OpenC3/cosmos

View on GitHub
docs/assets/js/72c6d8a8.5815b047.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[1524],{4785:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>d,default:()=>o,frontMatter:()=>i,metadata:()=>a,toc:()=>h});var s=n(4848),t=n(8453);const i={sidebar_position:4,title:"Commands"},d=void 0,a={id:"configuration/command",title:"Commands",description:"Command Definition Files",source:"@site/docs/configuration/command.md",sourceDirName:"configuration",slug:"/configuration/command",permalink:"/docs/configuration/command",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/command.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Commands"},sidebar:"defaultSidebar",previous:{title:"Targets",permalink:"/docs/configuration/target"},next:{title:"Telemetry",permalink:"/docs/configuration/telemetry"}},l={},h=[{value:"Command Definition Files",id:"command-definition-files",level:2},{value:"COMMAND",id:"command",level:2},{value:"COMMAND Modifiers",id:"command-modifiers",level:2},{value:"PARAMETER",id:"parameter",level:3},{value:"PARAMETER Modifiers",id:"parameter-modifiers",level:3},{value:"FORMAT_STRING",id:"format_string",level:4},{value:"UNITS",id:"units",level:4},{value:"DESCRIPTION",id:"description",level:4},{value:"META",id:"meta",level:4},{value:"OVERLAP",id:"overlap",level:4},{value:"KEY",id:"key",level:4},{value:"VARIABLE_BIT_SIZE",id:"variable_bit_size",level:4},{value:"REQUIRED",id:"required",level:4},{value:"MINIMUM_VALUE",id:"minimum_value",level:4},{value:"MAXIMUM_VALUE",id:"maximum_value",level:4},{value:"DEFAULT_VALUE",id:"default_value",level:4},{value:"STATE",id:"state",level:4},{value:"WRITE_CONVERSION",id:"write_conversion",level:4},{value:"POLY_WRITE_CONVERSION",id:"poly_write_conversion",level:4},{value:"SEG_POLY_WRITE_CONVERSION",id:"seg_poly_write_conversion",level:4},{value:"GENERIC_WRITE_CONVERSION_START",id:"generic_write_conversion_start",level:4},{value:"GENERIC_WRITE_CONVERSION_END",id:"generic_write_conversion_end",level:4},{value:"OVERFLOW",id:"overflow",level:4},{value:"APPEND_PARAMETER",id:"append_parameter",level:3},{value:"ID_PARAMETER",id:"id_parameter",level:3},{value:"APPEND_ID_PARAMETER",id:"append_id_parameter",level:3},{value:"ARRAY_PARAMETER",id:"array_parameter",level:3},{value:"APPEND_ARRAY_PARAMETER",id:"append_array_parameter",level:3},{value:"SELECT_PARAMETER",id:"select_parameter",level:3},{value:"DELETE_PARAMETER",id:"delete_parameter",level:3},{value:"HIDDEN",id:"hidden",level:3},{value:"DISABLED",id:"disabled",level:3},{value:"DISABLE_MESSAGES",id:"disable_messages",level:3},{value:"META",id:"meta-1",level:3},{value:"HAZARDOUS",id:"hazardous",level:3},{value:"ACCESSOR",id:"accessor",level:3},{value:"TEMPLATE",id:"template",level:3},{value:"TEMPLATE_FILE",id:"template_file",level:3},{value:"RESPONSE",id:"response",level:3},{value:"ERROR_RESPONSE",id:"error_response",level:3},{value:"RELATED_ITEM",id:"related_item",level:3},{value:"SCREEN",id:"screen",level:3},{value:"VIRTUAL",id:"virtual",level:3},{value:"VALIDATOR",id:"validator",level:3},{value:"SELECT_COMMAND",id:"select_command",level:2},{value:"Example File",id:"example-file",level:2}];function c(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.h2,{id:"command-definition-files",children:"Command Definition Files"}),"\n",(0,s.jsxs)(r.p,{children:["Command definition files define the command packets that can be sent to COSMOS targets. One large file can be used to define the command packets, or multiple files can be used at the user's discretion. Command definition files are placed in the target's cmd_tlm directory and are processed alphabetically. Therefore if you have some command files that depend on others, e.g. they override or extend existing commands, they must be named last. The easiest way to do this is to add an extension to an existing file name. For example, if you already have cmd.txt you can create cmd_override.txt for commands that depends on the definitions in cmd.txt. Also note that due to the way the ",(0,s.jsx)(r.a,{href:"http://www.asciitable.com/",children:"ASCII Table"})," is structured, files beginning with capital letters are processed before lower case letters."]}),"\n",(0,s.jsx)(r.p,{children:"When defining command parameters you can choose from the following data types: INT, UINT, FLOAT, STRING, BLOCK. These correspond to integers, unsigned integers, floating point numbers, strings and binary blocks of data. The only difference between a STRING and BLOCK is when COSMOS reads the binary command log it stops reading a STRING type when it encounters a null byte (0). This shows up in the text log produced by Data Extractor. Note that this does NOT affect the data COSMOS writes as it's still legal to pass null bytes (0) in STRING parameters."}),"\n",(0,s.jsx)("div",{style:{clear:"both"}}),"\n",(0,s.jsx)(r.h1,{id:"command-keywords",children:"Command Keywords"}),"\n",(0,s.jsx)(r.h2,{id:"command",children:"COMMAND"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a new command packet"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target"}),(0,s.jsx)(r.td,{children:"Name of the target this command is associated with"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Command"}),(0,s.jsx)(r.td,{children:"Name of this command. Also referred to as its mnemonic. Must be unique to commands to this target. Ideally will be as short and clear as possible."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description of this command which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'COMMAND INST COLLECT BIG_ENDIAN "Start collect"\n'})}),"\n",(0,s.jsx)(r.h2,{id:"command-modifiers",children:"COMMAND Modifiers"}),"\n",(0,s.jsx)(r.p,{children:"The following keywords must follow a COMMAND keyword."}),"\n",(0,s.jsx)(r.h3,{id:"parameter",children:"PARAMETER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a command parameter in the current command packet"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"Name of the parameter. Must be unique within the command."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Bit Offset"}),(0,s.jsx)(r.td,{children:"Bit offset into the command packet of the Most Significant Bit of this parameter. May be negative to indicate on offset from the end of the packet. Always use a bit offset of 0 for derived parameters."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Bit Size"}),(0,s.jsx)(r.td,{children:"Bit size of this parameter. 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'."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Data Type"}),(0,s.jsxs)(r.td,{children:["Data Type of this parameter",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"INT, UINT, FLOAT, DERIVED, STRING, BLOCK"})]}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"When Data Type is INT, UINT, FLOAT, DERIVED the remaining parameters are:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Minimum Value"}),(0,s.jsx)(r.td,{children:"Minimum allowed value for this parameter"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Maximum Value"}),(0,s.jsx)(r.td,{children:"Maximum allowed value for this parameter"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Default Value"}),(0,s.jsx)(r.td,{children:"Default value for this parameter. You must provide a default but if you mark the parameter REQUIRED then scripts will be forced to specify a value."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format. See guide on ",(0,s.jsx)(r.a,{href:"/docs/guides/little-endian-bitfields",children:"Little Endian Bitfields"}),".",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"When Data Type is STRING, BLOCK the remaining parameters are:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Default Value"}),(0,s.jsx)(r.td,{children:"Default value for this parameter. You must provide a default but if you mark the parameter REQUIRED then scripts will be forced to specify a value."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'PARAMETER SYNC 0 32 UINT 0xDEADBEEF 0xDEADBEEF 0xDEADBEEF "Sync pattern"\nPARAMETER DATA 32 32 INT MIN MAX 0 "Data value"\nPARAMETER VALUE 64 32 FLOAT 0 10.5 2.5\nPARAMETER LABEL 96 96 STRING "OPENC3" "The label to apply"\nPARAMETER BLOCK 192 0 BLOCK 0x0 "Block of binary data"\n'})}),"\n",(0,s.jsx)(r.h3,{id:"parameter-modifiers",children:"PARAMETER Modifiers"}),"\n",(0,s.jsx)(r.p,{children:"The following keywords must follow a PARAMETER keyword."}),"\n",(0,s.jsx)(r.h4,{id:"format_string",children:"FORMAT_STRING"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Adds printf style formatting"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Format"}),(0,s.jsx)(r.td,{children:"How to format using printf syntax. For example, '0x%0X' will display the value in hex."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'FORMAT_STRING "0x%0X"\n'})}),"\n",(0,s.jsx)(r.h4,{id:"units",children:"UNITS"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Add displayed units"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Full Name"}),(0,s.jsx)(r.td,{children:"Full name of the units type, e.g. Celsius"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Abbreviated"}),(0,s.jsx)(r.td,{children:"Abbreviation for the units, e.g. C"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"UNITS Celsius C\nUNITS Kilometers KM\n"})}),"\n",(0,s.jsx)(r.h4,{id:"description",children:"DESCRIPTION"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Override the defined description"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Value"}),(0,s.jsx)(r.td,{children:"The new description"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h4,{id:"meta",children:"META"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Stores custom user metadata"})}),"\n",(0,s.jsx)(r.p,{children:"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."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Meta Name"}),(0,s.jsx)(r.td,{children:"Name of the metadata to store"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Meta Values"}),(0,s.jsx)(r.td,{children:"One or more values to be stored for this Meta Name"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'META TEST "This parameter is for test purposes only"\n'})}),"\n",(0,s.jsx)(r.h4,{id:"overlap",children:"OVERLAP"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 4.4.1)"}),(0,s.jsx)(r.strong,{children:"This item is allowed to overlap other items in the packet"})]}),"\n",(0,s.jsx)(r.p,{children:"If an item's bit offset overlaps another item, OpenC3 issues a warning. This keyword explicitly allows an item to overlap another and suppresses the warning message."}),"\n",(0,s.jsx)(r.h4,{id:"key",children:"KEY"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.0.10)"}),(0,s.jsx)(r.strong,{children:"Defines the key used to access this raw value in the packet."})]}),"\n",(0,s.jsx)(r.p,{children:"Keys are often JsonPath or XPath strings"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Key string"}),(0,s.jsx)(r.td,{children:"The key to access this item"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"KEY $.book.title\n"})}),"\n",(0,s.jsx)(r.h4,{id:"variable_bit_size",children:"VARIABLE_BIT_SIZE"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.18.0)"}),(0,s.jsx)(r.strong,{children:"Marks an item as having its bit size defined by another length item"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Length Item Name"}),(0,s.jsx)(r.td,{children:"The name of the associated length item"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Length Bits Per Count"}),(0,s.jsx)(r.td,{children:"Bits per count of the length item. Defaults to 8"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Length Value Bit Offset"}),(0,s.jsx)(r.td,{children:"Offset in Bits to Apply to Length Field Value. Defaults to 0"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.h4,{id:"required",children:"REQUIRED"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Parameter is required to be populated in scripts"})}),"\n",(0,s.jsx)(r.p,{children:"When sending the command via Script Runner a value must always be given for the current command parameter. This prevents the user from relying on a default value. Note that this does not affect Command Sender which will still populate the field with the default value provided in the PARAMETER definition."}),"\n",(0,s.jsx)(r.h4,{id:"minimum_value",children:"MINIMUM_VALUE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Override the defined minimum value"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Value"}),(0,s.jsx)(r.td,{children:"The new minimum value for the parameter"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h4,{id:"maximum_value",children:"MAXIMUM_VALUE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Override the defined maximum value"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Value"}),(0,s.jsx)(r.td,{children:"The new maximum value for the parameter"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h4,{id:"default_value",children:"DEFAULT_VALUE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Override the defined default value"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Value"}),(0,s.jsx)(r.td,{children:"The new default value for the parameter"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h4,{id:"state",children:"STATE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a key/value pair for the current command parameter"})}),"\n",(0,s.jsx)(r.p,{children:"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 command parameter and allows for much greater clarity and less chance for user error."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Key"}),(0,s.jsx)(r.td,{children:"The string state name"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Value"}),(0,s.jsx)(r.td,{children:"The numerical state value"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Hazardous / Disable Messages"}),(0,s.jsxs)(r.td,{children:["Indicates the state is hazardous. This will cause a popup to ask for user confirmation when sending this command. For non-hazardous states you can also set DISABLE_MESSAGES which will not print the command when using that state.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"HAZARDOUS"})]}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Hazardous Description"}),(0,s.jsx)(r.td,{children:"String describing why this state is hazardous"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'APPEND_PARAMETER ENABLE 32 UINT 0 1 0 "Enable setting"\n  STATE FALSE 0\n  STATE TRUE 1\nAPPEND_PARAMETER STRING 1024 STRING "NOOP" "String parameter"\n  STATE "NOOP" "NOOP" DISABLE_MESSAGES\n  STATE "ARM LASER" "ARM LASER" HAZARDOUS "Arming the laser is an eye safety hazard"\n  STATE "FIRE LASER" "FIRE LASER" HAZARDOUS "WARNING! Laser will be fired!"\n'})}),"\n",(0,s.jsx)(r.h4,{id:"write_conversion",children:"WRITE_CONVERSION"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Applies a conversion when writing the current command parameter"})}),"\n",(0,s.jsxs)(r.p,{children:["Conversions are implemented in a custom Ruby or Python file which should be\nlocated in the target's lib folder. The class must inherit from Conversion.\nIt must implement the ",(0,s.jsx)(r.code,{children:"initialize"})," (Ruby) or ",(0,s.jsx)(r.code,{children:"__init__"})," (Python) method if it\ntakes extra parameters and must always implement the ",(0,s.jsx)(r.code,{children:"call"})," method. The conversion\nfactor is applied to the value entered by the user before it is written into\nthe binary command packet and sent."]}),"\n",(0,s.jsx)(r.admonition,{title:"Multiple write conversions on command parameters",type:"info",children:(0,s.jsx)(r.p,{children:"When a command is built, each item gets written (and write conversions are run)\nto set the default value. Then items are written (again write conversions are run)\nwith user provided values. Thus write conversions can be run twice. Also there are\nno guarantees which parameters have already been written. The packet itself has a\ngiven_values() method which can be used to retrieve a hash of the user provided\nvalues to the command. That can be used to check parameter values passed in."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Class Filename"}),(0,s.jsx)(r.td,{children:"The filename which contains the Ruby or Python class. The filename must be named after the class such that the class is a CamelCase version of the underscored filename. For example, 'the_great_conversion.rb' should contain 'class TheGreatConversion'."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Parameter"}),(0,s.jsx)(r.td,{children:"Additional parameter values for the conversion which are passed to the class constructor."}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Ruby Example:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"WRITE_CONVERSION the_great_conversion.rb 1000\n\nDefined in the_great_conversion.rb:\n\nrequire 'openc3/conversions/conversion'\nmodule OpenC3\n  class TheGreatConversion < Conversion\n    def initialize(multiplier)\n      super()\n      @multiplier = multiplier.to_f\n    end\n    def call(value, packet, buffer)\n      return value * multiplier\n    end\n  end\nend\n"})}),"\n",(0,s.jsx)(r.p,{children:"Python Example:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"WRITE_CONVERSION the_great_conversion.py 1000\n\nDefined in the_great_conversion.py:\n\nfrom openc3.conversions.conversion import Conversion\nclass TheGreatConversion(Conversion):\n    def __init__(self, multiplier):\n        super().__init__()\n        self.multiplier = float(multiplier)\n    def call(self, value, packet, buffer):\n        return value * multiplier\n"})}),"\n",(0,s.jsx)(r.h4,{id:"poly_write_conversion",children:"POLY_WRITE_CONVERSION"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Adds a polynomial conversion factor to the current command parameter"})}),"\n",(0,s.jsx)(r.p,{children:"The conversion factor is applied to the value entered by the user before it is written into the binary command packet and sent."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"C0"}),(0,s.jsx)(r.td,{children:"Coefficient"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cx"}),(0,s.jsx)(r.td,{children:"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."}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"POLY_WRITE_CONVERSION 10 0.5 0.25\n"})}),"\n",(0,s.jsx)(r.h4,{id:"seg_poly_write_conversion",children:"SEG_POLY_WRITE_CONVERSION"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Adds a segmented polynomial conversion factor to the current command parameter"})}),"\n",(0,s.jsx)(r.p,{children:"This conversion factor is applied to the value entered by the user before it is written into the binary command packet and sent."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Lower Bound"}),(0,s.jsx)(r.td,{children:"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."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"C0"}),(0,s.jsx)(r.td,{children:"Coefficient"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cx"}),(0,s.jsx)(r.td,{children:"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."}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"SEG_POLY_WRITE_CONVERSION 0 10 0.5 0.25 # Apply the conversion to all values < 50\nSEG_POLY_WRITE_CONVERSION 50 11 0.5 0.275 # Apply the conversion to all values >= 50 and < 100\nSEG_POLY_WRITE_CONVERSION 100 12 0.5 0.3 # Apply the conversion to all values >= 100\n"})}),"\n",(0,s.jsx)(r.h4,{id:"generic_write_conversion_start",children:"GENERIC_WRITE_CONVERSION_START"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Start a generic write conversion"})}),"\n",(0,s.jsx)(r.p,{children:"Adds a generic conversion function to the current command parameter.\nThis conversion factor is applied to the value entered by the user before it\nis written into the binary command packet and sent. The conversion is specified\nas Ruby or Python code that receives two implied parameters. 'value' which is the raw\nvalue being written and 'packet' which is a reference to the command packet\nclass (Note, referencing the packet as 'myself' is still supported for backwards\ncompatibility). The last line of code should return the converted\nvalue. The GENERIC_WRITE_CONVERSION_END keyword specifies that all lines of\ncode for the conversion have been given."}),"\n",(0,s.jsx)(r.admonition,{title:"Multiple write conversions on command parameters",type:"info",children:(0,s.jsx)(r.p,{children:"When a command is built, each item gets written (and write conversions are run)\nto set the default value. Then items are written (again write conversions are run)\nwith user provided values. Thus write conversions can be run twice. Also there are\nno guarantees which parameters have already been written. The packet itself has a\ngiven_values() method which can be used to retrieve a hash of the user provided\nvalues to the command. That can be used to check parameter values passed in."})}),"\n",(0,s.jsx)(r.admonition,{type:"warning",children:(0,s.jsx)(r.p,{children:"Generic conversions are not a good long term solution. Consider creating a conversion class and using WRITE_CONVERSION instead. WRITE_CONVERSION is easier to debug and higher performance."})}),"\n",(0,s.jsx)(r.p,{children:"Ruby Example:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"APPEND_PARAMETER ITEM1 32 UINT 0 0xFFFFFFFF 0\n  GENERIC_WRITE_CONVERSION_START\n    return (value * 1.5).to_i # Convert the value by a scale factor\n  GENERIC_WRITE_CONVERSION_END\n"})}),"\n",(0,s.jsx)(r.p,{children:"Python Example:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"APPEND_PARAMETER ITEM1 32 UINT 0 0xFFFFFFFF 0\n  GENERIC_WRITE_CONVERSION_START\n    return int(value * 1.5) # Convert the value by a scale factor\n  GENERIC_WRITE_CONVERSION_END\n"})}),"\n",(0,s.jsx)(r.h4,{id:"generic_write_conversion_end",children:"GENERIC_WRITE_CONVERSION_END"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Complete a generic write conversion"})}),"\n",(0,s.jsx)(r.h4,{id:"overflow",children:"OVERFLOW"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Set the behavior when writing a value overflows the type"})}),"\n",(0,s.jsx)(r.p,{children:"By default OpenC3 throws an error if you try to write a value which overflows its specified type, e.g. writing 255 to a 8 bit signed value. Setting the overflow behavior also allows for OpenC3 to 'TRUNCATE' the value by eliminating any high order bits. You can also set 'SATURATE' which causes OpenC3 to replace the value with the maximum or minimum allowable value for that type. Finally you can specify 'ERROR_ALLOW_HEX' which will allow for a maximum hex value to be written, e.g. you can successfully write 255 to a 8 bit signed value."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Behavior"}),(0,s.jsxs)(r.td,{children:["How OpenC3 treats an overflow value. Only applies to signed and unsigned integer data types.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"ERROR, ERROR_ALLOW_HEX, TRUNCATE, SATURATE"})]}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"OVERFLOW TRUNCATE\n"})}),"\n",(0,s.jsx)(r.h3,{id:"append_parameter",children:"APPEND_PARAMETER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a command parameter in the current command packet"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"Name of the parameter. Must be unique within the command."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Bit Size"}),(0,s.jsx)(r.td,{children:"Bit size of this parameter. 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'."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Data Type"}),(0,s.jsxs)(r.td,{children:["Data Type of this parameter",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"INT, UINT, FLOAT, DERIVED, STRING, BLOCK"})]}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"When Data Type is INT, UINT, FLOAT, DERIVED the remaining parameters are:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Minimum Value"}),(0,s.jsx)(r.td,{children:"Minimum allowed value for this parameter"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Maximum Value"}),(0,s.jsx)(r.td,{children:"Maximum allowed value for this parameter"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Default Value"}),(0,s.jsx)(r.td,{children:"Default value for this parameter. You must provide a default but if you mark the parameter REQUIRED then scripts will be forced to specify a value."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format. See guide on ",(0,s.jsx)(r.a,{href:"/docs/guides/little-endian-bitfields",children:"Little Endian Bitfields"}),".",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"When Data Type is STRING, BLOCK the remaining parameters are:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Default Value"}),(0,s.jsx)(r.td,{children:"Default value for this parameter. You must provide a default but if you mark the parameter REQUIRED then scripts will be forced to specify a value."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'APPEND_PARAMETER SYNC 32 UINT 0xDEADBEEF 0xDEADBEEF 0xDEADBEEF "Sync pattern"\nAPPEND_PARAMETER VALUE 32 FLOAT 0 10.5 2.5\nAPPEND_PARAMETER LABEL 0 STRING "OPENC3" "The label to apply"\n'})}),"\n",(0,s.jsx)(r.h3,{id:"id_parameter",children:"ID_PARAMETER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines an identification command parameter in the current command packet"})}),"\n",(0,s.jsx)(r.p,{children:"ID parameters are used to identify the binary block of data as a particular command. A command packet may have one or more ID_PARAMETERs and all must match the binary data for the command to be identified."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"Name of the parameter. Must be unique within the command."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Bit Offset"}),(0,s.jsx)(r.td,{children:"Bit offset into the command packet of the Most Significant Bit of this parameter. May be negative to indicate on offset from the end of the packet."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Bit Size"}),(0,s.jsx)(r.td,{children:"Bit size of this parameter. 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'."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Data Type"}),(0,s.jsxs)(r.td,{children:["Data Type of this parameter",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"INT, UINT, FLOAT, DERIVED, STRING, BLOCK"})]}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"When Data Type is INT, UINT, FLOAT, DERIVED the remaining parameters are:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Minimum Value"}),(0,s.jsx)(r.td,{children:"Minimum allowed value for this parameter"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Maximum Value"}),(0,s.jsx)(r.td,{children:"Maximum allowed value for this parameter"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ID Value"}),(0,s.jsx)(r.td,{children:"Identification value for this parameter. The binary data must match this value for the buffer to be identified as this packet."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format. See guide on ",(0,s.jsx)(r.a,{href:"/docs/guides/little-endian-bitfields",children:"Little Endian Bitfields"}),".",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"When Data Type is STRING, BLOCK the remaining parameters are:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Default Value"}),(0,s.jsx)(r.td,{children:"Default value for this parameter. You must provide a default but if you mark the parameter REQUIRED then scripts will be forced to specify a value."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'ID_PARAMETER OPCODE 32 32 UINT 2 2 2 "Opcode identifier"\n'})}),"\n",(0,s.jsx)(r.h3,{id:"append_id_parameter",children:"APPEND_ID_PARAMETER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines an identification command parameter in the current command packet"})}),"\n",(0,s.jsx)(r.p,{children:"ID parameters are used to identify the binary block of data as a particular command. A command packet may have one or more ID_PARAMETERs and all must match the binary data for the command to be identified."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"Name of the parameter. Must be unique within the command."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Bit Size"}),(0,s.jsx)(r.td,{children:"Bit size of this parameter. 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'."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Data Type"}),(0,s.jsxs)(r.td,{children:["Data Type of this parameter",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"INT, UINT, FLOAT, DERIVED, STRING, BLOCK"})]}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"When Data Type is INT, UINT, FLOAT, DERIVED the remaining parameters are:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Minimum Value"}),(0,s.jsx)(r.td,{children:"Minimum allowed value for this parameter"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Maximum Value"}),(0,s.jsx)(r.td,{children:"Maximum allowed value for this parameter"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ID Value"}),(0,s.jsx)(r.td,{children:"Identification value for this parameter. The binary data must match this value for the buffer to be identified as this packet."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format. See guide on ",(0,s.jsx)(r.a,{href:"/docs/guides/little-endian-bitfields",children:"Little Endian Bitfields"}),".",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"When Data Type is STRING, BLOCK the remaining parameters are:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Default Value"}),(0,s.jsx)(r.td,{children:"Default value for this parameter. You must provide a default but if you mark the parameter REQUIRED then scripts will be forced to specify a value."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'APPEND_ID_PARAMETER OPCODE 32 UINT 2 2 2 "Opcode identifier"\n'})}),"\n",(0,s.jsx)(r.h3,{id:"array_parameter",children:"ARRAY_PARAMETER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a command parameter in the current command packet that is an array"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"Name of the parameter. Must be unique within the command."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Bit Offset"}),(0,s.jsx)(r.td,{children:"Bit offset into the command packet of the Most Significant Bit of this parameter. May be negative to indicate on offset from the end of the packet. Always use a bit offset of 0 for derived parameters."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Item Bit Size"}),(0,s.jsx)(r.td,{children:"Bit size of each array item"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Item Data Type"}),(0,s.jsxs)(r.td,{children:["Data Type of each array item",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"INT, UINT, FLOAT, STRING, BLOCK, DERIVED"})]}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Array Bit Size"}),(0,s.jsx)(r.td,{children:"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."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data is to be sent in Big Endian or Little Endian format",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'ARRAY_PARAMETER ARRAY 64 64 FLOAT 640 "Array of 10 64bit floats"\n'})}),"\n",(0,s.jsx)(r.h3,{id:"append_array_parameter",children:"APPEND_ARRAY_PARAMETER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a command parameter in the current command packet that is an array"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"Name of the parameter. Must be unique within the command."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Item Bit Size"}),(0,s.jsx)(r.td,{children:"Bit size of each array item"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Item Data Type"}),(0,s.jsxs)(r.td,{children:["Data Type of each array item",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"INT, UINT, FLOAT, STRING, BLOCK, DERIVED"})]}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Array Bit Size"}),(0,s.jsx)(r.td,{children:"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."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Endianness"}),(0,s.jsxs)(r.td,{children:["Indicates if the data is to be sent in Big Endian or Little Endian format",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'APPEND_ARRAY_PARAMETER ARRAY 64 FLOAT 640 "Array of 10 64bit floats"\n'})}),"\n",(0,s.jsx)(r.h3,{id:"select_parameter",children:"SELECT_PARAMETER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Selects an existing command parameter for editing"})}),"\n",(0,s.jsx)(r.p,{children:"Must be used in conjunction with SELECT_COMMAND to first select the packet. Typically used to override generated values or make specific changes to commands that only affect a particular instance of a target used multiple times."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Parameter"}),(0,s.jsx)(r.td,{children:"Name of the parameter to select for modification"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"SELECT_COMMAND INST COLLECT\n  SELECT_PARAMETER DURATION\n    # Add units\n    UNITS Seconds S\n"})}),"\n",(0,s.jsx)(r.h3,{id:"delete_parameter",children:"DELETE_PARAMETER"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 4.4.1)"}),(0,s.jsx)(r.strong,{children:"Deletes an existing command parameter from the packet definition"})]}),"\n",(0,s.jsx)(r.p,{children:'Deleting a parameter from the command definition does not remove the defined space for that parameter. Thus unless you redefine a new parameter, there will be a "hole" in the packet where the data is not accessible. You can use SELECT_COMMAND and then PARAMETER to define a new parameter.'}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Parameter"}),(0,s.jsx)(r.td,{children:"Name of the parameter to delete"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"SELECT_COMMAND INST COLLECT\n  DELETE_PARAMETER DURATION\n"})}),"\n",(0,s.jsx)(r.h3,{id:"hidden",children:"HIDDEN"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Hides this command from all OpenC3 tools such as Command Sender and Handbook Creator"})}),"\n",(0,s.jsx)(r.p,{children:"Hidden commands do not appear in the Script Runner popup helper when writing scripts. The command still exists in the system and can be sent by scripts."}),"\n",(0,s.jsx)(r.h3,{id:"disabled",children:"DISABLED"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Disables this command from being sent"})}),"\n",(0,s.jsx)(r.p,{children:"Hides the command and also disables it from being sent by scripts. Attempts to send DISABLED commands result in an error message."}),"\n",(0,s.jsx)(r.h3,{id:"disable_messages",children:"DISABLE_MESSAGES"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Disable the Server from printing cmd(...) messages. Commands are still logged."})}),"\n",(0,s.jsx)(r.h3,{id:"meta-1",children:"META"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Stores metadata for the current command"})}),"\n",(0,s.jsx)(r.p,{children:"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."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Meta Name"}),(0,s.jsx)(r.td,{children:"Name of the metadata to store"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Meta Values"}),(0,s.jsx)(r.td,{children:"One or more values to be stored for this Meta Name"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'META FSW_TYPE "struct command"\n'})}),"\n",(0,s.jsx)(r.h3,{id:"hazardous",children:"HAZARDOUS"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Designates the current command as hazardous"})}),"\n",(0,s.jsx)(r.p,{children:"Sending a hazardous command causes a dialog asking for confirmation before sending the command"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"Description for why the command is hazardous which must be enclosed with quotes"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"accessor",children:"ACCESSOR"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.0.10)"}),(0,s.jsx)(r.strong,{children:"Defines the class used to read and write raw values from the packet"})]}),"\n",(0,s.jsx)(r.p,{children:"Defines the class that is used too read raw values from the packet. Defaults to BinaryAccessor. Provided accessors also include JsonAccessor, CborAccessor, HtmlAccessor, and XmlAccessor."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Accessor Class Name"}),(0,s.jsx)(r.td,{children:"The name of the accessor class"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Argument"}),(0,s.jsx)(r.td,{children:"Additional argument passed to the accessor class constructor"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"template",children:"TEMPLATE"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.0.10)"}),(0,s.jsx)(r.strong,{children:"Defines a template string used to initialize the command before default values are filled in"})]}),"\n",(0,s.jsx)(r.p,{children:"Generally the template string is formatted in JSON or HTML and then values are filled in with command parameters. Must be UTF-8 encoded."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Template"}),(0,s.jsx)(r.td,{children:"The template string which should be enclosed in quotes"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"template_file",children:"TEMPLATE_FILE"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.0.10)"}),(0,s.jsx)(r.strong,{children:"Defines a template file used to initialize the command before default values are filled in"})]}),"\n",(0,s.jsx)(r.p,{children:"Generally the template file is formatted in JSON or HTML and then values are filled in with command parameters. Can be binary or UTF-8."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Template File Path"}),(0,s.jsx)(r.td,{children:"The relative path to the template file. Filename should generally start with an underscore."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"response",children:"RESPONSE"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.14.0)"}),(0,s.jsx)(r.strong,{children:"Indicates the expected telemetry packet response to this command"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"Target Name of telemetry response packet"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Packet Name"}),(0,s.jsx)(r.td,{children:"Packet Name of telemetry response packet"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"error_response",children:"ERROR_RESPONSE"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.14.0)"}),(0,s.jsx)(r.strong,{children:"Indicates the expected telemetry packet error response to this command"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"Target Name of telemetry error response packet"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Packet Name"}),(0,s.jsx)(r.td,{children:"Packet Name of telemetry error response packet"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"related_item",children:"RELATED_ITEM"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.14.0)"}),(0,s.jsx)(r.strong,{children:"Defines a related telemetry item to this command"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"Target Name of related telemetry item"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Packet Name"}),(0,s.jsx)(r.td,{children:"Packet Name of related telemetry item"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Item Name"}),(0,s.jsx)(r.td,{children:"Item Name of related telemetry item"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"screen",children:"SCREEN"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.14.0)"}),(0,s.jsx)(r.strong,{children:"Defines a related telemetry screen to this command"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"Target Name of related telemetry screen"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Screen Name"}),(0,s.jsx)(r.td,{children:"Screen Name of related telemetry screen"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"virtual",children:"VIRTUAL"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.18.0)"}),(0,s.jsx)(r.strong,{children:"Marks this packet as virtual and not participating in identification"})]}),"\n",(0,s.jsx)(r.p,{children:"Used for packet definitions that can be used as structures for items with a given packet."}),"\n",(0,s.jsx)(r.h3,{id:"validator",children:"VALIDATOR"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.19.0)"}),(0,s.jsx)(r.strong,{children:"Defines a validator class for a command"})]}),"\n",(0,s.jsx)(r.p,{children:"Validator class is used to validate the command success or failure with both a pre_check and post_check method."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Class Filename"}),(0,s.jsx)(r.td,{children:"The filename which contains the Ruby or Python class. The filename must be named after the class such that the class is a CamelCase version of the underscored filename. For example, 'command_validator.rb' should contain 'class CommandValidator'."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Argument"}),(0,s.jsx)(r.td,{children:"Additional argument passed to the validator class constructor"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Ruby Example:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'VALIDATOR custom_validator.rb\n\nDefined in custom_validator.rb:\n\nrequire \'openc3/packets/command_validator\'\nclass CustomValidator < OpenC3::CommandValidator\n  def pre_check(packet)\n    if tlm("TGT PKT ITEM") == 0\n      return [false, "TGT PKT ITEM is 0"]\n    end\n    @cmd_acpt_cnt = tlm("TGT PKT CMD_ACPT_CNT")\n    return [true, nil]\n  end\n  def post_check(packet)\n    wait_check("TGT PKT CMD_ACPT_CNT > #{@cmd_acpt_cnt}", 10)\n    return [true, nil]\n  end\nend\n'})}),"\n",(0,s.jsx)(r.p,{children:"Python Example:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:'VALIDATOR custom_validator.rb\n\nDefined in custom_validator.py:\n\nclass CustomValidator(CommandValidator):\n    def pre_check(self, command):\n        if tlm("TGT PKT ITEM") == 0:\n            return [False, "TGT PKT ITEM is 0"]\n        self.cmd_acpt_cnt = tlm("INST HEALTH_STATUS CMD_ACPT_CNT")\n        return [True, None]\n\n    def post_check(self, command):\n        wait_check(f"INST HEALTH_STATUS CMD_ACPT_CNT > {self.cmd_acpt_cnt}", 10)\n        return [True, None]\n'})}),"\n",(0,s.jsx)(r.h2,{id:"select_command",children:"SELECT_COMMAND"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Selects an existing command packet for editing"})}),"\n",(0,s.jsx)(r.p,{children:"Typically used in a separate configuration file from where the original command is defined to override or add to the existing command definition. Must be used in conjunction with SELECT_PARAMETER to change an individual parameter."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"Name of the target this command is associated with"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Command Name"}),(0,s.jsx)(r.td,{children:"Name of the command to select"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"SELECT_COMMAND INST COLLECT\n  SELECT_PARAMETER DURATION\n    # Add units\n    UNITS Seconds S\n"})}),"\n",(0,s.jsx)(r.h2,{id:"example-file",children:"Example File"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Example File: TARGET/cmd_tlm/cmd.txt"})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'COMMAND TARGET COLLECT_DATA BIG_ENDIAN "Commands my target to collect data"\n  PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS PRIMARY HEADER VERSION NUMBER"\n  PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS PRIMARY HEADER PACKET TYPE"\n  PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS PRIMARY HEADER SECONDARY HEADER FLAG"\n  ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 100 "CCSDS PRIMARY HEADER APPLICATION ID"\n  PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS PRIMARY HEADER SEQUENCE FLAGS"\n  PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS PRIMARY HEADER SEQUENCE COUNT"\n  PARAMETER CCSDSLENGTH 32 16 UINT 4 4 4 "CCSDS PRIMARY HEADER PACKET LENGTH"\n  PARAMETER ANGLE 48 32 FLOAT -180.0 180.0 0.0 "ANGLE OF INSTRUMENT IN DEGREES"\n    POLY_WRITE_CONVERSION 0 0.01745 0 0\n  PARAMETER MODE 80 8 UINT 0 1 0 "DATA COLLECTION MODE"\n    STATE NORMAL 0\n    STATE DIAG 1\nCOMMAND TARGET NOOP BIG_ENDIAN "Do Nothing"\n  PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS PRIMARY HEADER VERSION NUMBER"\n  PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS PRIMARY HEADER PACKET TYPE"\n  PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS PRIMARY HEADER SECONDARY HEADER FLAG"\n  ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 101 "CCSDS PRIMARY HEADER APPLICATION ID"\n  PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS PRIMARY HEADER SEQUENCE FLAGS"\n  PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS PRIMARY HEADER SEQUENCE COUNT"\n  PARAMETER CCSDSLENGTH 32 16 UINT 0 0 0 "CCSDS PRIMARY HEADER PACKET LENGTH"\n  PARAMETER DUMMY 48 8 UINT 0 0 0 "DUMMY PARAMETER BECAUSE CCSDS REQUIRES 1 BYTE OF DATA"\nCOMMAND TARGET SETTINGS BIG_ENDIAN "Set the Settings"\n  PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS PRIMARY HEADER VERSION NUMBER"\n  PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS PRIMARY HEADER PACKET TYPE"\n  PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS PRIMARY HEADER SECONDARY HEADER FLAG"\n  ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 102 "CCSDS PRIMARY HEADER APPLICATION ID"\n  PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS PRIMARY HEADER SEQUENCE FLAGS"\n  PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS PRIMARY HEADER SEQUENCE COUNT"\n  PARAMETER CCSDSLENGTH 32 16 UINT 0 0 0 "CCSDS PRIMARY HEADER PACKET LENGTH"\n  <% 5.times do |x| %>\n  APPEND_PARAMETER SETTING<%= x %> 16 UINT 0 5 0 "Setting <%= x %>"\n  <% end %>\n'})})]})}function o(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>d,x:()=>a});var s=n(6540);const t={},i=s.createContext(t);function d(e){const r=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]);