{
  "hdk_version": "1.0.0",
  "board_reference": "26YM-C1-Controller_V1_0_4",
  "protocol_reference": "YarBo-Y-CAN_Protocol_v1.6.4",
  "physical_layer": {
    "power_connector": {
      "designator": "J4 (Front Head) / J3 (Rear Attachment)",
      "part_number": "LCB30PB-M (2-Pin High-Current Waterproof)",
      "voltage_range_v": [
        26.0,
        42.0
      ],
      "nominal_voltage_v": 36.0,
      "battery_topology": "10S Li-Ion (BMS managed)",
      "high_side_switch": "JMSH1001MTL-22 MOSFET + 300 Ohm Pre-charge",
      "continuous_current_a": 40.0,
      "peak_current_a": 60.0,
      "internal_regulated_rails": [
        {
          "rail": "24V_ACT",
          "nominal_v": 24.0,
          "max_current_a": 10.0,
          "usage": "Linear push-rod, chute motor, cooling fan"
        },
        {
          "rail": "12V_POE",
          "nominal_v": 12.0,
          "max_current_a": 3.0,
          "usage": "PoE camera/compute & logic board"
        },
        {
          "rail": "5V_SEN",
          "nominal_v": 5.0,
          "max_current_a": 2.0,
          "usage": "Hall encoders, NTC thermistors, ultrasonic/rain sensors"
        }
      ]
    },
    "signal_connector": {
      "designator": "J19 (Front Head) / J18 (Rear Attachment)",
      "part_number": "HY2.0-12P (12-Pin 2.0mm Pitch)",
      "can_transceiver": "CA-IS3050 Isolated CAN Transceiver",
      "can_bitrate_bps": 1000000,
      "can_frame_format": "Standard 11-bit ID, 8-byte data payload, Little-Endian",
      "can_termination_ohm": 120
    }
  },
  "canopen_nodes": {
    "0x01": {
      "name": "Body_Master_ECU",
      "role": "Host Controller"
    },
    "0x02": {
      "name": "Roller_Plow_Head",
      "sdo_rx": "0x602",
      "sdo_tx": "0x582",
      "tpdos": [
        "0x182",
        "0x282",
        "0x382"
      ]
    },
    "0x03": {
      "name": "Snow_Blower_Head",
      "sdo_rx": "0x603",
      "sdo_tx": "0x583",
      "tpdos": [
        "0x183",
        "0x283",
        "0x383",
        "0x483"
      ]
    },
    "0x04": {
      "name": "Lawn_Mower_Head",
      "sdo_rx": "0x604",
      "sdo_tx": "0x584",
      "tpdos": [
        "0x184",
        "0x284",
        "0x384",
        "0x484"
      ]
    },
    "0x05": {
      "name": "Leaf_Blower_Head",
      "sdo_rx": "0x605",
      "sdo_tx": "0x585",
      "tpdos": [
        "0x185",
        "0x285"
      ]
    },
    "0x0C": {
      "name": "Chassis_Baseboard",
      "sdo_rx": "0x60C",
      "sdo_tx": "0x58C",
      "tpdos": [
        "0x18C",
        "0x28C",
        "0x38C",
        "0x48C",
        "0x68B",
        "0x68C"
      ]
    },
    "0x0F": {
      "name": "Trimmer_Head",
      "sdo_rx": "0x60F",
      "sdo_tx": "0x58F",
      "tpdos": [
        "0x18F"
      ]
    },
    "0x10": {
      "name": "Custom_3P_Head_Slot_0",
      "sdo_rx": "0x610",
      "sdo_tx": "0x590",
      "tpdos": [
        "0x190",
        "0x290",
        "0x390"
      ]
    }
  },
  "sdo_command_specifiers": {
    "write_req_1b": "0x2F",
    "write_req_2b": "0x2B",
    "write_req_3b": "0x27",
    "write_req_4b": "0x23",
    "write_ack": "0x60",
    "read_req": "0x40",
    "read_resp_1b": "0x4F",
    "read_resp_2b": "0x4B",
    "read_resp_3b": "0x47",
    "read_resp_4b": "0x43",
    "abort_err": "0x80"
  },
  "sdo_object_dictionary": [
    {
      "index": "0x0000",
      "sub": "0x00",
      "name": "HEAD_FIRMWARE",
      "type": "uint24",
      "access": "RO",
      "desc": "Firmware version [major, minor, patch]"
    },
    {
      "index": "0x0000",
      "sub": "0x01",
      "name": "HEAD_TYPE",
      "type": "uint8",
      "access": "RO",
      "desc": "1=SnowBlower, 2=LeafBlower, 3=LawnMower, 4=CoreCover, 5=M1Pro, 16..31=Custom 3P Attachment"
    },
    {
      "index": "0x0000",
      "sub": "0x02",
      "name": "PROTOCOL_CODE",
      "type": "uint16",
      "access": "RO",
      "desc": "Y-CAN protocol version (0x0164 = v1.6.4)"
    },
    {
      "index": "0x0000",
      "sub": "0x03",
      "name": "HARDWARE_CODE",
      "type": "uint16",
      "access": "RO",
      "desc": "PCB hardware revision"
    },
    {
      "index": "0x0001",
      "sub": "0x00",
      "name": "BLDC_PWM_CMD",
      "type": "int16",
      "access": "RW",
      "desc": "Primary tool motor speed/PWM command (850..2000 or RPM)"
    },
    {
      "index": "0x0001",
      "sub": "0x01",
      "name": "PUSH_ROD_SPEED_CMD",
      "type": "int16",
      "access": "RW",
      "desc": "Linear actuator speed/direction (-1000..+1000)"
    },
    {
      "index": "0x0001",
      "sub": "0x02",
      "name": "PUSH_ROD_POS_TARGET",
      "type": "uint16",
      "access": "RW",
      "desc": "Linear actuator target stroke (0..64 mm)"
    },
    {
      "index": "0x0001",
      "sub": "0x06",
      "name": "AUX_ACTUATOR_POS",
      "type": "int16",
      "access": "RW",
      "desc": "Secondary stepper/chute angle (-95..+95 deg) or deck height (0..100)"
    },
    {
      "index": "0x0002",
      "sub": "0x01",
      "name": "RAIL_24V_CTRL",
      "type": "uint8",
      "access": "RW",
      "desc": "24V auxiliary actuator rail enable (0=Off, 1=On)"
    },
    {
      "index": "0x0003",
      "sub": "0x20",
      "name": "HEARTBEAT_PRODUCER_MS",
      "type": "uint16",
      "access": "RW",
      "desc": "Heartbeat period in ms (default 200ms; timeout >500ms triggers safe stop)"
    },
    {
      "index": "0x0003",
      "sub": "0x30",
      "name": "HEAD_SN_PART1_4",
      "type": "char[16]",
      "access": "RO",
      "desc": "16-byte ASCII serial number across sub-indices 0x30..0x33"
    }
  ],
  "tpdo_frames": [
    {
      "cob_id": "0x180 + NodeID (e.g. 0x190 for Custom Node 0x10)",
      "period_ms": 100,
      "name": "TPDO1_Primary_Actuator_Status",
      "fields": [
        {
          "bits": "0..15",
          "name": "tool_motor_rpm",
          "type": "int16",
          "scale": 1.0,
          "unit": "rpm"
        },
        {
          "bits": "16..31",
          "name": "tool_motor_current",
          "type": "uint16",
          "scale": 0.001,
          "unit": "A"
        },
        {
          "bits": "32..47",
          "name": "push_rod_place",
          "type": "uint16",
          "scale": 1.0,
          "unit": "mm (0..64)"
        },
        {
          "bits": "48..63",
          "name": "fault_bitmap",
          "type": "uint16",
          "scale": 1.0,
          "unit": "bitmask"
        }
      ]
    },
    {
      "cob_id": "0x280 + NodeID (e.g. 0x290 for Custom Node 0x10)",
      "period_ms": 200,
      "name": "TPDO2_Power_And_Thermal",
      "fields": [
        {
          "bits": "0..15",
          "name": "vbat_mv",
          "type": "uint16",
          "scale": 0.001,
          "unit": "V"
        },
        {
          "bits": "16..23",
          "name": "rail_24v_dv",
          "type": "uint8",
          "scale": 0.1,
          "unit": "V"
        },
        {
          "bits": "24..31",
          "name": "rail_12v_dv",
          "type": "uint8",
          "scale": 0.1,
          "unit": "V"
        },
        {
          "bits": "32..47",
          "name": "mosfet_temp_deci_c",
          "type": "int16",
          "scale": 0.1,
          "unit": "degC"
        },
        {
          "bits": "48..63",
          "name": "aux_sensor_raw",
          "type": "uint16",
          "scale": 1.0,
          "unit": "raw"
        }
      ]
    },
    {
      "cob_id": "0x68C (Chassis Safety & E-Stop Broadcast)",
      "period_ms": 100,
      "name": "TPDO_Chassis_Safety_Interlock",
      "fields": [
        {
          "bits": "0..7",
          "name": "motion_state",
          "type": "uint8",
          "scale": 1.0,
          "unit": "enum"
        },
        {
          "bits": "32",
          "name": "emergency_stop_active",
          "type": "bit",
          "scale": 1.0,
          "unit": "bool (1=E-Stop pressed)"
        },
        {
          "bits": "33..34",
          "name": "hook_lock_state",
          "type": "uint2",
          "scale": 1.0,
          "unit": "enum"
        }
      ]
    }
  ]
}
