rfbcRawFilter (Function)

Top  Previous  Next

Architecture:

X32 / NX32L

Device support:

AX9 pro, CX1 pro/pro-c/warp/warp-c, SX1, AX9 turbo, NX-900, LX5

Firmware version:

2.86 / 1.51.00


This function will set a reception filter for raw packet handling.

Any packet matching the filter must be handled manually - including acknowledgment. No automatic acknowledgment will be sent.

 

Input:

start_id  : DINT [0 .. 16_777_215] (default 0)

ID of the sender must be greater or equal if not set to 0.

 

end_id   : DINT [0 .. 16_777_215] (default 0)

ID of the sender must be less or equal if not set to 0.

 

flags    : INT [-1, 0 .. 255] (default -1)

Packet flags must match this value if greater than -1.

 

type     : INT [-1, 0 .. 255] (default -1)

Packet message type must match this value if greater than -1.

 

Output:

None.

 

Returns: INT

0

-

Ok filter set

-1

-

Interface is not open (see rfbcOpen).

-4

-

RF communication is not available.

-6

-

Error in parameter.

 

Declaration:

FUNCTION rfbcRawFilter : INT;
VAR_INPUT
  start_id : DINT;
  end_id   : DINT;
  flags    : INT;
  type     : INT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM example;
BEGIN
  IF addFilter THEN
      rfbcRawFilter(start_id := 16#00_00_00, end_id := 16#00_FF_FF);
  ELSIF removeFilter THEN
      rfbcRawFilter();
  END_IF;
  ...
END;
END_PROGRAM;