Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdabrowski1990 committed Nov 20, 2024
1 parent f75ae8b commit 8bd4691
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 8 additions & 6 deletions uds/database/abstract_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ def encode(self,
:param sid: Service Identifier of a diagnostic message.
:param data_records_values: Value for each Data Record that is part a service message.
Each type represent other data:
- int type - raw value of a Data Record
- float type - physical value of a Data Record
- str type - text value of a Data Record
- iterable type - contains values for children Data Records
- dict type - values of children Data Records
- int type - raw value of a Data Record
- float type - physical value of a Data Record
- str type - text value of a Data Record
- iterable type - contains values for children Data Records
- dict type - values of children Data Records
.. warning:: Providing physical value as float might sometime cause issues due
:ref:`floating-point precision <https://docs.python.org/3/tutorial/floatingpoint.html>`.
`floating-point precision <https://docs.python.org/3/tutorial/floatingpoint.html>`_.
The closest raw value would be evaluated and put into a payload.
To avoid rounding, provide raw value (int type).
Expand Down
14 changes: 8 additions & 6 deletions uds/database/services/abstract_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ def encode(self, **data_records_values: DataRecordValueAlias) -> RawBytesListAli
Encode diagnostic message payload from data records values.
:param data_records_values: Value for each Data Record that is part a service message.
Each type represent other data:
- int type - raw value of a Data Record
- float type - physical value of a Data Record
- str type - text value of a Data Record
- iterable type - values for children Data Records
- dict type - values of children Data Records
- int type - raw value of a Data Record
- float type - physical value of a Data Record
- str type - text value of a Data Record
- iterable type - contains values for children Data Records
- dict type - values of children Data Records
.. warning:: Providing physical value as float might sometime cause issues due
:ref:`floating-point precision <https://docs.python.org/3/tutorial/floatingpoint.html>`.
`floating-point precision <https://docs.python.org/3/tutorial/floatingpoint.html>`_.
The closest raw value would be evaluated and put into a payload.
To avoid rounding, provide raw value (int type).
Expand Down

0 comments on commit 8bd4691

Please sign in to comment.