-
Notifications
You must be signed in to change notification settings - Fork 24
docs(DB): Finish all the database annotations/docs. #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| nixnet.database.linsched | ||
| ======================== | ||
|
|
||
| .. automodule:: nixnet.database._lin_sched | ||
| :members: | ||
| :inherited-members: | ||
| :show-inheritance: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| nixnet.database.linsched_entry | ||
| ============================== | ||
|
|
||
| .. automodule:: nixnet.database._lin_sched_entry | ||
| :members: | ||
| :inherited-members: | ||
| :show-inheritance: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| nixnet.database.pdu | ||
| =================== | ||
|
|
||
| .. automodule:: nixnet.database._pdu | ||
| :members: | ||
| :inherited-members: | ||
| :show-inheritance: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| nixnet.database.subframe | ||
| ======================== | ||
|
|
||
| .. automodule:: nixnet.database._subframe | ||
| :members: | ||
| :inherited-members: | ||
| :show-inheritance: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1247,12 +1247,6 @@ class WriteState(enum.Enum): | |
| FLEX_RAY_SYMBOL = _cconsts.NX_STATE_FLEX_RAY_SYMBOL | ||
|
|
||
|
|
||
| class IntfCanFdIsoMode(enum.Enum): | ||
| ISO = _cconsts.NX_CAN_FD_MODE_ISO | ||
| NON_ISO = _cconsts.NX_CAN_FD_MODE_NON_ISO | ||
| ISO_LEGACY = _cconsts.NX_CAN_FD_MODE_ISO_LEGACY | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this class being deleted?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the PR comment:
|
||
|
|
||
| class CanFdIsoMode(enum.Enum): | ||
| """CAN FD ISO MODE. | ||
|
|
||
|
|
@@ -1394,10 +1388,28 @@ class CanLastErr(enum.Enum): | |
|
|
||
|
|
||
| class CanIoMode(enum.Enum): | ||
| """CAN IO Mode.""" | ||
| CAN = _cconsts.NX_CA_NIO_MODE_CAN | ||
| CAN_FD = _cconsts.NX_CA_NIO_MODE_CAN_FD | ||
| CAN_FD_BRS = _cconsts.NX_CA_NIO_MODE_CAN_FD_BRS | ||
| """CAN I/O Mode. | ||
|
|
||
| Values: | ||
| CAN: | ||
| This is the default CAN 2.0 A/B standard I/O mode as defined in ISO 11898-1:2003. | ||
| A fixed baud rate is used for transfer, | ||
| and the payload length is limited to 8 bytes. | ||
| CAN_FD: | ||
| This is the CAN FD mode as specified in the CAN with *Flexible Data-Rate specification*, | ||
| version 1.0. Payload lengths up to 64 are allowed, | ||
| but they are transmitted at a single fixed baud rate | ||
| (defined by :any:`Cluster.can_fd_baud_rate` or :any:`Interface.can_fd_baud_rate`). | ||
| CAN_FD_BRS: | ||
| This is the CAN FD as specified in the *CAN with Flexible Data-Rate* specification, | ||
| version 1.0, with the optional Baud Rate Switching enabled. | ||
| The same payload lengths as CAN FD mode are allowed; additionally, | ||
| the data portion of the CAN frame is transferred at a different (higher) baud rate | ||
| (defined by :any:`Cluster.can_fd_baud_rate` or :any:`Interface.can_fd_baud_rate`). | ||
| """ | ||
| CAN = _cconsts.NX_CAN_IO_MODE_CAN | ||
| CAN_FD = _cconsts.NX_CAN_IO_MODE_CAN_FD | ||
| CAN_FD_BRS = _cconsts.NX_CAN_IO_MODE_CAN_FD_BRS | ||
|
|
||
|
|
||
| class FlexRayPocState(enum.Enum): | ||
|
|
@@ -1540,6 +1552,20 @@ class LinLastErr(enum.Enum): | |
|
|
||
|
|
||
| class LinProtocolVer(enum.Enum): | ||
| """LIN Protocol Version | ||
|
|
||
| Values: | ||
| VER_1_2: | ||
| Version 1.2 | ||
| VER_1_3: | ||
| Version 1.3 | ||
| VER_2_0: | ||
| Version 2.0 | ||
| VER_2_1: | ||
| Version 2.1 | ||
| VER_2_2: | ||
| Version 2.2 | ||
| """ | ||
| VER_1_2 = _cconsts.NX_LIN_PROTOCOL_VER_1_2 | ||
| VER_1_3 = _cconsts.NX_LIN_PROTOCOL_VER_1_3 | ||
| VER_2_0 = _cconsts.NX_LIN_PROTOCOL_VER_2_0 | ||
|
|
@@ -1561,6 +1587,24 @@ class GetDbcAttributeMode(enum.Enum): | |
|
|
||
|
|
||
| class Merge(enum.Enum): | ||
| """Cluster Merge Behavior | ||
|
|
||
| Values: | ||
| COPY_USE_SOURCE: | ||
| The target object with all dependent child objects | ||
| is removed from the target cluster and replaced by the source objects. | ||
| COPY_USE_TARGET: | ||
| The source object is ignored (the target cluster object with child objects remains unchanged). | ||
| MERGE_USE_SOURCE: | ||
| This adds child objects from the source object to child objects from the destination object. | ||
| If target object contains a child object with the same name, | ||
| the child object from the source frame replaces it. | ||
| The source object properties (for example, payload length of the frame) replace the target properties. | ||
| MERGE_USE_TARGET: | ||
| This adds child objects from the source object to child objects from the destination object. | ||
| If the target object contains a child object with the same name, it remains unchanged. | ||
| The target object properties remain unchanged (for example, payload length). | ||
| """ | ||
| COPY_USE_SOURCE = _cconsts.NXDB_MERGE_COPY_USE_SOURCE | ||
| COPY_USE_TARGET = _cconsts.NXDB_MERGE_COPY_USE_TARGET | ||
| MERGE_USE_SOURCE = _cconsts.NXDB_MERGE_MERGE_USE_SOURCE | ||
|
|
@@ -1715,15 +1759,38 @@ class CanTcvrCap(enum.Enum): | |
|
|
||
|
|
||
| class Protocol(enum.Enum): | ||
| """Protocol.""" | ||
| """Protocol. | ||
|
|
||
| Values: | ||
| UNKNOWN: | ||
| Unknown protocol, | ||
| CAN: | ||
| CAN protocol. | ||
| FLEX_RAY: | ||
| FlexRay protocol. | ||
| LIN: | ||
| LIN protocol. | ||
| """ | ||
| UNKNOWN = _cconsts.NX_PROTOCOL_UNKNOWN | ||
| CAN = _cconsts.NX_PROTOCOL_CAN | ||
| FLEX_RAY = _cconsts.NX_PROTOCOL_FLEX_RAY | ||
| LIN = _cconsts.NX_PROTOCOL_LIN | ||
|
|
||
|
|
||
| class AppProtocol(enum.Enum): | ||
| """Application Protocol.""" | ||
| """Application Protocol. | ||
|
|
||
| Values: | ||
| NONE: | ||
| The default application protocol. | ||
| J1939: | ||
| Indicates J1939 clusters. The value enables the following features: | ||
|
|
||
| * Sending/receiving long frames as the SAE J1939 specification specifies, | ||
| using the J1939 transport protocol. | ||
| * Using a special notation for J1939 identifiers. | ||
| * Using J1939 address claiming. | ||
| """ | ||
| NONE = _cconsts.NX_APP_PROTOCOL_NONE | ||
| J1939 = _cconsts.NX_APP_PROTOCOL_J1939 | ||
|
|
||
|
|
@@ -1975,6 +2042,35 @@ class FrmFlexRayTiming(enum.Enum): | |
|
|
||
|
|
||
| class FrmCanTiming(enum.Enum): | ||
| """CAN Frame Timing | ||
|
|
||
| Values: | ||
| CYCLIC_DATA: | ||
| The transmitting ECU transmits the CAN data frame in a cyclic (periodic) manner. | ||
| The :any:`Frame.can_tx_time` property defines the time between cycles. | ||
| The transmitting ECU ignores CAN remote frames received for this frame. | ||
| EVENT_DATA: | ||
| The transmitting ECU transmits the CAN data frame in an event-driven manner. | ||
| The :any:`Frame.can_tx_time` property defines the minimum interval. | ||
| For NI-XNET, the event occurs when you write data to a session. | ||
| The transmitting ECU ignores CAN remote frames received for this frame. | ||
| CYCLIC_REMOTE: | ||
| The receiving ECU transmits the CAN remote frame in a cyclic (periodic) manner. | ||
| The :any:`Frame.can_tx_time` property defines the time between cycles. | ||
| The transmitting ECU responds to each CAN remote frame by transmitting the associated CAN data frame. | ||
| EVENT_REMOTE: | ||
| The receiving ECU transmits the CAN remote frame in an event-driven manner. | ||
| The :any:`Frame.can_tx_time` property defines the minimum interval. | ||
| For NI-XNET, the event occurs when you write a frame to a session. | ||
| The transmitting ECU responds to each CAN remote frame by transmitting the associated CAN data frame. | ||
| CYCLIC_EVENT: | ||
| This timing type is a combination of the cyclic and event timing. | ||
| The frame is transmitted when you write to a session, | ||
| but also periodically sending the last recent values written. | ||
| The :any:`Frame.can_tx_time` property defines the cycle period. | ||
| There is no minimum interval time defined in this mode, | ||
| so be careful not to write too frequently to avoid creating a high busload. | ||
| """ | ||
| CYCLIC_DATA = _cconsts.NX_FRM_CAN_TIMING_CYCLIC_DATA | ||
| EVENT_DATA = _cconsts.NX_FRM_CAN_TIMING_EVENT_DATA | ||
| CYCLIC_REMOTE = _cconsts.NX_FRM_CAN_TIMING_CYCLIC_REMOTE | ||
|
|
@@ -1983,30 +2079,114 @@ class FrmCanTiming(enum.Enum): | |
|
|
||
|
|
||
| class SigByteOrdr(enum.Enum): | ||
| """Signal Byte Order | ||
|
|
||
| Values: | ||
| Little Endian: | ||
| Higher significant signal bits are placed on higher byte addresses. | ||
| In NI-CAN, this was called Intel Byte Order. | ||
|
|
||
| .. image:: littleendianstartbit12.gif | ||
|
|
||
| **Little Endian Signal with Start Bit 12** | ||
|
|
||
| Big Endian: | ||
| Higher significant signal bits are placed on lower byte addresses. | ||
| In NI-CAN, this was called Motorola Byte Order. | ||
|
|
||
| .. image:: bigendianstartbit12.gif | ||
|
|
||
| **Big Endian Signal with Start Bit 12** | ||
| """ | ||
| LITTLE_ENDIAN = _cconsts.NX_SIG_BYTE_ORDR_LITTLE_ENDIAN | ||
| BIG_ENDIAN = _cconsts.NX_SIG_BYTE_ORDR_BIG_ENDIAN | ||
|
|
||
|
|
||
| class SigDataType(enum.Enum): | ||
| """Signal Data Type | ||
|
|
||
| Values: | ||
| SIGNED: | ||
| Signed integer with positive and negative values. | ||
| UNSIGNED: | ||
| Unsigned integer with no negative values. | ||
| IEEE_FLOAT: | ||
| Float value with 7 or 15 significant decimal digits (32 bit or 64 bit). | ||
| """ | ||
| SIGNED = _cconsts.NX_SIG_DATA_TYPE_SIGNED | ||
| UNSIGNED = _cconsts.NX_SIG_DATA_TYPE_UNSIGNED | ||
| IEEE_FLOAT = _cconsts.NX_SIG_DATA_TYPE_IEEE_FLOAT | ||
|
|
||
|
|
||
| class LinSchedRunMode(enum.Enum): | ||
| """LIN Schedule Run Mode. | ||
|
|
||
| Values: | ||
| CONTINUOUS: | ||
| The master runs the schedule continuously. | ||
| When the last entry executes, | ||
| the schedule starts again with the first entry. | ||
| ONCE: | ||
| The master runs the schedule once (all entries), | ||
| then returns to the previously running continuous schedule (or NULL). | ||
| If requests are submitted for multiple run-once schedules, | ||
| each run-once executes in succession based on its :any:`LinSched.priority`, | ||
| then the master returns to the continuous schedule (or NULL). | ||
| NULL: | ||
| All communication stops immediately. | ||
| A schedule with this run mode is called a *null schedule*. | ||
| """ | ||
| CONTINUOUS = _cconsts.NX_LIN_SCHED_RUN_MODE_CONTINUOUS | ||
| ONCE = _cconsts.NX_LIN_SCHED_RUN_MODE_ONCE | ||
| NULL = _cconsts.NX_LIN_SCHED_RUN_MODE_NULL | ||
|
|
||
|
|
||
| class LinSchedEntryType(enum.Enum): | ||
| """LIN Schedule Entry Type. | ||
|
|
||
| Values: | ||
| UNCONDITIONAL: | ||
| A single frame transfers in this slot. | ||
| SPORADIC: | ||
| The master transmits in this slot. | ||
| The master can select from multiple frames to transmit. | ||
| Only updated frames are transmitted. | ||
| When more than one frame is updated, | ||
| the master decides by priority which frame to send. | ||
| The other updated frame remains pending | ||
| and can be sent when this schedule entry is processed the following time. | ||
| The order of unconditional frames in :any:`LinSchedEntry.frames` | ||
| (the first frame has the highest priority) determines the frame priority. | ||
| EVENT_TRIGGERED: | ||
| Multiple slaves can transmit an unconditional frame in this slot. | ||
| The slave transmits the frame only if at least one frame signal has been updated. | ||
| When a collision occurs (multiple slaves try to transmit in the same slot), | ||
| this is detected and resolved using a different schedule | ||
| specified in the :any:`LinSchedEntry.collision_res_sched` property. | ||
| The resolving schedule runs once, | ||
| starting in the subsequent slot after the collision, | ||
| and automatically returns to the previous schedule | ||
| at the subsequent position where the collision occurred. | ||
| NODE_CONFIG_SERVICE: | ||
| The schedule entry contains a node configuration service. | ||
| The node configuration service is defined as raw data bytes | ||
| in :any:`LinSchedEntry.nc_ff_data_bytes`. | ||
| """ | ||
| UNCONDITIONAL = _cconsts.NX_LIN_SCHED_ENTRY_TYPE_UNCONDITIONAL | ||
| SPORADIC = _cconsts.NX_LIN_SCHED_ENTRY_TYPE_SPORADIC | ||
| EVENT_TRIGGERED = _cconsts.NX_LIN_SCHED_ENTRY_TYPE_EVENT_TRIGGERED | ||
| NODE_CONFIG_SERVICE = _cconsts.NX_LIN_SCHED_ENTRY_TYPE_NODE_CONFIG_SERVICE | ||
|
|
||
|
|
||
| class FrmLinChecksum(enum.Enum): | ||
| """LIN Frame Transmitted Checksum | ||
|
|
||
| Values: | ||
| CLASSIC: | ||
| Classic checksum. | ||
| ENHANCED: | ||
| Enhanced checksum. | ||
| """ | ||
| CLASSIC = _cconsts.NX_FRM_LIN_CHECKSUM_CLASSIC | ||
| ENHANCED = _cconsts.NX_FRM_LIN_CHECKSUM_ENHANCED | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is sig_ref being changed to signal in some places but not others? Different API layers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is it that you see sig_ref being changed to signal? I'm not finding that.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you mean, why are we leaving "ref" attached in some places, then yes, it is different API layers. The calls to the driver still deal with references/handles, but we convert those to objects before giving them to the user.
NX_PROP_CLST_SIG_REFS is an internal constant used with driver calls, and it deals with references/handles.