Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViReal64, expected_value)
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViReal64, expected_size_or_value)
session.channels[0,1]._get_attribute_vi_real64(attribute_id)
Args:
attribute_id (int): The ID of the property that you want to get Supported Property
sample_clock_delay
Returns:
value (float): The value that you are getting
'''
session_ctype = _visatype.ViSession(self._session_number) # case S110
channel_name_ctype = ctypes.create_string_buffer(self._repeated_capability.encode(self._encoding)) # case C010
attribute_id_ctype = _visatype.ViAttr(attribute_id) # case S150
value_ctype = _visatype.ViReal64() # case S220
error_code = self._library.niTClk_GetAttributeViReal64(session_ctype, channel_name_ctype, attribute_id_ctype, None if value_ctype is None else (ctypes.pointer(value_ctype)))
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return float(value_ctype.value)
This method requires repeated capabilities. If called directly on the
nitclk.Session object, then the method will use all repeated capabilities in the session.
You can specify a subset of repeated capabilities using the Python index notation on an
nitclk.Session repeated capabilities container, and calling this method on the result.
Args:
attribute_id (int): The ID of the property that you want to set Supported Property
sample_clock_delay
value (float): The value for the property
'''
session_ctype = _visatype.ViSession(self._session_number) # case S110
channel_name_ctype = ctypes.create_string_buffer(self._repeated_capability.encode(self._encoding)) # case C010
attribute_id_ctype = _visatype.ViAttr(attribute_id) # case S150
value_ctype = _visatype.ViReal64(value) # case S150
error_code = self._library.niTClk_SetAttributeViReal64(session_ctype, channel_name_ctype, attribute_id_ctype, value_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return
def convert_timedelta_to_seconds_real64(value):
return _convert_timedelta(value, _visatype.ViReal64, 1)
You can specify a subset of repeated capabilities using the Python index notation on an
nitclk.Session repeated capabilities container, and calling this method on the result.
Args:
attribute_id (int): The ID of the property that you want to get Supported Property
sample_clock_delay
Returns:
value (float): The value that you are getting
'''
session_ctype = _visatype.ViSession(self._session_number) # case S110
channel_name_ctype = ctypes.create_string_buffer(self._repeated_capability.encode(self._encoding)) # case C010
attribute_id_ctype = _visatype.ViAttr(attribute_id) # case S150
value_ctype = _visatype.ViReal64() # case S220
error_code = self._library.niTClk_GetAttributeViReal64(session_ctype, channel_name_ctype, attribute_id_ctype, None if value_ctype is None else (ctypes.pointer(value_ctype)))
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return float(value_ctype.value)
You can specify a subset of repeated capabilities using the Python index notation on an
nitclk.Session repeated capabilities container, and calling this method on the result.:
session.channels[0,1]._set_attribute_vi_real64(attribute_id, value)
Args:
attribute_id (int): The ID of the property that you want to set Supported Property
sample_clock_delay
value (float): The value for the property
'''
session_ctype = _visatype.ViSession(self._session_number) # case S110
channel_name_ctype = ctypes.create_string_buffer(self._repeated_capability.encode(self._encoding)) # case C010
attribute_id_ctype = _visatype.ViAttr(attribute_id) # case S150
value_ctype = _visatype.ViReal64(value) # case S150
error_code = self._library.niTClk_SetAttributeViReal64(session_ctype, channel_name_ctype, attribute_id_ctype, value_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return