Writing a shutter
All new shutter object should inherited from Shutter
class located
under bliss/common/shutter.py
.
Methods to over-load are:
_init(self)
: software initialization ie: communication, internal state…_initialize_hardware(self)
: initializes hardware parameters. It is called only once and only by the first client. The minimum to do in this method is to go back to the previous mode if it has a meaning for your shutter._set_mode(self, mode)
: changes the opening/closing mode. Modes are:EXTERNAL
: externally controled i.e: with a TTl signal.MANUAL
: equals to software which means that the opening/closing are done withopen()
andclose()
methods.CONFIGURATION
: mode to tune the shutter. i.e: in case of axis shutter, this mode should be use to calibrate the opening and closing position.
Note
Leave this _set_mode
method unimplemented if mode means nothing for your shutter.
_state(self)
: returns the current state of the shutter- Either
self.OPEN
,self.CLOSED
orself.UNKNOWN
- Either
_open(self)
: to open the shutter_close(self)
: to close the shutter_measure_open_close_time(self)
(optional): to return the opening plus the closing time for a shutter