Modules¶
-
class
chariot_base.connector.local.LocalConnector[source]¶ All subscribers/publisers at Chariot project should extend this class
-
inject_tracer(tracer)[source]¶ Inject an opentracing client
Parameters: tracer – the opentracing client
-
on_connect(client, flags, rc, properties)[source]¶ The handler run when the connections is established
Parameters: - client – the subscribed MQTT client
- flags –
- rc –
- properties – Custom properties
-
on_disconnect(client, packet)[source]¶ The handler run when the connections is fineshed
Parameters: - client – the subscribed MQTT client
- packet –
-
on_message(client, topic, payload, qos, properties)[source]¶ Handler for new message
Parameters: - client – the subscribed MQTT client
- topic – the MQTT topic
- payload – the message
- qos – MQTT broker quality of service
- properties – Custom properties
-
on_subscribe(client, mid, qos)[source]¶ The handler run when the client subscribed to a new topic
Parameters: - client – the subscribed MQTT client
- mid –
- qos – MQTT broker quality of service
-
publish(topic, msg, qos=1)[source]¶ Publish to a topic
Parameters: - msg – the published message
- qos – MQTT broker quality of service
-
register_for_client(client)[source]¶ Register handlers to the client.
Parameters: client – Client to register handlers
-
set_up_tracer(options)[source]¶ Configure a new opentracing client
Parameters: options – options to configure the new client
-
-
chariot_base.connector.local.create_client(options, postfix='_client')[source]¶ Create a new GMQTT client
Parameters: options – Options for client initialization Para postfix: Unique postfix for the client
-
class
chariot_base.model.alert.Alert(name, msg=None, severity=100)[source]¶ Describe each alert raised by Chariot
-
class
chariot_base.model.message.Message(sensor_id, value)[source]¶ Describe message passed between Chariot’s components