Command Definition Files (*.cpd)
Previous  Top  Next

Command definition files define specifics about your commands. Commands are defined in an XML format as described below.
You can load as many command definition files as desired, new commands will simply be added to the already defined commands. The GSEOS Explorer lists all commands currently defined.


Command Definition Syntax
All <Cmd> elements are child nodes of the <GSEOS> root node:

<Cmd>
The main command definition node.

Attributes:

Name
Format
Optional
Default
Mnemonic
String
N

Opcode
Int
N

NumBits
Int
Y
16
Critical
Y, N
Y
N
Channel
Int
Y
0
Description
String
Y



Elements: <Arg>, <Const>, <Copy>, <Inv>, <Checksum>, <ZeroPad>, <CmdLen>


<Arg>
Defines an argument. Must be within a <Cmd> element.

Attributes:
Attributes:

Name
Format
Optional
Default
Name
String
N

Value
same as Arg
N
16
Description
String
Y



Elements: -


Name
Format
Optional
Default
Keyword
String
Y

NumBits
Int
Y
16
StartBit
Int
Y

Type
see below
Y
UNSIGNED
Default
same as Type
Y

ScaleFactor
Numeric
Y
1
Offset
Numeric
Y
0
DataRangeLow
Numeric
Y

DataRangeHigh
Numeric
Y

Description
String
Y



Elements: <Enum>

<Enum>
Defines an enumerated argument mnemonic. Must be within an <Arg> node.

Attributes:

Name
Format
Optional
Default
Name
String
N

Value
same as Arg
N
16
Description
String
Y



Elements: -

<Const>
Defines a constant command value that is not specified when issuing the command. Must be within a <Cmd> node.

Attributes:

Name
Format
Optional
Default
Value
same as Type
N

NumBits
Int
Y
16
StartBit
Int
Y

Type
see below
Y

Description
String
Y



Elements: -

<Copy>
Copies bits from a previous bit position in the command. Must be within a <Cmd> node.

Attributes:

Name
Format
Optional
Default
FromBit
Int
N

NumBits
Int
Y
16
StartBit
Int
Y



Elements: -

<Inv>
Inserts the inverted previous NumBits bits. Must be within a <Cmd> node.

Attributes:

Name
Format
Optional
Default
NumBits
Int
Y
16
StartBit
Int
Y



Elements: -

<ZeroPad>
Pads the command to NumBits bits with zeroes. Must be within a <Cmd> node.

Attributes:

Name
Format
Optional
Default
NumBits
Int
Y
16
StartBit
Int
Y



Elements: -

<Checksum>
Inserts a checksum of NumBits. The checksum is computed with the algorithm specified by Type, currently only XOR is implemented. The checksum is computed starting with FirstByte. Must be within a <Cmd> node.

Attributes:

Name
Format
Optional
Default
NumBits
Int
Y
16
StartBit
Int
Y

Algorithm
String
N

FirstByte
Int
Y
0


Elements: -

<CmdLen>
Inserts the command length in WordSize units. Must be within a <Cmd> node.

Attributes:

Name
Format
Optional
Default
NumBits
Int
Y
16
StartBit
Int
Y

WordSize
Int
Y
16


Elements: -
* #
The allowed argument types for commands are: UNSIGNED, SIGNED, FLOAT32_IEEE, FLOAT64_IEEE.


Example File
<!--
# *************************************************************** #
# * IBEX EGSE Command Definitions.                              * #
# *************************************************************** #
-->
<GSEOS Version="366">
  <Cmd Mnemonic="EGSE_SET_TIME" Opcode="0x0" NumBits="8" Channel="1" Description="Set Time">
    <Arg Keyword="Time" NumBits="32" Description="Time"/>
  </Cmd>

  <Cmd Mnemonic="EGSE_SET_QUATERNION" Opcode="0x0" NumBits="5" Channel="1" Description="Set Quaternion">
    <Arg NumBits="1" Description="Quaternion Type">
      <Enum Name="RAW"      Value="0" Description="Raw Quaternion"/>
      <Enum Name="FILTERED" Value="1" Description="Filtered Quaternion"/>
    </Arg>
    <Arg NumBits="2" Description="Quaternion Number"/>
    <Arg NumBits="32" DataRangeLow ="20" DataRangeHigh="4000" Description="Quaternion Value"/>
  </Cmd>

  <Cmd Mnemonic="EGSE_SET_SUBSECOND_TIME" Opcode="0x9" NumBits="8" Channel="1" Description="Set Time">
    <Const Value="0" NumBits="16"/>
    <Arg Keyword="SubsecondTime" NumBits="16" Description="Subsecond Time"/>
  </Cmd>

  <Cmd Mnemonic="EGSE_ANCILLARY_ENABLE" Critical="Y" Opcode="0xA" NumBits="8" Channel="1" Description="Enable/Disable Ancillary Packets">
    <Arg NumBits="32" DataRangeLow="0" DataRangeHigh="1" Description="Enable/Disable">
      <Enum Name="ON"  Value="1" Description="Enable Ancillary Packets"/>
      <Enum Name="OFF" Value="0" Description="Disable Ancillary Packets"/>
    </Arg>
  </Cmd>

  <Cmd Mnemonic="EGSE_SEND_ANCILLARY_PACKET" Opcode="0xB" NumBits="8" Channel="1" Description="Send one Ancillary Packet">
    <Const Value="0" NumBits="32"/>
  </Cmd>

  <Cmd Mnemonic="EGSE_1PPS_ENABLE" Opcode="0xA" NumBits="8" Channel="1" Description="Enable/Disable 1PPS">
    <Arg NumBits="32" DataRangeLow="0" DataRangeHigh="1" Description="Enable/Disable">
      <Enum Name="ON"  Value="1" Description="Enable 1PPS"/>
      <Enum Name="OFF" Value="0" Description="Disable 1PPS"/>
    </Arg>
  </Cmd>

  <Cmd Mnemonic="EGSE_SET_SPIN_PULSE" Opcode="0x20" NumBits="8" Channel="1" Description="Set Spin Pulse delay and period">
    <Arg Keyword="Delay"  NumBits="16" Description="Start Delay in Milliseconds from next 1PPS"/>
    <Arg Keyword="Period" NumBits="16" Description="Spin Period in Milliseconds. If 0 turn Spin Pulse off after next 1PPS"/>
  </Cmd>

</GSEOS>