Home > HMS NETWORKS > HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide

HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide

C Funcons Called from Lua  
CAN@net NT/CANbridge NT Lua ADK  
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: trueor false  
5.2.3. Module mqtt  
The module mqttis loaded by default and directly available.  
Funcon 'mqtt.publish'  
mqtt.publish(topic, payload, qos)  
Publishes (sends) an MQTT message to an MQTT broker. The broker setngs have to be specied in the device  
conguraon (MQTT Broker Setngs).  
topic: message topic as string (maximum length is 256 characters)  
payload: message data as string or array (maximum length is 1536 characters)  
qos: quality of service (0, 1, 2)  
TIP  
If Lua is enabled in "remote mode", the maximum string length for topic and payload is 184 bytes  
each due to USB communicaon limiaons.  
Funcon '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 dened 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)  
TIP  
If Lua is enabled in "remote mode", the maximum string length for topic and payload is 184 bytes  
each due to USB communicaon limiaons.  
5.2.4. Module sys  
The module sysis loaded by default and directly available.  
Funcon 'device_info'  
Reads and provides device related inormaon as Lua table. Here a code extract:  
4.02.0332.20002 Version 1.5  
Page 13 of 20  
GeneralDetails
NameHMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide
MakeHMS NETWORKS
LanguageEnglish
FiletypePDF (Download)
File size MB
Download PDF
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

If you have any questions regarding HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide, please ask here and describe the problem in detail.

Leave a Reply

Your email address will not be published. Required fields are marked *

two × five =

HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide