kenta-shimizu / pysemisecs

This package is SEMI-SECS-communicate implementation on Python3.
Apache License 2.0
31 stars 12 forks source link

Try to send unformatted data along with 'A' format tag #8

Closed iPAS closed 2 months ago

iPAS commented 2 months ago

Dear, thank you for your incredible work. This library worked fine until I got trying to send unformatted data which are not only ASCII characters, but also the possible char between 0..255. The following is the result from the device that received the message S18F7.

[Equipment] received primary message from: { "baudrate": 9600, "device_id": 0, "is_equip": true, "is_master": true, "name": "equip-master", "port": "/dev/pts/12", "protocol": "SECS-I-on-pySerial" } [Equipment] primary message: [00 00|92 07|00 00|00 00 00 01] S18F7 W <L [4] <A [2] "01" > <A [3] "S01" > <U4 [1] 8 > <A [11] "b'UUUUUUUU'" > # <-- Unformatted data

.

You might see that the data are sent as a sequence of code, not the byte array. Thus, my question is:

  1. Does it conform to the standard if sending the "unformatted data" message that is not pure ASCII ?
  2. How could we send the sequence of bytes via SECS protocol ?
iPAS commented 2 months ago

I sent the pull-request.