EXT0001: Device Parameters
Ta treść nie jest jeszcze dostępna w Twoim języku.
- Extension dependencies: none
- Document status: Approved (2020-02-01)
This extension describes reading and setting device parameters (setpoints/settings). Parameters are stored in persistent memory. To optimize work with many records and eliminate intermediate states, the extension supports transactions—changes are saved in RAM first, then written to permanent memory when the transaction completes.
Commands
Section titled “Commands”0002 Read Parameters
Section titled “0002 Read Parameters”Read a block of parameters from persistent memory.
Request:
<TID> 3900 <LEN> 0002 <SOURCE> [( <OFFSET> <BLOCKLEN> ) ...]If OFFSET and BLOCKLEN are not specified, returns maximum data without offset. Multiple pairs can be specified for multiple blocks in response.
Response:
<TID> 3900 <LEN> 0002 (<BLOCKDATA>) ...| Field | Length | Description |
|---|---|---|
SOURCE | 1 byte | Data source |
OFFSET | 2 bytes | Offset in parameter structure |
BLOCKLEN | 2 bytes | Block length |
BLOCKDATA | BLOCKLEN | Parameter block bytes |
Errors:
| Code | Description |
|---|---|
0010 | Incorrect SOURCE |
0011 | Reading out of bounds |
0012 | Response overflow |
0013 | ROM read error |
0003 Write Parameters
Section titled “0003 Write Parameters”Write parameters and manage transactions.
When initialized, the device allocates RAM for the parameter structure and copies from permanent memory. Changes accumulate in RAM. Device keeps the structure for at least 10 seconds. On transaction completion (TRCON = 2), changes are written to permanent memory.
Request:
<TID> 3900 <LEN> 0003 <SOURCE> <TRCON> [( <OFFSET> <BLOCKLEN> <BLOCKDATA> ) ...]Response:
<TID> 3900 0002 0003| Field | Length | Description |
|---|---|---|
SOURCE | 1 byte | Data source |
TRCON | 1 byte | Transaction control: 0=start new, 1=continue, 2=commit |
OFFSET | 2 bytes | Offset in parameter structure |
BLOCKLEN | 2 bytes | Block length |
BLOCKDATA | BLOCKLEN | Parameter block bytes |
Errors:
| Code | Description |
|---|---|
0010 | Incorrect SOURCE |
0011 | Writing out of bounds |
0012 | ROM write error |
0013 | ROM resource expired |
0014 | RAM error (can’t allocate) |
0015 | Transaction aborted by another connection |
0016 | Transaction timeout |
0017 | Attempting to continue completed transaction |