{
  "protocolVersion": "1.0",
  "scope": "GR-Edge read-only status and event index; full diagnosis via HTTPS",
  "eventKey": [
    "siteId",
    "deviceId",
    "streamId",
    "eventIndex"
  ],
  "index": {
    "min": 1,
    "max": 4294967295,
    "none": 0,
    "persistent": true,
    "wrapAllowed": false
  },
  "statuses": {
    "0": "pending",
    "1": "valid_reference_match",
    "2": "valid_abnormal_pattern",
    "3": "engine_not_running",
    "4": "not_applicable_bev",
    "5": "quality_insufficient",
    "6": "engine_running_unknown",
    "7": "unknown_model",
    "255": "unknown"
  },
  "flags": {
    "0": "local_report_readable",
    "1": "clock_synchronized",
    "2": "storage_warning",
    "3": "external_delivery_pending"
  },
  "deviceStates": {
    "0": "initializing",
    "1": "ready",
    "2": "degraded",
    "3": "fault"
  },
  "can": {
    "format": "CAN 2.0B extended classic data frame",
    "bitrate": 250000,
    "dlc": 8,
    "nodeRange": [
      1,
      127
    ],
    "byteOrder": "big-endian",
    "heartbeat": {
      "idBase": "0x18FF1000",
      "idOperation": "OR node",
      "periodMs": 1000,
      "bytes": [
        "major=1",
        "minor=0",
        "deviceState",
        "flags",
        "uptime[31:24]",
        "uptime[23:16]",
        "uptime[15:8]",
        "uptime[7:0]"
      ]
    },
    "event": {
      "idBase": "0x18FF1100",
      "idOperation": "OR node",
      "trigger": "completion or revision; latest repeated every 1 second",
      "bytes": [
        "major=1",
        "status",
        "flags",
        "revisionHint",
        "index[31:24]",
        "index[23:16]",
        "index[15:8]",
        "index[7:0]"
      ],
      "revisionHint": "1..254 actual; 255 means fetch full revision via HTTPS; 0 means no event"
    },
    "example": {
      "id": "0x18FF1101",
      "dataHex": "010203010000002A"
    }
  },
  "modbus": {
    "mode": "RTU",
    "baud": 19200,
    "serial": "8E1",
    "defaultUnit": 1,
    "unitRange": [
      1,
      247
    ],
    "function": 4,
    "startAddress": 0,
    "quantity": 16,
    "registerByteOrder": "big-endian",
    "uint32WordOrder": "high word first (ABCD)",
    "crcByteOrder": "low byte first",
    "atomicSnapshot": true,
    "registers": [
      {
        "pduAddress": 0,
        "reference": 30001,
        "count": 1,
        "name": "protocolVersion",
        "type": "uint16"
      },
      {
        "pduAddress": 1,
        "reference": 30002,
        "count": 1,
        "name": "deviceState",
        "type": "uint16"
      },
      {
        "pduAddress": 2,
        "reference": 30003,
        "count": 1,
        "name": "flags",
        "type": "uint16"
      },
      {
        "pduAddress": 3,
        "reference": 30004,
        "count": 1,
        "name": "status",
        "type": "uint16"
      },
      {
        "pduAddress": 4,
        "reference": 30005,
        "count": 2,
        "name": "eventIndex",
        "type": "uint32"
      },
      {
        "pduAddress": 6,
        "reference": 30007,
        "count": 2,
        "name": "reportRevision",
        "type": "uint32"
      },
      {
        "pduAddress": 8,
        "reference": 30009,
        "count": 2,
        "name": "uptimeSeconds",
        "type": "uint32"
      },
      {
        "pduAddress": 10,
        "reference": 30011,
        "count": 2,
        "name": "snapshotSequence",
        "type": "uint32"
      },
      {
        "pduAddress": 12,
        "reference": 30013,
        "count": 1,
        "name": "node",
        "type": "uint16"
      },
      {
        "pduAddress": 13,
        "reference": 30014,
        "count": 3,
        "name": "reserved",
        "type": "uint16[3]"
      }
    ]
  }
}
