__all__ = ['Error', 'Context', 'Driver', 'Device', 'Session', 'Packet', 'Log',
'LogLevel', 'PacketType', 'Quantity', 'Unit', 'QuantityFlag', 'ConfigKey',
__all__ = ['Error', 'Context', 'Driver', 'Device', 'Session', 'Packet', 'Log',
'LogLevel', 'PacketType', 'Quantity', 'Unit', 'QuantityFlag', 'ConfigKey',
- 'ProbeType', 'Probe', 'ChannelGroup', 'InputFormat', 'OutputFormat',
+ 'ChannelType', 'Channel', 'ChannelGroup', 'InputFormat', 'OutputFormat',
device._channel_groups = None
context._devices[address] = device
return context._devices[address]
device._channel_groups = None
context._devices[address] = device
return context._devices[address]
- def probes(self):
- if self._probes is None:
- self._probes = {}
- probe_list = self.struct.probes
- while (probe_list):
- probe_ptr = void_ptr_to_sr_channel_ptr(probe_list.data)
- self._probes[probe_ptr.name] = Probe(self, probe_ptr)
- probe_list = probe_list.next
- return self._probes
+ def channels(self):
+ if self._channels is None:
+ self._channels = {}
+ channel_list = self.struct.channels
+ while (channel_list):
+ channel_ptr = void_ptr_to_sr_channel_ptr(channel_list.data)
+ self._channels[channel_ptr.name] = Channel(self, channel_ptr)
+ channel_list = channel_list.next
+ return self._channels
return
check(sr_config_set(self.struct, None, key.id, python_to_gvariant(value)))
return
check(sr_config_set(self.struct, None, key.id, python_to_gvariant(value)))
if symbol_name.startswith(prefix):
name = symbol_name[len(prefix):]
value = getattr(lowlevel, symbol_name)
if symbol_name.startswith(prefix):
name = symbol_name[len(prefix):]
value = getattr(lowlevel, symbol_name)