Module 'Mqtt; Module 'Sys - HMS Networks IXXAT CAN@net NT User Manual

Table of Contents

Advertisement

Lua API Function and Module Reference
Function 'can.set_crossbar_switch'
can.set_crossbar_switch(rx_port, tx_port, turn_on)
Turns the device internal message stream on or off. Message streams are specified by the CAN
ports (receive and transmit can port). The uni-directional message flow between these ports can
be turned on and off with the crossbar switch.
rx_port: CAN port where the messages are received (1..4)
tx_port: CAN port where the messages shall be sent (1..4)
turn_on: possible values: true or false
5.2.3

Module 'mqtt'

The module mqtt is loaded by default and directly available.
Function 'mqtt.publish'
mqtt.publish(topic, payload, qos)
Publishes (sends) an MQTT message to an MQTT broker. The broker settings have to be specified
in the device configuration (MQTT Broker Settings).
topic: message topic as string (maximum length is 256 characters)
payload: message data as string (maximum length is 1536 characters)
qos: quality of service (0, 1, 2)
Function 'mqtt.subscribe'
mqtt.subscribe(handle, topic, qos)
Sends a SUBSCRIBE message to the MQTT broker to be able to receive messages on topics of
interest.
handle: user defined reference to the registered message, to be used inside on_mqtt
topic: message topic as string (maximum length is 256 characters)
qos: quality of service (0, 1, 2)
5.2.4

Module 'sys'

The module sys is loaded by default and directly available.
Function 'device_info'
Reads and provides device related information as Lua table. Here a code extract:
local info = device_info()
print(info.hw_version)
print(info.fw_version)
print(info.fpga_version)
print(info.security_lvl)
print(info.config_name)
print(info.config_type)
print(info.device_type)
print(info.serial_num)
print(info.device_name)
print(info.ip_address)
CAN@net NT/CANbridge NT User Manual
--> e.g.: "3.02.00"
--> e.g.: "6.00.00"
--> e.g.: "1.01.00"
--> e.g.: 1
--> user provided configuration name
--> e.g.: "Local Bridge"
--> e.g.: "CAN@net NT 200"
--> e.g.: "HW906509"
--> user provided device name
--> e.g.: "192.168.178.23"
15 (22)
4.02.0332.20002 1.2 en-US

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the IXXAT CAN@net NT and is the answer not in the manual?

This manual is also suitable for:

Ixxat canbridge nt

Table of Contents