uds.segmentation.abstract_segmenter =================================== .. py:module:: uds.segmentation.abstract_segmenter .. autoapi-nested-parse:: Definition of segmentation and desegmentation strategies. Exceptions ---------- .. autoapisummary:: uds.segmentation.abstract_segmenter.SegmentationError Classes ------- .. autoapisummary:: uds.segmentation.abstract_segmenter.AbstractSegmenter Module Contents --------------- .. py:exception:: SegmentationError Bases: :py:obj:`ValueError` .. autoapi-inheritance-diagram:: uds.segmentation.abstract_segmenter.SegmentationError :parts: 1 :private-bases: UDS segmentation or desegmentation process cannot be completed due to input data inconsistency. Initialize self. See help(type(self)) for accurate signature. .. py:class:: AbstractSegmenter(addressing_information) Bases: :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: uds.segmentation.abstract_segmenter.AbstractSegmenter :parts: 1 :private-bases: Abstract definition of a segmenter class. Segmenter classes defines UDS segmentation and desegmentation tasks. They contain helper methods that are essential for successful :ref:`segmentation ` and :ref:`desegmentation ` execution. .. note:: Each concrete segmenter class handles exactly one bus/network type. Initialize common configuration for all segmenters. :param addressing_information: Addressing Information configuration for this UDS Entity. .. py:property:: addressing_information :type: uds.addressing.AbstractAddressingInformation Addressing Information configuration for this UDS Entity. .. py:property:: supported_addressing_information_class :type: Type[uds.addressing.AbstractAddressingInformation] :abstractmethod: Addressing Information class supported by this segmenter. .. py:property:: supported_packet_class :type: Type[uds.packet.AbstractPacket] :abstractmethod: Packet class supported by this segmenter. .. py:property:: supported_packet_record_class :type: Type[uds.packet.AbstractPacketRecord] :abstractmethod: Packet Record class supported by this segmenter. .. py:method:: is_supported_packet_type(packet) Check if the argument value is a packet object of a supported type. :param packet: Packet object to check. :return: True if provided value is an object of a supported packet type, False otherwise. .. py:method:: is_supported_packets_sequence_type(packets) Check if the argument value is a packets sequence of a supported type. :param packets: Packets sequence to check. :return: True if provided value is a packets sequence of a supported type, False otherwise. .. py:method:: is_desegmented_message(packets) :abstractmethod: Check whether provided packets are full sequence of packets that form exactly one diagnostic message. :param packets: Packets sequence to check. :return: True if the packets form exactly one diagnostic message. False if there are missing, additional or inconsistent (e.g. two packets that initiate a message) packets. .. py:method:: desegmentation(packets) :abstractmethod: Perform desegmentation of packets. :param packets: Packets to collect into UDS message. :raise SegmentationError: Provided packets are not a complete packet sequence that form a diagnostic message. :return: A diagnostic message that is carried by provided packets. .. py:method:: segmentation(message) :abstractmethod: Perform segmentation of a diagnostic message. :param message: UDS message to divide into packets. :raise SegmentationError: Provided diagnostic message cannot be segmented. :return: Packet(s) that carry provided diagnostic message.