How to use the nidcpower.errors function in nidcpower

To help you get started, we’ve selected a few nidcpower 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 / nidcpower / system_tests / test_system_nidcpower.py View on Github external
def test_create_and_delete_advanced_sequence(single_channel_session):
    properties_used = ['output_function', 'voltage_level']
    sequence_name = 'my_sequence'
    single_channel_session.source_mode = nidcpower.SourceMode.SEQUENCE
    single_channel_session.create_advanced_sequence(sequence_name=sequence_name, property_names=properties_used, set_as_active_sequence=True)
    single_channel_session.create_advanced_sequence_step(set_as_active_step=True)
    assert single_channel_session.active_advanced_sequence == sequence_name
    single_channel_session.output_function = nidcpower.OutputFunction.DC_VOLTAGE
    single_channel_session.voltage_level = 1
    single_channel_session.delete_advanced_sequence(sequence_name=sequence_name)
    try:
        single_channel_session.active_advanced_sequence = sequence_name
        assert False
    except nidcpower.errors.DriverError:
        pass
github ni / nimi-python / generated / nidcpower / _library_singleton.py View on Github external
def _get_library_name():
    try:
        return _library_info[platform.system()][platform.architecture()[0]]['name']
    except KeyError:
        raise errors.UnsupportedConfigurationError
github ni / nimi-python / generated / nidcpower / nidcpower / _library_singleton.py View on Github external
def _get_library_name():
    try:
        return ctypes.util.find_library(_library_info[platform.system()][platform.architecture()[0]]['name'])  # We find and return full path to the DLL
    except KeyError:
        raise errors.UnsupportedConfigurationError
github ni / nimi-python / generated / nidcpower / nidcpower / _library_singleton.py View on Github external
def _get_library_type():
    try:
        return _library_info[platform.system()][platform.architecture()[0]]['type']
    except KeyError:
        raise errors.UnsupportedConfigurationError