Create an IoTCommunicator instance with a list of optional parameters.
IoTCommunicator(comm_params, on_connect, on_recieve, on_ack, on_disconnect, on_destroy)
comm_params |
When specified, a dictionary is expected with the following optional keys:
|
||||||||||||||
on_connect |
The callback for the def iot_on_connect(iotc): pass ... comm.on_connect = iot_on_connect where |
||||||||||||||
on_recieve |
The callback for the def iot_on_receive(iotc): pass ... comm.on_receive = iot_on_receive where |
||||||||||||||
on_ack |
The callback for the def iot_on_ack(iotc, ack): pass ... comm.on_ack = iot_on_ack where
|
||||||||||||||
on_disconnect |
The callback for the def iot_on_disconnect(iotc): pass ... comm.on_disconnect = iot_on_disconnect where |
||||||||||||||
on_destroy |
The callback for the def iot_on_destroy(iotc): pass ... comm.on_destroy = iot_on_destroy where |
This constructor creates an instance of IoTCommunicator with the specified parameters.
IoTCommunicator | The IoTCommunicator object was instantiated successfully |
Exception | An exception is thrown with the appropriate error message |