Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| doc:jroboplc:modules:jrbustcp-eng [2026/01/21 20:04] – denis | doc:jroboplc:modules:jrbustcp-eng [2026/01/21 20:06] (current) – denis | ||
|---|---|---|---|
| Line 92: | Line 92: | ||
| Initializes tag list and session parameters. | Initializes tag list and session parameters. | ||
| - | ==== Request ==== < | + | ==== Request ==== |
| + | < | ||
| cmd : 0x01 | cmd : 0x01 | ||
| flen : 1 byte | flen : 1 byte | ||
| Line 107: | Line 108: | ||
| * b3: Include tags with `hidden` flag | * b3: Include tags with `hidden` flag | ||
| - | ==== Response ==== < | + | ==== Response ==== |
| + | < | ||
| cmd : 0x81 | cmd : 0x81 | ||
| listsize | listsize | ||
| Line 119: | Line 121: | ||
| Retrieves tag metadata in chunks. | Retrieves tag metadata in chunks. | ||
| - | ==== Request ==== < | + | ==== Request ==== |
| + | < | ||
| cmd : 0x02 | cmd : 0x02 | ||
| index : 3 bytes (uint24) </ | index : 3 bytes (uint24) </ | ||
| - | ==== Response ==== < | + | ==== Response ==== |
| + | < | ||
| cmd : 0x82 | cmd : 0x82 | ||
| index : 3 bytes | index : 3 bytes | ||
| Line 130: | Line 134: | ||
| [tag entries] </ | [tag entries] </ | ||
| - | ==== Tag Entry Format ==== < | + | ==== Tag Entry Format ==== |
| + | < | ||
| type : 1 byte | type : 1 byte | ||
| nlen : 1 byte | nlen : 1 byte | ||
| Line 151: | Line 156: | ||
| Checks for tag value changes. | Checks for tag value changes. | ||
| - | ==== Request ==== < | + | ==== Request ==== |
| + | < | ||
| cmd : 0x03 </ | cmd : 0x03 </ | ||
| - | ==== Response ==== < | + | ==== Response ==== |
| + | < | ||
| cmd : 0x83 | cmd : 0x83 | ||
| quantity | quantity | ||
| Line 169: | Line 176: | ||
| Reads tag values. | Reads tag values. | ||
| - | ==== Request ==== < | + | ==== Request ==== |
| + | < | ||
| cmd : 0x04 | cmd : 0x04 | ||
| index : 3 bytes </ | index : 3 bytes </ | ||
| - | ==== Response ==== < | + | ==== Response ==== |
| + | < | ||
| cmd : 0x84 | cmd : 0x84 | ||
| index : 3 bytes | index : 3 bytes | ||
| Line 210: | Line 219: | ||
| Writes tag values. | Writes tag values. | ||
| - | ==== Request ==== < | + | ==== Request ==== |
| + | < | ||
| cmd : 0x05 | cmd : 0x05 | ||
| index : 3 bytes | index : 3 bytes | ||
| Line 216: | Line 226: | ||
| [data blocks] </ | [data blocks] </ | ||
| - | ==== Response ==== < | + | ==== Response ==== |
| + | < | ||
| cmd : 0x85 </ | cmd : 0x85 </ | ||
| Line 225: | Line 236: | ||
| Returns CRC32 checksum of all tag values after last UPDATE. | Returns CRC32 checksum of all tag values after last UPDATE. | ||
| - | ==== Request ==== < | + | ==== Request ==== |
| + | < | ||
| cmd : 0x06 </ | cmd : 0x06 </ | ||
| - | ==== Response ==== < | + | ==== Response ==== |
| + | < | ||
| cmd : 0x86 | cmd : 0x86 | ||
| crc : 4 bytes </ | crc : 4 bytes </ | ||
| Line 236: | Line 249: | ||
| ===== 11. Authentication ===== | ===== 11. Authentication ===== | ||
| - | ==== AUTH_INIT (0x07) ==== < | + | ==== AUTH_INIT (0x07) ==== |
| + | < | ||
| request: | request: | ||
| cmd : 0x07 | cmd : 0x07 | ||
| Line 254: | Line 268: | ||
| * 0x02 DISABLED | * 0x02 DISABLED | ||
| - | ==== AUTH_SUBMIT (0x08) ==== < | + | ==== AUTH_SUBMIT (0x08) ==== |
| + | < | ||
| request: | request: | ||
| cmd : 0x08 | cmd : 0x08 | ||
| Line 280: | Line 295: | ||
| ===== 13. Session Lifecycle ===== | ===== 13. Session Lifecycle ===== | ||
| - | 1. TCP connect | + | |
| - | 2. AUTH_INIT / AUTH_SUBMIT (optional) | + | 2. AUTH_INIT / AUTH_SUBMIT (optional) |
| - | 3. INIT | + | 3. INIT |
| - | 4. LIST (paged) | + | 4. LIST (paged) |
| - | 5. UPDATE | + | 5. UPDATE |
| - | 6. READ / WRITE | + | 6. READ / WRITE |
| - | 7. CRC (optional) | + | 7. CRC (optional) |
| - | 8. TCP disconnect | + | 8. TCP disconnect |
| --- | --- | ||
| Line 308: | Line 323: | ||
| ===== 16. Diagrams ===== | ===== 16. Diagrams ===== | ||
| - | ==== 16.1 Typical Session Sequence ==== < | + | ==== 16.1 Typical Session Sequence ==== |
| + | < | ||
| Client | Client | ||
| | | | | | | ||
| Line 330: | Line 346: | ||
| | | </ | | | </ | ||
| - | ==== 16.2 Binary Layout: READ Response ==== < | + | ==== 16.2 Binary Layout: READ Response ==== |
| + | < | ||
| +---------+------+---------+-----------+-----------+----------------+ | +---------+------+---------+-----------+-----------+----------------+ | ||
| | reqId | cmd | index | quantity | | reqId | cmd | index | quantity | ||
| Line 336: | Line 353: | ||
| +---------+------+---------+-----------+-----------+----------------+ </ | +---------+------+---------+-----------+-----------+----------------+ </ | ||
| - | ==== 16.3 Binary Layout: WRITE Request ==== < | + | ==== 16.3 Binary Layout: WRITE Request ==== |
| + | < | ||
| +---------+------+---------+-----------+----------------+ | +---------+------+---------+-----------+----------------+ | ||
| | reqId | cmd | index | quantity | | reqId | cmd | index | quantity | ||
| Line 364: | Line 382: | ||
| ===== Appendix A: Examples ===== | ===== Appendix A: Examples ===== | ||
| - | ==== A.1 INIT Request (hex dump) ==== < | + | ==== A.1 INIT Request (hex dump) ==== |
| + | < | ||
| 00 1A AB CD 00 00 00 01 01 | 00 1A AB CD 00 00 00 01 01 | ||
| 05 2E 2A 00 06 4A 52 6F 62 6F | 05 2E 2A 00 06 4A 52 6F 62 6F | ||
| Line 370: | Line 389: | ||
| A1 B2 C3 D4 </ | A1 B2 C3 D4 </ | ||
| - | ==== A.2 READ Response (single INT32 value) ==== < | + | ==== A.2 READ Response (single INT32 value) ==== |
| + | < | ||
| 00 14 AB CD 00 00 00 05 84 | 00 14 AB CD 00 00 00 05 84 | ||
| 00 00 01 00 00 01 00 00 00 | 00 00 01 00 00 01 00 00 00 | ||