Skip to content

Commit 6144327

Browse files
authored
Merge pull request #44 from us-irs/avoid-cfg-abbreviation
avoid cfg abbreviation
2 parents a6deb79 + a402542 commit 6144327

File tree

16 files changed

+98
-94
lines changed

16 files changed

+98
-94
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515

1616
- `TransactionStep.SENDING_ACK_OF_FINISHED` for source handler which is not required anymore.
1717

18+
## Changed
19+
20+
- Replaced `*Cfg*` abbreviation with `*Config*`
21+
1822
# [v0.5.1] 2025-02-10
1923

2024
- Bump allowed `spacepackets` to v0.28.0

examples/cfdp-cli-udp/common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
CheckTimerProvider,
3838
DefaultFaultHandlerBase,
3939
EntityType,
40-
IndicationCfg,
41-
RemoteEntityCfg,
40+
IndicationConfig,
41+
RemoteEntityConfig,
4242
)
4343
from cfdppy.user import (
4444
CfdpUserBase,
@@ -58,13 +58,13 @@
5858
LOCAL_ENTITY_ID = ByteFieldU16(1)
5959
REMOTE_ENTITY_ID = ByteFieldU16(2)
6060
# Enable all indications for both local and remote entity.
61-
INDICATION_CFG = IndicationCfg()
61+
INDICATION_CFG = IndicationConfig()
6262

6363
FILE_CONTENT = "Hello World!\n"
6464
FILE_SEGMENT_SIZE = 256
6565
MAX_PACKET_LEN = 512
6666

67-
REMOTE_CFG_OF_LOCAL_ENTITY = RemoteEntityCfg(
67+
REMOTE_CFG_OF_LOCAL_ENTITY = RemoteEntityConfig(
6868
entity_id=LOCAL_ENTITY_ID,
6969
max_packet_len=MAX_PACKET_LEN,
7070
max_file_segment_len=FILE_SEGMENT_SIZE,

examples/cfdp-cli-udp/local.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
from cfdppy.handler.dest import DestHandler
3737
from cfdppy.handler.source import SourceHandler
3838
from cfdppy.mib import (
39-
LocalEntityCfg,
40-
RemoteEntityCfgTable,
39+
LocalEntityConfig,
40+
RemoteEntityConfigTable,
4141
)
4242

4343
_LOGGER = logging.getLogger(__name__)
@@ -80,7 +80,7 @@ def main() -> None:
8080

8181
basicConfig(level=logging_level)
8282

83-
remote_cfg_table = RemoteEntityCfgTable()
83+
remote_cfg_table = RemoteEntityConfigTable()
8484
remote_cfg_table.add_config(REMOTE_CFG_OF_REMOTE_ENTITY)
8585

8686
src_fault_handler = CfdpFaultHandler(BASE_STR_SRC)
@@ -89,7 +89,7 @@ def main() -> None:
8989
src_user = CfdpUser(BASE_STR_SRC, PUT_REQ_QUEUE)
9090
check_timer_provider = CustomCheckTimerProvider()
9191
source_handler = SourceHandler(
92-
cfg=LocalEntityCfg(LOCAL_ENTITY_ID, INDICATION_CFG, src_fault_handler),
92+
cfg=LocalEntityConfig(LOCAL_ENTITY_ID, INDICATION_CFG, src_fault_handler),
9393
seq_num_provider=src_seq_count_provider,
9494
remote_cfg_table=remote_cfg_table,
9595
user=src_user,
@@ -109,7 +109,7 @@ def main() -> None:
109109
dest_fault_handler = CfdpFaultHandler(BASE_STR_DEST)
110110
dest_user = CfdpUser(BASE_STR_DEST, PUT_REQ_QUEUE)
111111
dest_handler = DestHandler(
112-
cfg=LocalEntityCfg(LOCAL_ENTITY_ID, INDICATION_CFG, dest_fault_handler),
112+
cfg=LocalEntityConfig(LOCAL_ENTITY_ID, INDICATION_CFG, dest_fault_handler),
113113
user=dest_user,
114114
remote_cfg_table=remote_cfg_table,
115115
check_timer_provider=check_timer_provider,

examples/cfdp-cli-udp/remote.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
from cfdppy.handler.dest import DestHandler
2626
from cfdppy.handler.source import SourceHandler
2727
from cfdppy.mib import (
28-
LocalEntityCfg,
29-
RemoteEntityCfgTable,
28+
LocalEntityConfig,
29+
RemoteEntityConfigTable,
3030
)
3131

3232
_LOGGER = logging.getLogger(__name__)
@@ -62,11 +62,11 @@ def main() -> None:
6262
# 16 bit sequence count for transactions.
6363
src_seq_count_provider = SeqCountProvider(16)
6464
src_user = CfdpUser(BASE_STR_SRC, PUT_REQ_QUEUE)
65-
remote_cfg_table = RemoteEntityCfgTable()
65+
remote_cfg_table = RemoteEntityConfigTable()
6666
remote_cfg_table.add_config(REMOTE_CFG_OF_LOCAL_ENTITY)
6767
check_timer_provider = CustomCheckTimerProvider()
6868
source_handler = SourceHandler(
69-
cfg=LocalEntityCfg(REMOTE_ENTITY_ID, INDICATION_CFG, src_fault_handler),
69+
cfg=LocalEntityConfig(REMOTE_ENTITY_ID, INDICATION_CFG, src_fault_handler),
7070
user=src_user,
7171
remote_cfg_table=remote_cfg_table,
7272
check_timer_provider=check_timer_provider,
@@ -86,7 +86,7 @@ def main() -> None:
8686
dest_fault_handler = CfdpFaultHandler(BASE_STR_DEST)
8787
dest_user = CfdpUser(BASE_STR_DEST, PUT_REQ_QUEUE)
8888
dest_handler = DestHandler(
89-
cfg=LocalEntityCfg(REMOTE_ENTITY_ID, INDICATION_CFG, dest_fault_handler),
89+
cfg=LocalEntityConfig(REMOTE_ENTITY_ID, INDICATION_CFG, dest_fault_handler),
9090
user=dest_user,
9191
remote_cfg_table=remote_cfg_table,
9292
check_timer_provider=check_timer_provider,

examples/cfdp-libre-cube-crosstest/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from spacepackets.cfdp import ChecksumType, TransmissionMode
22
from spacepackets.util import ByteFieldU16
33

4-
from cfdppy.mib import RemoteEntityCfg
4+
from cfdppy.mib import RemoteEntityConfig
55

66
SOURCE_ENTITY_ID = 2
77
REMOTE_ENTITY_ID = 3
@@ -12,7 +12,7 @@
1212
FILE_SEGMENT_SIZE = 128
1313
MAX_PACKET_LEN = 512
1414

15-
REMOTE_CFG_FOR_DEST_ENTITY = RemoteEntityCfg(
15+
REMOTE_CFG_FOR_DEST_ENTITY = RemoteEntityConfig(
1616
entity_id=ByteFieldU16(REMOTE_ENTITY_ID),
1717
max_packet_len=MAX_PACKET_LEN,
1818
max_file_segment_len=FILE_SEGMENT_SIZE,

examples/cfdp-libre-cube-crosstest/tmtccmd-client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
CheckTimerProvider,
3737
DefaultFaultHandlerBase,
3838
EntityType,
39-
IndicationCfg,
40-
LocalEntityCfg,
41-
RemoteEntityCfgTable,
39+
IndicationConfig,
40+
LocalEntityConfig,
41+
RemoteEntityConfigTable,
4242
)
4343
from cfdppy.request import PutRequest
4444
from cfdppy.user import (
@@ -217,12 +217,12 @@ def main() -> None:
217217
with open(SOURCE_FILE, "w") as file:
218218
file.write(FILE_CONTENT)
219219

220-
remote_cfg_table = RemoteEntityCfgTable([REMOTE_CFG_FOR_DEST_ENTITY])
220+
remote_cfg_table = RemoteEntityConfigTable([REMOTE_CFG_FOR_DEST_ENTITY])
221221

222222
# Enable all indications.
223-
src_indication_cfg = IndicationCfg()
223+
src_indication_cfg = IndicationConfig()
224224
src_fault_handler = CfdpFaultHandler()
225-
src_entity_cfg = LocalEntityCfg(SOURCE_ENTITY_ID, src_indication_cfg, src_fault_handler)
225+
src_entity_cfg = LocalEntityConfig(SOURCE_ENTITY_ID, src_indication_cfg, src_fault_handler)
226226
# 16 bit sequence count for transactions.
227227
src_seq_count_provider = SeqCountProvider(16)
228228
src_user = CfdpUser("SRC ENTITY")

examples/cfdp-simple/file-copy-example.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
CheckTimerProvider,
3434
DefaultFaultHandlerBase,
3535
EntityType,
36-
IndicationCfg,
37-
LocalEntityCfg,
38-
RemoteEntityCfg,
39-
RemoteEntityCfgTable,
36+
IndicationConfig,
37+
LocalEntityConfig,
38+
RemoteEntityConfig,
39+
RemoteEntityConfigTable,
4040
)
4141
from cfdppy.request import PutRequest
4242
from cfdppy.user import (
@@ -67,7 +67,7 @@ class TransferParams:
6767
_LOGGER = logging.getLogger()
6868

6969

70-
REMOTE_CFG_FOR_SOURCE_ENTITY = RemoteEntityCfg(
70+
REMOTE_CFG_FOR_SOURCE_ENTITY = RemoteEntityConfig(
7171
entity_id=SOURCE_ENTITY_ID,
7272
max_packet_len=MAX_PACKET_LEN,
7373
max_file_segment_len=FILE_SEGMENT_SIZE,
@@ -235,14 +235,14 @@ def main() -> None:
235235
with open(SOURCE_FILE, "w") as file:
236236
file.write(FILE_CONTENT)
237237

238-
remote_cfg_table = RemoteEntityCfgTable()
238+
remote_cfg_table = RemoteEntityConfigTable()
239239
remote_cfg_table.add_config(REMOTE_CFG_FOR_SOURCE_ENTITY)
240240
remote_cfg_table.add_config(REMOTE_CFG_FOR_DEST_ENTITY)
241241

242242
# Enable all indications.
243-
src_indication_cfg = IndicationCfg()
243+
src_indication_cfg = IndicationConfig()
244244
src_fault_handler = CfdpFaultHandler()
245-
src_entity_cfg = LocalEntityCfg(SOURCE_ENTITY_ID, src_indication_cfg, src_fault_handler)
245+
src_entity_cfg = LocalEntityConfig(SOURCE_ENTITY_ID, src_indication_cfg, src_fault_handler)
246246
# 16 bit sequence count for transactions.
247247
src_seq_count_provider = SeqCountProvider(16)
248248
src_user = CfdpUser("SRC ENTITY")
@@ -262,9 +262,9 @@ def main() -> None:
262262
)
263263

264264
# Enable all indications.
265-
dest_indication_cfg = IndicationCfg()
265+
dest_indication_cfg = IndicationConfig()
266266
dest_fault_handler = CfdpFaultHandler()
267-
dest_entity_cfg = LocalEntityCfg(DEST_ENTITY_ID, dest_indication_cfg, dest_fault_handler)
267+
dest_entity_cfg = LocalEntityConfig(DEST_ENTITY_ID, dest_indication_cfg, dest_fault_handler)
268268
dest_user = CfdpUser("DEST ENTITY")
269269
dest_handler = DestHandler(
270270
cfg=dest_entity_cfg,

src/cfdppy/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
from .filestore import HostFilestore, VirtualFilestore
99
from .handler.common import PacketDestination, get_packet_destination
1010
from .mib import (
11-
IndicationCfg,
12-
LocalEntityCfg,
13-
RemoteEntityCfg,
14-
RemoteEntityCfgTable,
11+
IndicationConfig,
12+
LocalEntityConfig,
13+
RemoteEntityConfig,
14+
RemoteEntityConfigTable,
1515
)
1616
from .request import PutRequest
1717
from .restricted_filestore import RestrictedFilestore
@@ -22,12 +22,12 @@
2222
"CfdpState",
2323
"CfdpUserBase",
2424
"HostFilestore",
25-
"IndicationCfg",
26-
"LocalEntityCfg",
25+
"IndicationConfig",
26+
"LocalEntityConfig",
2727
"PacketDestination",
2828
"PutRequest",
29-
"RemoteEntityCfg",
30-
"RemoteEntityCfgTable",
29+
"RemoteEntityConfig",
30+
"RemoteEntityConfigTable",
3131
"RestrictedFilestore",
3232
"TransactionId",
3333
"VirtualFilestore",

src/cfdppy/handler/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from spacepackets.seqcount import ProvidesSeqCount
22

33
from cfdppy.mib import (
4-
LocalEntityCfg,
5-
RemoteEntityCfg,
6-
RemoteEntityCfgTable,
4+
LocalEntityConfig,
5+
RemoteEntityConfig,
6+
RemoteEntityConfigTable,
77
)
88

99
from .common import PacketDestination, get_packet_destination
@@ -17,11 +17,11 @@
1717
"DestStateWrapper",
1818
"DestTransactionStep",
1919
"FsmResult",
20-
"LocalEntityCfg",
20+
"LocalEntityConfig",
2121
"PacketDestination",
2222
"ProvidesSeqCount",
23-
"RemoteEntityCfg",
24-
"RemoteEntityCfgTable",
23+
"RemoteEntityConfig",
24+
"RemoteEntityConfigTable",
2525
"SourceHandler",
2626
"SourceStateWrapper",
2727
"SourceTransactionStep",

src/cfdppy/handler/dest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
from cfdppy.mib import (
5757
CheckTimerProvider,
5858
EntityType,
59-
LocalEntityCfg,
60-
RemoteEntityCfg,
61-
RemoteEntityCfgTable,
59+
LocalEntityConfig,
60+
RemoteEntityConfig,
61+
RemoteEntityConfigTable,
6262
)
6363
from cfdppy.user import (
6464
CfdpUserBase,
@@ -238,7 +238,7 @@ class _DestFieldWrapper:
238238

239239
def __init__(self):
240240
self.transaction_id: TransactionId | None = None
241-
self.remote_cfg: RemoteEntityCfg | None = None
241+
self.remote_cfg: RemoteEntityConfig | None = None
242242
self.check_timer: Countdown | None = None
243243
self.current_check_count: int = 0
244244
self.closure_requested: bool = False
@@ -319,9 +319,9 @@ class DestHandler:
319319

320320
def __init__(
321321
self,
322-
cfg: LocalEntityCfg,
322+
cfg: LocalEntityConfig,
323323
user: CfdpUserBase,
324-
remote_cfg_table: RemoteEntityCfgTable,
324+
remote_cfg_table: RemoteEntityConfigTable,
325325
check_timer_provider: CheckTimerProvider,
326326
) -> None:
327327
self.cfg = cfg

0 commit comments

Comments
 (0)