Skip to content

Commit

Permalink
Pick up new daqmx metadata (#608)
Browse files Browse the repository at this point in the history
* Pick up new daqmx metadata

* reverted readArray type in ReadRaw metadata
  • Loading branch information
WayneDroid authored Jul 8, 2024
1 parent 8264bc2 commit 441569a
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 4 deletions.
1 change: 1 addition & 0 deletions generated/nidaqmx/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ class ProductCategory(Enum):
FIELD_DAQ = 16151 #: FieldDAQ.
TEST_SCALE_CHASSIS = 16180 #: TestScale chassis.
TEST_SCALE_MODULE = 16181 #: TestScale I/O module.
MIODAQ = 16182 #: mioDAQ.
UNKNOWN = 12588 #: Unknown category.


Expand Down
1 change: 1 addition & 0 deletions generated/nidaqmx/error_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class DAQmxErrors(IntEnum):
NEEDS_USB_SUPER_SPEED = -209889
REMOTE_SENSE = -209888
OVER_TEMPERATURE_PROTECTION_ACTIVATED = -209887
MULTI_TASK_CFG_SAMP_RATE_NOT_SUPPORTED_WITH_PROP_SET = -209886
Expand Down
15 changes: 15 additions & 0 deletions src/codegen/metadata/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,13 @@
},
'DAQmxErrors': {
'values': [
{
'documentation': {
'description': ' '
},
'name': 'NEEDS_USB_SUPER_SPEED',
'value': -209889
},
{
'documentation': {
'description': ' '
Expand Down Expand Up @@ -16502,6 +16509,14 @@
'name': 'TEST_SCALE_MODULE',
'value': 16181
},
{
'documentation': {
'description': 'mioDAQ.'
},
'name': 'MIO_DAQ',
'python_name': 'MIODAQ',
'value': 16182
},
{
'documentation': {
'description': 'Unknown category.'
Expand Down
84 changes: 80 additions & 4 deletions src/codegen/metadata/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13827,9 +13827,9 @@
'direction': 'out',
'is_optional_in_python': False,
'name': 'logicFamily',
'python_data_type': 'int',
'python_data_type': 'LogicFamily',
'python_description': '',
'python_type_annotation': 'int',
'python_type_annotation': 'nidaqmx.constants.LogicFamily',
'type': 'int32'
}
],
Expand Down Expand Up @@ -19462,30 +19462,53 @@
'calling_convention': 'StdCall',
'parameters': [
{
'ctypes_data_type': 'ctypes.TaskHandle',
'direction': 'in',
'is_optional_in_python': False,
'name': 'task',
'python_data_type': 'TaskHandle',
'python_description': '',
'python_type_annotation': 'TaskHandle',
'type': 'TaskHandle'
},
{
'ctypes_data_type': 'ctypes.c_int',
'direction': 'in',
'is_optional_in_python': False,
'name': 'numSampsPerChan',
'python_data_type': 'int',
'python_description': '',
'python_type_annotation': 'int',
'type': 'int32'
},
{
'ctypes_data_type': 'ctypes.c_double',
'direction': 'in',
'is_optional_in_python': False,
'name': 'timeout',
'python_data_type': 'float',
'python_description': '',
'python_type_annotation': 'float',
'type': 'float64'
},
{
'ctypes_data_type': 'ctypes.c_int',
'direction': 'in',
'enum': 'GroupBy',
'is_optional_in_python': False,
'name': 'fillMode',
'python_data_type': 'FillMode',
'python_description': '',
'python_type_annotation': 'nidaqmx.constants.FillMode',
'type': 'int32'
},
{
'coerced': True,
'ctypes_data_type': 'numpy.generic',
'direction': 'out',
'is_list': True,
'name': 'readArrayVoltage',
'python_data_type': 'object',
'size': {
'mechanism': 'passed-in',
'value': 'arraySizeInSamps'
Expand All @@ -19494,101 +19517,154 @@
},
{
'coerced': True,
'ctypes_data_type': 'numpy.generic',
'direction': 'out',
'is_list': True,
'name': 'readArrayCurrent',
'python_data_type': 'object',
'size': {
'mechanism': 'passed-in',
'value': 'arraySizeInSamps'
},
'type': 'int16[]'
},
{
'ctypes_data_type': 'ctypes.c_uint32',
'direction': 'in',
'name': 'arraySizeInSamps',
'python_data_type': 'int',
'type': 'uInt32'
},
{
'ctypes_data_type': 'ctypes.c_int',
'direction': 'out',
'is_optional_in_python': False,
'name': 'sampsPerChanRead',
'python_data_type': 'int',
'python_description': '',
'python_type_annotation': 'int',
'return_on_error_key': 'ni-samps-per-chan-read',
'type': 'int32'
},
{
'ctypes_data_type': 'c_bool32',
'direction': 'in',
'hardcoded_value': 'nullptr',
'include_in_proto': False,
'is_optional_in_python': False,
'name': 'reserved',
'pointer': True,
'python_data_type': 'bool',
'python_description': '',
'python_type_annotation': 'bool',
'type': 'bool32'
}
],
'python_codegen_method': 'no',
'python_codegen_method': 'CustomCode',
'returns': 'int32',
'timeout_error': 'DAQmxErrorSamplesNotYetAvailable'
},
'ReadPowerF64': {
'calling_convention': 'StdCall',
'parameters': [
{
'ctypes_data_type': 'ctypes.TaskHandle',
'direction': 'in',
'is_optional_in_python': False,
'name': 'task',
'python_data_type': 'TaskHandle',
'python_description': '',
'python_type_annotation': 'TaskHandle',
'type': 'TaskHandle'
},
{
'ctypes_data_type': 'ctypes.c_int',
'direction': 'in',
'is_optional_in_python': False,
'name': 'numSampsPerChan',
'python_data_type': 'int',
'python_description': '',
'python_type_annotation': 'int',
'type': 'int32'
},
{
'ctypes_data_type': 'ctypes.c_double',
'direction': 'in',
'is_optional_in_python': False,
'name': 'timeout',
'python_data_type': 'float',
'python_description': '',
'python_type_annotation': 'float',
'type': 'float64'
},
{
'ctypes_data_type': 'ctypes.c_int',
'direction': 'in',
'enum': 'GroupBy',
'is_optional_in_python': False,
'name': 'fillMode',
'python_data_type': 'FillMode',
'python_description': '',
'python_type_annotation': 'nidaqmx.constants.FillMode',
'type': 'int32'
},
{
'ctypes_data_type': 'numpy.float64',
'direction': 'out',
'is_list': True,
'name': 'readArrayVoltage',
'python_data_type': 'float',
'size': {
'mechanism': 'passed-in',
'value': 'arraySizeInSamps'
},
'type': 'float64[]'
},
{
'ctypes_data_type': 'numpy.float64',
'direction': 'out',
'is_list': True,
'name': 'readArrayCurrent',
'python_data_type': 'float',
'size': {
'mechanism': 'passed-in',
'value': 'arraySizeInSamps'
},
'type': 'float64[]'
},
{
'ctypes_data_type': 'ctypes.c_uint32',
'direction': 'in',
'name': 'arraySizeInSamps',
'python_data_type': 'int',
'type': 'uInt32'
},
{
'ctypes_data_type': 'ctypes.c_int',
'direction': 'out',
'is_optional_in_python': False,
'name': 'sampsPerChanRead',
'python_data_type': 'int',
'python_description': '',
'python_type_annotation': 'int',
'return_on_error_key': 'ni-samps-per-chan-read',
'type': 'int32'
},
{
'ctypes_data_type': 'c_bool32',
'direction': 'in',
'hardcoded_value': 'nullptr',
'include_in_proto': False,
'is_optional_in_python': False,
'name': 'reserved',
'pointer': True,
'python_data_type': 'bool',
'python_description': '',
'python_type_annotation': 'bool',
'type': 'bool32'
}
],
'python_codegen_method': 'no',
'python_codegen_method': 'CustomCode',
'returns': 'int32',
'timeout_error': 'DAQmxErrorSamplesNotYetAvailable'
},
Expand Down

0 comments on commit 441569a

Please sign in to comment.