NI-XNET Python Documentation
Info |
Communicate over CAN or LIN via NI-XNET hardware with Python. |
Author |
NI |
>>> import nixnet
>>> with nixnet.FrameInStreamSession('CAN1') as input_session:
>>> input_session.intf.can_term = constants.CanTerm.ON
>>> input_session.intf.baud_rate = 125000
>>> frames = input_session.frames.read(count)
>>> for frame in frames:
>>> print('Received frame:')
>>> print(frame)
Quick Start
Running nixnet requires NI-XNET or NI-XNET Runtime. Visit the ni.com/downloads to download the latest version of NI-XNET.
nixnet can be installed with pip:
$ python -m pip install nixnet~=1.0.0
Now you should be able to move onto the Examples.
Resources
Product Support
The nixnet package and NI-XNET are supported by NI. For support, open a request through the NI support portal at ni.com.
Bugs / Feature Requests
We welcome all kinds of contributions. If you have a bug to report or a feature request for nixnet, feel free to open an issue on Github or contribute the change yourself.
Status
nixnet package is created and maintained by NI.
- The following support is included:
CAN and LIN protocol
Frames, Signals, and frame/signal conversion
Database APIs
For a complete list of supported features and functions, see the documentation.
See the enhancement issues for potential future work.
Breaking API changes will be kept to a minimum. If a breaking change is made, it will be planned through breaking-change isssues and communicated via semver and the release notes.
nixnet currently supports
Windows operating system.
CPython 3.9+ and PyPy3.
NI-XNET 15.5+
License
nixnet is licensed under an MIT-style license (see LICENSE). Other incorporated projects may be licensed under different licenses. All licenses allow for non-commercial and commercial use.
Table of Contents:
- Installation
- API Reference
- nixnet.session
- nixnet.convert
- nixnet.system
- nixnet.database
- nixnet.database.cluster
- nixnet.database.database
- nixnet.database.ecu
- nixnet.database.frame
- nixnet.database.lin_sched
- nixnet.database.lin_sched_entry
- nixnet.database.pdu
- nixnet.database.signal
- nixnet.database.subframe
- nixnet.database.collection
- nixnet.database.dbc_attributes
- nixnet.database.dbc_signal_value_table
- nixnet.constants
AppProtocolBlinkModeCanCommStateCanFdIsoModeCanIoModeCanLastErrCanPendTxOrderCanTcvrCapCanTcvrStateCanTcvrTypeCanTermCanTermCapClstFlexRaySampClkPerConditionCreateSessionModeDevFormDongleIdDongleStateErrFlexRayPocStateFlexRaySleepFlexRayTermFrameTypeFrmCanTimingFrmFlexRayChAssignFrmFlexRayTimingFrmLinChecksumGetDbcAttributeModeLinCommStateLinDiagnosticScheduleLinLastErrLinProtocolVerLinSchedEntryTypeLinSchedRunModeLinSleepLinTermMergeObjectClassOutStrmTimngPhaseProtocolReadStateSessionInfoStateSigByteOrdrSigDataTypeStartStopScopeWarnWriteState
- nixnet.types
- nixnet.errors
- Examples
- Contributing to nixnet