SECS/GEM Module Questions

Hi All,

I’m new to SECS/GEM Module. I have a few questions regarding inserting of SECS/GEM messages into the Database Table “SECSGEM_NewMessage”

Suppose I’m sending a SECS requests with a parameter format of “B”

How will the message body look like

myByteVal = ??? <------ assume this is my “B” data to be inserted
myASCIIVAL = ‘test’
body = ‘[{“format”:“A”, “value”:’ + myASCIIVAL + ‘},{“format”:“B”, “value”:’ + myByteVal + ‘}]’;
print body

How will I do this? and how will the body string looks like when inserted in the database?

Thank you!

Keep in mind that the new messages table is going to disappear in the very near future, and that the only way to send messages will be to use the system.secsgem.sendMessage() scripting function. But in the meantime, here is a message body with binary data:

{'doc': 'ABS','format': 'B','value': [0x00,0x01,0x03,0x03,0x0a,0x0d,0x1b,0x5d,0x18,0x18,0x18,0x1a,0x04,0x13,0x7f,0x80,0xfe,0xff] }

Here is another example using integers for the byte array (same values as above):

{'doc': 'ABS','format': 'B','value': [0, 1, 3, 3, 10, 13, 27, 93, 24, 24, 24, 26, 4, 19, 127, -128, -2, -1] }

Thanks! It’s now working!