37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
|
|
class Instruction():
|
|
def __init__(self):
|
|
self._instruction_set = {
|
|
'set_file_name': {
|
|
'method': 'update_recording_file_name_info',
|
|
'arguments': ['file_name']
|
|
},
|
|
'set_parent': {
|
|
'method': 'update_parent_info',
|
|
'arguments': ['parent']
|
|
},
|
|
'set_parameter':{
|
|
'method': 'set_multi_parameters',
|
|
'arguments': ['parameter']
|
|
},
|
|
'call_instruction': {
|
|
'method': 'call_instruction',
|
|
'arguments': ['instruction']
|
|
},
|
|
}
|
|
|
|
self._start_instruction = list(map(lambda ins: self._instruction_set[ins] ,['set_file_name', 'set_parent', 'set_parameter', 'call_instruction']))
|
|
self._stop_instruction = list(map(lambda ins: self._instruction_set[ins] ,['call_instruction']))
|
|
self._idle_instruction = []
|
|
|
|
@property
|
|
def start(self) -> list:
|
|
return self._start_instruction
|
|
|
|
@property
|
|
def stop(self) -> list:
|
|
return self._stop_instruction
|
|
|
|
@property
|
|
def idle(self) -> list:
|
|
return self.idle_instruction |