OpenC3/cosmos

View on GitHub
docs/assets/js/5fe211ef.7cabc4a4.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[864],{472:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>o,frontMatter:()=>s,metadata:()=>d,toc:()=>h});var r=i(4848),t=i(8453);const s={sidebar_position:8,title:"Tables"},l=void 0,d={id:"configuration/table",title:"Tables",description:"Table Definition Files",source:"@site/docs/configuration/table.md",sourceDirName:"configuration",slug:"/configuration/table",permalink:"/docs/configuration/table",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/table.md",tags:[],version:"current",sidebarPosition:8,frontMatter:{sidebar_position:8,title:"Tables"},sidebar:"defaultSidebar",previous:{title:"Protocols",permalink:"/docs/configuration/protocols"},next:{title:"Screens",permalink:"/docs/configuration/telemetry-screens"}},a={},h=[{value:"Table Definition Files",id:"table-definition-files",level:2},{value:"TABLEFILE",id:"tablefile",level:2},{value:"TABLE",id:"table",level:2},{value:"TABLE Modifiers",id:"table-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:"HIDDEN",id:"hidden",level:4},{value:"UNEDITABLE",id:"uneditable",level:4},{value:"APPEND_PARAMETER",id:"append_parameter",level:3},{value:"SELECT_TABLE",id:"select_table",level:2},{value:"DEFAULT",id:"default",level:2},{value:"Example File",id:"example-file",level:2}];function c(e){const n={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,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"table-definition-files",children:"Table Definition Files"}),"\n",(0,r.jsxs)(n.p,{children:["Table definition files define the binary tables that can be displayed in COSMOS ",(0,r.jsx)(n.a,{href:"/docs/tools/table-manager",children:"Table Manager"}),"\n. Table definitions are defined in the target's tables/config directory and are typically named after the table such as ",(0,r.jsx)(n.code,{children:"PPSSelectionTable_def.txt"}),". The ",(0,r.jsx)(n.code,{children:"_def.txt"})," extension helps to identify the file as a table definition. Table definitions can be combined using the ",(0,r.jsx)(n.code,{children:"TABLEFILE"})," keyword. This allows you to build individual table components into a larger binary."]}),"\n",(0,r.jsxs)(n.p,{children:["The Table definition files share a lot of similarity with the ",(0,r.jsx)(n.a,{href:"/docs/configuration/command",children:"Command Configuration"}),". You have the same data types: INT, UINT, FLOAT, STRING, BLOCK. These correspond to integers, unsigned integers, floating point numbers, strings and binary blocks of data."]}),"\n",(0,r.jsx)("div",{style:{clear:"both"}}),"\n",(0,r.jsx)(n.h1,{id:"table-keywords",children:"Table Keywords"}),"\n",(0,r.jsx)(n.h2,{id:"tablefile",children:"TABLEFILE"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Specify another file to open and process for table definitions"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"File Name"}),(0,r.jsx)(n.td,{children:"Name of the file. The file will be looked for in the directory of the current definition file."}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.h2,{id:"table",children:"TABLE"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Start a new table definition"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Name"}),(0,r.jsx)(n.td,{children:"Name of the table in quotes. The name will appear on the GUI tab."}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Endianness"}),(0,r.jsxs)(n.td,{children:["Indicates if the data in this table is in Big Endian or Little Endian format",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Display"}),(0,r.jsxs)(n.td,{children:["Indicates the table contains KEY_VALUE rows (e.g. each row is unique), or a ROW_COLUMN table with identical rows containing different values.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"KEY_VALUE, ROW_COLUMN"})]}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"When Display is KEY_VALUE the remaining parameters are:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Description"}),(0,r.jsx)(n.td,{children:"Description of the table in quotes. The description is used in mouseover popups and status line information."}),(0,r.jsx)(n.td,{children:"False"})]})})]}),"\n",(0,r.jsx)(n.p,{children:"When Display is ROW_COLUMN the remaining parameters are:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Rows"}),(0,r.jsx)(n.td,{children:"The number of rows in the table"}),(0,r.jsx)(n.td,{children:"False"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Description"}),(0,r.jsx)(n.td,{children:"Description of the table in quotes. The description is used in mouseover popups and status line information."}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"table-modifiers",children:"TABLE Modifiers"}),"\n",(0,r.jsx)(n.p,{children:"The following keywords must follow a TABLE keyword."}),"\n",(0,r.jsx)(n.h3,{id:"parameter",children:"PARAMETER"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Defines a parameter in the current table"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Name"}),(0,r.jsx)(n.td,{children:"Name of the parameter. Must be unique within the table."}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Bit Offset"}),(0,r.jsx)(n.td,{children:"Bit offset into the table of the Most Significant Bit of this parameter. May be negative to indicate on offset from the end of the table. Always use a bit offset of 0 for derived parameters."}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Bit Size"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Data Type"}),(0,r.jsxs)(n.td,{children:["Data Type of this parameter",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"INT, UINT, FLOAT, DERIVED, STRING, BLOCK"})]}),(0,r.jsx)(n.td,{children:"True"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"When Data Type is INT, UINT, FLOAT, DERIVED the remaining parameters are:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Minimum Value"}),(0,r.jsx)(n.td,{children:"Minimum allowed value for this parameter"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Maximum Value"}),(0,r.jsx)(n.td,{children:"Maximum allowed value for this parameter"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Default Value"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Description"}),(0,r.jsx)(n.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,r.jsx)(n.td,{children:"False"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Endianness"}),(0,r.jsxs)(n.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format. See guide on ",(0,r.jsx)(n.a,{href:"/docs/guides/little-endian-bitfields",children:"Little Endian Bitfields"}),".",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"When Data Type is STRING, BLOCK the remaining parameters are:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Default Value"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Description"}),(0,r.jsx)(n.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,r.jsx)(n.td,{children:"False"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Endianness"}),(0,r.jsxs)(n.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"parameter-modifiers",children:"PARAMETER Modifiers"}),"\n",(0,r.jsx)(n.p,{children:"The following keywords must follow a PARAMETER keyword."}),"\n",(0,r.jsx)(n.h4,{id:"format_string",children:"FORMAT_STRING"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Adds printf style formatting"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Format"}),(0,r.jsx)(n.td,{children:"How to format using printf syntax. For example, '0x%0X' will display the value in hex."}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.p,{children:"Example Usage:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ruby",children:'FORMAT_STRING "0x%0X"\n'})}),"\n",(0,r.jsx)(n.h4,{id:"units",children:"UNITS"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Add displayed units"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Full Name"}),(0,r.jsx)(n.td,{children:"Full name of the units type, e.g. Celsius"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Abbreviated"}),(0,r.jsx)(n.td,{children:"Abbreviation for the units, e.g. C"}),(0,r.jsx)(n.td,{children:"True"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Example Usage:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ruby",children:"UNITS Celsius C\nUNITS Kilometers KM\n"})}),"\n",(0,r.jsx)(n.h4,{id:"description",children:"DESCRIPTION"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Override the defined description"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Value"}),(0,r.jsx)(n.td,{children:"The new description"}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.h4,{id:"meta",children:"META"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Stores custom user metadata"})}),"\n",(0,r.jsx)(n.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,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Meta Name"}),(0,r.jsx)(n.td,{children:"Name of the metadata to store"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Meta Values"}),(0,r.jsx)(n.td,{children:"One or more values to be stored for this Meta Name"}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Example Usage:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ruby",children:'META TEST "This parameter is for test purposes only"\n'})}),"\n",(0,r.jsx)(n.h4,{id:"overlap",children:"OVERLAP"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)("div",{class:"right",children:"(Since 4.4.1)"}),(0,r.jsx)(n.strong,{children:"This item is allowed to overlap other items in the packet"})]}),"\n",(0,r.jsx)(n.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,r.jsx)(n.h4,{id:"key",children:"KEY"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)("div",{class:"right",children:"(Since 5.0.10)"}),(0,r.jsx)(n.strong,{children:"Defines the key used to access this raw value in the packet."})]}),"\n",(0,r.jsx)(n.p,{children:"Keys are often JsonPath or XPath strings"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Key string"}),(0,r.jsx)(n.td,{children:"The key to access this item"}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.p,{children:"Example Usage:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ruby",children:"KEY $.book.title\n"})}),"\n",(0,r.jsx)(n.h4,{id:"variable_bit_size",children:"VARIABLE_BIT_SIZE"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)("div",{class:"right",children:"(Since 5.18.0)"}),(0,r.jsx)(n.strong,{children:"Marks an item as having its bit size defined by another length item"})]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Length Item Name"}),(0,r.jsx)(n.td,{children:"The name of the associated length item"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Length Bits Per Count"}),(0,r.jsx)(n.td,{children:"Bits per count of the length item. Defaults to 8"}),(0,r.jsx)(n.td,{children:"False"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Length Value Bit Offset"}),(0,r.jsx)(n.td,{children:"Offset in Bits to Apply to Length Field Value. Defaults to 0"}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.h4,{id:"required",children:"REQUIRED"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Parameter is required to be populated in scripts"})}),"\n",(0,r.jsx)(n.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,r.jsx)(n.h4,{id:"minimum_value",children:"MINIMUM_VALUE"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Override the defined minimum value"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Value"}),(0,r.jsx)(n.td,{children:"The new minimum value for the parameter"}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.h4,{id:"maximum_value",children:"MAXIMUM_VALUE"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Override the defined maximum value"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Value"}),(0,r.jsx)(n.td,{children:"The new maximum value for the parameter"}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.h4,{id:"default_value",children:"DEFAULT_VALUE"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Override the defined default value"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Value"}),(0,r.jsx)(n.td,{children:"The new default value for the parameter"}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.h4,{id:"state",children:"STATE"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Defines a key/value pair for the current command parameter"})}),"\n",(0,r.jsx)(n.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,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Key"}),(0,r.jsx)(n.td,{children:"The string state name"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Value"}),(0,r.jsx)(n.td,{children:"The numerical state value"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Hazardous / Disable Messages"}),(0,r.jsxs)(n.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,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"HAZARDOUS"})]}),(0,r.jsx)(n.td,{children:"False"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Hazardous Description"}),(0,r.jsx)(n.td,{children:"String describing why this state is hazardous"}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Example Usage:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.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,r.jsx)(n.h4,{id:"write_conversion",children:"WRITE_CONVERSION"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Applies a conversion when writing the current command parameter"})}),"\n",(0,r.jsxs)(n.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,r.jsx)(n.code,{children:"initialize"})," (Ruby) or ",(0,r.jsx)(n.code,{children:"__init__"})," (Python) method if it\ntakes extra parameters and must always implement the ",(0,r.jsx)(n.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,r.jsx)(n.admonition,{title:"Multiple write conversions on command parameters",type:"info",children:(0,r.jsx)(n.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,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Class Filename"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Parameter"}),(0,r.jsx)(n.td,{children:"Additional parameter values for the conversion which are passed to the class constructor."}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Ruby Example:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.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,r.jsx)(n.p,{children:"Python Example:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.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,r.jsx)(n.h4,{id:"poly_write_conversion",children:"POLY_WRITE_CONVERSION"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Adds a polynomial conversion factor to the current command parameter"})}),"\n",(0,r.jsx)(n.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,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"C0"}),(0,r.jsx)(n.td,{children:"Coefficient"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Cx"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Example Usage:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ruby",children:"POLY_WRITE_CONVERSION 10 0.5 0.25\n"})}),"\n",(0,r.jsx)(n.h4,{id:"seg_poly_write_conversion",children:"SEG_POLY_WRITE_CONVERSION"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Adds a segmented polynomial conversion factor to the current command parameter"})}),"\n",(0,r.jsx)(n.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,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Lower Bound"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"C0"}),(0,r.jsx)(n.td,{children:"Coefficient"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Cx"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Example Usage:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.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,r.jsx)(n.h4,{id:"generic_write_conversion_start",children:"GENERIC_WRITE_CONVERSION_START"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Start a generic write conversion"})}),"\n",(0,r.jsx)(n.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,r.jsx)(n.admonition,{title:"Multiple write conversions on command parameters",type:"info",children:(0,r.jsx)(n.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,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsx)(n.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,r.jsx)(n.p,{children:"Ruby Example:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.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,r.jsx)(n.p,{children:"Python Example:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.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,r.jsx)(n.h4,{id:"generic_write_conversion_end",children:"GENERIC_WRITE_CONVERSION_END"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Complete a generic write conversion"})}),"\n",(0,r.jsx)(n.h4,{id:"overflow",children:"OVERFLOW"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Set the behavior when writing a value overflows the type"})}),"\n",(0,r.jsx)(n.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,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Behavior"}),(0,r.jsxs)(n.td,{children:["How OpenC3 treats an overflow value. Only applies to signed and unsigned integer data types.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"ERROR, ERROR_ALLOW_HEX, TRUNCATE, SATURATE"})]}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.p,{children:"Example Usage:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ruby",children:"OVERFLOW TRUNCATE\n"})}),"\n",(0,r.jsx)(n.h4,{id:"hidden",children:"HIDDEN"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Indicates that the parameter should not be shown to the user in the Table Manager GUI"})}),"\n",(0,r.jsx)(n.p,{children:"Hidden parameters still exist and will be saved to the resulting binary. This is useful for padding and other essential but non-user editable fields."}),"\n",(0,r.jsx)(n.h4,{id:"uneditable",children:"UNEDITABLE"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Indicates that the parameter should be shown to the user but not editable."})}),"\n",(0,r.jsx)(n.p,{children:"Uneditable parameters are useful for control fields which the user may be interested in but should not be able to edit."}),"\n",(0,r.jsx)(n.h3,{id:"append_parameter",children:"APPEND_PARAMETER"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Defines a parameter in the current table"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Name"}),(0,r.jsx)(n.td,{children:"Name of the parameter. Must be unique within the table."}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Bit Size"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Data Type"}),(0,r.jsxs)(n.td,{children:["Data Type of this parameter",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"INT, UINT, FLOAT, DERIVED, STRING, BLOCK"})]}),(0,r.jsx)(n.td,{children:"True"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"When Data Type is INT, UINT, FLOAT, DERIVED the remaining parameters are:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Minimum Value"}),(0,r.jsx)(n.td,{children:"Minimum allowed value for this parameter"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Maximum Value"}),(0,r.jsx)(n.td,{children:"Maximum allowed value for this parameter"}),(0,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Default Value"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Description"}),(0,r.jsx)(n.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,r.jsx)(n.td,{children:"False"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Endianness"}),(0,r.jsxs)(n.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format. See guide on ",(0,r.jsx)(n.a,{href:"/docs/guides/little-endian-bitfields",children:"Little Endian Bitfields"}),".",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"When Data Type is STRING, BLOCK the remaining parameters are:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Default Value"}),(0,r.jsx)(n.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,r.jsx)(n.td,{children:"True"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Description"}),(0,r.jsx)(n.td,{children:"Description for this parameter which must be enclosed with quotes"}),(0,r.jsx)(n.td,{children:"False"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Endianness"}),(0,r.jsxs)(n.td,{children:["Indicates if the data in this command is to be sent in Big Endian or Little Endian format",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Valid Values: ",(0,r.jsx)("span",{class:"values",children:"BIG_ENDIAN, LITTLE_ENDIAN"})]}),(0,r.jsx)(n.td,{children:"False"})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"select_table",children:"SELECT_TABLE"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Select an existing table for editing, typically done to override an existing definition"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Table"}),(0,r.jsx)(n.td,{children:"The name of the existing table"}),(0,r.jsx)(n.td,{children:"True"})]})})]}),"\n",(0,r.jsx)(n.h2,{id:"default",children:"DEFAULT"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Specify default values for a SINGLE row in a multi-column table"})}),"\n",(0,r.jsx)(n.p,{children:"If you have multiple rows you need a DEFAULT line for each row. If all your rows are identical consider using ERB as shown in the OpenC3 demo."}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Parameter"}),(0,r.jsx)(n.th,{children:"Description"}),(0,r.jsx)(n.th,{children:"Required"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Default values"}),(0,r.jsx)(n.td,{children:"A STATE value or data value corresponding to the data type"}),(0,r.jsx)(n.td,{children:"False"})]})})]}),"\n",(0,r.jsx)(n.h2,{id:"example-file",children:"Example File"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example File: TARGET/tables/config/MCConfigurationTable_def.txt"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ruby",children:'TABLE "MC_Configuration" BIG_ENDIAN KEY_VALUE "Memory Control Configuration Table"\n  APPEND_PARAMETER "Scrub_Region_1_Start_Addr" 32 UINT 0 0x03FFFFFB 0\n    FORMAT_STRING "0x%0X"\n  APPEND_PARAMETER "Scrub_Region_1_End_Addr" 32 UINT 0 0x03FFFFFF 0x03FFFFFF\n    FORMAT_STRING "0x%0X"\n  APPEND_PARAMETER "Scrub_Region_2_Start_Addr" 32 UINT 0 0x03FFFFB 0\n    FORMAT_STRING "0x%0X"\n  APPEND_PARAMETER "Scrub_Region_2_End_Addr" 32 UINT 0 0x03FFFFF 0x03FFFFF\n    FORMAT_STRING "0x%0X"\n  APPEND_PARAMETER "Dump_Packet_Throttle_(sec)" 32 UINT 0 0x0FFFFFFFF 2 "Number of seconds to wait between dumping large packets"\n  APPEND_PARAMETER "Memory_Scrubbing" 8 UINT 0 1 1\n    STATE DISABLE 0\n    STATE ENABLE 1\n  APPEND_PARAMETER "SIOC_Memory_Config" 8 UINT 1 3 3\n  APPEND_PARAMETER "Uneditable_Text" 32 UINT MIN MAX 0xDEADBEEF "Uneditable field"\n    FORMAT_STRING "0x%0X"\n    UNEDITABLE\n  APPEND_PARAMETER "Uneditable_State" 16 UINT MIN MAX 0 "Uneditable field"\n    STATE DISABLE 0\n    STATE ENABLE 1\n    UNEDITABLE\n  APPEND_PARAMETER "Uneditable_Check" 16 UINT MIN MAX 1 "Uneditable field"\n    STATE UNCHECKED 0\n    STATE CHECKED 1\n    UNEDITABLE\n  APPEND_PARAMETER "Binary" 32 STRING 0xDEADBEEF "Binary string"\n  APPEND_PARAMETER "Pad" 16 UINT 0 0 0\n    HIDDEN\n'})})]})}function o(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>d});var r=i(6540);const t={},s=r.createContext(t);function l(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]);