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