Closed akshatd closed 2 years ago
In the interface documentation we describe Protocols. Have you tried adding our CRC Protocol to your interface:
INTERFACE <%= bob_target_name %>_INT tcpip_client_interface.rb host.docker.internal 12345 12345 10.0 nil LENGTH 32 16 0 1 LITTLE_ENDIAN 6 0xBA5EBA11 nil true
MAP_TARGET <%= bob_target_name %>
CRC_PROTOCOL READ CrcProtocol CRC
You would then also have to add a CRC item to your command:
COMMAND BOB EXAMPLE LITTLE_ENDIAN "Packet description"
# Keyword Name BitSize Type Min Max Default Description
APPEND_ID_PARAMETER ID 16 INT 1 1 1 "Identifier"
APPEND_PARAMETER VALUE 32 FLOAT 0 10.5 5 "New Value"
APPEND_PARAMETER BOOL 8 UINT MIN MAX 0 "Boolean"
STATE FALSE 0
STATE TRUE 1
APPEND_PARAMETER CRC 32 UINT MIN MAX 0 "Packet CRC"
To decode this on the C side you need to implement the CRC algorithm. Our Ruby implementation is here.
I am running COSMOS v5.0.4 and trying to use the LENGTH protocol with the syn pattern with a simple C++ server. However, I cannot figure out from the docs how to add CRC to this.
On the Cosmos side
cmd.txt
tlm.txt
plugin.txt
Rationale for the LENGTH args:
structs on the C++ server side
I am stuck here, I cannot figure out how and where to add the CRC, both on COSMOS side and on the C++ side.
Any pointers would be appreciated! Thank you!