node-open-protocol icon indicating copy to clipboard operation
node-open-protocol copied to clipboard

MID 0002 revision 6 is incorrectly implemented

Open ferm10n opened this issue 2 years ago • 3 comments

Open Protocol spec defines rev 6 with these new fields:

  • sequenceNumberSupport
  • linkingHandlingSupport
  • stationID
  • stationName
  • clientID

Missing Keys / Fields

The parser is missing the last three keys:

  • https://github.com/st-one-io/node-open-protocol/blob/f514d00d5ddc7b0d84f222c2e481e2a07cf16c91/src/mid/0002.js#L72
  • https://github.com/st-one-io/node-open-protocol/blob/f514d00d5ddc7b0d84f222c2e481e2a07cf16c91/test/0002.spec.js#L191-L205

Interestingly, the serializer has all the keys:

  • https://github.com/st-one-io/node-open-protocol/blob/f514d00d5ddc7b0d84f222c2e481e2a07cf16c91/src/mid/0002.js#L191-L200
  • https://github.com/st-one-io/node-open-protocol/blob/f514d00d5ddc7b0d84f222c2e481e2a07cf16c91/test/0002.spec.js#L378-L395

I would expect the parser and serializer to behave as inverses to each other.

Wrong type for stationID

Additionally, the type for stationID is also wrong. The official protocol says it's supposed to be a number, but node-open-protocol tries to interpret it as a string!

ferm10n avatar Mar 24 '23 19:03 ferm10n

Just realized that the type for stationID is also wrong. The official protocol says it's supposed to be a number, but node-open-protocol tries to interpret it as a string! Updating the issue to be more generic

ferm10n avatar Mar 24 '23 20:03 ferm10n

Hello @ferm10n , it seems that you are the only one active member in the project. I have a machine IxB ready in my lab that I would like to use for creating MID0900. I am currently using MID0008 I always receive an error and to be honest I am not able to debug it. Would you be interested on stablishing a kind of collab o working session in order to help me to debug it?

Thanks in advance

alexmc1510 avatar Apr 14 '23 07:04 alexmc1510

I don't have a whole lot of time lately, but I could try to help! I'll reply on your MID900 issue

ferm10n avatar Apr 14 '23 15:04 ferm10n