MCPcopy Create free account
hub / github.com/LabPy/lantz / RetStr

Class RetStr

lantz/foreign.py:116–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115
116class RetStr(object):
117
118 def __init__(self, length, encoding='ascii'):
119 self.length = length
120 self.buffer = ctypes.create_string_buffer(b'', length)
121 self.encoding = encoding
122
123 def __iter__(self):
124 yield self
125 yield self.length
126
127 @property
128 def value(self):
129 if self.encoding:
130 return self.buffer.value.decode(self.encoding)
131 else:
132 return self.buffer.value
133
134
135class RetValue(object):

Callers 15

_get_error_stringMethod · 0.90
_device_namesMethod · 0.90
_task_namesMethod · 0.90
_channel_namesMethod · 0.90
product_typeMethod · 0.90
analog_input_channelsMethod · 0.90
digital_input_linesMethod · 0.90
digital_output_linesMethod · 0.90
digital_input_portsMethod · 0.90
digital_output_portsMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_return_stringMethod · 0.72