SignalConversionSinglePointSession(database_name, cluster_name, signals)¶
Convert NI-XNET signal data to frame data or vice versa.
Conversion works similar to Single-Point mode. You specify a set of signals that can span multiple frames. Signal to frame conversion reads a set of values for the signals specified and writes them to the respective frame(s). Frame to signal conversion parses a set of frames and returns the latest signal value read from a corresponding frame.
This property returns the application protocol that the session uses.
The database used with the session determines the application protocol.
Close (clear) the XNET session.
This property returns the cluster (network) name used with the session.
Convert Frames to signals.
The frames passed into the
framesarray are read one by one, and the signal values found are written to internal buffers for each signal. Frames are identified by their identifier (FlexRay: slot) field. After all frames in
framesarray are processed, the internal signal buffers’ status is returned with the corresponding timestamps from the frames where a signal value was found. The signal internal buffers’ status is being preserved over multiple calls to this function.
This way, for example, data returned from multiple calls of nxFrameRead for a Frame Input Stream Mode session (or any other Frame Input session) can be passed to this function directly.
Frames unknown to the session are silently ignored.
convert_signals_to_frames(signals, frame_type=<class 'nixnet.types.XnetFrame'>)¶
Convert signals to frames.
The signal values written to the
signalsarray are written to a raw frame buffer array. For each frame included in the session, one frame is generated in the array that contains the signal values. Signals not present in the session are written as their respective default values; empty space in the frames that signals do not occupy is written with the frame’s default payload.
The frame header values are filled with appropriate values so that this function’s output can be directly written to a Frame Output session.
- signals (list of float) – Values corresponding to signals configured in this session.
- frame_type (
nixnet.types.FrameFactory) – A factory for the desired frame formats.
This property returns the database name used with the session.
This property returns the mode associated with the session.
For more information, refer to
This property returns the protocol that the interface in the session uses.