You can declare numeric script constants to use later in assignments or arithmetic operations. The limits of values of constants are from 0 to 0xFFFFFFFF (4294967295 decimal).
Constants are DWORD (unsigned integer) values only.
Constant Definition Examples
Examples
Const SOME_HEX_DATA = 0xAABBFFEE # Define a hexadecimal constant.
Const SOME_DEC_DATA = 12 # Define a decimal constant.
Const "SOME DEC DATA" = 64 # Define a decimal constant.
Const SOME_BIN_DATA = _11110000 # Define a binary constant.
Const "Some Hex Data" = 0xCDCDBEBE
Const LMP_PORT_CFG_ACK = 6
# The parser can use arithmetic operations in constant definitions.
Const TX_PAYLOAD_OFFSET = 16 * 8 # Payload offset(in bits) for the Tx packet
# Payload offset(in bits) for the Rx packet
Const SOME_CONST = 16
Const SOME_PAYLOAD_OFFSET = TX_PAYLOAD_OFFSET + SOME_CONST
# Example of a complex name in an expression
Const MY_Data = "Some Hex Data" + 12 - _1111000 /*binary literal*/