MAC create with
Create MAC with extracts first 12 hexadecimal characters from input string and normalizes them as a MAC address. It is not necessary to have a continuous sequence of characters. Non hexadecimal characters are skipped.
Therefore, retyping can be used on any representations of mac addresses.
The block accepts any string value as an input (on right side) and returns internal data type representing a MAC address.
In case the value can’t be retyped to a mac address, the type with default address of 000000000000 is returned.
XML representation of empty mac_create block
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="mac_create"/>
</xml>
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="mac_create">
<value name="VALUE">
<block type="text">
<field name="TEXT">00:00:00:00:00:00</field>
</block>
</value>
</block>
</xml>

Block “Create MAC with”

Example of “Create MAC with” block
Block is used on the “set mac_datatype to” row in the example:
- Key “mac” is loaded from the “item” dictionary.
- Value is transmitted to the “create MAC with” block.
- Output is variable “mac_datatype” with data type MAC, containing information about manufacturer and normalized value.
{
"user": "administrator",
"mac" : "00:00:00:00:00:11"
}

Results of “Create MAC with” block