fastcs.methods.scan#
- fastcs.methods.scan.UnboundScanCallback#
A Scan callback that is unbound and must be called with a
Controllerinstancealias of
Callable[[Controller_T],Coroutine[None,None,None]]
- fastcs.methods.scan.ScanCallback#
A Scan callback that is bound and can be called without
self
- class fastcs.methods.scan.Scan(fn: Callable[[], Coroutine[None, None, None]], period: float)[source]#
A
ControllerMethodthat will be called periodically in the background.This class contains a function that is bound to a specific
Controllerinstance and is callable outside of the class context, without an explicitselfparameter. Calling an instance of this class will call the boundControllermethod.
- class fastcs.methods.scan.UnboundScan(fn: Callable[[Controller_T], Coroutine[None, None, None]], period: float)[source]#
A wrapper of an unbound
Controllermethod to be bound into aScan.This generic class stores an unbound
Controllermethod - effectively a function that takes an instance of a specificControllertype (Controller_T). Instances of this class can be added atControllerdefinition, either manually or with use of thescanwrapper, to register the method to be included in the API of theController. When theControlleris instantiated, these instances will be bound to the instance, creating aScaninstance.