Skip to content

MID 0002 revision 6 is incorrectly implemented #40

@ferm10n

Description

@ferm10n

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:

  • processKey(msg, buffer, "linkingHandlingSupport", 13, 2, position, cb) &&
  • payload: {
    cellID: 1,
    channelID: 1,
    controllerName: "Teste Airbag",
    supplierCode: "ABC",
    openProtocolVersion: "AAAAAAAAAAAAAAAAAAA",
    controllerSoftwareVersion: "BBBBBBBBBBBBBBBBBBB",
    toolSoftwareVersion: "CCCCCCCCCCCCCCCCCCC",
    rbuType: "AS254DFCVFDCVGTREDFGHJKL",
    controllerSerialNumber: "123987ASD6",
    systemType: 3,
    systemSubtype: 2,
    sequenceNumberSupport: 0,
    linkingHandlingSupport: 1
    }

Interestingly, the serializer has all the keys:

  • serializerField(msg, buf, "clientID", "number", 1, position, cb) &&
    serializerKey(msg, buf, 16, 2, position, cb) &&
    serializerField(msg, buf, "stationName", "string", 25, position, cb) &&
    serializerKey(msg, buf, 15, 2, position, cb) &&
    serializerField(msg, buf, "stationID", "string", 10, position, cb) &&
    serializerKey(msg, buf, 14, 2, position, cb) &&
    serializerField(msg, buf, "linkingHandlingSupport", "number", 1, position, cb) &&
    serializerKey(msg, buf, 13, 2, position, cb) &&
    serializerField(msg, buf, "sequenceNumberSupport", "number", 1, position, cb) &&
    serializerKey(msg, buf, 12, 2, position, cb);
  • payload: {
    cellID: 1,
    channelID: 1,
    controllerName: "Teste Airbag",
    supplierCode: "ABC",
    openProtocolVersion: "AAAAAAAAAAAAAAAAAAA",
    controllerSoftwareVersion: "BBBBBBBBBBBBBBBBBBB",
    toolSoftwareVersion: "CCCCCCCCCCCCCCCCCCC",
    rbuType: "AS254DFCVFDCVGTREDFGHJKL",
    controllerSerialNumber: "123987ASD6",
    systemType: 3,
    systemSubtype: 2,
    sequenceNumberSupport: 0,
    linkingHandlingSupport: 1,
    stationID: "AESDR56RDT",
    stationName: "QASWWEDXCVFR562 DERF34EDF",
    clientID: 9
    }

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions