Mqtt Toolkit - mqttclient
- :
client =
mqttclient(brokerAddr)
- :
client =
mqttclient(brokerAddr, [name, value ....])
Create a MQTT client connection
Inputs
brokerAddr
Name or IP address with protocol. ie: tcp://127.0.0.1.
name, value
Optional name / value pairs.
Known options are:
Port
Numeric port number to connect to (default 1883)
Timeout
Numeric timeout value in seconds (default 5)
KeepAliveDuration
Numeric keep alive value in seconds (default 60)
ClientID
String client Id
Username
String username
Password
String password
CARootCertificate
String full file path to a root certificate file when using a secure connection
ClientCertificate
String full file path to a client certificate file when using a secure connection
ClientKey
String full file path to a private client key file when using a secure connection
SSLPassword
String Password to decrypt the client key file
Outputs
client
a octave_mqtt object
Properties
A octave_mqtt object has the following properties:
BrokerAddress
Broker URL
Port
Numeric port number to connect to (default 1883)
Timeout
Numeric timeout value in seconds (default 5)
KeepAliveDuration
Numeric keep alive value in seconds (default 60)
ClientID
String client Id
Connected
logical 0|1 for connection status
Subscriptions
List of topics currently subscribed to
Examples
Create a new mqttclient
client = mqttclient("tcp://127.0.0.1");