I am gathering high-frequency data (1ms-5ms) from a JSON payload via OPC
I have attempted multiple methods using the traditional tag-based system.tag.writeBlocking() to transmit this data to our MQTT server, but the tag groups can only poll 1ms and it misses about 80% of the data.
I would like to take an input array of objects and transmit them iteratively using system.cirruslink.transmission.publish
Fiddling around, I have an input and an output from the google protobuf payload:
timestamp: 1664396472110
metrics {
name: "pressure"
timestamp: 1664396472110
datatype: 9
float_value: 173.15607
}
seq: 3
gets turned into
b"\x08\xae\xde\x8a\xae\xb80\x12\x18\n\x08pressure\x18\xae\xde\x8a\xae\xb80 \te\xf4'-C\x18\x03"
It’s not elegant, but I’d like to brute-force together a specific bytearray to transmit this data correctly.
Does anyone know the structure.pack formats for timestamp, float, etc?