integrated pcu, acu and p60 dock tests

This commit is contained in:
2020-12-29 11:29:03 +01:00
parent 9be8713fa0
commit 0c334f615f
14 changed files with 679 additions and 0 deletions

View File

@ -28,6 +28,10 @@ class ServiceList(enum.Enum):
SERVICE_20 = auto()
SERVICE_23 = auto()
SERVICE_200 = auto()
P60DOCK = auto()
PDU1 = auto()
PDU2 = auto()
ACU = auto()
class SerialConfig(enum.Enum):

View File

@ -146,6 +146,14 @@ def add_globals_post_args_parsing(args: argparse.Namespace):
service = ServiceList.SERVICE_20
elif service == "23":
service = ServiceList.SERVICE_23
elif service == "p60dock":
service = ServiceList.P60DOCK
elif service == "pdu1":
service = ServiceList.PDU1
elif service == "pdu2":
service = ServiceList.PDU2
elif service == "acu":
service = ServiceList.ACU
else:
logger.warning("Service not known! Setting standard service 17")
service = ServiceList.SERVICE_17

View File

@ -12,6 +12,10 @@ class ObjectIds(enum.Enum):
from enum import auto
PUS_SERVICE_17 = auto()
TEST_DEVICE = auto()
P60DOCK_HANDLER_ID = auto()
PDU1_HANDLER_ID = auto()
PDU2_HANDLER_ID = auto()
ACU_HANDLER_ID = auto()
def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]):
@ -19,5 +23,9 @@ def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]):
object_id_dict.update(
{o_ids.PUS_SERVICE_17: bytearray([0x53, 0x00, 0x00, 0x17]),
o_ids.TEST_DEVICE: bytearray([0x44, 0x00, 0xAF, 0xFE]),
o_ids.P60DOCK_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x1]),
o_ids.PDU1_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x2]),
o_ids.PDU2_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x3]),
o_ids.ACU_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x4]),
}
)