Update tmtc #26
@ -1 +1 @@
|
|||||||
Subproject commit b5068ceb033b6a857d463d6d91aa8cbdf07913e9
|
Subproject commit 559e42f03b51cfb673e46cd3b25e68348c33fc21
|
@ -27,28 +27,43 @@ limitations under the License.
|
|||||||
@author R. Mueller
|
@author R. Mueller
|
||||||
"""
|
"""
|
||||||
import sys
|
import sys
|
||||||
|
try:
|
||||||
|
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
|
||||||
|
from tmtccmd.ccsds.handler import CcsdsTmHandler
|
||||||
|
from tmtccmd.utility.logger import TMTC_LOGGER_NAME
|
||||||
|
except ImportError as error:
|
||||||
|
run_tmtc_commander = None
|
||||||
|
initialize_tmtc_commander = None
|
||||||
|
print(error)
|
||||||
|
print('Python tmtccmd submodule could not be imported')
|
||||||
|
print(
|
||||||
|
'Install with \"cd tmtccmd && python3 -m pip '
|
||||||
|
'install -e .[gui]\" for interactive installation'
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
try:
|
||||||
|
import spacepackets
|
||||||
|
from spacepackets.log import set_custom_console_logger_name
|
||||||
|
except ImportError as error:
|
||||||
|
print(error)
|
||||||
|
print('Python spacepackets module could not be imported')
|
||||||
|
print(
|
||||||
|
'Install with \"cd spacepackets && python3 -m pip intall -e .\" for interative installation'
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
from config.hook_implementations import EiveHookObject
|
from config.hook_implementations import EiveHookObject
|
||||||
from config.version import __version__
|
from config.version import __version__
|
||||||
from config.definitions import PUS_APID
|
from config.definitions import PUS_APID
|
||||||
from pus_tm.factory_hook import ccsds_tm_handler
|
from pus_tm.factory_hook import ccsds_tm_handler
|
||||||
try:
|
|
||||||
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
|
|
||||||
from tmtccmd.ccsds.handler import CcsdsTmHandler
|
|
||||||
import spacepackets
|
|
||||||
except ImportError as error:
|
|
||||||
run_tmtc_commander = None
|
|
||||||
initialize_tmtc_commander = None
|
|
||||||
print(error)
|
|
||||||
print("Python tmtccmd submodule could not be imported")
|
|
||||||
print("Install with \"cd tmtccmd && python3 -m pip install -e .\" for interactive installation")
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
hook_obj = EiveHookObject()
|
hook_obj = EiveHookObject()
|
||||||
print(f'-- eive tmtc version {__version__} --')
|
print(f'-- eive tmtc version {__version__} --')
|
||||||
print(f'-- spacepackets version {spacepackets.__version__} --')
|
print(f'-- spacepackets version {spacepackets.__version__} --')
|
||||||
|
set_custom_console_logger_name(logger_name=TMTC_LOGGER_NAME)
|
||||||
initialize_tmtc_commander(hook_object=hook_obj)
|
initialize_tmtc_commander(hook_object=hook_obj)
|
||||||
ccsds_handler = CcsdsTmHandler()
|
ccsds_handler = CcsdsTmHandler()
|
||||||
ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50)
|
ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50)
|
||||||
|
Loading…
Reference in New Issue
Block a user