— 15 —
VI. Structure and Basic Syntax of the Program
The program defines algorithms and rules for the processing and forwarding of NMEA 2000 or other CAN
messages that the Device receives via the CAN1 and CAN2 interfaces.
The program consists of settings, built-in functions, filter subprograms and comments. Settings, functions
and filters are described in detail in the later sections of this Manual.
Comments in the program are added after the # symbol. Comments can be situated at the beginning
of a line as well as after interpretable program text.
Settings can be set anywhere in the program, except for inside subprograms of filters. Nevertheless,
we recommend declaring settings before filters.
Example 1.
# Example N1
FW_CAN1_TO_CAN2=ON
# Allow forwarding of all mismatched messages
FW_CAN2_TO_CAN1=OFF
# Setting for other direction
match(CAN2,0x01FD0600,0x01FFFF00) # 1st filter
{
# Empty subprogram, matched messages will be dropped
}
match(CAN2,0x00000010,0x000000FF) # 2nd filter
{
send(CAN1)
# Forward of matched message to CAN1 interface
}
match(CAN1,0x00000020,0x000000FF) # 3rd filter (for CAN1)
{
# No send(), matched messages will be dropped
}
# End of program