ASCOM.Utilities A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Class that represents a whole device Profile and which contains a set of methods for for manipulating its contents This class is used by the Profile.GetProfile and Profile.SetProfile methods, do not confuse it with the Profile Class itself. Add a new subkey Name of the subkey Clears all contents Retrieve a registry value Name of the value "SubKey in which the value is located String value Removes a complete subkey Subkey to be removed Remove a value Name of the value to be removed "SubKey containing the value Set a value Name of the value to set Value to be set "Subkey continaining the value Changing a value with this method does NOT change the underlying profile store, only the value in this class. In order to persist the new value, the class should be written back to the profile store through Profile.SetProfile. Get the collection of values in this profile All values in the collection SortedList(Of SubKey as String, SortedList(Of ValueName as String, Value as String)) Retrieve a registry value from the driver top level subkey Name of the value String value Remove a value from the driver top level subkey Name of the value to be removed Set a value in the driver top level subkey Name of the value to set Value to be set List of available conversion units for use in the Util.ConvertUnits method The Chooser object provides a way for your application to let your user select the telescope to use. Calling Chooser.Choose() causes a chooser window to appear, with a drop down selector list containing all of the registered Telescope drivers, listed by the driver's friendly/display name. The user sees a list of telescope types and selects one. Before the OK button will light up, however, the user must click the Setup button, causing the selected driver's setup dialog to appear (it calls the driver's Telescope.SetupDialog() method). When the setup dialog is closed, the OK button will light and allow the user to close the Chooser itself. The Choose() method returns the DriverID of the selected driver. Choose() allows you to optionally pass the DriverID of a "current" driver (you probably save this in the registry), and the corresponding telescope type is pre-selected in the Chooser's list. In this case, the OK button starts out enabled (lit-up); the assumption is that the pre-selected driver has already been configured. Creates a new Chooser object Does the work of cleaning up objects used by Chooser True if called by the user, false if called by the system You can't call this directly, use Dispose with no arguments instead. Cleans up and disposes objects used by Chooser The type of device for which the Chooser will select a driver. (String, default = "Telescope") The type of device for which the Chooser will select a driver. (String, default = "Telescope") The device type that has been set Thrown on setting the device type to empty string This property changes the "personality" of the Chooser, allowing it to be used to select a driver for any arbitrary ASCOM device type. The default value for this is "Telescope", but it could be "Focuser", "Camera", etc. This property is independent of the Profile object's DeviceType property. Setting Chooser's DeviceType property doesn't set the DeviceType property in Profile, you must set that also when needed. Select ASCOM driver to use including pre-selecting one in the dropdown list Driver to preselect in the chooser dialogue Driver ID of chosen driver Thrown if the Chooser.DeviceType property has not been set before Choose is called. It must be set in order for Chooser to know which list of devices to display. The supplied driver will be pre-selected in the Chooser's list when the chooser window is first opened. Select ASCOM driver to use without pre-selecting in the dropdown list Driver ID of chosen driver No driver will be pre-selected in the Chooser's list when the chooser window is first opened. Thrown if the Chooser.DeviceType property has not been set before Choose is called. It must be set in order for Chooser to know which list of devices to display. This overload is not available through COM, please use "Choose(ByVal DriverProgID As String)" with an empty string parameter to achieve this effect. Class that returns a key and associated value This class is used by some Profile properties and methods and compensates for the inability of .NET to return Generic classes to COM clients. The properties and methods are: Profile.RegisteredDevices, Profile.SubKeys and Profile.Values. COM visible default constructor Constructor that can set the key and value simultaneously. The Key element of a key value pair The Value element of a key value pair The Key element of a key value pair Key Key as a string The Value element of a key value pair. Value Value as a string Enum containing all the possible registry access rights values. The buit-in RegistryRights enum only has a partial collection and often returns values such as -1 or large positive and negative integer values when converted to a string The Flags attribute ensures that the ToString operation returns an aggregate list of discrete values Common code for the new method If true, suppresses the exception normally thrown if a valid profile is not present Base exception for the Utilities components Create a new exception with message Message to be reported by the exception Create a new exception with message and inner exception Message to be reported by the exception Exception to be reported as the inner exception Serialise the exception Serialisation information Serialisation context Exception thrown when the profile is not found. This is internally trapped and should not appear externally to an application. Create a new exception with message Message to be reported by the exception Create a new exception with message Message to be reported by the exception Exception to be reported as the inner exception Serialise the exception Serialisation information Serialisation context Exception thrown when an invalid value is passed to a Utilities component Create a new exception with message Message to be reported by the exception Create a new exception with message Message to be reported by the exception Exception to be reported as the inner exception Serialise the exception Serialisation information Serialisation context Exception thrown when a serial port method is already in progress and a second attempt is made to use the serial port. This exception is only thrown after 5 attempts, each with a 1 second timeout, have been made to acquire the serial port. It may indicate that you have more than one thread attempting to access the serial port and that you have not synchronised these within your application. The serial port can only handle one transaction at a time e.g. Serial.Receive or Serial.Transmit etc. Create a new exception with message Message to be reported by the exception Create a new exception with message Message to be reported by the exception Exception to be reported as the inner exception Serialise the exception Serialisation information Serialisation context Exception thrown if there is any problem in reading or writing the profile from or to the file system This is an ifrastructural exception indicatig that there is a problem at the file access layer in the profile code. Possible underlying reasons are security access permissions, file system full and hardware failure. Create a new exception with message Message to be reported by the exception Create a new exception with message Message to be reported by the exception Exception to be reported as the inner exception Serialise the exception Serialisation information Serialisation context Exception thrown when a profile request is made for a driver that is not registered Drivers must be registered before other profile commands are used to manipulate their values. Create a new exception with message Message to be reported by the exception Create a new exception with message Message to be reported by the exception Exception to be reported as the inner exception Serialise the exception Serialisation information Serialisation context Exception thrown when an attempt is made to write to a protected part of the the Profile store that is reserved for Platform use. An example is attempting to write to the the default value of a device driver profile. This value is reserved for use by the Chooser to display the device description and is set by the Profile.Register method. Create a new exception with message Message to be reported by the exception Create a new exception with message Message to be reported by the exception Exception to be reported as the inner exception Serialise the exception Serialisation information Serialisation context Exception thrown when an attempt is made to read a value that has not yet been set. Create a new exception with message Message to be reported by the exception Create a new exception with message Message to be reported by the exception Exception to be reported as the inner exception Serialise the exception Serialisation information Serialisation context Interface for KeyValuePair class This is a return type only used by a small number of the Profile.XXXCOM commands. Including IProfile.RegisteredDevices, IProfile.SubKeys and IProfile.Values. Key member of a key value pair Key Ky as string Value memeber of a key value pair Value Value as string Interface to the TraceLogger component Writes the time and identifier to the log, leaving the line ready for further content through LogContinue and LogFinish Identifies the meaning of the the message e.g. name of modeule or method logging the message. Message to log Use this to start a log line where you want to write further information on the line at a later time. E.g. You might want to use this to record that an action has started and then append the word OK if all went well. You would then end up with just one line to record the whole transaction even though you didn't know that it would be successful when you started. If you just used LogMsg you would have ended up with two log lines, one showing the start of the transaction and the next the outcome. Will create a LOGISSUE message in the log if called before a line started by LogStart has been closed with LogFinish. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Appends further message to a line started by LogStart, appends a hex translation of the message to the line, does not terminate the line. The additional message to appear in the line True to append a hex translation of the message at the end of the message This can be called multiple times to build up a complex log line if required. Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Closes a line started by LogStart with option to append a translation of the supplied message into HEX The final message to appear in the line True to append a hex translation of the message at the end of the message Closes a line started by LogStart with the supplied message and a hex translation of the message Identifies the meaning of the the message e.g. name of modeule or method logging the message. The final message to terminate the line True to append a hex translation of the message at the end of the message Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Enables or disables logging to the file. True to enable logging Boolean, current logging status (enabled/disabled). If this property is false then calls to LogMsg, LogStart, LogContinue and LogFinish do nothing. If True, supplied messages are written to the log file. Logs an issue, closing any open line and opening a continuation line if necessary after the issue message. Identifies the meaning of the the message e.g. name of modeule or method logging the message. Message to log Use this for reporting issues that you don't want to appear on a line already opened with StartLine Sets the log filename and type if the constructor is called without parameters Fully qualified trace file name or null string to use automatic file naming (recommended) String identifying the type of log e,g, Focuser, LX200, GEMINI, MoonLite, G11 The LogFileType is used in the file name to allow you to quickly identify which of several logs contains the information of interest. Note This command is only required if the tracelogger constructor is called with no parameters. It is provided for use in COM clients that can not call constructors with parameters. If you are writing a COM client then create the trace logger as: TL = New TraceLogger() TL.SetLogFile("","TraceName") If you are writing a .NET client then you can achieve the same end in one call: TL = New TraceLogger("",TraceName") Insert a blank line into the log file Return the full filename of the log file being created Full filename of the log file String filename This call will return an empty string until the first line has been written to the log file as the file is not created until required. Displays a message respecting carriage return and linefeed characters Identifies the meaning of the the message e.g. name of modeule or method logging the message. The final message to terminate the line Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Set or return the path to a directory in which the log file will be created Path to the log directory String path Introduced with Platform 6.4.If set, this path will be used instead of the the user's Documents directory default path. This must be Set before the first message Is logged. Set or return the width of the identifier field in the log message Width of the identifier field Integer width Introduced with Platform 6.4.If set, this width will be used instead of the default identifier field width. Addiitonal methods that are only visible to .NET clients and not to COM clients Appends further message to a line started by LogStart, does not terminate the line. The additional message to appear in the line This can be called multiple times to build up a complex log line if required. Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. This overload is not available through COM, please use "LogContinue(ByVal Message As String, ByVal HexDump As Boolean)" with HexDump set False to achieve this effect. Closes a line started by LogStart with the supplied message The final message to terminate the line Can only be called once for each line started by LogStart. Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. This overload is not available through COM, please use "LogFinish(ByVal Message As String, ByVal HexDump As Boolean)" with HexDump set False to achieve this effect. Logs a complete message in one call Identifies the meaning of the the message e.g. name of modeule or method logging the message. Message to log Use this for straightforward logging requrements. Writes all information in one command. Will create a LOGISSUE message in the log if called before a line started by LogStart has been closed with LogFinish. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. This overload is not available through COM, please use "LogMessage(ByVal Identifier As String, ByVal Message As String, ByVal HexDump As Boolean)" with HexDump set False to achieve this effect. Interface to the .NET Chooser component The type of device for which the Chooser will select a driver. (String, default = "Telescope") The type of device for which the Chooser will select a driver. (String, default = "Telescope") The device type that has been set This property changes the "personality" of the Chooser, allowing it to be used to select a driver for any arbitrary ASCOM device type. The default value for this is "Telescope", but it could be "Focuser", "Camera", etc. This property is independent of the Profile object's DeviceType property. Setting Chooser's DeviceType property doesn't set the DeviceType property in Profile, you must set that also when needed. Select ASCOM driver to use including pre-selecting one in the dropdown list Driver to preselect in the chooser dialogue Driver ID of chosen driver The supplied driver will be pre-selected in the Chooser's list when the chooser window is first opened. Addiitonal methods that are only visible to .NET clients and not to COM clients Select ASCOM driver to use without pre-selecting in the dropdown list Driver ID of chosen driver No driver will be pre-selected in the Chooser's list when the chooser window is first opened. This overload is not available through COM, please use "Choose(ByVal DriverProgID As String)" with an empty string parameter to achieve this effect. Interface to the .NET Util component Pauses for a given interval in milliseconds. The number of milliseconds to wait Repeatedly puts the calling Win32 process to sleep, totally freezing it, for 10 milliseconds, then pumps events so the script or program calling it will receive its normal flow of events, until the pause interval elapses. If the pause interval is 20 milliseconds or less, the sleep interval is reduced to 0, causing the calling Win32 process to give up control to the kernel scheduler and then immediately become eligible for scheduling. Convert sexagesimal degrees to binary double-precision degrees The sexagesimal input string (degrees) The double-precision binary value (degrees) represented by the sexagesimal input The sexagesimal to real conversion methods such as this one are flexible enough to convert just about anything that resembles sexagesimal. Thee way they operate is to first separate the input string into numeric "tokens", strings consisting only of the numerals 0-9, plus and minus, and period. All other characters are considered delimiters. Once the input string is parsed into tokens they are converted to numerics. If there are more than three numeric tokens, only the first three are considered, the remainder are ignored. Left to right positionally, the tokens are assumed to represent units (degrees or hours), minutes, and seconds. If only two tokens are present, they are assumed to be units and minutes, and if only one token is present, it is assumed to be units. Any token can have a fractionsl part. Of course it would not be normal (for example) for both the minutes and seconds parts to have fractional parts, but it would be legal. So 00:30.5:30 would convert to 1.0 unit. Note that plain units, for example 23.128734523 are acceptable to the method. Convert sexagesimal hours to binary double-precision hours The sexagesimal input string (hours) The double-precision binary value (hours) represented by the sexagesimal input The sexagesimal to real conversion methods such as this one are flexible enough to convert just about anything that resembles sexagesimal. Thee way they operate is to first separate the input string into numeric "tokens", strings consisting only of the numerals 0-9, plus and minus, and period. All other characters are considered delimiters. Once the input string is parsed into tokens they are converted to numerics. If there are more than three numeric tokens, only the first three are considered, the remainder are ignored. Left to right positionally, the tokens are assumed to represent units (degrees or hours), minutes, and seconds. If only two tokens are present, they are assumed to be units and minutes, and if only one token is present, it is assumed to be units. Any token can have a fractionsl part. Of course it would not be normal (for example) for both the minutes and seconds parts to have fractional parts, but it would be legal. So 00:30.5:30 would convert to 1.0 unit. Note that plain units, for example 23.128734523 are acceptable to the method. Convert sexagesimal hours to binary double-precision hours The sexagesimal input string (hours) The double-precision binary value (hours) represented by the sexagesimal input The sexagesimal to real conversion methods such as this one are flexible enough to convert just about anything that resembles sexagesimal. Thee way they operate is to first separate the input string into numeric "tokens", strings consisting only of the numerals 0-9, plus and minus, and period. All other characters are considered delimiters. Once the input string is parsed into tokens they are converted to numerics. If there are more than three numeric tokens, only the first three are considered, the remainder are ignored. Left to right positionally, the tokens are assumed to represent units (degrees or hours), minutes, and seconds. If only two tokens are present, they are assumed to be units and minutes, and if only one token is present, it is assumed to be units. Any token can have a fractionsl part. Of course it would not be normal (for example) for both the minutes and seconds parts to have fractional parts, but it would be legal. So 00:30.5:30 would convert to 1.0 unit. Note that plain units, for example 23.128734523 are acceptable to the method. Convert degrees to sexagesimal degrees, minutes and seconds with specified second decimal places The degrees value to convert The delimiter string separating degrees and minutes The delimiter string to append to the minutes part The delimiter string to append to the seconds part The number of digits after the decimal point on the seconds part Sexagesimal representation of degrees input value, degrees, minutes, and seconds This overload is not available through COM, please use "DegreesToDMS(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal SecDelim As String)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds with specified number of second decimal places The hours value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds The delimiter string to append to the seconds part The number of digits after the decimal point on the seconds part Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert degrees to sexagesimal degrees and minutes with the specified number of minute decimal places The degrees value to convert The delimiter string separating degrees The delimiter string to append to the minutes The number of digits after the decimal point on the minutes part Sexagesimal representation of degrees input value, as degrees and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert hours to sexagesimal hours and minutes with supplied number of minute decimal places The hours value to convert The delimiter string separating hours The delimiter string to append to the minutes part The number of digits after the decimal point on the minutes part Sexagesimal representation of hours input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert degrees to sexagesimal hours, minutes, and seconds with the specified number of second decimal places The degrees value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds The delimiter string to append to the seconds part The number of digits after the decimal point on the seconds part Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert degrees to sexagesimal hours and minutes with supplied number of minute decimal places The degrees value to convert The delimiter string separating hours and minutes The delimiter string to append to the minutes part The number of minutes decimal places Sexagesimal representation of degrees input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters Current Platform version in m.n form Current Platform version in m.n form Change the serial trace file (default C:\SerialTrace.txt) Serial trace file name including fully qualified path e.g. C:\SerialTrace.txt Serial trace file name Change this before setting the SerialTrace property to True. Enable/disable serial I/O tracing Boolean - Enable/disable serial I/O tracing Enabled - disabled state of serial tracing If you want to change the serial trace file path, change the SerialTraceFile property before setting this to True. After setting this to True, serial trace info will be written to the last-set serial trace file. The name of the computer's time zone The name of the computer's time zone This will be in the local language of the operating system, and will reflect any daylight/summer time that may be in effect. UTC offset (hours) for the computer's clock UTC offset (hours) for the computer's clock The offset is in hours, such that UTC = local + offset. The offset includes any daylight/summer time that may be in effect. The current UTC Date The current UTC Date Current Julian date Current Julian date This is quantised to the second in the COM component but to a small decimal fraction in the .NET component Convert local-time Date to Julian date Date in local-time Julian date Julian dates are always in UTC Convert Julian date to local-time Date Julian date to convert Date in local-time for the given Julian date Julian dates are always in UTC Convert UTC Date to Julian date UTC date to convert Julian date Julian dates are always in UTC Convert Julian date to UTC Date Julian date Date in UTC for the given Julian date Julian dates are always in UTC Convert UTC Date to local-time Date Date in UTC Date in local-time Convert local-time Date to UTC Date Date in local-time Date in UTC Tests whether the current platform version is at least equal to the supplied major and minor version numbers, returns false if this is not the case The required major version number The required minor version number True if the current platform version equals or exceeds the major and minor values provided This function provides a simple way to test for a minimum platform level. If for example, your application requires at least platform version 5.5 then you can use code such as this to make a test and display information as appropriate. Const Int requiredMajorVersion = 5; Const Int requiredMinorVersion = 5; // Requires Platform version 5.5 Bool isOK = ASCOM.Utilities.IsMinimumRequiredVersion(requiredMajorVersion, requiredMinorVersion); If (isOK) // Do the install (or whatever) Else // Abort, throw exception, print an error. Converts a safearray of strings to a collection that can be used in scripting. This is required to do things such as handling the array of names returned by the FilterWheel.Names property. This string array won't work in scripting languages. array of strings Collection of strings Converts a safearray of integers to a collection that can be used in scripting languages. This is required to handle properties that are returned as safearrays of integers, for example FilterWheel.FocusOffsets SafeArrays don't work in scripting languages. array of integers Collection of Integers Convert an array of .NET built-in types to an equivalent Variant arrray (array of .NET Objects) The array to convert to variant types A Variant array If the supplied array contains elements of an unsuported Type. If the array rank is outside the range 1 to 5. If the supplied object is not an array. This function will primarily be of use to Scripting Language programmers who need to convert Camera and Video ImageArrays from their native types to Variant types. If this is not done, the scripting language will throw a type mismatch exception when it receives, for example, Int32 element types instead of the expected Variant types. A VBScript Camera usage example is: Image = UTIL.ArrayToVariantArray(CAMERA.ImageArray) This example assumes that the camera and utilities objects have already been created with CreateObject statements. The supported .NET types are: Int16 Int32 UInt16 UInt32 UInt64 Byte SByte Single Double Boolean DateTime String The function supports arrays with 1 to 5 dimensions (Rank = 1 to 5). If the supplied array already contains elements of Variant type, it is returned as-is without any processing. Platform major version number Platform major version number Integer version number Platform minor version number Platform minor version number Integer version number Platform service pack number Platform service pack number Integer service pack number Platform build number Platform build number Integer build number Convert from one set of units to another Value to convert Integer value from the Units enum indicating the value's current units Integer value from the Units enum indicating the units to which the input value should be converted Input value converted to the new specified units Calculate the dew point given the ambient temperature and humidity Humidity expressed in percent (0.0 .. 100.0) Ambient temperature in degrees C Dew point in degrees C Calculate the humidity given the ambient temperature and dew point Dewpoint in degrees C Ambient temperature in degrees C Humidity expressed in percent (0.0 .. 100.0) Convert atmospheric pressure from one altitude above mean sea level to another Measured pressure in hPa at the "From" altitude "Altitude at which the input pressure was measured Altitude to which the pressure is to be converted Pressure in hPa at the "To" altitude Addiitonal methods that are only visible to .NET clients and not to COM clients Convert degrees to sexagesimal degrees, minutes and seconds with default delimiters DD° MM' SS" The degrees value to convert Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "Choose(ByVal DriverProgID As String)" with an empty string parameter to achieve this effect. Convert degrees to sexagesimal degrees, minutes and seconds with with default minute and second delimiters MM' SS" The degrees value to convert The delimiter string separating degrees and minutes Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDMS(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal SecDelim As String)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees, minutes and seconds with default second delimiter SS" The degrees value to convert The delimiter string separating degrees and minutes The delimiter string to append to the minutes part Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDMS(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal SecDelim As String)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees, minutes and seconds The degrees value to convert The delimiter string separating degrees and minutes The delimiter string to append to the minutes part The delimiter string to append to the seconds part Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDMS(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal SecDelim As String)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds with default delimiters HH:MM:SS The hours value to convert Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHMS(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds with default minutes and seconds delimters MM:SS The hours value to convert The delimiter string separating hours and minutes Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHMS(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds with default second delimiter of null string The hours value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHMS(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds The hours value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds The delimiter string to append to the seconds part Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHMS(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees and minutes with default delimiters DD° MM' The degrees value to convert Sexagesimal representation of degrees input value, as degrees and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDM(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees and minutes with the default minutes delimeter MM' The degrees value to convert The delimiter string separating degrees Sexagesimal representation of degrees input value, as degrees and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDM(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees and minutes The degrees value to convert The delimiter string separating degrees The delimiter string to append to the minutes Sexagesimal representation of degrees input value, as degrees and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDM(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours and minutes with default delimiters HH:MM The hours value to convert Sexagesimal representation of hours input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHM(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with an suitable parameters to achieve this effect. Convert hours to sexagesimal hours and minutes with default minutes delimiter MM (null string) The hours value to convert The delimiter string separating hours and minutes Sexagesimal representation of hours input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHM(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with an suitable parameters to achieve this effect. Convert hours to sexagesimal hours and minutes The hours value to convert The delimiter string separating hours and minutes The delimiter string to append to the minutes part Sexagesimal representation of hours input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHM(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with an suitable parameters to achieve this effect. Convert degrees to sexagesimal hours, minutes, and seconds with default delimters of HH:MM:SS The degrees value to convert Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. This overload is not available through COM, please use "DegreesToHMS(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours, minutes, and seconds with the default second and minute delimiters of MM:SS The degrees value to convert The delimiter string separating hours and minutes Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToHMS(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours, minutes, and seconds with the default second delimiter SS (null string) The degrees value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToHMS(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours, minutes, and seconds The degrees value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds The delimiter string to append to the seconds part Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToHMS(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours and minutes with default delimiters HH:MM The degrees value to convert Sexagesimal representation of degrees input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters This overload is not available through COM, please use "DegreesToHM(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours and minutes with default minute delimiter MM (null string) The degrees value to convert The delimiter string separating hours and minutes Sexagesimal representation of degrees input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters This overload is not available through COM, please use "DegreesToHM(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours and minutes The degrees value to convert The delimiter string separating hours and minutes The delimiter string to append to the minutes part Sexagesimal representation of degrees input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters This overload is not available through COM, please use "DegreesToHM(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Interface to the .NET Timer component The interval between Tick events when the timer is Enabled in milliseconds, (default = 1000) The interval between Tick events when the timer is Enabled (milliseconds, default = 1000) The interval between Tick events when the timer is Enabled in milliseconds Enable the timer tick events True means the timer is active and will deliver Tick events every Interval milliseconds. Enabled state of timer tick events Timer event interface Fired once per Interval when timer is Enabled. To sink this event in Visual Basic, declare the object variable using the WithEvents keyword. Interface to the .NET Profile component The type of ASCOM device for which profile data and registration services are provided (String, default = "Telescope") String describing the type of device being accessed String describing the type of device being accessed List the device types registered in the Profile store List of registered device types An ArrayList of device types Use this to find which types of device are registered in the Profile store. List the devices of a given device type that are registered in the Profile store Type of devices to list An ArrayList of KeyValuePair objects of installed devices and associated device descriptions Throw if the supplied DeviceType is empty string or null value. Use this to find all the registerd devices of a given type that are in the Profile store. If a DeviceType is supplied, where no device of that type has been registered before on this system, an empty list will be returned Platform 6 Profile.RegisteredDevices was introduced in Platform 5.5 as a read only property that took DeviceType as a parameter, which is legal syntax in Visual Basic .NET but is not interpreted correctly in C#. Consequently, a breaking change has been introduced in Platform 6 that changes the property into a parameterised method which works correctly in all .NET languages. This change does not require you to alter your source code but you may need to recompile your application under Platform 6 to ensure that there are no runtime errors. Confirms whether a specific driver is registered ort unregistered in the profile store String reprsenting the device's ProgID Boolean indicating registered or unregisteredstate of the supplied DriverID Registers a supplied DriverID and associates a descriptive name with the device ProgID of the device to register Descriptive name of the device Does nothing if already registered, so safe to call on driver load. Remove all data for the given DriverID from the registry. ProgID of the device to unregister This deletes the entire device profile tree, including the DriverID root key. Retrieve a string value from the profile using the supplied subkey for the given Driver ID and variable name. Set and return the default value if the requested variable name has not yet been set. ProgID of the device to read from Name of the variable whose value is retrieved Subkey from the profile root from which to read the value Default value to be used if there is no value currently set Retrieved variable value Name may be an empty string for the unnamed value. The unnamed value is also known as the "default" value for a registry key. Does not provide access to other registry data types such as binary and doubleword. If a default value is supplied and the value is not already present in the profile store, the default value will be set in the profile store and then returned as the value of the DriverID/SubKey/Name. If the default value is set to null (C#) or Nothing (VB) then no value will be set in the profile and an empty string will be returned as the value of the DriverID/SubKey/Name. Writes a string value to the profile using the supplied subkey for the given Driver ID and variable name. ProgID of the device to read from Name of the variable whose value is retrieved The string value to be written Subkey from the profile root in which to write the value Return a list of the (unnamed and named variables) under the given DriverID and subkey. ProgID of the device to read from Subkey from the profile root from which to return values An ArrayList of KeyValuePair objects. The returned object contains entries for each value. For each entry, the Key property is the value's name, and the Value property is the string value itself. Note that the unnamed (default) value will be included if it has a value, even if the value is a blank string. The unnamed value will have its entry's Key property set to an empty string. The KeyValuePair objects are instances of the KeyValuePair class Delete the value from the registry. Name may be an empty string for the unnamed value. Value will be deleted from the subkey supplied. ProgID of the device to read from Name of the variable whose value is retrieved Subkey from the profile root in which to write the value Specify "" to delete the unnamed value which is also known as the "default" value for a registry key. Create a registry key for the given DriverID. ProgID of the device to read from Subkey from the profile root in which to write the value If the SubKey argument contains a \ separated path, the intermediate keys will be created if needed. Return a list of the sub-keys under the given DriverID (for COM clients) ProgID of the device to read from Subkey from the profile root in which to search for subkeys An ArrayList of key-value pairs The returned object (scripting.dictionary) contains entries for each sub-key. For each KeyValuePair in the list, the Key property is the sub-key name, and the Value property is the value. The unnamed ("default") value for that key is also returned. The KeyValuePair objects are instances of the KeyValuePair class Delete a registry key for the given DriverID. SubKey may contain \ separated path to key to be deleted. ProgID of the device to read from Subkey from the profile root in which to write the value The sub-key and all data and keys beneath it are deleted. Read an entire device profile The ProgID of the device Device profile encoded in XML This method will be implemented in a future update This is not implemented and returns a MethodNotImplemented exception, it will be implemented in a future update. An XML schema will also be made available to support this method. Set an entire device profile The ProgID of the device An XML encoding of the profile This method will be implemented in a future update This is not implemented and returns a MethodNotImplemented exception, it will be implemented in a future update. An XML schema will also be made available to support this method. Addiitonal methods that are only visible to .NET clients and not to COM clients Migrate the ASCOM profile from registry to file store The platform version number of the current profile store beig migrated Delete the value from the registry. Name may be an empty string for the unnamed value. ProgID of the device to read from Name of the variable whose value is retrieved Specify "" to delete the unnamed value which is also known as the "default" value for a registry key. This overload is not available through COM, please use "DeleteValue(ByVal DriverID As String, ByVal Name As String, ByVal SubKey As String)" with SubKey set to empty string achieve this effect. Retrieve a string value from the profile for the given Driver ID and variable name ProgID of the device to read from Name of the variable whose value is retrieved Retrieved variable value Name may be an empty string for the unnamed value. The unnamed value is also known as the "default" value for a registry key. Does not provide access to other registry data types such as binary and doubleword. This overload is not available through COM, please use "GetValue(ByVal DriverID As String, ByVal Name As String, ByVal SubKey As String)" with SubKey set to empty string achieve this effect. Retrieve a string value from the profile using the supplied subkey for the given Driver ID and variable name. ProgID of the device to read from Name of the variable whose value is retrieved Subkey from the profile root from which to read the value Retrieved variable value Name may be an empty string for the unnamed value. The unnamed value is also known as the "default" value for a registry key. Does not provide access to other registry data types such as binary and doubleword. Return a list of the sub-keys under the root of the given DriverID ProgID of the device to read from An ArrayList of key-value pairs The returned object (scripting.dictionary) contains entries for each sub-key. For each KeyValuePair in the list, the Key property is the sub-key name, and the Value property is the value. The unnamed ("default") value for that key is also returned. The KeyValuePair objects are instances of the KeyValuePair class Return a list of the (unnamed and named variables) under the given DriverID. ProgID of the device to read from An ArrayList of KeyValuePair objects. The returned object contains entries for each value. For each entry, the Key property is the value's name, and the Value property is the string value itself. Note that the unnamed (default) value will be included if it has a value, even if the value is a blank string. The unnamed value will have its entry's Key property set to an empty string. The KeyValuePair objects are instances of the KeyValuePair class Writes a string value to the profile using the given Driver ID and variable name. ProgID of the device to read from Name of the variable whose value is retrieved The string value to be written This overload is not available through COM, please use "WriteValue(ByVal DriverID As String, ByVal Name As String, ByVal Value As String, ByVal SubKey As String)" with SubKey set to empty string achieve this effect. Read an entire device profile and return it as an XML encoded string The ProgID of the device Device profile represented as a recusrive class Returns a whole driver profile encoded as an XML string Set an entire device profile from an XML encoded string The ProgID of the device A class representing the profile Set a whole device Profile in one call using a recusrive ProfileKey class Interface to the .NET Serial component Returns a list of all available ASCOM serial ports with COMnnn ports sorted into ascending port number order String array of available serial ports A string array of available serial ports Update in platform 6.0.0.0 This call uses the .NET Framework to retrieve available COM ports and this has been found not to return names of some USB serial adapters. Additional code has been added to attempt to open all COM ports up to COM32. Any ports that can be successfully opened are now returned alongside the ports returned by the .NET call. If this new approach still does not detect a COM port it can be forced to appear in the list by adding its name as a string entry in the ForceCOMPorts key of the ASCOM Profile. In the event that this scanning causes issues, a COM port can be omitted from the scan by adding its name as a string entry in the IgnoreCOMPorts key of the ASCOM Profile. Gets or sets the number of data bits in each byte The number of data bits in each byte, default is 8 data bits Integer number of data bits in each byte The data bits value is less than 5 or more than 8 Gets or sets the state of the DTR line The state of the DTR line, default is enabled Boolean true/false indicating enabled/disabled Gets or sets the type of parity check used over the serial link The type of parity check used over the serial link, default none One of the Ports.Parity enumeration values Gets or sets the number of stop bits used on the serial link the number of stop bits used on the serial link, default 1 One of the Ports.StopBits enumeration values Gets or sets the type of serial handshake used on the serial line The type of handshake used on the serial line, default is none One of the Ports.Handshake enumeration values Use of the RTS line can additionally be controlled by the property. Gets or sets the connected state of the ASCOM serial port. Connected state of the serial port. True if the serial port is connected. Set this property to True to connect to the serial (COM) port. You can read the property to determine if the object is connected. Gets or sets the number of the ASCOM serial port (Default is 1, giving COM1 as the serial port name). COM port number of the ASCOM serial port. Integer, number of the ASCOM serial port This works for serial port names of the form COMnnn. Use PortName if your COM port name does not fit the form COMnnn. The maximum time that the ASCOM serial port will wait for incoming receive data (seconds, default = 5) Integer, serial port timeout in seconds Integer, serial port timeout in seconds. The minimum delay timout that can be set through this command is 1 seconds. Use ReceiveTimeoutMs to set a timeout less than 1 second. The maximum time that the ASCOM serial port will wait for incoming receive data (milliseconds, default = 5000) Integer, serial port timeout in milli-seconds Integer, serial port timeout in milli-seconds If a timeout occurs, an IO timeout error is raised. See ReceiveTimeout for an alternate form using the timeout in seconds. Sets the ASCOM serial port name as a string Serial port name to be used Current serial port name This property allows any serial port name to be used, even if it doesn't conform to a format of COMnnn If the required port name is of the form COMnnn then Serial.Port=nnn and Serial.PortName="COMnnn" are equivalent. Gets and sets the baud rate of the ASCOM serial port Port speed using the PorSpeed enum Port speed using the PortSpeed enum This is modelled on the COM component with possible values enumerated in the PortSpeed enum. Clears the ASCOM serial port receive and transmit buffers Transmits a string through the ASCOM serial port String to transmit Transmit an array of binary bytes through the ASCOM serial port Byte array to transmit Adds a message to the ASCOM serial trace file String identifying the module logging the message Message text to be logged. This can be called regardless of whether logging is enabled Receive at least one text character from the ASCOM serial port The characters received This method reads all of the characters currently in the serial receive buffer. It will not return unless it reads at least one character. A timeout will cause a TimeoutException to be raised. Use this for text data, as it returns a String. Receive one binary byte from the ASCOM serial port The received byte Use this for 8-bit (binary data). If a timeout occurs, a TimeoutException is raised. Receive exactly the given number of characters from the ASCOM serial port and return as a string The number of characters to return String of length "Count" characters If a timeout occurs a TimeoutException is raised. Receive exactly the given number of characters from the ASCOM serial port and return as a byte array The number of characters to return Byte array of size "Count" elements If a timeout occurs, a TimeoutException is raised. This function exists in the COM component but is not documented in the help file. Receive characters from the ASCOM serial port until the given terminator string is seen The character string that indicates end of message Received characters including the terminator string If a timeout occurs, a TimeoutException is raised. Receive characters from the ASCOM serial port until the given terminator bytes are seen, return as a byte array Array of bytes that indicates end of message Byte array of received characters If a timeout occurs, a TimeoutException is raised. This function exists in the COM component but is not documented in the help file. Gets or sets use of the RTS handshake control line The state of RTS line use, default is disabled (false) Boolean true/false indicating RTS line use enabled/disabled By default the serial component will not drive the RTS line. If RTSEnable is true, the RTS line will be raised before characters are sent. Please also see the associated property. Update a COM registration assembly executable reference (mscoree.dll) from a relative path to an absolute path This is necessary to ensure that the mscoree.dll can be found when the SetSearchDirectories function has been called in an application e.g. by Inno installer post v5.5.9. The COM class name and ClassID are determined from the supplied type definition. If the ClassID cannot be determined it is looked up through the COM registration registry entry through the class's ProgID Add an event record to the ASCOM Windows event log Name of routine creating the event Event message Event severity Id number Initiating exception or Nothing Returns true when the application is 32bit and running on a 64bit OS True when the application is 32bit and running on a 64bit OS Determines whether the specified process is running under WOW64 i.e. is a 32bit application running on a 64bit OS. A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.Windows Server 2003 and Windows XP: The handle must have the PROCESS_QUERY_INFORMATION access right. A pointer to a value that is set to TRUE if the process is running under WOW64. If the process is running under 32-bit Windows, the value is set to FALSE. If the process is a 64-bit application running under 64-bit Windows, the value is also set to FALSE. If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero. To get extended error information, call GetLastError. Return a message when a driver is not compatible with the requested 32/64bit application type. Returns an empty string if the driver is compatible ProgID of the driver to be assessed Application bitness for which application compatibility should be tested String compatibility message or empty string if driver is fully compatible ASCOM Scope Driver Helper Registry Profile Object This object provides facilities for registering ASCOM drivers with the Chooser, and for storing persistence information in a shared area of the file system. Please code to the IProfile interface Create a new Profile object Create a new profile object ignoring profile not found exceptions if generated Ignore ProfileNotFound exceptions Disposes of resources used by the profile object - called by IDisposable interface Disposes of resources used by the profile object The type of ASCOM device for which profile data and registration services are provided (String, default = "Telescope") String describing the type of device being accessed String describing the type of device being accessed Thrown on setting the device type to empty string List the device types registered in the Profile store List of registered device types A sorted arraylist of device type strings Use this to find the types of device that are registered in the Profile store. Device types are returned without the suffix " Devices" that is used in key names within the profile store; this allows direct use of returned device types inside For Each loops as shown in the Profile code example. List the devices of a given device type that are registered in the Profile store Type of devices to list An ArrayList of installed devices and associated device descriptions Throw if the supplied DeviceType is empty string or null value. Use this to find all the registerd devices of a given type that are in the Profile store If a DeviceType is supplied, where no device of that type has been registered before on this system, an empty list will be returned Confirms whether a specific driver is registered ort unregistered in the profile store String reprsenting the device's ProgID Boolean indicating registered or unregisteredstate of the supplied DriverID Registers a supplied DriverID and associates a descriptive name with the device ProgID of the device to register Descriptive name of the device Does nothing if already registered, so safe to call on driver load. Remove all data for the given DriverID from the registry. ProgID of the device to unregister Thrown if DriverID is an empty string. Thrown if the driver is not registered, This deletes the entire device profile tree, including the DriverID root key. Unregister must only be called if the driver has already been registered. If you are not sure use the IsRegistered function to check the status and only unregister if the driver is registered. Retrieve a string value from the profile using the supplied subkey for the given Driver ID and variable name. Set and return the default value if the requested variable name has not yet been set. ProgID of the device to read from Name of the variable whose value is retrieved Subkey from the profile root from which to read the value Default value to be used if there is no value currently set Retrieved variable value Thrown if DriverID is an empty string. Thrown if the driver is not registered, Name may be an empty string for the unnamed value. The unnamed value is also known as the "default" value for a registry key. Does not provide access to other registry data types such as binary and doubleword. If a default value is supplied and the value is not already present in the profile store, the default value will be set in the profile store and then returned as the value of the DriverID/SubKey/Name. If the default value is set to null (C#) or Nothing (VB) then no value will be set in the profile and an empty string will be returned as the value of the DriverID/SubKey/Name. Writes a string value to the profile using the supplied subkey for the given Driver ID and variable name. ProgID of the device to read from Name of the variable whose value is retrieved The string value to be written Subkey from the profile root in which to write the value Thrown if DriverID is an empty string. Thrown if the driver is not registered, Thrown if Name and SubKey are both empty strings. This value is reserved for the device description as it appears in Chooser and is set by Profile.Register Return a list of the (unnamed and named variables) under the given DriverID and subkey. ProgID of the device to read from Subkey from the profile root in which to write the value An ArrayList of KeyValuePairs The returned object contains entries for each value. For each entry, the Key property is the value's name, and the Value property is the string value itself. Note that the unnamed (default) value will be included if it has a value, even if the value is a blank string. The unnamed value will have its entry's Key property set to an empty string. The KeyValuePair objects are instances of the KeyValuePair class Delete the value from the registry. Name may be an empty string for the unnamed value. Value will be deleted from the subkey supplied. ProgID of the device to read from Name of the variable whose value is retrieved Subkey from the profile root in which to write the value Thrown if DriverID is an empty string. Thrown if the driver is not registered, Specify "" to delete the unnamed value which is also known as the "default" value for a registry key. Create a registry key for the given DriverID. ProgID of the device to read from Subkey from the profile root in which to write the value Thrown if DriverID is an empty string. Thrown if the driver is not registered, If the SubKey argument contains a \ separated path, the intermediate keys will be created if needed. Return a list of the sub-keys under the given DriverID ProgID of the device to read from Subkey from the profile root in which to write the value An ArrayList of key-value pairs The returned object contains entries for each sub-key. For each KeyValuePair in the list, the Key property is the sub-key name, and the Value property is the value. The unnamed ("default") value for that key is also returned. The KeyValuePair objects are instances of the KeyValuePair class Delete a registry key for the given DriverID. SubKey may contain \ separated path to key to be deleted. ProgID of the device to read from Subkey from the profile root in which to write the value Thrown if DriverID is an empty string. Thrown if the driver is not registered, The sub-key and all data and keys beneath it are deleted. Read an entire device profile and return it as an XML encoded string The ProgID of the device Device profile encoded in XML Please see the code examples in this help file for a description of how to use this method. The format of the returned XML is shown below. The SubKey element repeats for as many subkeys as are present while the Value element with its Name and Data memebers repeats as often as there are values in a particular subkey.
 <?xml version="1.0" encoding="utf-8" ?> 
 <ASCOMProfileAL>
 <SubKey>
 <SubKeyName /> 
 <DefaultValue>Default text value</DefaultValue> 
    <Values>
      <Value>
        <Name>Valuename 1</Name> 
        <Data>False</Data> 
      </Value>
      <Value>
        <Name>Valuename 2</Name> 
        <Data>True</Data> 
      </Value>
    </Values>
  </SubKey>
  <SubKey>
    <SubKeyName>Settings</SubKeyName> 
    <DefaultValue /> 
    <Values>
      <Value>
        <Name>Valuename 3</Name> 
        <Data>1</Data> 
      </Value>
      <Value>
        <Name>Valuename 4</Name> 
        <Data>53.4217</Data> 
      </Value>
    </Values>
  </SubKey>
 </ASCOMProfileAL>
 
Set an entire device profile from an XML encoded string The ProgID of the device An XML encoding of the profile Please see the code examples in this help file for a description of how to use this method. See GetProfileXML for a description of the XML format. Read an entire device profile and return it as an ASCOMProfile class instance The ProgID of the device Device profile represented as a recusrive class Please see the code examples in this help file for a description of how to use this method. Set an entire device profile from an ASCOMProfile class instance The ProgID of the device A class representing the profile Please see the code examples in this help file for a description of how to use this method. Migrate the ASCOM profile from registry to file store The platform version number of the current profile store beig migrated Delete the value from the registry. Name may be an empty string for the unnamed value. ProgID of the device to read from Name of the variable whose value is retrieved Thrown if DriverID is an empty string. Thrown if the driver is not registered, Specify "" to delete the unnamed value which is also known as the "default" value for a registry key. This overload is not available through COM, please use "DeleteValue(ByVal DriverID As String, ByVal Name As String, ByVal SubKey As String)" with SubKey set to empty string achieve this effect. Retrieve a string value from the profile for the given Driver ID and variable name ProgID of the device to read from Name of the variable whose value is retrieved Retrieved variable value Thrown if DriverID is an empty string. Thrown if the driver is not registered, Name may be an empty string for the unnamed value. The unnamed value is also known as the "default" value for a registry key. Does not provide access to other registry data types such as binary and doubleword. This overload is not available through COM, please use "GetValue(ByVal DriverID As String, ByVal Name As String, ByVal SubKey As String)" with SubKey set to empty string achieve this effect. Retrieve a string value from the profile using the supplied subkey for the given Driver ID and variable name. ProgID of the device to read from Name of the variable whose value is retrieved Subkey from the profile root from which to read the value Retrieved variable value Thrown if DriverID is an empty string. Thrown if the driver is not registered, Name may be an empty string for the unnamed value. The unnamed value is also known as the "default" value for a registry key. Does not provide access to other registry data types such as binary and doubleword. Return a list of the sub-keys under the root of the given DriverID ProgID of the device to read from An ArrayList of key-value pairs The returned object contains entries for each sub-key. For each KeyValuePair in the list, the Key property is the sub-key name, and the Value property is the value. The unnamed ("default") value for that key is also returned. The KeyValuePair objects are instances of the KeyValuePair class Return a list of the (unnamed and named variables) under the root of the given DriverID. ProgID of the device to read from An ArrayList of KeyValuePairs The returned object contains entries for each value. For each entry, the Key property is the value's name, and the Value property is the string value itself. Note that the unnamed (default) value will be included if it has a value, even if the value is a blank string. The unnamed value will have its entry's Key property set to an empty string. The KeyValuePair objects are instances of the KeyValuePair class Writes a string value to the profile using the given Driver ID and variable name. ProgID of the device to read from Name of the variable whose value is retrieved The string value to be written Thrown if DriverID is an empty string. Thrown if the driver is not registered, This overload is not available through COM, please use "WriteValue(ByVal DriverID As String, ByVal Name As String, ByVal Value As String, ByVal SubKey As String)" with SubKey set to empty string achieve this effect. Enumeration of serial port speeds for use with the Serial port This contains an additional speed 230,400 baud that the COM component doesn't support. Number of stop bits appended to a serial character This enumeration specifies the number of stop bits to use. Stop bits separate each unit of data on an asynchronous serial connection. The None option is not supported. Setting the StopBits property to None raises an ArgumentOutOfRangeException. No stop bits are used. This value is not supported. Setting the StopBits property to None raises an ArgumentOutOfRangeException. One stop bit is used. 1.5 stop bits are used. Two stop bits are used. The type of parity used on the serial port Parity is an error-checking procedure in which the number of 1s must always be the same — either even or odd — for each group of bits that is transmitted without error. Parity is one of the parameters that must be agreed upon by both sending and receiving parties before transmission can take place. Sets the parity bit so that the count of bits set is an even number. Leaves the parity bit set to 1. No parity check occurs. Sets the parity bit so that the count of bits set is an odd number. Leaves the parity bit set to 0. The control protocol used by the serial port No control is used for the handshake. Request-to-Send (RTS) hardware flow control is used. RTS signals that data is available for transmission. If the input buffer becomes full, the RTS line will be set to false. The RTS line will be set to true when more room becomes available in the input buffer. Both the Request-to-Send (RTS) hardware control and the XON/XOFF software controls are used. The XON/XOFF software control protocol is used. The XOFF control is sent to stop the transmission of data. The XON control is sent to resume the transmission. These software controls are used instead of Request to Send (RTS) and Clear to Send (CTS) hardware controls. Creates a .NET serial port and provides a simple set of commands to use it. This object provides an easy to use interface to a serial (COM) port. It provides ASCII and binary I/O with controllable timeout. The interface is callable from any .NET client. The platform allows you to control use of the DTR and RTS/CTS lines for a particular COM port and to remove or force listing of individual COM ports in the AvailableComPorts list through configuration in the ASCOM Profile. Please see the Tools and Features section of this help file for further details. Example of how to create and use an ASCOM serial port. Disposes of resources used by the profile object Disposes of resources used by the profile object - called by IDisposable interface Gets or sets the number of data bits in each byte The number of data bits in each byte, default is 8 data bits Integer number of data bits in each byte The data bits value is less than 5 or more than 8 Gets or sets the state of the DTR line The state of the DTR line, default is enabled Boolean true/false indicating enabled/disabled Gets or sets use of the RTS handshake control line The state of RTS line use, default is disabled (false) Boolean true/false indicating RTS line use enabled/disabled By default the serial component will not drive the RTS line. If RTSEnable is true, the RTS line will be raised before characters are sent. Please also see the associated property. Gets or sets the type of serial handshake used on the serial link The type of flow control handshake used on the serial line, default is none One of the SerialHandshake enumeration values Use of the RTS line can additionally be controlled by the property. Gets or sets the type of parity check used over the serial link The type of parity check used over the serial link, default none One of the SerialParity enumeration values Gets or sets the number of stop bits used on the serial link the number of stop bits used on the serial link, default 1 One of the SerialStopBits enumeration values Gets or sets the connected state of the ASCOM serial port. Connected state of the serial port. True if the serial port is connected. Set this property to True to connect to the serial (COM) port. You can read the property to determine if the object is connected. Throws this exception if the requested COM port does not exist. Gets or sets the number of the ASCOM serial port (Default is 1, giving COM1 as the serial port name). COM port number of the ASCOM serial port. Integer, number of the ASCOM serial port This works for serial port names of the form COMnnn. Use PortName if your COM port name does not fit the form COMnnn. The maximum time that the ASCOM serial port will wait for incoming receive data (seconds, default = 5) Integer, serial port timeout in seconds Integer, serial port timeout in seconds. The minimum delay timout that can be set through this command is 1 seconds. Use ReceiveTimeoutMs to set a timeout less than 1 second. Thrown when value is invalid (outside the range 1 to 120 seconds.) The maximum time that the ASCOM serial port will wait for incoming receive data (milliseconds, default = 5000) Integer, serial port timeout in milli-seconds Integer, serial port timeout in milli-seconds If a timeout occurs, an IO timeout error is raised. See ReceiveTimeout for an alternate form using the timeout in seconds. Thrown when value is invalid. Gets and sets the baud rate of the ASCOM serial port Port speed using the PortSpeed enum Port speed as a SerialSpeed enum value This is modelled on the COM component with possible values enumerated in the PortSpeed enum. Clears the ASCOM serial port receive and transmit buffers Thrown when unable to acquire the serial port Receive at least one text character from the ASCOM serial port The characters received Thrown when a receive timeout occurs. Thrown when unable to acquire the serial port Thrown when this command is used before setting Connect = True This method reads all of the characters currently in the serial receive buffer. It will not return unless it reads at least one character. A timeout will cause a TimeoutException to be raised. Use this for text data, as it returns a String. Receive one binary byte from the ASCOM serial port The received byte Thrown when a receive timeout occurs. Thrown when unable to acquire the serial port Thrown when this command is used before setting Connect = True Use this for 8-bit (binary data). If a timeout occurs, a TimeoutException is raised. Receive exactly the given number of characters from the ASCOM serial port and return as a string The number of characters to return String of length "Count" characters Thrown when a receive timeout occurs. Thrown when unable to acquire the serial port Thrown when this command is used before setting Connect = True If a timeout occurs a TimeoutException is raised. Receive exactly the given number of characters from the ASCOM serial port and return as a byte array The number of characters to return Byte array of size "Count" elements Thrown when a receive timeout occurs. Thrown when unable to acquire the serial port Thrown when this command is used before setting Connect = True If a timeout occurs, a TimeoutException is raised. This function exists in the COM component but is not documented in the help file. Receive characters from the ASCOM serial port until the given terminator string is seen The character string that indicates end of message Received characters including the terminator string Thrown when a receive timeout occurs. Thrown when unable to acquire the serial port Thrown when this command is used before setting Connect = True If a timeout occurs, a TimeoutException is raised. Receive characters from the ASCOM serial port until the given terminator bytes are seen, return as a byte array Array of bytes that indicates end of message Byte array of received characters Thrown when unable to acquire the serial port Thrown when this command is used before setting Connect = True If a timeout occurs, a TimeoutException is raised. This function exists in the COM component but is not documented in the help file. Transmits a string through the ASCOM serial port String to transmit Thrown when unable to acquire the serial port Thrown when this command is used before setting Connect = True Transmit an array of binary bytes through the ASCOM serial port Byte array to transmit Thrown when unable to acquire the serial port Thrown when this command is used before setting Connect = True Sets the ASCOM serial port name as a string Serial port name to be used Current serial port name This property allows any serial port name to be used, even if it doesn't conform to a format of COMnnn If the required port name is of the form COMnnn then Serial.Port=nnn and Serial.PortName="COMnnn" are equivalent. Returns a list of all available ASCOM serial ports with COMnnn ports sorted into ascending port number order String array of available serial ports A string array of available serial ports Update in platform 6.0.0.0 This call uses the .NET Framework to retrieve available COM ports and this has been found not to return names of some USB serial adapters. Additional code has been added to attempt to open all COM ports up to COM32. Any ports that can be successfully opened are now returned alongside the ports returned by the .NET call. If this new approach still does not detect a COM port it can be forced to appear in the list by adding its name as a string entry in the ForceCOMPorts key of the ASCOM Profile. In the event that this scanning causes issues, a COM port can be omitted from the scan by adding its name as a string entry in the IgnoreCOMPorts key of the ASCOM Profile. Adds a message to the ASCOM serial trace file String identifying the module logging the message Message text to be logged. This can be called regardless of whether logging is enabled Translates a supplied string into hex characters The string to convert A string with each character represented as [xx] OS level blocking wait for an event The triggering even't handle Length of time to wait before timing out Status, 0 = success Sleep the calling thread until the worker thread has completed ThreadData class holding required inputs, outputs and thread management information Worker thread data Initialises a new ThreadData synchronisation object Signals that this thread has completed its work Provides a repeating timer with associated tick event. The interval resolution is about 20ms.If you need beter than this, you could use the WaitForMilliseconds method to create your own solution. You can create multiple instances of this object. When enabled, the Timer delivers Tick events periodically (determined by setting the Interval property). This component is now considered obsolete for use in .NET clients and drivers. It is reliable under almost all circumstances but there are some environments, noteably console and some scripted applications, where it fails to fire. The Platform 6 component improves performance over the Platform 5 component in this respect and can be further tuned for particular applications by placing an entry in the ForceSystemTimer Profile key. For .NET applications, use of System.Timers.Timer is recommended but atention must be paid to getting threading correct when using this control. The Windows.Forms.Timer control is not an improvement over the ASCOM timer which is based upon it. Developers using non .NET languages are advised to use timers provided as part of their development environment, only falling back to the ASCOM Timer if no viable alternative can be found. Timer tick event handler Fired once per Interval when timer is Enabled. To sink this event in Visual Basic, declare the object variable using the WithEvents keyword. Create a new timer component Disposes of resources used by the profile object - called by IDisposable interface Disposes of resources used by the profile object The interval between Tick events when the timer is Enabled in milliseconds, (default = 1000) The interval between Tick events when the timer is Enabled (milliseconds, default = 1000) The interval between Tick events when the timer is Enabled in milliseconds Enable the timer tick events True means the timer is active and will deliver Tick events every Interval milliseconds. Enabled state of timer tick events Timer event handler Raises the Tick event Creates a log file for a driver or application. Uses a similar file name and internal format to the serial logger. Multiple logs can be created simultaneously if needed. In automatic mode the file will be stored in an ASCOM folder within XP's My Documents folder or equivalent places in other operating systems. Within the ASCOM folder will be a folder named Logs yyyy-mm-dd where yyyy, mm and dd are today's year, month and day numbers. The trace file will appear within the day folder with the name ASCOM.Identifier.hhmm.ssffff where hh, mm, ss and ffff are the current hour, minute, second and fraction of second numbers at the time of file creation. Within the file the format of each line is hh:mm:ss.fff Identifier Message where hh, mm, ss and fff are the hour, minute, second and fractional second at the time that the message was logged, Identifier is the supplied identifier (usually the subroutine, function, property or method from which the message is sent) and Message is the message to be logged. Creates a new TraceLogger instance The LogFileType is used in the file name to allow you to quickly identify which of several logs contains the information of interest. This call enables automatic logging and sets the filetype to "Default". Creates a new TraceLogger instance and initialises filename and type Fully qualified trace file name or null string to use automatic file naming (recommended) String identifying the type of log e,g, Focuser, LX200, GEMINI, MoonLite, G11 The LogFileType is used in the file name to allow you to quickly identify which of several logs contains the information of interest. Create and enable a new TraceLogger instance with automatic naming based on the supplied log file type String identifying the type of log e,g, Focuser, LX200, GEMINI, MoonLite, G11 The LogFileType is used in the file name to allow you to quickly identify which of several logs contains the information of interest. Disposes of the TraceLogger object True if being disposed by the application, False if disposed by the finalizer. Disposes of the TraceLogger object Finalizes the TraceLogger object Logs an issue, closing any open line and opening a continuation line if necessary after the issue message. Identifies the meaning of the the message e.g. name of modeule or method logging the message. Message to log Use this for reporting issues that you don't want to appear on a line already opened with StartLine Insert a blank line into the log file Logs a complete message in one call, including a hex translation of the message Identifies the meaning of the the message e.g. name of modeule or method logging the message. Message to log True to append a hex translation of the message at the end of the message Use this for straightforward logging requrements. Writes all information in one command. Will create a LOGISSUE message in the log if called before a line started by LogStart has been closed with LogFinish. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Displays a message respecting carriage return and linefeed characters Identifies the meaning of the the message e.g. name of modeule or method logging the message. The final message to terminate the line Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Writes the time and identifier to the log, leaving the line ready for further content through LogContinue and LogFinish Identifies the meaning of the the message e.g. name of modeule or method logging the message. Message to log Use this to start a log line where you want to write further information on the line at a later time. E.g. You might want to use this to record that an action has started and then append the word OK if all went well. You would then end up with just one line to record the whole transaction even though you didn't know that it would be successful when you started. If you just used LogMsg you would have ended up with two log lines, one showing the start of the transaction and the next the outcome. Will create a LOGISSUE message in the log if called before a line started by LogStart has been closed with LogFinish. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Appends further message to a line started by LogStart, appends a hex translation of the message to the line, does not terminate the line. The additional message to appear in the line True to append a hex translation of the message at the end of the message This can be called multiple times to build up a complex log line if required. Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Closes a line started by LogStart with the supplied message and a hex translation of the message The final message to terminate the line True to append a hex translation of the message at the end of the message Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. Enables or disables logging to the file. True to enable logging Boolean, current logging status (enabled/disabled). If this property is false then calls to LogMsg, LogStart, LogContinue and LogFinish do nothing. If True, supplied messages are written to the log file. Sets the log filename and type if the constructor is called without parameters Fully qualified trace file name or null string to use automatic file naming (recommended) String identifying the type of log e,g, Focuser, LX200, GEMINI, MoonLite, G11 The LogFileType is used in the file name to allow you to quickly identify which of several logs contains the information of interest. Note This command is only required if the tracelogger constructor is called with no parameters. It is provided for use in COM clients that can not call constructors with parameters. If you are writing a COM client then create the trace logger as: TL = New TraceLogger() TL.SetLogFile("","TraceName") If you are writing a .NET client then you can achieve the same end in one call: TL = New TraceLogger("",TraceName") Return the full filename of the log file being created Full filename of the log file String filename This call will return an empty string until the first line has been written to the log file as the file is not created until required. Set or return the path to a directory in which the log file will be created String path Introduced with Platform 6.4.If set, this path will be used instead of the the user's Documents directory default path. This must be Set before the first message Is logged. Set or return the width of the identifier field in the log message Width of the identifier field Integer width Introduced with Platform 6.4.If set, this width will be used instead of the default identifier field width. Logs a complete message in one call Identifies the meaning of the the message e.g. name of modeule or method logging the message. Message to log Use this for straightforward logging requrements. Writes all information in one command. Will create a LOGISSUE message in the log if called before a line started by LogStart has been closed with LogFinish. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. This overload is not available through COM, please use "LogMessage(ByVal Identifier As String, ByVal Message As String, ByVal HexDump As Boolean)" with HexDump set False to achieve this effect. Appends further message to a line started by LogStart, does not terminate the line. The additional message to appear in the line This can be called multiple times to build up a complex log line if required. Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. This overload is not available through COM, please use "LogContinue(ByVal Message As String, ByVal HexDump As Boolean)" with HexDump set False to achieve this effect. Closes a line started by LogStart with the supplied message The final message to terminate the line Can only be called once for each line started by LogStart. Will create a LOGISSUE message in the log if called before a line has been started with LogStart. Posible reasons for this are exceptions causing the normal flow of code to be bypassed or logic errors. This overload is not available through COM, please use "LogFinish(ByVal Message As String, ByVal HexDump As Boolean)" with HexDump set False to achieve this effect. Provides a set of utility functions for ASCOM clients and drivers Disposes of resources used by the profile object - called by IDisposable interface Disposes of resources used by the profile object Pauses for a given interval in milliseconds. The number of milliseconds to wait Repeatedly puts the calling Win32 process to sleep, totally freezing it, for 10 milliseconds, then pumps events so the script or program calling it will receive its normal flow of events, until the pause interval elapses. If the pause interval is 20 milliseconds or less, the sleep interval is reduced to 0, causing the calling Win32 process to give up control to the kernel scheduler and then immediately become eligible for scheduling. Convert sexagesimal degrees to binary double-precision degrees The sexagesimal input string (degrees) The double-precision binary value (degrees) represented by the sexagesimal input The sexagesimal to real conversion methods such as this one are flexible enough to convert just about anything that resembles sexagesimal. Thee way they operate is to first separate the input string into numeric "tokens", strings consisting only of the numerals 0-9, plus and minus, and period. All other characters are considered delimiters. Once the input string is parsed into tokens they are converted to numerics. If there are more than three numeric tokens, only the first three are considered, the remainder are ignored. Left to right positionally, the tokens are assumed to represent units (degrees or hours), minutes, and seconds. If only two tokens are present, they are assumed to be units and minutes, and if only one token is present, it is assumed to be units. Any token can have a fractionsl part. Of course it would not be normal (for example) for both the minutes and seconds parts to have fractional parts, but it would be legal. So 00:30.5:30 would convert to 1.0 unit. Note that plain units, for example 23.128734523 are acceptable to the method. Convert sexagesimal hours to binary double-precision hours The sexagesimal input string (hours) The double-precision binary value (hours) represented by the sexagesimal input The sexagesimal to real conversion methods such as this one are flexible enough to convert just about anything that resembles sexagesimal. Thee way they operate is to first separate the input string into numeric "tokens", strings consisting only of the numerals 0-9, plus and minus, and period. All other characters are considered delimiters. Once the input string is parsed into tokens they are converted to numerics. If there are more than three numeric tokens, only the first three are considered, the remainder are ignored. Left to right positionally, the tokens are assumed to represent units (degrees or hours), minutes, and seconds. If only two tokens are present, they are assumed to be units and minutes, and if only one token is present, it is assumed to be units. Any token can have a fractionsl part. Of course it would not be normal (for example) for both the minutes and seconds parts to have fractional parts, but it would be legal. So 00:30.5:30 would convert to 1.0 unit. Note that plain units, for example 23.128734523 are acceptable to the method. Convert sexagesimal hours to binary double-precision hours The sexagesimal input string (hours) The double-precision binary value (hours) represented by the sexagesimal input The sexagesimal to real conversion methods such as this one are flexible enough to convert just about anything that resembles sexagesimal. Thee way they operate is to first separate the input string into numeric "tokens", strings consisting only of the numerals 0-9, plus and minus, and period. All other characters are considered delimiters. Once the input string is parsed into tokens they are converted to numerics. If there are more than three numeric tokens, only the first three are considered, the remainder are ignored. Left to right positionally, the tokens are assumed to represent units (degrees or hours), minutes, and seconds. If only two tokens are present, they are assumed to be units and minutes, and if only one token is present, it is assumed to be units. Any token can have a fractionsl part. Of course it would not be normal (for example) for both the minutes and seconds parts to have fractional parts, but it would be legal. So 00:30.5:30 would convert to 1.0 unit. Note that plain units, for example 23.128734523 are acceptable to the method. Convert degrees to sexagesimal degrees, minutes and seconds with default delimiters DD° MM' SS" The degrees value to convert Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDMS(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal SecDelim As String)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees, minutes and seconds with with default minute and second delimiters MM' SS" The degrees value to convert The delimiter string separating degrees and minutes Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDMS(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal SecDelim As String)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees, minutes and seconds with default second delimiter SS" The degrees value to convert The delimiter string separating degrees and minutes The delimiter string to append to the minutes part Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDMS(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal SecDelim As String)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees, minutes and seconds The degrees value to convert The delimiter string separating degrees and minutes The delimiter string to append to the minutes part The delimiter string to append to the seconds part Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDMS(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal SecDelim As String)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees, minutes and seconds with specified second decimal places The degrees value to convert The delimiter string separating degrees and minutes The delimiter string to append to the minutes part The delimiter string to append to the seconds part The number of digits after the decimal point on the seconds part Sexagesimal representation of degrees input value, degrees, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert hours to sexagesimal hours, minutes, and seconds with default delimiters HH:MM:SS The hours value to convert Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHMS(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds with default minutes and seconds delimters MM:SS The hours value to convert The delimiter string separating hours and minutes Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHMS(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds with default second delimiter of null string The hours value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHMS(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds The hours value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds The delimiter string to append to the seconds part Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHMS(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert hours to sexagesimal hours, minutes, and seconds with specified number of second decimal places The hours value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds The delimiter string to append to the seconds part The number of digits after the decimal point on the seconds part Sexagesimal representation of hours input value, hours, minutes and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert degrees to sexagesimal hours, minutes, and seconds with default delimters of HH:MM:SS The degrees value to convert Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. This overload is not available through COM, please use "DegreesToHMS(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours, minutes, and seconds with the default second and minute delimiters of MM:SS The degrees value to convert The delimiter string separating hours and minutes Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToHMS(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours, minutes, and seconds with the default second delimiter SS (null string) The degrees value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToHMS(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours, minutes, and seconds The degrees value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds The delimiter string to append to the seconds part Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToHMS(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal SecDelim As String, ByVal SecDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours, minutes, and seconds with the specified number of second decimal places The degrees value to convert The delimiter string separating hours and minutes The delimiter string separating minutes and seconds The delimiter string to append to the seconds part The number of digits after the decimal point on the seconds part Sexagesimal representation of degrees input value, as hours, minutes, and seconds If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert degrees to sexagesimal degrees and minutes with default delimiters DD° MM' The degrees value to convert Sexagesimal representation of degrees input value, as degrees and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDM(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees and minutes with the default minutes delimeter MM' The degrees value to convert The delimiter string separating degrees Sexagesimal representation of degrees input value, as degrees and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDM(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees and minutes The degrees value to convert The delimiter string separating degrees The delimiter string to append to the minutes Sexagesimal representation of degrees input value, as degrees and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "DegreesToDM(ByVal Degrees As Double, ByVal DegDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal degrees and minutes with the specified number of minute decimal places The degrees value to convert The delimiter string separating degrees The delimiter string to append to the minutes The number of digits after the decimal point on the minutes part Sexagesimal representation of degrees input value, as degrees and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert hours to sexagesimal hours and minutes with default delimiters HH:MM The hours value to convert Sexagesimal representation of hours input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHM(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with an suitable parameters to achieve this effect. Convert hours to sexagesimal hours and minutes with default minutes delimiter MM (null string) The hours value to convert The delimiter string separating hours and minutes Sexagesimal representation of hours input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHM(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with an suitable parameters to achieve this effect. Convert hours to sexagesimal hours and minutes The hours value to convert The delimiter string separating hours and minutes The delimiter string to append to the minutes part Sexagesimal representation of hours input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. This overload is not available through COM, please use "HoursToHM(ByVal Hours As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with an suitable parameters to achieve this effect. Convert hours to sexagesimal hours and minutes with supplied number of minute decimal places The hours value to convert The delimiter string separating hours The delimiter string to append to the minutes part The number of digits after the decimal point on the minutes part Sexagesimal representation of hours input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters. Convert degrees to sexagesimal hours and minutes with default delimiters HH:MM The degrees value to convert Sexagesimal representation of degrees input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters This overload is not available through COM, please use "DegreesToHM(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours and minutes with default minute delimiter MM (null string) The degrees value to convert The delimiter string separating hours and minutes Sexagesimal representation of degrees input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters This overload is not available through COM, please use "DegreesToHM(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours and minutes The degrees value to convert The delimiter string separating hours and minutes The delimiter string to append to the minutes part Sexagesimal representation of degrees input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters This overload is not available through COM, please use "DegreesToHM(ByVal Degrees As Double, ByVal HrsDelim As String, ByVal MinDelim As String, ByVal MinDecimalDigits As Integer)" with suitable parameters to achieve this effect. Convert degrees to sexagesimal hours and minutes with supplied number of minute decimal places The degrees value to convert The delimiter string separating hours and minutes The delimiter string to append to the minutes part Number of minutes decimal places Sexagesimal representation of degrees input value as hours and minutes If you need a leading plus sign, you must prepend it yourself. The delimiters are not restricted to single characters Current Platform version in Major.Minor form Current Platform version in Major.Minor form Please be careful if you wish to convert this string into a number within your application because the ASCOM Platform is used internationally and some countries use characters other than point as the decimal separator. If your application tries to convert 5.5 into a Double value when running on a PC localised to France, you will get an exception because the French decimal separater is comma and 5.5 is not a valid representation of a decimal number in that locale. If you still wish to turn the Platform Version into a Double value, you can use an approach such as this: If Double.Parse(Util.PlatformVersion, CultureInfo.InvariantCulture) < 5.5 Then... If you just wish to test whether the platform is greater than a particular level, you can use the IsMinimumRequiredVersion method. Tests whether the current platform version is at least equal to the supplied major and minor version numbers, returns false if this is not the case The required major version number The required minor version number True if the current platform version equals or exceeds the major and minor values provided This function provides a simple way to test for a minimum platform level. If for example, your application requires at least platform version 5.5 then you can use code such as this to make a test and display information as appropriate. Const requiredMajorVersion as Integer = 5 Const requiredMinorVersion as Integer = 5 ' Requires Platform version 5.5 Dim Utils as New ASCOM.Utilities.Util isOK = Utils.IsMinimumRequiredVersion(requiredMajorVersion, requiredMinorVersion) If Not isOK Then ' Abort, throw exception, print an error or whatever. End EndIf Change the serial trace file (default C:\SerialTrace.txt) Serial trace file name including fully qualified path e.g. C:\SerialTrace.txt Serial trace file name Change this before setting the SerialTrace property to True. Enable/disable serial I/O tracing Boolean - Enable/disable serial I/O tracing Enabled - disabled state of serial tracing If you want to change the serial trace file path, change the SerialTraceFile property before setting this to True. After setting this to True, serial trace info will be written to the last-set serial trace file. The name of the computer's time zone The name of the computer's time zone This will be in the local language of the operating system, and will reflect any daylight/summer time that may be in effect. UTC offset (hours) for the computer's clock UTC offset (hours) for the computer's clock The offset is in hours, such that UTC = local + offset. The offset includes any daylight/summer time that may be in effect. The current UTC Date The current UTC Date Current Julian date Current Julian date This is quantised to the second in the COM component but to a small decimal fraction in the .NET component Convert local-time Date to Julian date Date in local-time Julian date Julian dates are always in UTC Convert Julian date to local-time Date Julian date to convert Date in local-time for the given Julian date Julian dates are always in UTC Convert UTC Date to Julian date UTC date to convert Julian date Julian dates are always in UTC Convert Julian date to UTC Date Julian date Date in UTC for the given Julian date Julian dates are always in UTC Convert UTC Date to local-time Date Date in UTC Date in local-time Convert local-time Date to UTC Date Date in local-time Date in UTC Convert a string safearray to an ArrayList that can be used in scripting languages Array of strings Collection of integers Convert an integer safearray to an ArrayList collection that can be used in scripting languages Safearray of integers Colection of integers Convert from one set of speed / temperature / pressure rain rate units to another Value to convert Integer value from the Units enum indicating the value's current units Integer value from the Units enum indicating the units to which the input value should be converted Input value expressed in the new units When the specified from and to units can not refer to the same value. e.g. attempting to convert miles per hour to degrees Celsius Conversions available: metres per second <==> miles per hour <==> knots Celsius <==> Farenheit <==> Kelvin hecto Pascals (hPa) <==> milli bar(mbar) <==> mm of mercury <==> inches of mercury mm per hour <==> inches per hour Knots conversions use the international nautical mile definition (1 nautical mile = 1852m) rather than the orginal UK or US Admiralty definitions. For convenience, milli bar and hecto Pascals are shown as separate units even though they have numerically identical values and there is a 1:1 conversion between them. Calculate the dew point (°Celsius) given the ambient temperature (°Celsius) and relative humidity (%) Relative humidity expressed in percent (0.0 .. 100.0) Ambient temperature (°Celsius) Dew point (°Celsius) When relative humidity < 0.0% or > 100.0%> When ambient temperature < absolute zero or > 100.0C> 'Calculation uses Vaisala formula for water vapour saturation pressure and is accurate to 0.083% over -20C - +50°C http://www.vaisala.com/Vaisala%20Documents/Application%20notes/Humidity_Conversion_Formulas_B210973EN-F.pdf Calculate the relative humidity (%) given the ambient temperature (°Celsius) and dew point (°Celsius) Dewpoint in (°Celsius) Ambient temperature (°Celsius) Humidity expressed in percent (0.0 .. 100.0) When dew point < absolute zero or > 100.0C> When ambient temperature < absolute zero or > 100.0C> 'Calculation uses the Vaisala formula for water vapour saturation pressure and is accurate to 0.083% over -20C - +50°C http://www.vaisala.com/Vaisala%20Documents/Application%20notes/Humidity_Conversion_Formulas_B210973EN-F.pdf Convert atmospheric pressure from one altitude above mean sea level to another Measured pressure in hPa (mBar) at the "From" altitude "Altitude at which the input pressure was measured (metres) Altitude to which the pressure is to be converted (metres) Pressure in hPa at the "To" altitude Uses the equation: p = p0 * (1.0 - 2.25577E-05 h)^5.25588 Convert an array of .NET built-in types to an equivalent Variant arrray (array of .NET Objects) The array to convert to variant types A Variant array If the supplied array contains elements of an unsuported Type. If the array rank is outside the range 1 to 5. If the supplied object is not an array. This function will primarily be of use to Scripting Language programmers who need to convert Camera and Video ImageArrays from their native types to Variant types. If this is not done, the scripting language will throw a type mismatch exception when it receives, for example, Int32 element types instead of the expected Variant types. A VBScript Camera usage example is: Image = UTIL.ArrayToVariantArray(CAMERA.ImageArray) This example assumes that the camera and utilities objects have already been created with CreateObject statements. The supported .NET types are: Int16 Int32 UInt16 UInt32 UInt64 Byte SByte Single Double Boolean DateTime String The function supports arrays with 1 to 5 dimensions (Rank = 1 to 5). If the supplied array already contains elements of Variant type, it is returned as-is without any processing. Turns an array of type T into a variant array of Object The type to convert to Variant The supplied array of Type T as an Object The supplied array of Type T as an Array The array with all elements represented as Variant objects Works for 1 to 5 dimensional arrays of any Type Platform major version number Platform major version number Integer version number Platform minor version number Platform minor version number Integer version number Platform service pack number Platform service pack number Integer service pack number Platform build number Platform build number Integer build number Function that is called by RegAsm when the assembly is registered for COM This is necessary to ensure that the mscoree.dll can be found when the SetSearchDirectories function has been called in an application e.g. by Inno installer post v5.5.9 Function that is called by RegAsm when the assembly is registered for COM