Difference between revisions of "Component: IoT Made Easy (Comms: IoT/Cloud)"

From Flowcode Help
Jump to navigationJump to search
 
(9 intermediate revisions by the same user not shown)
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_IoTMadeEasy.fcfx FC_Comp_Source_IoTMadeEasy.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_IoTMadeEasy.fcfx FC_Comp_Source_IoTMadeEasy.fcfx]
 +
 
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_IoTMadeEasy.fcfx FC_Comp_Source_IoTMadeEasy.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 36: Line 50:
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 53: Line 79:
  
  
==Downloadable macro reference==
 
  
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
==Macro reference==
 +
 +
===Connect===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ErrorAsString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connect'''
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Connect to the MQTT Server. Returns the connected state. 0 if not connected, 1 if successful connection, or already connected.  
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Error
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===Disconnect===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PublishString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Disconnect'''
 
|-
 
|-
| colspan="2" | Publishes data to the selected topic ID using a data string. Returns none zero if successful 
+
| colspan="2" | Disconnects from the MQTT server and the network 
 
|-
 
|-
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | TopicID
 
|-
 
| colspan="2" | The topic ID to publish data to 
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Data
 
|-
 
| colspan="2" | Data string to publish 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 96: Line 119:
  
  
 +
===ErrorAsString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTopicID'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ErrorAsString'''
 +
|-
 +
| colspan="2" |  
 +
|-
 
|-
 
|-
| colspan="2" | Compares the topic ID of the last received message with enabled IDs. Returns the topic ID received. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Error
 
|-
 
|-
 +
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetPayloadFloat===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connect'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPayloadFloat'''
 
|-
 
|-
| colspan="2" | Connect to the MQTT Server. Returns the connected state. 0 if not connected, 1 if successful connection, or already connected.  
+
| colspan="2" | Get the Payload of the last received (Read) packet as a floating point value 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===GetPayloadInteger===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 135: Line 166:
  
  
 +
===GetPayloadString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LastError'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPayloadString'''
 +
|-
 +
| colspan="2" | Get the Payload of the last received (Read) packet as a string value 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Payload
 
|-
 
|-
| colspan="2" | Returns the last error 
+
| colspan="2" |  
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Size
 +
|-
 +
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 148: Line 190:
  
  
 +
===GetTopicID===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTopicID'''
 
|-
 
|-
| colspan="2" | Read incoming data. Returns non-zero if packet received. Use GetTopicID and GetPayloadXXX to read the contents. 
+
| colspan="2" | Compares the topic ID of the last received message with enabled IDs. Returns the topic ID received. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===Initialise===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Disconnect'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | Disconnects from the MQTT server and the network 
+
| colspan="2" | Starts up the MQTT component - call this after initialising the NetworkComms component. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===LastError===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PublishFloat'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LastError'''
|-
 
| colspan="2" | Publishes data to the selected topic ID using a floating point value. Returns none zero if successful 
 
 
|-
 
|-
 +
| colspan="2" | Returns the last error 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | TopicID
 
|-
 
| colspan="2" | The topic ID to publish data to 
 
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | Data
 
|-
 
| colspan="2" | Data to publish 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 197: Line 232:
  
  
 +
===Ping===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 210: Line 246:
  
  
 +
===PublishFloat===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PublishInteger'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PublishFloat'''
 
|-
 
|-
| colspan="2" | Publishes data to the selected topic ID using a signed long integer value. Returns none zero if successful 
+
| colspan="2" | Publishes data to the selected topic ID using a floating point value. Returns none zero if successful 
 
|-
 
|-
 
|-
 
|-
Line 223: Line 260:
 
| colspan="2" | The topic ID to publish data to 
 
| colspan="2" | The topic ID to publish data to 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | Data
 
| width="90%" | Data
 
|-
 
|-
Line 233: Line 270:
  
  
 +
===PublishInteger===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPayloadFloat'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PublishInteger'''
 +
|-
 +
| colspan="2" | Publishes data to the selected topic ID using a signed long integer value. Returns none zero if successful 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | TopicID
 +
|-
 +
| colspan="2" | The topic ID to publish data to 
 
|-
 
|-
| colspan="2" | Get the Payload of the last received (Read) packet as a floating point value 
+
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
 +
| width="90%" | Data
 
|-
 
|-
 +
| colspan="2" | Data to publish 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===PublishString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPayloadString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PublishString'''
 
|-
 
|-
| colspan="2" | Get the Payload of the last received (Read) packet as a string value 
+
| colspan="2" | Publishes data to the selected topic ID using a data string. Returns none zero if successful 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Payload
+
| width="90%" | TopicID
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The topic ID to publish data to 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Size
+
| width="90%" | Data
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Data string to publish 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 269: Line 318:
  
  
 +
===Read===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read'''
 
|-
 
|-
| colspan="2" | Starts up the MQTT component - call this after initialising the NetworkComms component. 
+
| colspan="2" | Read incoming data. Returns non-zero if packet received. Use GetTopicID and GetPayloadXXX to read the contents. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  
Line 295: Line 343:
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | MQTT Properties
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | MQTT Properties
 
|-
 
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | LinkTo
 +
|-
 +
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
Line 325: Line 378:
 
|-
 
|-
 
| colspan="2" | The Keep Alive is the maximum time interval that is permitted to elapse  between the point at which the Client finishes transmitting one Control Packet  and the point it starts sending the next, measured in seconds. 
 
| colspan="2" | The Keep Alive is the maximum time interval that is permitted to elapse  between the point at which the Client finishes transmitting one Control Packet  and the point it starts sending the next, measured in seconds. 
|-
 
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
| width="90%" | Network Component
 
|-
 
| colspan="2" | Pointer to the network communications component providing TCP simulation and abstraction for embedded TCP modules. 
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]

Latest revision as of 13:11, 7 February 2023

Author Matrix TSL
Version 1.0
Category Comms: IoT/Cloud


IoT Made Easy component

A component designed to simplify MQTT comms allowing for multiple data streams to be dealt with in a simple manner. Deals with translating values to and from the broker from topic strings into message IDs and numeric values. Works with lots of different MQTT brokers.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_IoTMadeEasy.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_IoTMadeEasy.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

Connect

Fc9-comp-macro.png Connect
Connect to the MQTT Server. Returns the connected state. 0 if not connected, 1 if successful connection, or already connected.  
Fc9-u8-icon.png - BYTE Return


Disconnect

Fc9-comp-macro.png Disconnect
Disconnects from the MQTT server and the network 
Fc9-u8-icon.png - BYTE Return


ErrorAsString

Fc9-comp-macro.png ErrorAsString
 
Fc9-u8-icon.png - BYTE Error
 
Fc9-string-icon.png - STRING Return


GetPayloadFloat

Fc9-comp-macro.png GetPayloadFloat
Get the Payload of the last received (Read) packet as a floating point value 
Fc9-f32-icon.png - FLOAT Return


GetPayloadInteger

Fc9-comp-macro.png GetPayloadInteger
Get the Payload of the last received (Read) packet as a signed long value 
Fc9-s32-icon.png - LONG Return


GetPayloadString

Fc9-comp-macro.png GetPayloadString
Get the Payload of the last received (Read) packet as a string value 
Fc9-string-icon.png - STRING Payload
 
Fc9-u8-icon.png - BYTE Size
 
Fc9-u8-icon.png - BYTE Return


GetTopicID

Fc9-comp-macro.png GetTopicID
Compares the topic ID of the last received message with enabled IDs. Returns the topic ID received. 
Fc9-u8-icon.png - BYTE Return


Initialise

Fc9-comp-macro.png Initialise
Starts up the MQTT component - call this after initialising the NetworkComms component. 
Fc9-void-icon.png - VOID Return


LastError

Fc9-comp-macro.png LastError
Returns the last error 
Fc9-u8-icon.png - BYTE Return


Ping

Fc9-comp-macro.png Ping
Ping packet is sent to the server and checks for a reply. If nothing is sent or received within the keep alive period then a ping is required to keep the connection to the server active. Returns non-zero value if successful  
Fc9-u8-icon.png - BYTE Return


PublishFloat

Fc9-comp-macro.png PublishFloat
Publishes data to the selected topic ID using a floating point value. Returns none zero if successful 
Fc9-u8-icon.png - BYTE TopicID
The topic ID to publish data to 
Fc9-f32-icon.png - FLOAT Data
Data to publish 
Fc9-u8-icon.png - BYTE Return


PublishInteger

Fc9-comp-macro.png PublishInteger
Publishes data to the selected topic ID using a signed long integer value. Returns none zero if successful 
Fc9-u8-icon.png - BYTE TopicID
The topic ID to publish data to 
Fc9-s32-icon.png - LONG Data
Data to publish 
Fc9-u8-icon.png - BYTE Return


PublishString

Fc9-comp-macro.png PublishString
Publishes data to the selected topic ID using a data string. Returns none zero if successful 
Fc9-u8-icon.png - BYTE TopicID
The topic ID to publish data to 
Fc9-string-icon.png - STRING Data
Data string to publish 
Fc9-u8-icon.png - BYTE Return


Read

Fc9-comp-macro.png Read
Read incoming data. Returns non-zero if packet received. Use GetTopicID and GetPayloadXXX to read the contents. 
Fc9-u16-icon.png - UINT Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png MQTT Properties
Fc9-type-16-icon.png LinkTo
 
Fc9-type-10-icon.png Host
Address of MQTT Broker Can be an IP Address or URL (URL only supported by some hardware platforms) 
Fc9-type-21-icon.png Port
Port used by MQTT Broker Default 1883 for unencrypted access and 8883 for encrypted access. 
Fc9-type-10-icon.png Client identifier
Client identifier (Maximum length 20 characters) Must be unique to the broker. 
Fc9-type-21-icon.png Network Timeout
Maximum time in mS to wait for network responses 
Fc9-type-21-icon.png Read Timeout
Time to wait in ms when waiting for incoming messages 
Fc9-type-21-icon.png Keep Alive
The Keep Alive is the maximum time interval that is permitted to elapse between the point at which the Client finishes transmitting one Control Packet and the point it starts sending the next, measured in seconds. 
Fc9-type-16-icon.png Authentication
Selects if the broker is open or if the broker requires a username and password. 
Fc9-conn-icon.png Topics
Fc9-type-16-icon.png Number of topics
Sets the number of data topics that can be sent or received 
Fc9-conn-icon.png Topic ID: 0
Fc9-type-10-icon.png Topic String
 
Fc9-type-16-icon.png Topic Type
 
Fc9-conn-icon.png Topic ID: 1
Fc9-type-10-icon.png Topic String
 
Fc9-type-16-icon.png Topic Type