MQTT_CommandSubscriber (FB) ¶ FUNCTION_BLOCK MQTT_CommandSubscriber Function Block to receive Command over the Google Cloud Iot Core MQTT Bridge InOut: Scope Name Type Comment Inout MQTTBridge MQTT_Bridge Instance of the MQTT Bridge Input xEnable BOOL Subscribes a command pbCommandPayload POINTER TO BYTE Pointer to Command Payload uiMaxCommandPayloadSize UDINT Maximal size of Command Payload eQoS MQTT.MQTT_QOS Quality of Service of the Command Subscriber Output eError Error Output Error eMQTTError MQTT.MQTT_ERROR Error from MQTT xSubscribeActive BOOL Subcriber is active and lisenig xReceived BOOL Received a message xBusy BOOL xDone BOOL xError BOOL
MQTT_ConfigSubscriber (FB) ¶ FUNCTION_BLOCK MQTT_ConfigSubscriber Function Block to receive device Configuration over the Google Cloud Iot Core MQTT Bridge InOut: Scope Name Type Comment Inout MQTTBridge MQTT_Bridge Instance of the MQTT Bridge Input xEnable BOOL Subscribes configuration changes pbConfigPayload POINTER TO BYTE Pointer to Configuration Payload uiMaxConfigPayloadSize UDINT Maximal size of Configuration Payload eQoS MQTT.MQTT_QOS Quality of Service of the Configuration Subscriber Output eError Error Output Error eMQTTError MQTT.MQTT_ERROR Error from MQTT xSubscribeActive BOOL Subcriber is active and lisenig xReceived BOOL Received a message xBusy BOOL xDone BOOL xError BOOL
MQTT_EventPublisher (FB) ¶ FUNCTION_BLOCK MQTT_EventPublisher Function Block to publish device Events InOut: Scope Name Type Comment Inout MQTTBridge MQTT_Bridge Instance of the MQTT Bridge Input xExecute BOOL Publishes a message sSub_Topic STRING(255) Publisher sub Topic uiPublisherTimeOut UINT Publisher TimeOut in [ms] pbPayload POINTER TO BYTE Pointer to Event Payload uiPayloadSize UINT Size of Event Payload eQoS MQTT.MQTT_QOS Quality of Service of the Event Publisher Output eError Error Output Error eMQTTError MQTT.MQTT_ERROR Error from MQTT xBusy BOOL xDone BOOL xError BOOL
MQTT_StatePublisher (FB) ¶ FUNCTION_BLOCK MQTT_StatePublisher Function Block to publish device State InOut: Scope Name Type Comment Inout MQTTBridge MQTT_Bridge Instance of the MQTT Bridge Input xExecute BOOL Publishes a message uiPublisherTimeOut UINT Publisher TimeOut in [ms] pbPayload POINTER TO BYTE Pointer to State Payload uiPayloadSize UINT Size of State Payload eQoS MQTT.MQTT_QOS Quality of Service of the State Publisher Output eError Error Output Error eMQTTError MQTT.MQTT_ERROR Error from MQTT xBusy BOOL xDone BOOL xError BOOL
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 20.10.2022, 10:42:30 companyName string 3S-Smart Software Solutions GmbH libraryFile Google Cloud IoT Core Client SL.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile Google Cloud IoT Core Client SL.clean.json version version 2.0.0.0 ProjectInformation AutoResolveUnbound bool True IsEndUserLibrary False OnlineHelp True Released True SourceLibrary False LastModificationDateTime date 20.10.2022, 10:42:23 LibraryCategories library-category-list Application|Utils Author string 3S - Smart Software Solutions GmbH Company 3S - Smart Software Solutions GmbH CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Patch 2 DefaultNamespace GCIC Description See: Description DocFormat reStructuredText DocLanguages en, de LanguageModelAttribute qualified-access-only Placeholder Google_Cloud_IoT_Core_Client_SL Project Google Cloud IoT Core Client SL Title Google Cloud IoT Core Client SL Version version 1.2.0.0
HTTP_Bridge (FB) ¶ FUNCTION_BLOCK HTTP_Bridge EXTENDS CBML.LConTo Function Block to connect with the Google Cloud Iot Core over HTTP Bridge InOut: Scope Name Type Initial Comment Inherited from Input xEnable BOOL TRUE : Activates the defined operation FALSE : Aborts/resets the defined operation LConTo udiTimeOut UDINT Max. operating time for executing [µs], 0: No operating time limit LConTo Output xDone BOOL TRUE : Ready condition reached LConTo xBusy BOOL TRUE : Operation is running LConTo xError BOOL TRUE : Error condition reached LConTo Input sproject_id STRING(255) PROJECT_ID used by Google IoT CORE scloud_region STRING(255) REGION used by Google IoT CORE sregistry_id STRING(255) REGISTRY_ID used by Google IoT CORE sdevice_id STRING(255) DEVICE_ID used by Google IoT CORE sUseCaseNamePrivateKey STRING Use Case Name for Certificate used for creation of JWT sCommonNamePrivateKey STRING Common Name for Certificate used for creation of JWT udiJWTExpirationTime UDINT 3600 Expiration Time of the JWT, in [s]. Default 3600s sSNTPServer REFERENCE TO STRING(255) The IP address or the name of a SNTP server to get the UTC time. If the input is not set, then the local system time will be used. Output eError Error Output Error
HTTP_ConfigGeter (FB) ¶ FUNCTION_BLOCK HTTP_ConfigGeter EXTENDS CBML.ETrigA IMPLEMENTS IExponentialBackoff Function Block to get device Configuration over the Google Cloud Iot Core HTTP Bridge InOut: Scope Name Type Initial Comment Inherited from Input xExecute BOOL Rising edge: Starts defined operation FALSE : Resets the defined operation after ready condition was reached ETrig Output xDone BOOL TRUE : Ready condition reached ETrig xBusy BOOL TRUE : Operation is running ETrig xError BOOL TRUE : Error condition reached ETrig Input xAbort BOOL TRUE : Aborts the operation ETrigA Output xAborted BOOL TRUE : Abort condition reached ETrigA Inout HTTPBridge HTTP_Bridge Instance of the HTTP Bridge Input usilocal_version USINT local_version of the requestet Configuration uimaximum_backoff_Time UINT 3200 Maximum Backoff time allowed in [ms]. Default is 3200 ms Output eError Error Output Error httpResult WEB_CLIENT.HttpResult HTTP Result eHTTPError WEB_CLIENT.ERROR HTTP Error Methods: CyclicAction Execute StartAction Structure: CyclicAction (Method) Execute (Method) StartAction (Method)
HTTP_ConfigGeter.CyclicAction (METH) ¶ METHOD CyclicAction InOut: Scope Name Type Input itfTimingController CBML.ITimingController Output xComplete BOOL iErrorID INT
HTTP_ConfigGeter.Execute (METH) ¶ METHOD Execute InOut: Scope Name Type Output xDone BOOL xBackoff BOOL
HTTP_ConfigGeter.StartAction (METH) ¶ METHOD StartAction InOut: Scope Name Type Output xComplete BOOL iErrorID INT