• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ni / nixnet-python / #631999863

08 Apr 2025 07:22AM UTC coverage: 67.546% (-0.005%) from 67.551%
#631999863

Pull #302

travis-ci

Pull Request #302: Fix `tox -e mypy` errors with `mypy 1.14.1`

22 of 66 new or added lines in 15 files covered. (33.33%)

10 existing lines in 1 file now uncovered.

4712 of 6976 relevant lines covered (67.55%)

0.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.12
/nixnet/session.py
1
import typing  # NOQA: F401
1✔
2

1✔
3
from nixnet import _funcs
1✔
4
from nixnet import _utils
5
from nixnet import constants
1✔
6

7
from nixnet._session import base
1✔
8
from nixnet._session import frames as session_frames
1✔
9
from nixnet._session import signals as session_signals
1✔
10

11

1✔
12
__all__ = [
1✔
13
    "FrameInStreamSession",
1✔
14
    "FrameOutStreamSession",
15
    "FrameInQueuedSession",
16
    "FrameOutQueuedSession",
1✔
17
    "FrameInSinglePointSession",
18
    "FrameOutSinglePointSession",
19
    "SignalInSinglePointSession",
20
    "SignalOutSinglePointSession"]
21

22

23
class FrameInStreamSession(base.SessionBase):
24
    """Frame Input Stream session.
25

26
    This session reads all frames received from the network using a single
27
    stream.
1✔
28

29
    The input data is returned as a list of frames. Because all frames are
30
    returned, your application must evaluate identification in each frame (such
31
    as a CAN identifier or FlexRay slot/cycle/channel) to interpret the frame
32
    payload data.
33

34
    Previously, you could use only one Frame Input Stream session for a given
35
    interface. Now, multiple Frame Input Stream sessions can be open at the same
36
    time on CAN and LIN interfaces.
37

38
    While using one or more Frame Input Stream sessions, you can use other
39
    sessions with different input modes. Received frames are copied to Frame
40
    Input Stream sessions in addition to any other applicable input session. For
41
    example, if you create a Frame Input Single-Point session for frame_a, then
42
    create a Frame Input Stream session, when frame_a is received, its data is
43
    returned from the call to read function of both sessions. This duplication
44
    of incoming frames enables you to analyze overall traffic while running a
45
    higher level application that uses specific frame or signal data.
46

47
    When used with a FlexRay interface, frames from both channels are returned.
48
    For example, if a frame is received in a static slot on both channel A and
49
    channel B, two frames are returned from the read function.
50

51
    .. note:: Typical use case: Analyzing and/or logging all frame traffic in
52
       the network.
53
    """
54

55
    def __init__(
56
            self,
57
            interface_name,  # type: typing.Text
58
            database_name=':memory:',  # type: typing.Text
59
            cluster_name='',  # type: typing.Text
1✔
60
    ):
61
        # type: (...) -> None
62
        """Create a Frame Input Stream session.
63

64
        This function creates a Frame Input Stream session using the named
65
        references to database objects.
66

67
        Args:
68
            interface_name(str): XNET Interface name to use for
69
                this session.
70
            database_name(str): XNET database name to use for
71
                interface configuration. The database name must use the <alias>
72
                or <filepath> syntax (refer to Databases).
73
            cluster_name(str): XNET cluster name to use for
74
                interface configuration. The name must specify a cluster from
75
                the database given in the database_name parameter.
76
        """
77
        flattened_list = _utils.flatten_items(None)
78
        base.SessionBase.__init__(
79
            self,
80
            database_name,
81
            cluster_name,
1✔
82
            flattened_list,
1✔
83
            interface_name,
84
            constants.CreateSessionMode.FRAME_IN_STREAM)
85
        self._frames = session_frames.InFrames(self._handle)  # type: ignore
86

87
    @property
88
    def frames(self):
89
        # type: () -> session_frames.InFrames
1✔
90
        """:any:`nixnet._session.frames.InFrames`: Operate on session's frames"""
91
        return self._frames
1✔
92

93

94
class FrameOutStreamSession(base.SessionBase):
95
    """Frame Output Stream session.
1✔
96

97
    This session transmits an arbitrary sequence of frame values using a single
98
    stream. The values are not limited to a single frame in the database, but
1✔
99
    can transmit any frame.
100

101
    The data passed to the write frame function is a list of frame values,
102
    each of which transmits as soon as possible. Frames transmit sequentially
103
    (one after another).
104

105
    Like Frame Input Stream sessions, you can create more than one Frame Output
106
    Stream session for a given interface.
107

108
    For CAN, frame values transmit on the network based entirely on the time
109
    when you call the write frame function. The timing of each frame as
110
    specified in the database is ignored. For example, if you provide four frame
111
    values to the the write frame function, the first frame value transmits
112
    immediately, followed by the next three values transmitted back to back. For
113
    this session, the CAN frame payload length in the database is ignored, and
114
    the write frame function is always used.
115

116
    Similarly for LIN, frame values transmit on the network based entirely on
117
    the time when you call the write frame function. The timing of each frame as
118
    specified in the database is ignored. The LIN frame payload length in the
119
    database is ignored, and the write frame function is always used. For LIN,
120
    this session/mode is allowed only on the interface as master. If the payload
121
    for a frame is empty, only the header part of the frame is transmitted. For
122
    a nonempty payload, the header + response for the frame is transmitted. If a
123
    frame for transmit is defined in the database (in-memory or otherwise), it
124
    is transmitted using its database checksum type. If the frame for transmit
125
    is not defined in the database, it is transmitted using enhanced checksum.
126

127
    This session is not supported for FlexRay.
128

129
    The frame values for this session are stored in a queue, such that every value
130
    provided is transmitted.
131
    """
132

133
    def __init__(
134
            self,
135
            interface_name,  # type: typing.Text
136
            database_name=':memory:',  # type: typing.Text
137
            cluster_name='',  # type: typing.Text
1✔
138
    ):
139
        # type: (...) -> None
140
        """Create a Frame Input Stream session.
141

142
        This function creates a Frame Output Stream session using the named
143
        references to database objects.
144

145
        Args:
146
            interface_name(str): XNET Interface name to use for
147
                this session.
148
            database_name(str): XNET database name to use for
149
                interface configuration. The database name must use the <alias>
150
                or <filepath> syntax (refer to Databases).
151
            cluster_name(str): XNET cluster name to use for
152
                interface configuration. The name must specify a cluster from
153
                the database given in the database_name parameter.
154
        """
155
        flattened_list = _utils.flatten_items(None)
156
        base.SessionBase.__init__(
157
            self,
158
            database_name,
159
            cluster_name,
1✔
160
            flattened_list,
1✔
161
            interface_name,
162
            constants.CreateSessionMode.FRAME_OUT_STREAM)
163
        self._frames = session_frames.OutFrames(self._handle)  # type: ignore
164

165
    @property
166
    def frames(self):
167
        # type: () -> session_frames.OutFrames
1✔
168
        """:any:`nixnet._session.frames.InFrames`: Operate on session's frames"""
169
        return self._frames
1✔
170

171

172
class FrameInQueuedSession(base.SessionBase):
173
    """Frame Input Queued session.
1✔
174

175
    This session reads data from a dedicated queue per frame. It enables your
176
    application to read a sequence of data specific to a frame (for example, a
1✔
177
    CAN identifier).
178

179
    You specify only one frame for the session, and the read frame function
180
    returns values for that frame only. If you need sequential data for multiple
181
    frames, create multiple sessions, one per frame.
182

183
    The input data is returned as a list of frame values. These values
184
    represent all values received for the frame since the previous call to the
185
    read frame function.
186
    """
187

188
    def __init__(
189
            self,
190
            interface_name,  # type: typing.Text
191
            database_name,  # type: typing.Text
192
            cluster_name,  # type: typing.Text
1✔
193
            frame,  # type: typing.Text
194
    ):
195
        # type: (...) -> None
196
        """Create a Frame Input Queued session.
197

198
        This function creates a Frame Input Queued session using the named
199
        references to database objects.
200

201
        Args:
202
            interface_name(str): XNET Interface name to use for
203
                this session.
204
            database_name(str): XNET database name to use for
205
                interface configuration. The database name must use the <alias>
206
                or <filepath> syntax (refer to Databases).
207
            cluster_name(str): XNET cluster name to use for
208
                interface configuration. The name must specify a cluster from
209
                the database given in the database_name parameter. If it is left
210
                blank, the cluster is extracted from the ``frame`` parameter.
211
            frame(str): XNET Frame or PDU name. This name
212
                must be one of the following options, whichever uniquely
213
                identifies a frame within the database given:
214

215
                    - ``<Frame>``
216
                    - ``<Cluster>.<Frame>``
217
                    - ``<PDU>``
218
                    - ``<Cluster>.<PDU>``
219
        """
220
        flattened_list = _utils.flatten_items(frame)
221
        base.SessionBase.__init__(
222
            self,
223
            database_name,
224
            cluster_name,
1✔
225
            flattened_list,
1✔
226
            interface_name,
227
            constants.CreateSessionMode.FRAME_IN_QUEUED)
228
        self._frames = session_frames.InFrames(self._handle)  # type: ignore
229

230
    @property
231
    def frames(self):
232
        # type: () -> session_frames.InFrames
1✔
233
        """:any:`nixnet._session.frames.InFrames`: Operate on session's frames"""
234
        return self._frames
1✔
235

236

237
class FrameOutQueuedSession(base.SessionBase):
238
    """Frame Output Queued session.
1✔
239

240
    This session provides a sequence of values for a single frame, for transmit
241
    using that frame's timing as specified in the database.
1✔
242

243
    The output data is provided as a list of frame values, to be transmitted
244
    sequentially for the frame specified in the session.
245

246
    You can only specify one frame for this session. To transmit sequential
247
    values for multiple frames, use a different Frame Output Queued session for
248
    each frame or use the Frame Output Stream session.
249

250
    The frame values for this session are stored in a queue, such that every
251
    value provided is transmitted.
252

253
    For this session, NI-XNET transmits each frame according to its properties
254
    in the database. Therefore, when you call the write frame function, the
255
    number of payload bytes in each frame value must match that frame's Payload
256
    Length property. The other frame value elements are ignored, so you can
257
    leave them uninitialized. For CAN interfaces, if the number of payload bytes
258
    you write is smaller than the Payload Length configured in the database, the
259
    requested number of bytes transmits. If the number of payload bytes is
260
    larger than the Payload Length configured in the database, the queue is
261
    flushed and no frames transmit. For other interfaces, transmitting a number
262
    of payload bytes different than the frame's payload may cause unexpected
263
    results on the bus.
264
    """
265

266
    def __init__(
267
            self,
268
            interface_name,  # type: typing.Text
269
            database_name,  # type: typing.Text
270
            cluster_name,  # type: typing.Text
1✔
271
            frame,  # type: typing.Text
272
    ):
273
        # type: (...) -> None
274
        """Create a Frame Output Queued session.
275

276
        This function creates a Frame Output Stream session using the named
277
        references to database objects.
278

279
        Args:
280
            interface_name(str): XNET Interface name to use for
281
                this session.
282
            database_name(str): XNET database name to use for
283
                interface configuration. The database name must use the <alias>
284
                or <filepath> syntax (refer to Databases).
285
            cluster_name(str): XNET cluster name to use for
286
                interface configuration. The name must specify a cluster from
287
                the database given in the database_name parameter. If it is left
288
                blank, the cluster is extracted from the ``frame`` parameter.
289
            frame(str): XNET Frame or PDU name. This name
290
                must be one of the following options, whichever uniquely
291
                identifies a frame within the database given:
292

293
                    - ``<Frame>``
294
                    - ``<Cluster>.<Frame>``
295
                    - ``<PDU>``
296
                    - ``<Cluster>.<PDU>``
297
        """
298
        flattened_list = _utils.flatten_items(frame)
299
        base.SessionBase.__init__(
300
            self,
301
            database_name,
302
            cluster_name,
1✔
303
            flattened_list,
1✔
304
            interface_name,
305
            constants.CreateSessionMode.FRAME_OUT_QUEUED)
306
        self._frames = session_frames.OutFrames(self._handle)  # type: ignore
307

308
    @property
309
    def frames(self):
310
        # type: () -> session_frames.OutFrames
1✔
311
        """:any:`nixnet._session.frames.OutFrames`: Operate on session's frames"""
312
        return self._frames
1✔
313

314

315
class FrameInSinglePointSession(base.SessionBase):
316
    """Frame Input Single-Point session.
1✔
317

318
    This session reads the most recent value received for each frame.
319

1✔
320
    This session does not use queues to store each received frame. If the
321
    interface receives two frames prior to calling the read frame function, that
322
    read returns signals for the second frame.
323

324
    The input data is returned as a list of frames, one for each frame
325
    specified for the session.
326

327
    .. note:: Typical use case: Control or simulation applications that require
328
       lower level access to frames (not signals).
329
    """
330

331
    def __init__(
332
            self,
333
            interface_name,  # type: typing.Text
334
            database_name,  # type: typing.Text
335
            cluster_name,  # type: typing.Text
1✔
336
            frames,  # type: typing.Union[typing.Text, typing.List[typing.Text]]
337
    ):
338
        # type: (...) -> None
339
        """Create a Frame Input Single-Point session.
340

341
        This function creates a Frame Input Single-Point session using the named
342
        references to database objects.
343

344
        Args:
345
            interface_name(str): XNET Interface name to use for
346
                this session.
347
            database_name(str): XNET database name to use for
348
                interface configuration. The database name must use the <alias>
349
                or <filepath> syntax (refer to Databases).
350
            cluster_name(str): XNET cluster name to use for
351
                interface configuration. The name must specify a cluster from
352
                the database given in the database_name parameter. If it is left
353
                blank, the cluster is extracted from the ``frames`` parameter.
354
            frames(list of str): Strings describing frames for the session. The
355
                list syntax is as follows:
356

357
                List contains one or more XNET Frame or PDU names. Each name
358
                must be one of the following options, whichever uniquely
359
                identifies a frame within the database given:
360

361
                    - ``<Frame>``
362
                    - ``<Cluster>.<Frame>``
363
                    - ``<PDU>``
364
                    - ``<Cluster>.<PDU>``
365
        """
366
        flattened_list = _utils.flatten_items(frames)
367
        base.SessionBase.__init__(
368
            self,
369
            database_name,
370
            cluster_name,
×
371
            flattened_list,
×
372
            interface_name,
373
            constants.CreateSessionMode.FRAME_IN_SINGLE_POINT)
374
        self._frames = session_frames.SinglePointInFrames(self._handle)  # type: ignore
375

376
    @property
377
    def frames(self):
NEW
378
        # type: () -> session_frames.SinglePointInFrames
×
379
        """:any:`nixnet._session.frames.InFrames`: Operate on session's frames"""
380
        return self._frames
1✔
381

382

383
class FrameOutSinglePointSession(base.SessionBase):
384
    """Frame Output Single-Point session.
×
385

386
    This session writes frame values for the next transmit.
387

1✔
388
    This session does not use queues to store frame values. If the write frame
389
    function is called twice before the next transmit, the transmitted frame
390
    uses the value from the second call to the write frame function.
391

392
    The output data is provided as a list of frames, one for each frame
393
    specified for the session.
394

395
    For this session, NI-XNET transmits each frame according to its properties
396
    in the database. Therefore, when you call the write frame function, the
397
    number of payload bytes in each frame value must match that frame's Payload
398
    Length property. The other frame value elements are ignored, so you can
399
    leave them uninitialized. For CAN interfaces, if the number of payload bytes
400
    you write is smaller than the Payload Length configured in the database, the
401
    requested number of bytes transmit. If the number of payload bytes is larger
402
    than the Payload Length configured in the database, the queue is flushed and
403
    no frames transmit. For other interfaces, transmitting a number of payload
404
    bytes different than the frame payload may cause unexpected results on the bus.
405

406
    .. note:: Typical use case: Control or simulation applications that require lower level access
407
       to frames (not signals).
408
    """
409
    def __init__(
410
            self,
411
            interface_name,  # type: typing.Text
412
            database_name,  # type: typing.Text
413
            cluster_name,  # type: typing.Text
1✔
414
            frames,  # type: typing.Union[typing.Text, typing.List[typing.Text]]
415
    ):
416
        # type: (...) -> None
417
        """Create a Frame Output Single-Point session.
418

419
        This function creates a Frame Output Single-Point session using the named
420
        references to database objects.
421

422
        Args:
423
            interface_name(str): XNET Interface name to use for
424
                this session.
425
            database_name(str): XNET database name to use for
426
                interface configuration. The database name must use the <alias>
427
                or <filepath> syntax (refer to Databases).
428
            cluster_name(str): XNET cluster name to use for
429
                interface configuration. The name must specify a cluster from
430
                the database given in the database_name parameter. If it is left
431
                blank, the cluster is extracted from the ``frames`` parameter.
432
            frames(list of str): Strings describing frames for the session. The
433
                list syntax is as follows:
434

435
                List contains one or more XNET Frame or PDU names. Each name
436
                must be one of the following options, whichever uniquely
437
                identifies a frame within the database given:
438

439
                    - ``<Frame>``
440
                    - ``<Cluster>.<Frame>``
441
                    - ``<PDU>``
442
                    - ``<Cluster>.<PDU>``
443
        """
444
        flattened_list = _utils.flatten_items(frames)
445
        base.SessionBase.__init__(
446
            self,
447
            database_name,
448
            cluster_name,
×
449
            flattened_list,
×
450
            interface_name,
451
            constants.CreateSessionMode.FRAME_OUT_SINGLE_POINT)
452
        self._frames = session_frames.SinglePointOutFrames(self._handle)  # type: ignore
453

454
    @property
455
    def frames(self):
NEW
456
        # type: () -> session_frames.SinglePointOutFrames
×
457
        """:any:`nixnet._session.frames.InFrames`: Operate on session's frames"""
458
        return self._frames
1✔
459

460

461
class SignalInSinglePointSession(base.SessionBase):
462
    """Signal Input Single-Point session.
×
463

464
    This session reads the most recent value received for each signal.
465

1✔
466
    This session does not use queues to store each received frame. If the
467
    interface receives two frames prior to calling
468
    :any:`nixnet._session.signals.SinglePointInSignals.read`, that call to
469
    :any:`nixnet._session.signals.SinglePointInSignals.read` returns signals
470
    for the second frame.
471

472
    Use :any:`nixnet._session.signals.SinglePointInSignals.read` for this session.
473

474
    You also can specify a trigger signal for a frame. This signal name is
475
    :trigger:.<frame name>, and once it is specified in the __init__ ``signals``
476
    list, it returns a value of 0.0 if the frame did not arrive since the last
477
    Read (or Start), and 1.0 if at least one frame of this ID arrived. You can
478
    specify multiple trigger signals for different frames in the same session.
479
    For multiplexed signals, a signal may or may not be contained in a received
480
    frame. To define a trigger signal for a multiplexed signal, use the signal
481
    name :trigger:.<frame name>.<signal name>. This signal returns 1.0 only if a
482
    frame with appropriate set multiplexer bit has been received since the last
483
    Read or Start.
484

485
    .. note:: Typical use case: Control or simulation applications, such as
486
       Hardware In the Loop (HIL).
487
    """
488

489
    def __init__(
490
            self,
491
            interface_name,  # type: typing.Text
492
            database_name,  # type: typing.Text
493
            cluster_name,  # type: typing.Text
1✔
494
            signals,  # type: typing.Union[typing.Text, typing.List[typing.Text]]
495
    ):
496
        # type: (...) -> None
497
        """Create a Signal Input Single-Point session.
498

499
        This function creates a Signal Input Single-Point session using the named
500
        references to database objects.
501

502
        Args:
503
            interface_name(str): XNET Interface name to use for
504
                this session.
505
            database_name(str): XNET database name to use for
506
                interface configuration. The database name must use the <alias>
507
                or <filepath> syntax (refer to Databases).
508
            cluster_name(str): XNET cluster name to use for
509
                interface configuration. The name must specify a cluster from
510
                the database given in the database_name parameter. If it is left
511
                blank, the cluster is extracted from the ``signals`` parameter.
512
            signals(list of str): Strings describing signals for the session. The
513
                list syntax is as follows:
514

515
                ``signals`` contains one or more XNET Signal names. Each name must
516
                be one of the following options, whichever uniquely
517
                identifies a signal within the database given:
518

519
                    - ``<Signal>``
520
                    - ``<Frame>.<Signal>``
521
                    - ``<Cluster>.<Frame>.<Signal>``
522
                    - ``<PDU>.<Signal>``
523
                    - ``<Cluster>.<PDU>.<Signal>``
524

525
                ``signals`` may also contain one or more trigger signals. For
526
                information about trigger signals, refer to Signal Output
527
                Single-Point Mode or Signal Input Single-Point Mode.
528
        """
529
        flattened_list = _utils.flatten_items(signals)
530
        base.SessionBase.__init__(
531
            self,
532
            database_name,
533
            cluster_name,
1✔
534
            flattened_list,
1✔
535
            interface_name,
536
            constants.CreateSessionMode.SIGNAL_IN_SINGLE_POINT)
537
        self._signals = session_signals.SinglePointInSignals(self._handle)  # type: ignore
538

539
    @property
540
    def signals(self):
541
        # type: () -> session_signals.SinglePointInSignals
1✔
542
        """:any:`nixnet._session.signals.SinglePointInSignals`: Operate on session's signals"""
543
        return self._signals
1✔
544

545

546
class SignalOutSinglePointSession(base.SessionBase):
547
    """Signal Out Single-Point session.
1✔
548

549
    This session writes signal values for the next frame transmit.
550

1✔
551
    This session does not use queues to store signal values. If
552
    :any:`nixnet._session.signals.SinglePointOutSignals.write` is called twice
553
    before the next transmit, the transmitted frame uses signal values from the
554
    second call to :any:`nixnet._session.signals.SinglePointOutSignals.write`.
555

556
    Use :any:`nixnet._session.signals.SinglePointOutSignals.write` for this session.
557

558
    You also can specify a trigger signal for a frame. This signal name is
559
    :trigger:.<frame name>, and once it is specified in the __init__ ``signals``
560
    list, you can write a value of 0.0 to suppress writing of that frame, or any
561
    value not equal to 0.0 to write the frame. You can specify multiple trigger
562
    signals for different frames in the same session.
563

564
    .. note:: Typical use case: Control or simulation applications, such as
565
       Hardware In the Loop (HIL).
566
    """
567

568
    def __init__(
569
            self,
570
            interface_name,  # type: typing.Text
571
            database_name,  # type: typing.Text
572
            cluster_name,  # type: typing.Text
1✔
573
            signals,  # type: typing.Union[typing.Text, typing.List[typing.Text]]
574
    ):
575
        # type: (...) -> None
576
        """Create a Signal Output Single-Point session.
577

578
        This function creates a Signal Output Single-Point session using the named
579
        references to database objects.
580

581
        Args:
582
            interface_name(str): XNET Interface name to use for
583
                this session.
584
            database_name(str): XNET database name to use for
585
                interface configuration. The database name must use the <alias>
586
                or <filepath> syntax (refer to Databases).
587
            cluster_name(str): XNET cluster name to use for
588
                interface configuration. The name must specify a cluster from
589
                the database given in the database_name parameter. If it is left
590
                blank, the cluster is extracted from the ``signals`` parameter.
591
            signals(list of str): Strings describing signals for the session. The
592
                list syntax is as follows:
593

594
                ``signals`` contains one or more XNET Signal names. Each name must
595
                be one of the following options, whichever uniquely
596
                identifies a signal within the database given:
597

598
                    - ``<Signal>``
599
                    - ``<Frame>.<Signal>``
600
                    - ``<Cluster>.<Frame>.<Signal>``
601
                    - ``<PDU>.<Signal>``
602
                    - ``<Cluster>.<PDU>.<Signal>``
603

604
                ``signals`` may also contain one or more trigger signals. For
605
                information about trigger signals, refer to Signal Output
606
                Single-Point Mode or Signal Output Single-Point Mode.
607
        """
608
        flattened_list = _utils.flatten_items(signals)
609
        base.SessionBase.__init__(
610
            self,
611
            database_name,
612
            cluster_name,
1✔
613
            flattened_list,
1✔
614
            interface_name,
615
            constants.CreateSessionMode.SIGNAL_OUT_SINGLE_POINT)
616
        self._signals = session_signals.SinglePointOutSignals(self._handle)  # type: ignore
617

618
    @property
619
    def signals(self):
620
        # type: () -> session_signals.SinglePointOutSignals
1✔
621
        """:any:`nixnet._session.signals.SinglePointInSignals`: Operate on session's signals"""
622
        return self._signals
1✔
623

624

625
def create_session_by_ref(
626
        database_refs,
1✔
627
        interface_name,
628
        mode):
629
    return _funcs.nx_create_session_by_ref(database_refs, interface_name, mode)
1✔
630

631

632
def read_signal_waveform(
633
        session_ref,
×
634
        timeout,
635
        start_time,
636
        delta_time,
1✔
637
        value_buffer,
638
        size_of_value_buffer,
639
        number_of_values_returned):
640
    raise NotImplementedError("Placeholder")
641

642

643
def read_signal_xy(
644
        session_ref,
×
645
        time_limit,
646
        value_buffer,
647
        size_of_value_buffer,
1✔
648
        timestamp_buffer,
649
        size_of_timestamp_buffer,
650
        num_pairs_buffer,
651
        size_of_num_pairs_buffer):
652
    raise NotImplementedError("Placeholder")
653

654

655
def write_signal_waveform(
656
        session_ref,
×
657
        timeout,
658
        value_buffer):
659
    _funcs.nx_write_signal_waveform(session_ref, timeout, value_buffer)
1✔
660

661

662
def write_signal_xy(
663
        session_ref,
×
664
        timeout,
665
        value_buffer,
666
        timestamp_buffer,
1✔
667
        num_pairs_buffer):
668
    _funcs.nx_write_signal_xy(session_ref, timeout, value_buffer, timestamp_buffer, num_pairs_buffer)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc