MQTT – MQ Telemetry Transport for B4i

MQTT - MQ Telemetry Transport for B4i

MQTT – MQ Telemetry Transport for B4i

Author
Alberto Iglesias
Release
2019-09-12
Version
2.0.0
Requirement
B4i

£8.99

MQTT – MQ Telemetry Transport for B4i

SKU: B4ILIBMQTT Category: Tag:

Product Description

MQTT – MQ Telemetry Transport for B4i

This library was made based on MQTT Protocol

Installation instructions:

– Copy the *.a and *.h files into the folder “Libs” in your MAC or in your MAC HOSTED by AnywhereSoftware, normally in “B4i-MacServer\Libs” folder

-Copy the iMQTT.xml to your custom libraries folder in B4i
– Select in your REFERENCED LIBRARIES

  •  Events:

    • Received (Message As String)
    • onConnect (Status As Int)
    • onDisconnect (Status As Int)
    • onInitialized ( )
    • onPublish (Status As Int)
    • onSubscribe (Topic as String )

    Methods:

    • ClearWill
    • Connect (Broker As String, Username As String, Password As String, Port As String)
      Connect to Broker
    • Disconnect
      Disconnect from Broker
    • Initialize (EventName As String)
      Initializes the object.
    • IsConnected As Boolean
      Get status of connection
    • Publish: (Topic As String, Payload As String, qos As Int, Retained As Boolean)
      Publish a message to Topic
    • Reconnect
    • Subscribe2: (Topic As String, qos As int)
      Subscribe into a Topic with Quality of Service
    • Subscribe: (Topic As String)
      Subscribe into a Topic
    • Unsubscribe: (Topic As String)
      Unsubscribe a Topic

    Properties:

    • Author As String [read only]
      Author of this Library
    • ClientID As String
      Set/Get the Client ID for broker know who you are. Default = UUID from Device
    • DebugMode As BOOL
      Enable/Disable Debug mode from Library
    • QoS_AtLeastOnce As Int [read only]
      QoS1, At least once: The message is always delivered at least once. It might be delivered multiple times if there is a failure before an acknowledgment is received by the sender. The message must be stored locally at the sender, until the sender receives confirmation that the message has been published by the receiver. The message is stored in case the message must be sent again.
    • QoS_AtMostOnce As Int [read only]
      QoS0, At most once: The message is delivered at most once, or it may not be delivered at all. Its delivery across the network is not acknowledged. The message is not stored. The message could be lost if the client is disconnected, or if the server fails. QoS0 is the fastest mode of transfer. It is sometimes called “fire and forget”.
    • QoS_ExactlyOnce As Int [read only]
      QoS2, Exactly once
    • Version As NSString* [read only]
      Library Version

MqttRef2

MqttSample1

MqttScheme2

MqttScheme1

MqttScreen3

Library
Sample

 

 

BEFORE PAY ANY LIBRAY, YOU CAN TEST THE LIBRARY TO MAKE SURE WILL BE WORK FOR YOUR PROJECT