Signals

Syntax

signal
 SG_ Name : Start|Size@Order[+|-] (Slope, Offset) [Min|Max] "Units" ReceiverNodes
Signals must adhere to these strict rules of syntax:
  • Always indented with a single space, immediately preceding SG_
  • Immediately follow a parent BO_Message , or sibling SG_Signal
  • No padding with any tabs, blank lines, or other whitespace.

Keywords

KeywordTypeDescription
Namestrunique mnemonic name for identifying the signal
Startintstarting bit number for the signal inclusive
Sizeinttotal length of bits this signal occupies
Orderenum1 little-endian/Intel  · 0 big-endian/Motorola
Signenum+ unsigned integer  · signed integer
Slopenummultiplied by original signal value  · default: 1
Offsetnumadded to the original signal value  · default: 0
Minimumnumminimum value relative to Slope and Offset
Maximumnummaximum value relative to Slope and Offset
Units[str]optional units for the return value, such as mph
Receivers[str]space-separated BU_Nodes that receive this signal

Example and Dissection

message block
BO_ 420 CruiseControl: 4 SZL SG_ IncSpeedReq : 16|1@0+ (1,0|1] "" XXX SG_ DecSpeedReq : 18|1@0+ (1,0|1] "" XXXCM_ "(* ...DecSpeedReq : 18|1@0+ (1,0) [0|1] "" XXX      bit start ___↑ ↑ ↑    ↑↑    ↑↑    ↑  ↑___ receiver=XXX       bit length ___| |    |     |    |___ no units         big-endian ___|    |     |___ minimum=0           unsigned + _|    |     |_ maximum=1                   slope=1 _|_ offset=0*)";

Examples

Here are some examples of real-world Signals that you might encounter in the field.

Constrained Values

As noted in the keywords section above,

signal
SG_ BattVoltage : 0|8@1+ (.1,0) [0|25.5] "volts" Vector__XXX

0.1 slope x 255 max. -> 25.5 volts

signal
SG_ EngineRPM : 8|12@1+ (0.125,0) [0|512] "" Vector__XXX

0.125 slope x 4095 max. -> 511.875

signal
SG_ FuelLevel : 8|16@1+ (0.00625,0) [0|41] "liters" Vector__XXX

0.00625 slope x 65535 max. -> 41 liters


Further Reading

See the snippets page for more examples of Signals and Messages!