Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabled support for DAQmxSelfCal #460

Merged
merged 13 commits into from
Dec 19, 2023
4 changes: 4 additions & 0 deletions generated/nidaqmx/_base_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,10 @@ def save_scale(self, scale_name, save_as, author, options):
def save_task(self, task, save_as, author, options):
raise NotImplementedError

@abc.abstractmethod
def self_cal(self, device_name):
raise NotImplementedError
zhindes marked this conversation as resolved.
Show resolved Hide resolved

@abc.abstractmethod
def self_test_device(self, device_name):
raise NotImplementedError
Expand Down
5 changes: 5 additions & 0 deletions generated/nidaqmx/_grpc_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2758,6 +2758,11 @@ def save_task(self, task, save_as, author, options):
task=task, save_as=save_as, author=author,
options_raw=options))

def self_cal(self, device_name):
response = self._invoke(
self._client.SelfCal,
grpc_types.SelfCalRequest(device_name=device_name))

def self_test_device(self, device_name):
response = self._invoke(
self._client.SelfTestDevice,
Expand Down
3 changes: 3 additions & 0 deletions generated/nidaqmx/_library_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4632,6 +4632,9 @@ def save_task(self, task, save_as, author, options):
task, save_as, author, options)
self.check_for_error(error_code)

def self_cal(self, device_name):
zhindes marked this conversation as resolved.
Show resolved Hide resolved
raise NotImplementedError

def self_test_device(self, device_name):
cfunc = lib_importer.windll.DAQmxSelfTestDevice
if cfunc.argtypes is None:
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/metadata/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25001,4 +25001,4 @@
'python_description': 'Writes data from a virtual TEDS file to the TEDS sensor.',
'returns': 'int32'
}
}
}
24 changes: 24 additions & 0 deletions src/codegen/metadata/functions_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,29 @@
},
'WriteRaw':{
'python_codegen_method': 'CustomCode_Write',
},
zhindes marked this conversation as resolved.
Show resolved Hide resolved
'SelfCal': {
'calling_convention': 'StdCall',
'handle_parameter': {
'ctypes_data_type': 'ctypes.c_char_p',
'cvi_name': 'deviceName',
'python_accessor': 'self._name'
},
'parameters': [
{
'ctypes_data_type': 'ctypes.c_char_p',
'direction': 'in',
'is_optional_in_python': False,
'name': 'deviceName',
'python_data_type': 'str',
'python_description': '',
'python_type_annotation': 'str',
'type': 'const char[]',
'use_in_python_api': False
}
],
'python_class_name': 'Device',
'python_description': 'Measures the onboard reference voltage of the device and adjusts the self-calibration constants to account for any errors caused by short-term fluctuations in the operating environment. When you self-calibrate a device, no external signal connections are necessary.',
'returns': 'int32'
}
}
1 change: 0 additions & 1 deletion src/codegen/utilities/interpreter_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"GetCalInfoAttributeString",
"GetCalInfoAttributeUInt32",
"GetSelfCalLastDateAndTime",
"SelfCal",
"SetCalInfoAttributeBool",
"SetCalInfoAttributeDouble",
"SetCalInfoAttributeString",
Expand Down
Loading