bsl.triggers.SoftwareTrigger#

class bsl.triggers.SoftwareTrigger(recorder, *, verbose=True)#

Trigger saving signal value in a .txt file.

Software trigger instance must be created after a StreamRecorder is started and close/deleted before a StreamRecorder is stopped.

Parameters
  • recorder (StreamRecorder) – BSL’s recorder used.

  • verbose (bool) – If True, display a logger.info message when a trigger is sent.

Examples

>>> recorder = StreamRecorder('path to dir')
>>> recorder.start()
>>> trigger = SoftwareTrigger(recorder)
>>> trigger.signal(1)
>>> trigger.close()  # OR >>> del trigger
>>> recorder.stop()
Attributes
eve_file

Event .ini file.

recorder

BSL’s recorder used.

verbose

Methods

close()

Close the event file.

signal(value)

Send a trigger value.

close()#

Close the event file.

property eve_file#

Event .ini file.

Type

TextIOWrapper

property recorder#

BSL’s recorder used.

Type

StreamRecorder

signal(value)#

Send a trigger value.

Parameters

value (int) – Value of the trigger.