Gemini Users Manual 123
Using the native commands:
• The Identification tag is interpreted as an integer value, leading zeros are ignored.
• Parameters are separated from the Id and from each other by hyphens.
• The checksum for the native commands is calculated by a bytewise XOR
operation of the transmitted characters, including the Get/Set command sign ('<',
'>') and colon ':'. The highest significant bit of the result is cleared (modulo 128
operation) and 64 is added.
• Undefined Id's are ignored in Set operations. For Get operations, only a hash mark
will be returned.
• In Debug Mode, the expected and the received checksum are displayed on the
hand controller display in hexadecimal format whenever a discrepancy is
detected. A command sent with a wrong checksum will not be executed.
Examples:
• Get the Mount Type: "<0:v" and "<00:F#" are equivalent.
• "<1:w#" and "<2:t#" and "<3:u#" will deliver the same result, f.i. the string "1q#"
if the mount type is set to GM-8 or "2r#" if G-11 is selected.
Pseudo Code Example:
The following sample pseudo code shows how to calculate the checksum for a Gemini
native command.
FUNCTION CalcGeminiCkSum (CommandString)
SET cksum TO 0 ' Initialise checksum variable
IF LENGTH OF CommandString IS GREATER THAN 0
FOR i = 1 to LENGTH(CommandString)
SET cksum = cksum XOR (CHARCTER i OF CommandString)
NEXT
SET cksum = (cksum AND 127) + 64
ENDIF
RETURN cksum
ENDFUNCTION
Note: If Gemini is started in Debug Mode (see section 7.2), the display will show the
expected and received checksum in hexadecimal notation for any native Gemini
command received with an incorrect checksum. This may be useful for debugging any
software that sends native Gemini commands.
Komentáře k této Příručce