OpenC3 / cosmos

OpenC3 COSMOS
https://openc3.com
Other
94 stars 25 forks source link

cmd_response_protocol #1162

Open jmbell1989 opened 3 months ago

jmbell1989 commented 3 months ago

I'm looking to create an interface that is a command response type interface with a crc at the end of the outgoing packets. I see there is now a cmd_response_protocol but no example usage. How do you define the packet response? Also I've tried to include the CRC helper protocol with no luck. Any help is appreciated!

jmthomas commented 3 months ago

We haven't really documented this well or converted our Demo over to the new syntax. I'll leave this open until we do. In the meantime it's basically something like this:

TELEMETRY TGT PKT BIG_ENDIAN "Handles the TLM command response"
  ACCESSOR TemplateAccessor # Default is <VALUE>
  TEMPLATE "<VOLTAGE>"
  APPEND_ITEM VOLTAGE 16 UINT

There is a 1 to 1 in the TEMPLATE with the items that are defined. You can change the template delimiters in the ACCESSOR line by doing something like: ACCESSOR TemplateAccessor ( ) to make it look for (VALUE).

jmthomas commented 2 months ago

We also need to implement the python version of the cmd/response protocol