\App\CloudModule\ModelsAzureManager

Tool for managing Azure IoT Hub

Summary

Methods
Properties
Constants
__construct()
createMqttInterface()
checkConnectionString()
parseConnectionString()
generateSasToken()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(\App\CloudModule\Models\GenericManager  configManager) : 

Constructor

Parameters

\App\CloudModule\Models\GenericManager configManager

Generic config manager

Returns

createMqttInterface()

createMqttInterface(mixed||string|int  values) : 

Create MQTT interface

Parameters

mixed||string|int values

Values from form

Throws

\App\CloudModule\Models\InvalidConnectionStringException
\App\CloudModule\Models\JsonException

Returns

checkConnectionString()

checkConnectionString(  connectionString) : 

Validate MS Azure IoT Hub Connection String for devices

Parameters

connectionString

MS Azure IoT Hub Connection String

Throws

\App\CloudModule\Models\InvalidConnectionStringException

Returns

parseConnectionString()

parseConnectionString(  connectionString) : mixed||string|int

Parse Microsoft Azure IoT HUb connection string

Parameters

connectionString

MS Azure IoT Hub Connection string

Throws

\App\CloudModule\Models\InvalidConnectionStringException

Returns

mixed||string|int —

Values from the connection string

generateSasToken()

generateSasToken(  resourceUri,   signingKey,   policyName = null,   expiresInMins = 525600) : 

Generate shared access signature token

Parameters

resourceUri

URI prefix (by segment) of the endpoints that can be accessed with this token, starting with host name of the IoT hub (no protocol).

signingKey

Signing key

policyName

The name of the shared access policy to which this token refers. Absent if the token refers to device-registry credentials.

expiresInMins

Expiration in minutes

Returns

MS Azure Shared access signature token