You can add local fields to Send instructions. You can use them to add to the existing packet template or structure variable or to override specified offsets within the declared structures.
These local fields only exist for the specific instance of the Send instruction where they are declared. The packet template or structure variable remains unmodified and does not retain the local fields created.
With local fields, you can assign a portion of a larger field using bit offsets or append information to a specific packet, without having to redefine a template. (Local fields are also applicable to Register Condition Instructions.)
# Send instruction with a local field appended
Send(Packet Template name | Structure variable name )
[
( packet delay, override bitmap )
{
Field = Value
...
# Declare local field “Lfield” 48 bits long at the packet end.
LField : 48 = { 01 02 03 04 05 06 }
}
]
# Send instruction with a local field overwriting an offset
Send(Packet Template name | Structure variable name )
[
{
Field = Value
...
# Declare local field “FirstByte” 8 bits long at offset 0.
FirstByte : 0,8 = { 01 }
}
( packet delay, override bitmap )
]
# Send instruction with local fields appended and override an offset
Send(Packet Template name | Structure variable name )
[
( packet delay, override bitmap )
{
Field = Value
...
# Declare local field “Lfield” 48 bits long at packet end.
LField : 48 = { 01 02 03 04 05 06 }
# Declare local field “FirstByte” 8 bits long at offset 0.
FirstByte : 0,8 = { 01 }
}
]
Note: The instruction parameters “( … )” and packet/structure field assignments “{ … }” are interchangeable in order within the Send instruction.
Note: Declare local fields within the Send instruction in the same way that packet template fields are declared. They exist only for the instruction where they are declared.