Skip to content

Commit

Permalink
Filter out CalculatedPower stuff until it is fully supported
Browse files Browse the repository at this point in the history
  • Loading branch information
SiuFong-NI committed Nov 7, 2024
1 parent 240a481 commit 5dcd9b0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 276 deletions.
5 changes: 0 additions & 5 deletions generated/nidaqmx/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,6 @@ class PowerOutputState(Enum):
OUTPUT_DISABLED = 15503 #: Power output is disabled.


class PowerUnits(Enum):
WATTS = 16203 #: Watts.
FROM_CUSTOM_SCALE = 10065 #: Units a custom scale specifies. If you select this value, you must specify a custom scale name.


class PowerUpChannelType(Enum):
CHANNEL_VOLTAGE = 0 #: Voltage Channel
CHANNEL_CURRENT = 1 #: Current Channel
Expand Down
120 changes: 8 additions & 112 deletions generated/nidaqmx/task/channels/_ai_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
ExcitationVoltageOrCurrent, FilterResponse, FilterType,
ForceIEPESensorSensitivityUnits, ForceUnits, FrequencyUnits, Impedance1,
InputDataTransferCondition, LVDTSensitivityUnits, LengthUnits,
PowerIdleOutputBehavior, PowerOutputState, PowerUnits, PressureUnits,
RTDType, RVDTSensitivityUnits, RawDataCompressionType,
ResistanceConfiguration, ResistanceUnits, ResolutionType, ScaleType,
Sense, SensorPowerCfg, SensorPowerType, ShuntCalSelect,
SoundPressureUnits, SourceSelection, StrainGageBridgeType,
StrainGageRosetteMeasurementType, StrainGageRosetteType, StrainUnits,
TemperatureUnits, TerminalConfiguration, ThermocoupleType, TorqueUnits,
UsageTypeAI, VelocityIEPESensorSensitivityUnits, VelocityUnits,
VoltageUnits)
PowerIdleOutputBehavior, PowerOutputState, PressureUnits, RTDType,
RVDTSensitivityUnits, RawDataCompressionType, ResistanceConfiguration,
ResistanceUnits, ResolutionType, ScaleType, Sense, SensorPowerCfg,
SensorPowerType, ShuntCalSelect, SoundPressureUnits, SourceSelection,
StrainGageBridgeType, StrainGageRosetteMeasurementType,
StrainGageRosetteType, StrainUnits, TemperatureUnits,
TerminalConfiguration, ThermocoupleType, TorqueUnits, UsageTypeAI,
VelocityIEPESensorSensitivityUnits, VelocityUnits, VoltageUnits)


class AIChannel(Channel):
Expand Down Expand Up @@ -883,90 +882,6 @@ def ai_bridge_units(self, val):
def ai_bridge_units(self):
self._interpreter.reset_chan_attribute(self._handle, self._name, 0x2f92)

@property
def ai_calculated_power_current_max(self):
"""
float: Specifies the current maximum value you expect to
measure. This value is in the units you specify with a units
property. When you query this property, it returns the
coerced current maximum value that the device can measure
with the current settings.
"""

val = self._interpreter.get_chan_attribute_double(self._handle, self._name, 0x31ef)
return val

@ai_calculated_power_current_max.setter
def ai_calculated_power_current_max(self, val):
self._interpreter.set_chan_attribute_double(self._handle, self._name, 0x31ef, val)

@ai_calculated_power_current_max.deleter
def ai_calculated_power_current_max(self):
self._interpreter.reset_chan_attribute(self._handle, self._name, 0x31ef)

@property
def ai_calculated_power_current_min(self):
"""
float: Specifies the current minimum value you expect to
measure. This value is in the units you specify with a units
property. When you query this property, it returns the
coerced current minimum value that the device can measure
with the current settings.
"""

val = self._interpreter.get_chan_attribute_double(self._handle, self._name, 0x31f0)
return val

@ai_calculated_power_current_min.setter
def ai_calculated_power_current_min(self, val):
self._interpreter.set_chan_attribute_double(self._handle, self._name, 0x31f0, val)

@ai_calculated_power_current_min.deleter
def ai_calculated_power_current_min(self):
self._interpreter.reset_chan_attribute(self._handle, self._name, 0x31f0)

@property
def ai_calculated_power_voltage_max(self):
"""
float: Specifies the voltage maximum value you expect to
measure. This value is in the units you specify with a units
property. When you query this property, it returns the
coerced voltage maximum value that the device can measure
with the current settings.
"""

val = self._interpreter.get_chan_attribute_double(self._handle, self._name, 0x31ed)
return val

@ai_calculated_power_voltage_max.setter
def ai_calculated_power_voltage_max(self, val):
self._interpreter.set_chan_attribute_double(self._handle, self._name, 0x31ed, val)

@ai_calculated_power_voltage_max.deleter
def ai_calculated_power_voltage_max(self):
self._interpreter.reset_chan_attribute(self._handle, self._name, 0x31ed)

@property
def ai_calculated_power_voltage_min(self):
"""
float: Specifies the voltage minimum value you expect to
measure. This value is in the units you specify with a units
property. When you query this property, it returns the
coerced voltage minimum value that the device can measure
with the current settings.
"""

val = self._interpreter.get_chan_attribute_double(self._handle, self._name, 0x31ee)
return val

@ai_calculated_power_voltage_min.setter
def ai_calculated_power_voltage_min(self, val):
self._interpreter.set_chan_attribute_double(self._handle, self._name, 0x31ee, val)

@ai_calculated_power_voltage_min.deleter
def ai_calculated_power_voltage_min(self):
self._interpreter.reset_chan_attribute(self._handle, self._name, 0x31ee)

@property
def ai_charge_units(self):
"""
Expand Down Expand Up @@ -2495,25 +2410,6 @@ def ai_power_supply_fault_detect_enable(self, val):
def ai_power_supply_fault_detect_enable(self):
self._interpreter.reset_chan_attribute(self._handle, self._name, 0x3191)

@property
def ai_power_units(self):
"""
:class:`nidaqmx.constants.PowerUnits`: Specifies the units to
use to return power measurements from the channel.
"""

val = self._interpreter.get_chan_attribute_int32(self._handle, self._name, 0x31ec)
return PowerUnits(val)

@ai_power_units.setter
def ai_power_units(self, val):
val = val.value
self._interpreter.set_chan_attribute_int32(self._handle, self._name, 0x31ec, val)

@ai_power_units.deleter
def ai_power_units(self):
self._interpreter.reset_chan_attribute(self._handle, self._name, 0x31ec)

@property
def ai_pressure_units(self):
"""
Expand Down
141 changes: 0 additions & 141 deletions src/codegen/metadata/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16925,147 +16925,6 @@
'python_description': 'Specifies whether to use local or remote sense to sense the output voltage. DAQmx Read (Power Supply) will return remote or local voltage based on the Remote Sense attribute value. Reading this property will return the user-defined value.',
'resettable': True,
'type': 'int32'
},
12780: {
'access': 'read-write',
'c_function_name': 'AIPowerUnits',
'calling_convention': 'StdCall',
'ctypes_data_type': 'ctypes.c_int',
'enum': 'PowerUnits',
'handle_parameters': {
'channelHandle': {
'accessor': 'self._name',
'ctypes_data_type': 'ctypes.c_char_p',
'cvi_name': 'channel'
},
'taskHandle': {
'accessor': 'self._handle',
'ctypes_data_type': 'lib_importer.task_handle',
'cvi_name': 'taskHandle'
}
},
'has_explicit_read_buffer_size': False,
'has_explicit_write_buffer_size': False,
'is_list': False,
'is_python_object': False,
'name': 'AI_POWER_UNITS',
'python_class_name': 'AIChannel',
'python_data_type': 'PowerUnits',
'python_description': 'Specifies the units to use to return power measurements from the channel.',
'resettable': True,
'type': 'int32'
},
12781: {
'access': 'read-write',
'c_function_name': 'AICalculatedPowerVoltageMax',
'calling_convention': 'StdCall',
'ctypes_data_type': 'ctypes.c_double',
'handle_parameters': {
'channelHandle': {
'accessor': 'self._name',
'ctypes_data_type': 'ctypes.c_char_p',
'cvi_name': 'channel'
},
'taskHandle': {
'accessor': 'self._handle',
'ctypes_data_type': 'lib_importer.task_handle',
'cvi_name': 'taskHandle'
}
},
'has_explicit_read_buffer_size': False,
'has_explicit_write_buffer_size': False,
'is_list': False,
'is_python_object': False,
'name': 'AI_CALCULATED_POWER_VOLTAGE_MAX',
'python_class_name': 'AIChannel',
'python_data_type': 'float',
'python_description': 'Specifies the voltage maximum value you expect to measure. This value is in the units you specify with a units property. When you query this property, it returns the coerced voltage maximum value that the device can measure with the current settings.',
'resettable': True,
'type': 'float64'
},
12782: {
'access': 'read-write',
'c_function_name': 'AICalculatedPowerVoltageMin',
'calling_convention': 'StdCall',
'ctypes_data_type': 'ctypes.c_double',
'handle_parameters': {
'channelHandle': {
'accessor': 'self._name',
'ctypes_data_type': 'ctypes.c_char_p',
'cvi_name': 'channel'
},
'taskHandle': {
'accessor': 'self._handle',
'ctypes_data_type': 'lib_importer.task_handle',
'cvi_name': 'taskHandle'
}
},
'has_explicit_read_buffer_size': False,
'has_explicit_write_buffer_size': False,
'is_list': False,
'is_python_object': False,
'name': 'AI_CALCULATED_POWER_VOLTAGE_MIN',
'python_class_name': 'AIChannel',
'python_data_type': 'float',
'python_description': 'Specifies the voltage minimum value you expect to measure. This value is in the units you specify with a units property. When you query this property, it returns the coerced voltage minimum value that the device can measure with the current settings.',
'resettable': True,
'type': 'float64'
},
12783: {
'access': 'read-write',
'c_function_name': 'AICalculatedPowerCurrentMax',
'calling_convention': 'StdCall',
'ctypes_data_type': 'ctypes.c_double',
'handle_parameters': {
'channelHandle': {
'accessor': 'self._name',
'ctypes_data_type': 'ctypes.c_char_p',
'cvi_name': 'channel'
},
'taskHandle': {
'accessor': 'self._handle',
'ctypes_data_type': 'lib_importer.task_handle',
'cvi_name': 'taskHandle'
}
},
'has_explicit_read_buffer_size': False,
'has_explicit_write_buffer_size': False,
'is_list': False,
'is_python_object': False,
'name': 'AI_CALCULATED_POWER_CURRENT_MAX',
'python_class_name': 'AIChannel',
'python_data_type': 'float',
'python_description': 'Specifies the current maximum value you expect to measure. This value is in the units you specify with a units property. When you query this property, it returns the coerced current maximum value that the device can measure with the current settings.',
'resettable': True,
'type': 'float64'
},
12784: {
'access': 'read-write',
'c_function_name': 'AICalculatedPowerCurrentMin',
'calling_convention': 'StdCall',
'ctypes_data_type': 'ctypes.c_double',
'handle_parameters': {
'channelHandle': {
'accessor': 'self._name',
'ctypes_data_type': 'ctypes.c_char_p',
'cvi_name': 'channel'
},
'taskHandle': {
'accessor': 'self._handle',
'ctypes_data_type': 'lib_importer.task_handle',
'cvi_name': 'taskHandle'
}
},
'has_explicit_read_buffer_size': False,
'has_explicit_write_buffer_size': False,
'is_list': False,
'is_python_object': False,
'name': 'AI_CALCULATED_POWER_CURRENT_MIN',
'python_class_name': 'AIChannel',
'python_data_type': 'float',
'python_description': 'Specifies the current minimum value you expect to measure. This value is in the units you specify with a units property. When you query this property, it returns the coerced current minimum value that the device can measure with the current settings.',
'resettable': True,
'type': 'float64'
}
},
'Device': {
Expand Down
18 changes: 0 additions & 18 deletions src/codegen/metadata/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -16312,24 +16312,6 @@
}
]
},
'PowerUnits': {
'values': [
{
'documentation': {
'description': 'Watts.'
},
'name': 'WATTS',
'value': 16203
},
{
'documentation': {
'description': ' Units a custom scale specifies. If you select this value, you must specify a custom scale name.'
},
'name': 'FROM_CUSTOM_SCALE',
'value': 10065
}
]
},
'PowerUpChannelType': {
'values': [
{
Expand Down

0 comments on commit 5dcd9b0

Please sign in to comment.