Difference between revisions of "Component: IoT Made Easy (Comms: IoT/Cloud)"
From Flowcode Help
Jump to navigationJump to search (XML import) |
|||
Line 1: | Line 1: | ||
− | + | {| style="width:50%" | |
− | |||
− | {| | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| Matrix TSL | | Matrix TSL | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
− | | 1.0 | + | | 1.0 |
|- | |- | ||
− | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| Comms: IoT/Cloud | | 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. | ||
+ | |||
+ | ==Detailed description== | ||
− | + | ''No detailed description exists yet for this component'' | |
− | |||
− | |||
− | |||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
Line 26: | Line 27: | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | + | |- | |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ErrorAsString''' | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | |- | ||
+ | | 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-string-icon.png]] - STRING | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PublishString''' | ||
+ | |- | ||
+ | | colspan="2" | Publishes data to the selected topic ID using a data string. 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 | ||
+ | |- | ||
+ | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :[[ | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTopicID''' | ||
+ | |- | ||
+ | | 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-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | '''Return | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connect''' | ||
+ | |- | ||
+ | | 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" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPayloadInteger''' | ||
+ | |- | ||
+ | | colspan="2" | Get the Payload of the last received (Read) packet as a signed long value | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | Returns | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LastError''' | ||
+ | |- | ||
+ | | colspan="2" | Returns the last error | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | :[[ | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | :: | + | |- |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read''' | ||
+ | |- | ||
+ | | 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-u16-icon.png]] - UINT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Disconnect''' | ||
+ | |- | ||
+ | | colspan="2" | Disconnects from the MQTT server and the network | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | :[[ | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PublishFloat''' | ||
+ | |- | ||
+ | | colspan="2" | Publishes data to the selected topic ID using a floating point 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 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | + | |- | |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Ping''' | ||
+ | |- | ||
+ | | colspan="2" | 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 | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | ''' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | 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 | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPayloadFloat''' | ||
+ | |- | ||
+ | | 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:]] - | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :[[ | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | 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" | | ||
+ | |- | ||
+ | | 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="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |
− | + | |- | |
− | + | | 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-void-icon.png]] - VOID | |
− | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Property reference== | ==Property reference== | ||
− | |||
− | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
− | + | |- | |
− | Address of MQTT Broker | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Host | |
− | Port used by MQTT Broker | + | |- |
− | + | | colspan="2" | Address of MQTT Broker Can be an IP Address or URL (URL only supported by some hardware platforms) | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |
− | + | | width="90%" | Port | |
− | + | |- | |
− | Client identifier (Maximum length 20 characters) | + | | colspan="2" | Port used by MQTT Broker Default 1883 for unencrypted access and 8883 for encrypted access. |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Client identifier | |
− | + | |- | |
− | + | | colspan="2" | Client identifier (Maximum length 20 characters) Must be unique to the broker. | |
− | Maximum time in mS to wait for network responses | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |
− | + | | width="90%" | Network Timeout | |
− | + | |- | |
− | + | | colspan="2" | Maximum time in mS to wait for network responses | |
− | + | |- | |
− | The Keep Alive is the maximum time interval that is permitted to elapse | + | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] |
− | + | | width="90%" | Read Timeout | |
− | between the point at which the Client finishes transmitting one Control Packet | + | |- |
− | + | | colspan="2" | Time to wait in ms when waiting for incoming messages | |
− | and the point it starts sending the next, measured in seconds. | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |
− | + | | width="90%" | Keep Alive | |
− | + | |- | |
− | + | | 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. | |
− | + | |- | |
− | Pointer to the network communications component providing TCP simulation and abstraction for embedded | + | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]] |
− | + | | width="90%" | Network Component | |
− | TCP modules. | + | |- |
− | + | | 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="90%" | Authentication | |
− | + | |- | |
− | + | | colspan="2" | Selects if the broker is open or if the broker requires a username and password. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Number of topics | |
− | + | |- | |
− | + | | colspan="2" | Sets the number of data topics that can be sent or received | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | Sets the number of data topics that can be sent or received | + | | width="90%" | Topic String |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | |
− | + | | width="90%" | Topic String | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Topic Type | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections''' | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations''' | |
− | + | |- | |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 19:48, 16 November 2021
Author | Matrix TSL |
Version | 1.0 |
Category | Comms: IoT/Cloud |
Contents
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.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
![]() |
ErrorAsString |
![]() |
Error |
![]() |
Return |
![]() |
GetTopicID |
Compares the topic ID of the last received message with enabled IDs. Returns the topic ID received. | |
![]() |
Return |
![]() |
Connect |
Connect to the MQTT Server. Returns the connected state. 0 if not connected, 1 if successful connection, or already connected. | |
![]() |
Return |
![]() |
GetPayloadInteger |
Get the Payload of the last received (Read) packet as a signed long value | |
[[File:]] - | Return |
![]() |
LastError |
Returns the last error | |
![]() |
Return |
![]() |
Read |
Read incoming data. Returns non-zero if packet received. Use GetTopicID and GetPayloadXXX to read the contents. | |
![]() |
Return |
![]() |
Disconnect |
Disconnects from the MQTT server and the network | |
![]() |
Return |
![]() |
GetPayloadFloat |
Get the Payload of the last received (Read) packet as a floating point value | |
[[File:]] - | Return |
![]() |
GetPayloadString |
Get the Payload of the last received (Read) packet as a string value | |
![]() |
Payload |
![]() |
Size |
![]() |
Return |
![]() |
Initialise |
Starts up the MQTT component - call this after initialising the NetworkComms component. | |
![]() |
Return |