bleMacCreate (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

LX2

Firmware version:

2.20.00


 

This helper function combines a simple MAC address with the address type, to create a complete MAC address.

This is a simple helper function that adds the address type to a traditional MAC address in the format "XX:XX:XX:XX:XX:XX".

This function performs no validation of the provided MAC address, so the created MAC address might be invalid.

 

 

Input:

MAC: STRING

The MAC address to add to the accept filter.

 

type: USINT (0..1) (default 0)

The address type:

0

-

Public address

1

-

Random address

 

 

Returns: STRING

The new MAC address.

 

Declaration:

FUNCTION bleMacCreate : STRING;
VAR_INPUT
  MAC       : STRING;
  type      : USINT;
END_VAR;

 

Example:

...
// Add MAC address to accept filter
rc := bleAcceptFilterAdd(mac:=bleMacCreate(mac:="E3:1C:E6:43:F5:2D", type:=1));
...