Telemetry Configuration
Telemetry Definition Files
Telemetry definition files define the telemetry packets that can be received and processed from COSMOS targets. One large file can be used to define the telemetry packets, or multiple files can be used at the user’s discretion. Telemetry definition files are placed in the config/TARGET/cmd_tlm directory and are processed alphabetically. Therefore if you have some telemetry files that depend on others, e.g. they override or extend existing telemetry, they must be named last. The easist way to do this is to add an extension to an existing file name. For example, if you already have tlm.txt you can create tlm_override.txt for telemetry that depends on the definitions in tlm.txt. Note that due to the way the ASCII Table is structured, files beginning with capital letters are processed before lower case letters.
When defining telemetry items you can choose from the following data types: INT, UINT, FLOAT, DERIVED, STRING, BLOCK. These correspond to integers, unsigned integers, floating point numbers, derived values of 0 size which aren’t actually physically defined in the packet, strings and binary blocks of data. The only difference between a STRING and BLOCK is when COSMOS reads a STRING type it stops reading when it encounters a null byte (0). This shows up when displaying the value in Packet Viewer or Tlm Viewer and in the output of Telemetry Extractor.
TELEMETRY
Defines a new telemetry packet
Parameter | Description | Required |
---|---|---|
Target | Name of the target this telemetry packet is associated with Valid Values: Any Target Name |
True |
Command | Name of this telemetry packet. Also referred to as its mnemonic. Must be unique to telemetry packets in this target. Ideally will be as short and clear as possible. | True |
Endianness | Indicates if the data in this packet is in Big Endian or Little Endian format Valid Values: BIG_ENDIAN, LITTLE_ENDIAN |
True |
Description | Description of this telemetry packet which must be enclosed with quotes | False |
Example Usage:
SELECT_TELEMETRY
Selects an existing telemetry packet for editing
Typically used in a separate configuration file from where the original telemetry is defined to override or add to the existing telemetry definition
Parameter | Description | Required |
---|---|---|
Target Name | Name of the target this telemetry packet is associated with Valid Values: Any Target Name |
True |
Command Name | Name of the telemetry packet to select | True |
Example Usage:
LIMITS_GROUP
Defines a group of related limits Items
Limits groups contain telemetry items that can be enabled and disabled together. It can be used to group related limits as a subsystem that can be enabled or disabled as that particular subsystem is powered (for example). To enable a group call the enable_limits_group(“NAME”) method in Script Runner. To disable a group call the disable_limits_group(“NAME”) in Script Runner. Items can belong to multiple groups but the last enabled or disabled group “wins”. For example, if an item belongs to GROUP1 and GROUP2 and you first enable GROUP1 and then disable GROUP2 the item will be disabled. If you then enable GROUP1 again it will be enabled.
Parameter | Description | Required |
---|---|---|
Group Name | Name of the limits group | True |
LIMITS_GROUP_ITEM
Adds the specified telemetry item to the last defined LIMITS_GROUP
Limits group information is typically kept in a separate configuration file in the config/TARGET/cmd_tlm folder named limits_groups.txt. If you want to configure multiple target items in a particular group you should put this information in the config/SYSTEM/cmd_tlm/limits_groups.txt file. The SYSTEM target is processed last and contains information that crosses target boundaries.
Parameter | Description | Required |
---|---|---|
Target Name | Name of the target Valid Values: Any Target Name |
True |
Packet Name | Name of the packet | True |
Item Name | Name of the telemetry item to add to the group | True |
Example Usage:
TELEMETRY Modifiers
The following keywords must follow a TELEMETRY keyword.
ITEM
Defines a telemetry item in the current telemetry packet
Parameter | Description | Required |
---|---|---|
Name | Name of the telemety item. Must be unique within the packet. | True |
Bit Offset | Bit offset into the telemetry packet of the Most Significant Bit of this item. May be negative to indicate on offset from the end of the packet. Always use a bit offset of 0 for derived item. | True |
Bit Size | Bit size of this telemetry item. Zero or Negative values may be used to indicate that a string fills the packet up to the offset from the end of the packet specified by this value. If Bit Offset is 0 and Bit Size is 0 then this is a derived parameter and the Data Type must be set to ‘DERIVED’. | True |
Data Type | Data Type of this telemetry item Valid Values: INT, UINT, FLOAT, STRING, BLOCK, DERIVED |
True |
Description | Description for this telemetry item which must be enclosed with quotes | False |
Endianness | Indicates if the item is to be interpreted in Big Endian or Little Endian format Valid Values: BIG_ENDIAN, LITTLE_ENDIAN |
False |
Example Usage:
APPEND_ITEM
Defines a telemetry item in the current telemetry packet
Parameter | Description | Required |
---|---|---|
Name | Name of the telemety item. Must be unique within the packet. | True |
Bit Size | Bit size of this telemetry item. Zero or Negative values may be used to indicate that a string fills the packet up to the offset from the end of the packet specified by this value. If Bit Offset is 0 and Bit Size is 0 then this is a derived parameter and the Data Type must be set to ‘DERIVED’. | True |
Data Type | Data Type of this telemetry item Valid Values: INT, UINT, FLOAT, STRING, BLOCK, DERIVED |
True |
Description | Description for this telemetry item which must be enclosed with quotes | False |
Endianness | Indicates if the item is to be interpreted in Big Endian or Little Endian format Valid Values: BIG_ENDIAN, LITTLE_ENDIAN |
False |
Example Usage:
ID_ITEM
Defines a telemetry item in the current telemetry packet. Note, packets defined without one or more ID_ITEMs are “catch-all” packets which will match all incoming data. Normally this is the job of the UNKNOWN packet.
Parameter | Description | Required |
---|---|---|
Name | Name of the telemety item. Must be unique within the packet. | True |
Bit Offset | Bit offset into the telemetry packet of the Most Significant Bit of this item. May be negative to indicate on offset from the end of the packet. Always use a bit offset of 0 for derived item. | True |
Bit Size | Bit size of this telemetry item. Zero or Negative values may be used to indicate that a string fills the packet up to the offset from the end of the packet specified by this value. If Bit Offset is 0 and Bit Size is 0 then this is a derived parameter and the Data Type must be set to ‘DERIVED’. | True |
Data Type | Data Type of this telemetry item Valid Values: INT, UINT, FLOAT, STRING, BLOCK, DERIVED |
True |
ID Value | The value of this telemetry item that uniquely identifies this telemetry packet | True |
Description | Description for this telemetry item which must be enclosed with quotes | False |
Endianness | Indicates if the item is to be interpreted in Big Endian or Little Endian format Valid Values: BIG_ENDIAN, LITTLE_ENDIAN |
False |
Example Usage:
APPEND_ID_ITEM
Defines a telemetry item in the current telemetry packet
Parameter | Description | Required |
---|---|---|
Name | Name of the telemety item. Must be unique within the packet. | True |
Bit Size | Bit size of this telemetry item. Zero or Negative values may be used to indicate that a string fills the packet up to the offset from the end of the packet specified by this value. If Bit Offset is 0 and Bit Size is 0 then this is a derived parameter and the Data Type must be set to ‘DERIVED’. | True |
Data Type | Data Type of this telemetry item Valid Values: INT, UINT, FLOAT, STRING, BLOCK, DERIVED |
True |
ID Value | The value of this telemetry item that uniquely identifies this telemetry packet | True |
Description | Description for this telemetry item which must be enclosed with quotes | False |
Endianness | Indicates if the item is to be interpreted in Big Endian or Little Endian format Valid Values: BIG_ENDIAN, LITTLE_ENDIAN |
False |
Example Usage:
ARRAY_ITEM
Defines a telemetry item in the current telemetry packet that is an array
Parameter | Description | Required |
---|---|---|
Name | Name of the telemety item. Must be unique within the packet. | True |
Bit Offset | Bit offset into the telemetry packet of the Most Significant Bit of this item. May be negative to indicate on offset from the end of the packet. Always use a bit offset of 0 for derived item. | True |
Item Bit Size | Bit size of each array item | True |
Item Data Type | Data Type of each array item Valid Values: INT, UINT, FLOAT, STRING, BLOCK, DERIVED |
True |
Array Bit Size | Total Bit Size of the Array. Zero or Negative values may be used to indicate the array fills the packet up to the offset from the end of the packet specified by this value. | True |
Description | Description which must be enclosed with quotes | False |
Endianness | Indicates if the data is to be sent in Big Endian or Little Endian format Valid Values: BIG_ENDIAN, LITTLE_ENDIAN |
False |
Example Usage:
APPEND_ARRAY_ITEM
Defines a telemetry item in the current telemetry packet that is an array
Parameter | Description | Required |
---|---|---|
Name | Name of the telemety item. Must be unique within the packet. | True |
Item Bit Size | Bit size of each array item | True |
Item Data Type | Data Type of each array item Valid Values: INT, UINT, FLOAT, STRING, BLOCK, DERIVED |
True |
Array Bit Size | Total Bit Size of the Array. Zero or Negative values may be used to indicate the array fills the packet up to the offset from the end of the packet specified by this value. | True |
Description | Description which must be enclosed with quotes | False |
Endianness | Indicates if the data is to be sent in Big Endian or Little Endian format Valid Values: BIG_ENDIAN, LITTLE_ENDIAN |
False |
Example Usage:
SELECT_ITEM
Selects an existing telemetry item for editing
Parameter | Description | Required |
---|---|---|
Item | Name of the item to select for modification | True |
Example Usage:
DELETE_ITEM
Delete an existing telemetry item from the packet definition
Deleting an item from the packet definition does not remove the defined space for that item. Thus unless you redefine a new item, there will be a “hole” in the packet where the data is not accessible. You can use SELECT_TELEMETRY and then ITEM to define a new item.
Parameter | Description | Required |
---|---|---|
Item | Name of the item to delete | True |
Example Usage:
META
Stores metadata for the current telemetry packet
Meta data is user specific data that can be used by custom tools for various purposes. One example is to store additional information needed to generate source code header files.
Parameter | Description | Required |
---|---|---|
Meta Name | Name of the metadata to store | True |
Meta Values | One or more values to be stored for this Meta Name | False |
Example Usage:
PROCESSOR
Defines a processor class that executes code every time a packet is received
Parameter | Description | Required |
---|---|---|
Processor Name | The name of the processor | True |
Processor Class Filename | Name of the Ruby file which implements the processor. This file should be in the config/TARGET/lib directory so it can be found by COSMOS. | True |
Processor Specific Options | Variable length number of options that will be passed to the class constructor. | False |
Example Usage:
ALLOW_SHORT
Process telemetry packets which are less than their defined length
Allows the telemetry packet to be received with a data portion that is smaller than the defined size without warnings. Any extra space in the packet will be filled in with zeros by COSMOS.
HIDDEN
Hides this telemetry packet from all the COSMOS tools
This packet will not appear in Packet Viewer, Telemetry Grapher and Handbook Creator. It also hides this telemetry from appearing in the Script Runner popup helper when writing scripts. The telemetry still exists in the system and can received and checked by scripts.
ITEM Modifiers
The following keywords must follow a ITEM keyword.
FORMAT_STRING
Adds printf style formatting
Parameter | Description | Required |
---|---|---|
Format | How to format using printf syntax. For example, ‘0x%0X’ will display the value in hex. | True |
Example Usage:
UNITS
Add displayed units
Parameter | Description | Required |
---|---|---|
Full Name | Full name of the units type, e.g. Celsius | True |
Abbreviated | Abbreviation for the units, e.g. C | True |
Example Usage:
DESCRIPTION
Override the defined description
Parameter | Description | Required |
---|---|---|
Value | The new description | True |
META
Stores custom user metadata
Meta data is user specific data that can be used by custom tools for various purposes. One example is to store additional information needed to generate source code header files.
Parameter | Description | Required |
---|---|---|
Meta Name | Name of the metadata to store | True |
Meta Values | One or more values to be stored for this Meta Name | False |
Example Usage:
OVERLAP
This item is allowed to overlap other items in the packet
If an item’s bit offset overlaps another item, COSMOS issues a warning. This keyword explicitly allows an item to overlap another and supresses the warning message.
STATE
Defines a key/value pair for the current item
Key value pairs allow for user friendly strings. For example, you might define states for ON = 1 and OFF = 0. This allows the word ON to be used rather than the number 1 when sending the telemetry item and allows for much greater clarity and less chance for user error.
Parameter | Description | Required |
---|---|---|
Key | The string state name | True |
Value | The numerical state value | True |
Color | The color the state should be displayed as Valid Values: GREEN, YELLOW, RED |
False |
Example Usage:
READ_CONVERSION
Applies a conversion to the current telemetry item
Conversions are implemented in a custom Ruby file which should be located in the target’s lib folder and required by the target’s target.txt file (see REQUIRE). The class must require ‘cosmos/conversions/conversion’ and inherit from Conversion. It must implement the initialize method if it takes extra parameters and must always implement the call method. The conversion factor is applied to the raw value in the telemetry packet before it is displayed to the user. The user still has the ability to see the raw unconverted value in a details dialog.
Parameter | Description | Required |
---|---|---|
Class File Name | The file name which contains the Ruby class. The file name must be named after the class such that the class is a CamelCase version of the underscored file name. For example, ‘the_great_conversion.rb’ should contain ‘class TheGreatConversion’. | True |
Parameter | Additional parameter values for the conversion which are passed to the class constructor. | False |
Example Usage:
POLY_READ_CONVERSION
Adds a polynomial conversion factor to the current telemetry item
The conversion factor is applied to raw value in the telemetry packet before it is displayed to the user. The user still has the ability to see the raw unconverted value in a details dialog.
Parameter | Description | Required |
---|---|---|
C0 | Coefficient | True |
Cx | Additional coefficient values for the conversion. Any order polynomial conversion may be used so the value of ‘x’ will vary with the order of the polynomial. Note that larger order polynomials take longer to process than shorter order polynomials, but are sometimes more accurate. | False |
Example Usage:
SEG_POLY_READ_CONVERSION
Adds a segmented polynomial conversion factor to the current telemetry item
This conversion factor is applied to the raw value in the telemetry packet before it is displayed to the user. The user still has the ability to see the raw unconverted value in a details dialog.
Parameter | Description | Required |
---|---|---|
Lower Bound | Defines the lower bound of the range of values that this segmented polynomial applies to. Is ignored for the segment with the smallest lower bound. | True |
C0 | Coefficient | True |
Cx | Additional coefficient values for the conversion. Any order polynomial conversion may be used so the value of ‘x’ will vary with the order of the polynomial. Note that larger order polynomials take longer to process than shorter order polynomials, but are sometimes more accurate. | False |
Example Usage:
GENERIC_READ_CONVERSION_START
Start a generic read conversion
Adds a generic conversion function to the current telemetry item. This conversion factor is applied to the raw value in the telemetry packet before it is displayed to the user. The user still has the ability to see the raw unconverted value in a details dialog. The conversion is specified as ruby code that receives two implied parameters. ‘value’ which is the raw value being read and ‘packet’ which is a reference to the telemetry packet class (Note, referencing the packet as ‘myself’ is still supported for backwards compatibility). The last line of ruby code given should return the converted value. The GENERIC_READ_CONVERSION_END keyword specifies that all lines of ruby code for the conversion have been given.
Generic conversions are not a good long term solution. Consider creating a conversion class and using READ_CONVERSION instead. READ_CONVERSION is easier to debug and higher performance.
Parameter | Description | Required |
---|---|---|
Converted Type | Type of the converted value Valid Values: INT, UINT, FLOAT, STRING, BLOCK |
False |
Converted Bit Size | Bit size of converted value | False |
Example Usage:
GENERIC_READ_CONVERSION_END
Complete a generic read conversion
LIMITS
Defines a set of limits for a telemetry item
If limits are violated a message is printed in the Command and Telemetry Server to indicate an item went out of limits. Other tools also use this information to update displays with different colored telemetry items or other useful information. The concept of “limits sets” is defined to allow for different limits values in different environments. For example, you might want tighter or looser limits on telemetry if your environment changes such as during thermal vacuum testing.
Parameter | Description | Required |
---|---|---|
Limits Set | Name of the limits set. If you have no unique limits sets use the keyword DEFAULT. | True |
Persistence | Number of consecutive times the telemetry item must be within a different limits range before changing limits state. | True |
Initial State | Whether limits monitoring for this telemetry item is initially enabled or disabled. Note if you have multiple LIMITS items they should all have the same initial state. Valid Values: ENABLED, DISABLED |
True |
Red Low Limit | If the telemetry value is less than or equal to this value a Red Low condition will be detected | True |
Yellow Low Limit | If the telemetry value is less than or equal to this value, but greater than the Red Low Limit, a Yellow Low condition will be detected | True |
Yellow High Limit | If the telemetry value is greater than or equal to this value, but less than the Red High Limit, a Yellow High condition will be detected | True |
Red High Limit | If the telemetry value is greater than or equal to this value a Red High condition will be detected | True |
Green Low Limit | Setting the Green Low and Green High limits defines an “operational limit” which is colored blue by COSMOS. This allows for a distinct desired operational range which is narrower than the green safety limit. If the telemetry value is greater than or equal to this value, but less than the Green High Limit, a Blue operational condition will be detected. | False |
Green High Limit | Setting the Green Low and Green High limits defines an “operational limit” which is colored blue by COSMOS. This allows for a distinct desired operational range which is narrower than the green safety limit. If the telemetry value is less than or equal to this value, but greater than the Green Low Limit, a Blue operational condition will be detected. | False |
Example Usage:
LIMITS_RESPONSE
Defines a response class that is called when the limits state of the current item changes
Parameter | Description | Required |
---|---|---|
Response Class Filename | Name of the Ruby file which implements the limits response. This file should be in the config/TARGET/lib directory so it can be found by COSMOS. | True |
Response Specific Options | Variable length number of options that will be passed to the class constructor | False |
Example Usage:
Example File
Example File: <COSMOSPATH>/config/TARGET/cmd_tlm/tlm.txt