MQTTSN ConfigurationThe class 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 class, 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 class 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.|
The level of detail that is logged.This setting controls the level of detail that is logged through the Log event. Possible values are:
|PingTimeout: Length of time to wait for a PINGRESP packet.This setting controls how long the class will wait, in seconds, for a response to a ping message before timing out. The default is 5 seconds.|
Whether to set the Retain flag when publishing a message.When enabled, the class 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 class 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.
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.|
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.
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.|
The system code page used for Unicode to Multibyte translations.The default code page is Unicode UTF-8 (65001).
The following is a list of valid code page identifiers:
Information about the current license.When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:
|UseInternalSecurityAPI: Tells the class whether or not to use the system security libraries or an internal implementation. By default the class will use the system security libraries to perform cryptographic functions. Setting this to True tells the class to use the internal implementation instead of using the system's security API.|