sgr_commhandler.driver.messaging.messaging_interface_async ========================================================== .. py:module:: sgr_commhandler.driver.messaging.messaging_interface_async Attributes ---------- .. autoapisummary:: sgr_commhandler.driver.messaging.messaging_interface_async.logger Classes ------- .. autoapisummary:: sgr_commhandler.driver.messaging.messaging_interface_async.MessagingDataPoint sgr_commhandler.driver.messaging.messaging_interface_async.MessagingFunctionalProfile sgr_commhandler.driver.messaging.messaging_interface_async.SGrMessagingInterface Functions --------- .. autoapisummary:: sgr_commhandler.driver.messaging.messaging_interface_async.build_messaging_data_point sgr_commhandler.driver.messaging.messaging_interface_async.get_messaging_client Module Contents --------------- .. py:data:: logger .. py:function:: build_messaging_data_point(data_point, functional_profile, interface) Builds a data point of a messaging interface. .. py:function:: get_messaging_client(name, desc) Builds a messaging client from the interface specification. .. py:class:: MessagingDataPoint(dp_spec, fp_spec, interface) Bases: :py:obj:`sgr_commhandler.api.data_point_api.DataPointProtocol`\ [\ :py:obj:`sgr_specification.v0.product.MessagingFunctionalProfile`\ , :py:obj:`sgr_specification.v0.product.MessagingDataPoint`\ ] Implements a data point of a messaging interface. .. py:attribute:: _in_cmd :type: Optional[sgr_specification.v0.product.InMessage] :value: None .. py:attribute:: _read_cmd :type: Optional[sgr_specification.v0.product.OutMessage] :value: None .. py:attribute:: _write_cmd :type: Optional[sgr_specification.v0.product.OutMessage] :value: None .. py:attribute:: _in_filter :type: Optional[sgr_commhandler.driver.messaging.messaging_filter.MessagingFilter] :value: None .. py:attribute:: _read_response_event :type: Optional[asyncio.Event] :value: None .. py:attribute:: _cached_value :type: Any :value: None .. py:attribute:: _handle_message :type: Optional[collections.abc.Callable[[sgr_commhandler.api.data_point_api.DataPointProtocol, Any], NoReturn]] :value: None .. py:attribute:: _interface .. py:method:: get_val(parameters = None, skip_cache = False) :async: .. py:method:: set_val(value) :async: .. py:method:: can_subscribe() .. py:method:: subscribe(fn) .. py:method:: unsubscribe() .. py:method:: _on_message(payload) .. py:class:: MessagingFunctionalProfile(fp_spec, interface) Bases: :py:obj:`sgr_commhandler.api.functional_profile_api.FunctionalProfile`\ [\ :py:obj:`sgr_specification.v0.product.MessagingFunctionalProfile`\ ] Implements a functional profile of a messaging interface. .. py:attribute:: _interface .. py:attribute:: _data_points .. py:method:: get_data_points() .. py:class:: SGrMessagingInterface(frame) Bases: :py:obj:`sgr_commhandler.api.device_api.SGrBaseInterface` SmartGridready External Interface Class for Messaging Protocols .. py:attribute:: _client .. py:attribute:: _subscribed_topics :type: set[str] .. py:attribute:: _data_point_handlers :type: list[tuple[str, str, str, collections.abc.Callable[[Any], NoReturn], Optional[sgr_commhandler.driver.messaging.messaging_filter.MessagingFilter]]] :value: [] .. py:attribute:: functional_profiles .. py:method:: is_connected() .. py:method:: disconnect_async() :async: .. py:method:: connect_async() :async: .. py:method:: read_message(out_topic, in_topic, payload) :async: .. py:method:: write_message(topic, payload) :async: .. py:method:: data_point_handler(data_point) .. py:method:: handle_client_message(topic, payload)