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"
|
2022-02-26 13:16:09 +01:00
|
|
|
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(
|
2022-02-26 13:16:09 +01:00
|
|
|
"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
|