fsfwgen/fsfwgen/core.py

26 lines
662 B
Python
Raw Normal View History

2021-07-31 20:49:38 +02:00
import enum
import argparse
class ParserTypes(enum.Enum):
2022-03-04 10:24:08 +01:00
EVENTS = "events"
OBJECTS = "objects"
RETVALS = "returnvalues"
SUBSERVICES = "subservices"
2021-07-31 20:49:38 +02:00
2021-08-02 13:02:33 +02:00
def init_printout(project_string: str):
2022-02-26 14:07:14 +01:00
print(f"-- {project_string} MIB Generator --")
2021-07-31 20:49:38 +02:00
def return_generic_args_parser() -> argparse.ArgumentParser:
2022-02-26 14:07:14 +01:00
parser = argparse.ArgumentParser("Arguments for FSFW MIB generation")
2022-05-20 09:22:38 +02:00
choices = ("events", "objects", "returnvalues", "retvals", "subservices", "all")
2021-07-31 20:49:38 +02:00
parser.add_argument(
"type",
metavar="type",
choices=choices,
2022-02-26 14:07:14 +01:00
help=f"Type of MIB data to generate. Choices: {choices}",
2021-07-31 20:49:38 +02:00
)
return parser