use singular enum names

This commit is contained in:
Robin Müller 2022-09-15 18:46:28 +02:00
parent 7b0c8fa25a
commit 73ba9f5d90
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -5,11 +5,11 @@ from typing import cast
from spacepackets import SpacePacket, SpacePacketHeader
from spacepackets.cfdp import (
TransmissionModes,
ChecksumTypes,
TransmissionMode,
ChecksumType,
ConditionCode,
PduHolder,
DirectiveTypes,
DirectiveType,
)
from spacepackets.cfdp.pdu import MetadataPdu, FileDataPdu
from tmtccmd.cfdp import (
@ -255,13 +255,13 @@ class TcHandler(TcHandlerBase):
pdu, sp = source_pair
pdu = cast(PduHolder, pdu)
if pdu.is_file_directive:
if pdu.pdu_directive_type == DirectiveTypes.METADATA_PDU:
if pdu.pdu_directive_type == DirectiveType.METADATA_PDU:
metadata = pdu.to_metadata_pdu()
self.queue_helper.add_log_cmd(
f"CFDP Source: Sending Metadata PDU for file with size "
f"{metadata.file_size}"
)
elif pdu.pdu_directive_type == DirectiveTypes.EOF_PDU:
elif pdu.pdu_directive_type == DirectiveType.EOF_PDU:
self.queue_helper.add_log_cmd(
f"CFDP Source: Sending EOF PDU"
)
@ -352,8 +352,8 @@ def setup_cfdp_handler() -> CfdpInCcsdsWrapper:
max_file_segment_len=1024,
check_limit=None,
crc_on_transmission=False,
crc_type=ChecksumTypes.CRC_32,
default_transmission_mode=TransmissionModes.UNACKNOWLEDGED,
crc_type=ChecksumType.CRC_32,
default_transmission_mode=TransmissionMode.UNACKNOWLEDGED,
)
cfdp_seq_count_provider = FileSeqCountProvider(
max_bit_width=16, file_name=Path("seqcnt_cfdp_transaction.txt")