caproto.ioc_examples.mirror.Mirror¶
- class caproto.ioc_examples.mirror.Mirror(*args, target, **kwargs)[source]¶
Subscribe to a PV and serve its value.
The default prefix is
mirror:
.¶ Attribute
Suffix
Docs
Type
Notes
Alarm Group
value
value
float
Read-only Startup
Methods
group_read
(instance)Generic read called for channels without get defined
group_write
(instance, value)Generic write called for channels without put defined
Attributes
default_values
type_map
type_map_read_only
pvdb
attr_pvdb
attr_to_pvname
groups
pvproperty methods
- value.startup(self, instance, async_lib)¶
Source code: value.startup
34 @value.startup 35 async def value(self, instance, async_lib): 36 # Note that the asyncio context must be created here so that it knows 37 # which asyncio loop to use: 38 self.client_context = Context() 39 40 self.pv, = await self.client_context.get_pvs(self.target) 41 42 # Subscribe to the target PV and register self._callback. 43 self.subscription = self.pv.subscribe(data_type='time') 44 self.subscription.add_callback(self._callback)