CAUTION: This information refers to an earlier version of the live changes format (version 1.1).
The live changes command table (LIVECMDS) consists of a number of contiguous definitions (LIVECMDs), each of which contains all the information about a specific live command.
The location (relative to the file) and size of the table are specified by the LIVEHEADER.ITEMSOFF and LIVEHEADER.ITEMSSIZE fields, respectively.
Live changes command definition
Live commands (LIVECMD) have a common initial part, then a specific data area for each type of element. The common part is as follows:
Name |
Offset |
Type |
Description |
---|---|---|---|
CODE |
+0 |
U16 |
Command code |
SIZE |
+2 |
U32 |
Full size of the command (all fields). |
DATA |
+6 |
... |
Command-specific data (optional). |
The commands currently provided are:
•Command 0x0001 - Circuit insertion
•Command 0x0002 - Edit circuit
•Command 0x0003 - Remove circuit
•Command 0x0004 - Structure insertion
•Command 0x0005 - Variable insertion
Command 0x0001 - Circuit Insertion
This command allows a circuit to be inserted into a given block, at a certain position. The data of the command, are as follows:
Name |
Offset |
Type |
Description |
---|---|---|---|
CODE |
+0 |
U16 |
0x0001 |
SIZE |
+2 |
U32 |
32 + ITEMSSIZE |
BLOCKID |
+6 |
U32 |
container block ID |
RUNGID |
+10 |
U32 |
ID of the affected circuit (goes into Inserting state) |
REFID |
+14 |
U32 |
ID of reference circuit (only for insertion locations #1, otherwise 0) |
IFLAGS |
+18 |
U16 |
Insertion settings: 0x000F = Insertion location: 0x0 = Before the circuit with REFID ID (#1) 0x1 = After the circuit with REFID ID (#1) 0x2 = As the first circuit of the block 0x3 = As the last circuit of the block |
FLAGS |
+20 |
U16 |
Circuit settings: 0x0001 (ignored in live changes) |
ITEMSOFF |
+22 |
U32 |
Offset of the circuit element table (relative to the file) |
ITEMSSIZE |
+26 |
U32 |
Size of the circuit element table |
TEXT |
+30 |
U32 |
Offset circuit description ((relative to strings)) |
WARNING: the circuit element table must still be appended to the live command itself.
Command 0x0002 - Edit Circuit
This command allows to insert a modified circuit, removing the old one, in a given block. The data of the command, are as follows:
Name |
Offset |
Type |
Description |
---|---|---|---|
CODE |
+0 |
U16 |
0x0002 |
SIZE |
+2 |
U32 |
32 + ITEMSSIZE |
BLOCKID |
+6 |
U32 |
container block ID |
RUNGID |
+10 |
U32 |
ID of the affected circuit (goes into Inserting state) |
REFID |
+14 |
U32 |
ID of previous circuit to be removed (goes into Dropping state) |
|
+18 |
U16 |
(reserved) |
FLAGS |
+20 |
U16 |
Circuit settings: 0x0001 (ignored in live changes) |
ITEMSOFF |
+22 |
U32 |
Offset of the circuit element table (relative to the file) |
ITEMSSIZE |
+26 |
U32 |
Size of the circuit element table |
TEXT |
+30 |
U32 |
Offset circuit description (related to strings) |
Command 0x0003 - Circuit Removal.
This command allows to remove an existing circuit. The data of the command, are as follows:
Name |
Offset |
Type |
Description |
---|---|---|---|
CODE |
+0 |
U16 |
0x0003 |
SIZE |
+2 |
U32 |
14 |
BLOCKID |
+6 |
U32 |
Container block ID |
RUNGID |
+10 |
U32 |
ID of the circuit to be removed (goes into Deleting state) |
Command 0x0004 - Structure Insertion
This command allows you to create a new structure. The data of the command, are as follows:
Name |
Offset |
Type |
Description |
---|---|---|---|
CODE |
+0 |
U16 |
0x0004 |
SIZE |
+2 |
U32 |
32 + (VARSCNT * sizeof(VAR)) |
TYPEID |
+6 |
U32 |
User structure type ID Note: only values 0x0001000-0xFFFFFE; values 0 and 0xFFFFFF are special meaning IDs. |
FLAGS |
+10 |
U16 |
Structure settings: 0x0001 (ignored in live edits) |
NAME |
+12 |
U32 |
Offset structure name (relative to strings) |
TEXT |
+16 |
U32 |
Offset description of structure (relative to strings) |
VARSOFF |
+20 |
U32 |
Variable table offset (file related) (#1) |
VARSCNT |
+24 |
U32 |
Variable table size |
SIZE |
+28 |
U32 |
Size of structure [bytes] |
(#1) The structure definition uses a normal variable definition table to define its elements. In this case, variable IDs are meaningless and should always be 0.
Command 0x0005 - Variable insertion.
This command allows you to create a new variable. The command data, are as follows:
Name |
Offset |
Type |
Description |
---|---|---|---|
CODE |
+0 |
U16 |
0x0005 |
SIZE |
+2 |
U32 |
48 |
VARID |
|
U32 |
Unique ID of the user variable. Note: only values 0x0001000-0xFFFFFE; values 0 and 0xFFFFFF are special meaning IDs. |
TYPEID |
|
U32 |
ID variable data type Note: can be a default or user-defined type. |
FLAGS |
|
U16 |
Variable settings: 0x0001 (ignored in live edits) 0x0002 (ignored in live edits) |
NAME |
|
U32 |
Offset variable name (relative to strings) |
TEXT |
|
U32 |
Offset description of the variable (relative to strings) |
BITTEXT |
|
U32 |
Offset variable bit descriptions, i.e., sequence of strings related to each individual bit separated by the ascii character 0xFF (related to strings). |
ARRAY0 |
|
U32 |
No. of indexes 1st level (0=No array) (#1) or index 0 for Aliases. |
ARRAY1 |
|
U32 |
No. of indexes 2nd level (0=No array) (#1) or index 1 for Alias. |
ARRAY2 |
|
U32 |
No. of indexes 3rd level (0=No array) (#1) or index 2 for Alias. |
ALIASID |
|
U16 |
Alias type ID |
ALIASBIT |
|
U16 |
No. of bits per alias (depends on the type of alias ID) |
SIZE |
|
U32 |
Size of variable. If Alias, the size is 0. |
(#1) Although ARRAYn fields are 32bit, in the current version of SW the maximum index however should only be considered 16bit (i.e. maximum index 0xFFFF).