fsfw-example-hosted/generators/gen.py

43 lines
1.1 KiB
Python
Raw Normal View History

2022-05-20 09:12:36 +02:00
#!/usr/bin/env python3
import time
2022-05-20 09:17:18 +02:00
from objects.objects import parse_objects
2022-05-20 09:12:36 +02:00
from events.event_parser import parse_events
2022-05-20 09:23:14 +02:00
from returnvalues.returnvalues_parser import parse_returnvalues
2022-05-20 09:12:36 +02:00
from fsfwgen.core import (
return_generic_args_parser,
init_printout,
get_console_logger,
ParserTypes,
)
LOGGER = get_console_logger()
def main():
init_printout(project_string="FSFW")
parser = return_generic_args_parser()
args = parser.parse_args()
if args.type == "objects":
LOGGER.info(f"Generating objects data..")
time.sleep(0.05)
2022-05-20 09:17:18 +02:00
parse_objects()
2022-05-20 09:12:36 +02:00
elif args.type == "events":
LOGGER.info(f"Generating event data")
time.sleep(0.05)
parse_events()
2022-05-20 09:23:14 +02:00
elif args.type == "returnvalues" or args.type == "retvals":
2022-05-20 09:12:36 +02:00
LOGGER.info("Generating returnvalue data")
time.sleep(0.05)
2022-05-20 09:23:14 +02:00
parse_returnvalues()
2022-05-20 09:12:36 +02:00
elif args.type == "all":
LOGGER.info("Generating all data")
parse_objects()
parse_events()
2022-05-20 09:17:18 +02:00
# parse_returnvalues()
2022-05-20 09:12:36 +02:00
if __name__ == "__main__":
main()