You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 10
Next »
The following API modules are available for the MQTT Transmission Module and can be executed within the Ignition Designer Script Console.
APIs
system.cirruslink.engine.publish(mqttServerName, topic, payload, qos, retained) → void
ParametersString mqttServerNameThe name of the server connection to use in the MQTT Engine Server configuration. This must match an existing server name in the configuration.
String topicThe MQTT topic to publish on. This must be a valid MQTT topic
byte[] payloadAn array of bytes representing the MQTT payload
int qosThe MQTT 'Quality of Service' to use. This must be either 0, 1, or 2
boolean retainedWhether or not to publish this message with the retained flag set
Return Value
system.cirruslink.engine.createConfig(type, props) → void
ParametersString typeMap propsDictionary of properties making up the configuration with the following keys and datatypes:Cert FilesId (long)
Name (str)
FileContents (str)
Description (str)
ServersDef Namespace FiltersId (long)
NamespaceId (long)
GroupId (str)
EdgeNodeId (str)
Def NamespaceCust NamespaceId (long)
Name (str)
Subscription (str)
QoS1 (bool)
RootFolder (str)
TagName (str)
JsonPayload (bool)
Charset (str)
WritableTags (bool)
Return Value
system.cirruslink.engine.readConfig(type) → List
ParametersReturn ValueA List of Dictionaries of properties making up the configurations with the following keys and datatypes:
GeneralId (long)
Enabled (bool)
PrimaryHostEnabled (bool)
PrimaryHostId (str)
BlockNodeCommands (bool)
BlockDeviceCommands (bool)
BlockTagPropertyChanges (bool)
StoreHistoricalEvents (bool)
EnableLatching (bool)
LatchTimeout (long)
LatchTagList (str)
FilteredProperties (str)
EnableBdSeqChecking (bool)
CustomProperties (str)
EnablePrimaryHostSubscriptions (bool)
Cert FilesId (long)
Name (str)
FileContents (str)
Description (str)
ServersDef Namespace FilesDef Namespace FiltersId (long)
NamespaceId (long)
GroupId (str)
EdgeNodeId (str)
Def NamespaceCust NamespaceId (long)
Name (str)
Subscription (str)
QoS1 (bool)
RootFolder (str)
TagName (str)
JsonPayload (bool)
Charset (str)
WritableTags (bool)
system.cirruslink.engine.updateConfig(type, id, collisionPolicy, props) → voidParametersString typeLong idThe ID of the record to update
String collisionPolicy"MergeOverwrite" or "Overwrite""MergeOverwrite" will replace the existing properties in the record ID with only those included in the call"Overwrite" will replace all properties in the record ID with those in the call
Map propsDictionary of properties making up the configuration with the following keys and datatypes: GeneralId (long)
Enabled (bool)
PrimaryHostEnabled (bool)
PrimaryHostId (str)
BlockNodeCommands (bool)
BlockDeviceCommands (bool)
BlockTagPropertyChanges (bool)
StoreHistoricalEvents (bool)
EnableLatching (bool)
LatchTimeout (long)
LatchTagList (str)
FilteredProperties (str)
EnableBdSeqChecking (bool)
CustomProperties (str)
EnablePrimaryHostSubscriptions (bool)
Cert FilesId (long)
Name (str)
FileContents (str)
Description (str)
ServersDef Namespace FilesDef Namespace FiltersId (long)
NamespaceId (long)
GroupId (str)
EdgeNodeId (str)
Def NamespaceCust NamespaceId (long)
Name (str)
Subscription (str)
QoS1 (bool)
RootFolder (str)
TagName (str)
JsonPayload (bool)
Charset (str)
WritableTags (bool)
Return Value
system.cirruslink.engine.deleteConfig(type, id) → void
ParametersString typeLong idThe ID of the record to delete
Return Value