How to use nifgen - 10 common examples

To help you get started, we’ve selected a few nifgen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ni / nimi-python / src / nifgen / system_tests / test_system_nifgen.py View on Github external
def test_channel_format_types():
    with nifgen.Session('', [0, 1], False, 'Simulate=1, DriverSetup=Model:5433 (2CH);BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
    with nifgen.Session('', range(2), False, 'Simulate=1, DriverSetup=Model:5433 (2CH);BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
    with nifgen.Session('', '0,1', False, 'Simulate=1, DriverSetup=Model:5433 (2CH);BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
    with nifgen.Session('', None, False, 'Simulate=1, DriverSetup=Model:5433 (2CH); BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
    with nifgen.Session(resource_name='', reset_device=False, options='Simulate=1, DriverSetup=Model:5433 (2CH); BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
github ni / nimi-python / src / nifgen / system_tests / test_system_nifgen.py View on Github external
def test_channel_format_types():
    with nifgen.Session('', [0, 1], False, 'Simulate=1, DriverSetup=Model:5433 (2CH);BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
    with nifgen.Session('', range(2), False, 'Simulate=1, DriverSetup=Model:5433 (2CH);BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
    with nifgen.Session('', '0,1', False, 'Simulate=1, DriverSetup=Model:5433 (2CH);BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
    with nifgen.Session('', None, False, 'Simulate=1, DriverSetup=Model:5433 (2CH); BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
    with nifgen.Session(resource_name='', reset_device=False, options='Simulate=1, DriverSetup=Model:5433 (2CH); BoardType:PXIe') as simulated_session:
        assert simulated_session.channel_count == 2
github ni / nimi-python / generated / nifgen / nifgen / unit_tests / _matchers.py View on Github external
def __init__(self, expected_size_or_value):
        _BufferMatcher.__init__(self, _visatype.ViBoolean, expected_size_or_value)
github ni / nimi-python / generated / nifgen / unit_tests / _matchers.py View on Github external
def __init__(self):
        _PointerMatcher.__init__(self, _visatype.ViInt32)
github ni / nimi-python / generated / nifgen / nifgen / unit_tests / _matchers.py View on Github external
def __init__(self, expected_size_or_value):
        _BufferMatcher.__init__(self, _visatype.ViInt8, expected_size_or_value)
github ni / nimi-python / generated / nifgen / unit_tests / _matchers.py View on Github external
def __init__(self):
        _PointerMatcher.__init__(self, _visatype.ViReal64)
github ni / nimi-python / generated / nifgen / unit_tests / _matchers.py View on Github external
def __init__(self, expected_value):
        _ScalarMatcher.__init__(self, _visatype.ViInt16, expected_value)
github ni / nimi-python / generated / nifgen / unit_tests / _matchers.py View on Github external
def __init__(self):
        _PointerMatcher.__init__(self, _visatype.ViSession)
github ni / nimi-python / generated / nifgen / nifgen / unit_tests / _matchers.py View on Github external
def __init__(self, expected_size_or_value):
        _BufferMatcher.__init__(self, _visatype.ViReal64, expected_size_or_value)
github ni / nimi-python / generated / nifgen / nifgen / unit_tests / _matchers.py View on Github external
def __init__(self):
        _PointerMatcher.__init__(self, _visatype.ViInt32)