IPWorks IoT 2020 Android Edition

Questions / Feedback?

Mqttsn Configuration

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

MQTTSN Configuration Settings

ConnectionTimeout:   How long to wait for a connection attempt to succeed.

This setting controls how long the component will wait, in seconds, for connection attempt to succeed before timing out. The default is 60 seconds.

Duplicate:   Whether to set the Duplicate flag when publishing a message.

When enabled, the component will set the Duplicate flag when a message is published using PublishData or PublishMessage. See those methods for details on retransmission.

LogLevel:   The level of detail that is logged.

This setting controls the level of detail that is logged through the Log event. Possible values are:

0 (None) No events are logged.
1 (Info - default) Informational events are logged.
2 (Verbose) Detailed data is logged.
3 (Debug) Debug data is logged.

PingTimeout:   Length of time to wait for a PINGRESP packet.

This setting controls how long the component will wait, in seconds, for a response to a ping message before timing out. The default is 5 seconds.

Retain:   Whether to set the Retain flag when publishing a message.

When enabled, the component will set the Retain flag when a message is published using PublishData or PublishMessage. By default, this is disabled.

Publishing a non-empty message with the Retain flag set and a non-zero QoS will cause the server to store it (replacing any previously retained message in the process) so that it can be delivered to any clients which subscribe to the topic in the future. (If the QoS is 0, the server can store the message, but it is not required to do so indefinitely, if at all.)

If the component publishes an empty message with the Retain flag set, then (regardless of its QoS) the server will remove any previously retained message for the topic.

Note that messages with the Retain flag set are still processed by the server and delivered as usual to clients currently subscribed to the topic, regardless of whether they are empty or not. Also note that retained messages are not part of a session's state, they are retained until they are either removed or replaced by another retained message, regardless of whether or not the client connected with CleanSession set to True.

SubscribedTopicId:   Topic id assigned by the gateway when a topic name is used in a SUBSCRIBE message.

When the client uses a TopicIdType of 0 (topic name), this name must be registered to a topic id. In this scenario, the topic id assigned will be included in the SUBACK message and will be set here when it is received.

See Subscribe for more details.

SubscribeDUP:   Whether to set the Duplicate flag when subscribe to a topic.

When enabled, the component will set the Duplicate flag when Subscribe is called. See that method for details on retransmission.

WillQOS:   The QoS value to use for the Will message.

If WillTopic is set to a non-empty string when Connect is called, this is the QoS value that will be used for the Will message; possible values are 0 (default), 1, and 2. (Note that this setting is ignored if WillTopic is empty.)

Refer to WillTopic for more information.

WillRetain:   Whether the server should retain the Will message after publishing it.

If WillTopic is set to a non-empty string when Connect is called, this determines whether or not the server will treat the Will message as retained. By default, this is disabled. (Note that this setting is ignored if WillTopic is empty.)

See Retain for general information about how retained messages are handled by the server.

Refer to WillTopic for more information.

Base Configuration Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Tells the component whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the component does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a component is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g. RuntimeLicense, License File).
  • License Type: The type of license installed (e.g. Royalty Free, Single Server).
UseDaemonThreads:   Whether threads created by the component are daemon threads.

If set to True (default), when the component creates a thread the thread's Daemon property will be explicitly set to True. When set to False the component will not set the Daemon property on the created thread. The default value is True.

UseInternalSecurityAPI:   Tells the component whether or not to use the system security libraries or an internal implementation.

By default the component will use the system security libraries to perform cryptographic functions. Setting this to True tells the component to use the internal implementation instead of using the system's security API.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 Android Edition - Version 20.0 [Build 8265]