I have a device that sends binary data. This binary data populates a read parameter of rawtype (other) and type (string). Does dataminer convert the binary data into an ascii string or does it leave it alone?
Hi Laurens!
It is through serial connection
Hello!
I believe it leaves it alone.
According to the Dataminer ECS XML agent on copilot CLI:
With rawtype="other" + type="string", DataMiner treats the value as an opaque byte sequence. It does not interpret, transcode, or null-terminate the data. What the device sends is what gets stored in the parameter.
If you need to process the binary data, you'd typically trigger a QAction on that parameter and handle the conversion yourself using protocol.GetParameter(), which returns it as a string (byte array marshalled as a .NET string).
Hi,
Data entering from a serial response stores the raw bytes into the parameter without modifying them.
The way these bytes are displayed back depends e.g. if the unicode option is active or not as it will try to interpret these bytes as text characters depending on the used code page.
If a protocol.GetParameter() is called, there has already been conversion applied to the returned result as it expects it to be a string. Converting back the raw bytes based on that string could mean that some bytes are not as expected anymore.
Getting the raw bytes in a QAction as they were received in the response can be done by calling protocol.GetData as documented here
Regards,
Through what connector connection type is the binary data received? Is it through SNMP connection (e.g. octetstring type), or through an HTTP connection type, websocket, (smart)-serial connection?