Skip to content

Commit

Permalink
Add knowledge base references. (#107)
Browse files Browse the repository at this point in the history
- Create references to important knowledge base chapters.
- Add links in User Documentation.
  • Loading branch information
mdabrowski1990 authored Sep 21, 2021
1 parent 482a26b commit cb07777
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 27 deletions.
14 changes: 14 additions & 0 deletions docs/source/pages/knowledge_base/diagnostic_message.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ and redirect the response back until it reaches the request message originator (
In this example all ECUs in the vehicle responds to the request.


.. _knowledge-base-request-message:

Diagnostic Request
------------------
Diagnostic request is a `diagnostic message`_ that was transmitted by a client and targets a server or group of servers.
Diagnostic request can be identified by its `Service Identifier`_ (SID) value.


.. _knowledge-base-response-message:

Diagnostic Response
-------------------
Diagnostic response is a `diagnostic message`_ that was transmitted by a server and targets a client.
Expand Down Expand Up @@ -107,6 +111,8 @@ Where:
- NRC - `Negative Response Code`_ value that identified the reason for negative response


.. _knowledge-base-sid:

Service Identifier
------------------
Service Identifier (SID) is data parameter that is always located in the first Application Data (A_Data) byte
Expand Down Expand Up @@ -359,6 +365,8 @@ LinkControl service allows the client to control the communication between the c
gain bus bandwidth for diagnostic purposes (e.g. programming).


.. _knowledge-base-nrc:

Negative Response Code
----------------------
Negative Response Code (NRC) is one byte value which contains information why a server is not sending
Expand Down Expand Up @@ -525,6 +533,8 @@ List of NRC values:
- 0xFF - ISO Reserved - This value is reserved for future definition by ISO 14229 Standard.


.. _knowledge-base-addressing:

Addressing
----------
Addressing determines model of UDS communication.
Expand All @@ -534,6 +544,8 @@ We distinguish following addressing types:
- Functional_


.. _knowledge-base-physical-addressing:

Physical
````````
Physical addressing is used to send a dedicated message to a certain server (ECU).
Expand Down Expand Up @@ -611,6 +623,8 @@ Where:
if server is currently overloaded and cannot process next request message)


.. _knowledge-base-functional-addressing:

Functional
``````````
Functional addressing is used to send messages to multiple servers (ECUs) in the network.
Expand Down
2 changes: 2 additions & 0 deletions docs/source/pages/knowledge_base/packet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ between whom data exchange takes place. It also describes communication model (e
for the message.


.. _knowledge-base-n-pci:

Network Protocol Control Information
------------------------------------
Network Protocol Control Information (N_PCI) identifies the type of `UDS packet`_ (Network Protocol Data Unit).
Expand Down
2 changes: 2 additions & 0 deletions docs/source/pages/knowledge_base/segmentation.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.. _knowledge-base-segmentation:

.. _knowledge-base-desegmentation:

Segmentation
============
If diagnostic message data to be transmitted does not fit into a single frame, then segmentation process is required
Expand Down
61 changes: 34 additions & 27 deletions docs/source/pages/message.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ Implementation related to diagnostic messages and packets is located in :mod:`ud

UDS Message Implementation
--------------------------
Diagnostic messages implementation is divided into two parts:
:ref:`Diagnostic messages <knowledge-base-diagnostic-message>` implementation is divided into two parts:
- `UDS Message`_ - storage for a temporary diagnostic message definition on the user side
- `UDS Message Record`_ - storage for historic information of a diagnostic message that was either received
or transmitted


UDS Message
```````````
:class:`~uds.messages.uds_message.UdsMessage` class is meant to provide containers for diagnostic messages information.
:class:`~uds.messages.uds_message.UdsMessage` class is meant to provide containers for
:ref:`diagnostic messages <knowledge-base-diagnostic-message>` information.
Once a diagnostic message object is created, it stores diagnostic message data that were provided by a user.
One can **use these objects to execute complex operations** (provided in other subpackages) such as diagnostic messages
transmission or segmentation.
transmission or :ref:`segmentation <knowledge-base-segmentation>`.

All :class:`~uds.messages.uds_message.UdsMessage` **attributes are validated on each value change**, therefore a user will
face an exception if one tries to set an invalid (incompatible with the annotation) value to of these attributes.
Expand Down Expand Up @@ -55,7 +56,7 @@ Example code:
UDS Message Record
``````````````````
:class:`~uds.messages.uds_message.UdsMessageRecord` class is meant to provide container for historic information
of diagnostic messages that were either transmitted or received.
of :ref:`diagnostic messages <knowledge-base-diagnostic-message>` that were either transmitted or received.
A **user shall not create objects of this class** in normal cases, but one would probably use them quite often as they
are returned by other layers of :mod:`uds` package.

Expand All @@ -76,16 +77,19 @@ Attributes implemented in :class:`~uds.messages.uds_message.UdsMessageRecord` cl

UDS Packet Implementation
--------------------------
Packets implementation is divided into three parts:
- `UDS Packet Type`_ - enums with Network Protocol Control Information (N_PCI) values definitions
- `UDS Packet`_ - storages for a temporary Network Protocol Data Unit (N_PDU) definition on the user side
- `UDS Packet Record`_ - storages for historic information of a Network Protocol Data Unit (N_PDU) that was either
received or transmitted
:ref:`UDS packets <knowledge-base-uds-packet>` implementation is divided into three parts:
- `UDS Packet Type`_ - enums with :ref:`Network Protocol Control Information (N_PCI) <knowledge-base-n-pci>`
values definitions
- `UDS Packet`_ - storages for a temporary :ref:`Network Protocol Data Unit (N_PDU) <knowledge-base-uds-packet>`
definition on the user side
- `UDS Packet Record`_ - storages for historic information of a :ref:`Network Protocol Data Unit (N_PDU) <knowledge-base-uds-packet>`
that was either received or transmitted


UDS Packet Type
```````````````
UDS packet types are supposed to be understood as values of Network Protocol Control Information (N_PCI).
UDS packet types are supposed to be understood as values of
:ref:`Network Protocol Control Information (N_PCI) <knowledge-base-n-pci>`.
Supported values of UDS packet types are defined in specially designed for this purpose enum classes.

Enum classes that implements UDS packet types:
Expand All @@ -110,13 +114,12 @@ Methods implemented in :class:`~uds.messages.uds_packet.AbstractUdsPacketType` c

UDS Packet
``````````
UDS packet is supposed to be understood as Network Protocol Data Unit (N_PDU).

UDS packets **differs for each communication bus**, therefore **multiple classes implementing them are defined**.
Each UDS packet class provides containers for Network Protocol Data Unit (N_PDU) information that are specific for
a communication bus for which this class is relevant.
:ref:`UDS packets <knowledge-base-uds-packet>` **differs for each communication bus**, therefore
**multiple classes implementing them are defined**.
Each UDS packet class provides containers for :ref:`Network Protocol Data Unit (N_PDU) <knowledge-base-uds-packet>`
information that are specific for a communication bus for which this class is relevant.
**Objects of UDS packet classes might be used to execute complex operations** (provided in other subpackages) such as
packets transmission or desegmentation.
packets transmission or :ref:`desegmentation <knowledge-base-desegmentation>`.

Implemented UDS packet classes:
- `AbstractUdsPacket`_
Expand All @@ -141,8 +144,8 @@ Properties implemented in :class:`~uds.messages.uds_packet.AbstractUdsPacket` cl

UDS Packet Record
`````````````````
UDS packet record is a container that stores historic information of UDS packet (N_PDU) that was either received
or transmitted.
UDS packet record is a container that stores historic information of :ref:`UDS packet (N_PDU) <knowledge-base-uds-packet>`
that was either received or transmitted.
UDS packets **differs for each communication bus**, therefore **multiple classes implementing UDS packet records are defined**.

A **user shall not create objects of UDS packet record classes** in normal cases, but one would probably use them quite
Expand Down Expand Up @@ -196,13 +199,14 @@ Service Identifiers

POSSIBLE_REQUEST_SIDS
'''''''''''''''''''''
:attr:`~uds.messages.service_identifiers.POSSIBLE_REQUEST_SIDS` is a set with all possible values of Service Identifier
data parameter in a request message.
:attr:`~uds.messages.service_identifiers.POSSIBLE_REQUEST_SIDS` is a set with all possible values of
:ref:`Service Identifier <knowledge-base-sid>` data parameter in a :ref:`request message <knowledge-base-request-message>`.


RequestSID
''''''''''
Enum :class:`~uds.messages.service_identifiers.RequestSID` contains definitions of request Service Identifiers values.
Enum :class:`~uds.messages.service_identifiers.RequestSID` contains definitions of request
:ref:`Service Identifiers <knowledge-base-sid>` values.

Methods implemented in :class:`~uds.messages.service_identifiers.RequestSID` class:
- :meth:`~uds.messages.service_identifiers.RequestSID.is_request_sid`
Expand All @@ -213,13 +217,14 @@ Methods implemented in :class:`~uds.messages.service_identifiers.RequestSID` cla

POSSIBLE_RESPONSE_SIDS
''''''''''''''''''''''
:attr:`~uds.messages.service_identifiers.POSSIBLE_RESPONSE_SIDS` is a set with all possible values of Service Identifier
data parameter in a response message.
:attr:`~uds.messages.service_identifiers.POSSIBLE_RESPONSE_SIDS` is a set with all possible values of
:ref:`Service Identifier <knowledge-base-sid>` data parameter in a :ref:`response message <knowledge-base-response-message>`.


ResponseSID
'''''''''''
Enum :class:`~uds.messages.service_identifiers.ResponseSID` contains definitions of response Service Identifiers values.
Enum :class:`~uds.messages.service_identifiers.ResponseSID` contains definitions of response
:ref:`Service Identifiers <knowledge-base-sid>` values.

Methods implemented in :class:`~uds.messages.service_identifiers.ResponseSID` class:
- :meth:`~uds.messages.service_identifiers.ResponseSID.is_response_sid`
Expand All @@ -230,8 +235,8 @@ Methods implemented in :class:`~uds.messages.service_identifiers.ResponseSID` cl

Negative Response Codes
```````````````````````
Enum :class:`~uds.messages.nrc.NRC` contains definitions of all common (defined by ISO 14229) Negative Response Codes
values.
Enum :class:`~uds.messages.nrc.NRC` contains definitions of all common (defined by ISO 14229)
:ref:`Negative Response Codes <knowledge-base-nrc>` values.

Methods implemented in :class:`~uds.messages.nrc.NRC` class:
- :meth:`~uds.utilities.enums.ValidatedEnum.is_member`
Expand All @@ -248,9 +253,11 @@ Attributes that describes UDS communication:

Addressing
``````````
Enum :class:`~uds.messages.transmission_attributes.AddressingType` contains definitions of UDS communication models:
Enum :class:`~uds.messages.transmission_attributes.AddressingType` contains definitions of :ref:`addressing <knowledge-base-addressing>` values that determines UDS communication model:
- :attr:`~uds.messages.transmission_attributes.AddressingType.PHYSICAL` - direct one to one communication
(:ref:`physical addressing <knowledge-base-physical-addressing>`)
- :attr:`~uds.messages.transmission_attributes.AddressingType.FUNCTIONAL` - one to many communication
(:ref:`functional addressing <knowledge-base-functional-addressing>`)

Methods implemented in :class:`~uds.messages.transmission_attributes.AddressingType` class:
- :meth:`~uds.utilities.enums.ValidatedEnum.is_member`
Expand Down

0 comments on commit cb07777

Please sign in to comment.