File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
pymosa/constellation_pymosa Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 55def main (args = None ):
66 parser = SatelliteArgumentParser ()
77 args = vars (parser .parse_args (args ))
8- setup_cli_logging (args .pop ("log_level " ))
8+ setup_cli_logging (args .pop ("level " ))
99 s = Pymosa (** args )
1010 s .run_satellite ()
1111
Original file line number Diff line number Diff line change 11from constellation .core .configuration import Configuration
22from constellation .core .satellite import Satellite
33import time
4- from constellation .core .commandmanager import cscp_requestable
5- from constellation .core .cscp import CSCPMessage
64from constellation .core .cmdp import MetricsType
5+ from constellation .core .fsm import SatelliteState
6+ from constellation .core .monitoring import schedule_metric
77import os
88import yaml
99import pymosa
1212from pymosa .m26_raw_data import save_configuration_dict
1313from time import sleep , strftime , time
1414from tqdm import tqdm
15-
15+ from typing import Any
1616
1717class Pymosa (Satellite ):
1818 def __init__ (self , * args , ** kwargs ):
@@ -117,5 +117,11 @@ def _pre_run(self):
117117 self .fh .setFormatter (logging .Formatter (FORMAT ))
118118 self .logger = logging .getLogger ()
119119 self .logger .addHandler (self .fh )
120+ self .telescope .dut ['TLU' ]['TRIGGER_COUNTER' ] = 0
120121
121-
122+ @schedule_metric ("" , MetricsType .LAST_VALUE , 1 )
123+ def trigger_number (self ) -> Any :
124+ if self .fsm .current_state_value == SatelliteState .RUN :
125+ return self .telescope .dut ['TLU' ]['TRIGGER_COUNTER' ]
126+ else :
127+ return None
You can’t perform that action at this time.
0 commit comments