blaecktcpy 2.0.0
Server Mode
Frames
B0 — Symbol List (0xB0)
Signal schema: names, types, master/slave config.
| Element | Size | Type | Description |
|---|---|---|---|
| MasterSlaveConfig | 1 byte | uint8 | 0x01 = master, 0x02 = slave |
| SlaveID | 1 byte | uint8 | 0x00 for master; device-specific for slaves |
| SymbolName | variable | string | Signal name |
| DTYPE | 1 byte | uint8 | Datatype code (0x00–0x09). See Datatypes |
D2 — Data (0xD2)
Signal values with SchemaHash, 8-byte Timestamp, StatusByte, StatusPayload, and CRC32.
| Element | Size | Type | Description |
|---|---|---|---|
| RestartFlag | 1 byte | uint8 | 0x00 = normal, 0x01 = first frame after restart |
| SchemaHash | 2 bytes | uint16 | CRC16-CCITT over signal schema. See Schema Hash |
| TimestampMode | 1 byte | uint8 | 0 = none, 1 = micros, 2 = UNIX |
| Timestamp64 | 8 bytes | uint64 | Conditional: only if TimestampMode > 0 |
| SymbolID | 2 bytes | uint16 | Zero-based signal index (matches B0 order) |
| DATA | variable | raw bytes | Signal value, size per DTYPE |
| StatusByte | 1 byte | uint8 | Device/hub status. See Status Codes |
| StatusPayload | 4 bytes | raw bytes | Status-specific data |
| CRC32 | 4 bytes | uint32 | Integrity checksum. See CRC32 |
B6 — Devices (0xB6)
Device identity with LibName, ClientNo, ClientDataEnabled, ServerRestarted, DeviceType, and Parent.
| Element | Size | Type | Description |
|---|---|---|---|
| MasterSlaveConfig | 1 byte | uint8 | 0x01 = master, 0x02 = slave |
| SlaveID | 1 byte | uint8 | 0x00 for master; device-specific for slaves |
| DeviceName | variable | string | User-defined device name |
| HWVersion | variable | string | Hardware version |
| FWVersion | variable | string | Firmware version |
| LibVersion | variable | string | Library version (e.g., "6.0.0") |
| LibName | variable | string | Library name |
| ClientNo | variable | string | Client number |
| ClientDataEnabled | variable | string | Data streaming enabled ("true" / "false") |
| ServerRestarted | variable | string | Whether server restarted since client connected |
| DeviceType | variable | string | "server" or "hub" |
| Parent | variable | string | Parent device in topology |
Hub Mode
Additional Frames
C0 — Restart Notification (0xC0)
Notifies that a device restarted. Same layout as B3.
| Element | Size | Type | Description |
|---|---|---|---|
| MasterSlaveConfig | 1 byte | uint8 | 0x01 = master, 0x02 = slave |
| SlaveID | 1 byte | uint8 | 0x00 for master; device-specific for slaves |
| DeviceName | variable | string | User-defined device name |
| HWVersion | variable | string | Hardware version |
| FWVersion | variable | string | Firmware version |
| LibVersion | variable | string | Library version (e.g., "6.0.0") |
| LibName | variable | string | Library name |