use singular enum names
This commit is contained in:
parent
7b0c8fa25a
commit
73ba9f5d90
14
common.py
14
common.py
@ -5,11 +5,11 @@ from typing import cast
|
|||||||
|
|
||||||
from spacepackets import SpacePacket, SpacePacketHeader
|
from spacepackets import SpacePacket, SpacePacketHeader
|
||||||
from spacepackets.cfdp import (
|
from spacepackets.cfdp import (
|
||||||
TransmissionModes,
|
TransmissionMode,
|
||||||
ChecksumTypes,
|
ChecksumType,
|
||||||
ConditionCode,
|
ConditionCode,
|
||||||
PduHolder,
|
PduHolder,
|
||||||
DirectiveTypes,
|
DirectiveType,
|
||||||
)
|
)
|
||||||
from spacepackets.cfdp.pdu import MetadataPdu, FileDataPdu
|
from spacepackets.cfdp.pdu import MetadataPdu, FileDataPdu
|
||||||
from tmtccmd.cfdp import (
|
from tmtccmd.cfdp import (
|
||||||
@ -255,13 +255,13 @@ class TcHandler(TcHandlerBase):
|
|||||||
pdu, sp = source_pair
|
pdu, sp = source_pair
|
||||||
pdu = cast(PduHolder, pdu)
|
pdu = cast(PduHolder, pdu)
|
||||||
if pdu.is_file_directive:
|
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()
|
metadata = pdu.to_metadata_pdu()
|
||||||
self.queue_helper.add_log_cmd(
|
self.queue_helper.add_log_cmd(
|
||||||
f"CFDP Source: Sending Metadata PDU for file with size "
|
f"CFDP Source: Sending Metadata PDU for file with size "
|
||||||
f"{metadata.file_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(
|
self.queue_helper.add_log_cmd(
|
||||||
f"CFDP Source: Sending EOF PDU"
|
f"CFDP Source: Sending EOF PDU"
|
||||||
)
|
)
|
||||||
@ -352,8 +352,8 @@ def setup_cfdp_handler() -> CfdpInCcsdsWrapper:
|
|||||||
max_file_segment_len=1024,
|
max_file_segment_len=1024,
|
||||||
check_limit=None,
|
check_limit=None,
|
||||||
crc_on_transmission=False,
|
crc_on_transmission=False,
|
||||||
crc_type=ChecksumTypes.CRC_32,
|
crc_type=ChecksumType.CRC_32,
|
||||||
default_transmission_mode=TransmissionModes.UNACKNOWLEDGED,
|
default_transmission_mode=TransmissionMode.UNACKNOWLEDGED,
|
||||||
)
|
)
|
||||||
cfdp_seq_count_provider = FileSeqCountProvider(
|
cfdp_seq_count_provider = FileSeqCountProvider(
|
||||||
max_bit_width=16, file_name=Path("seqcnt_cfdp_transaction.txt")
|
max_bit_width=16, file_name=Path("seqcnt_cfdp_transaction.txt")
|
||||||
|
Loading…
Reference in New Issue
Block a user