fprime-gds 4.0.2a4__py3-none-any.whl → 4.0.2a5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,21 @@
1
- """ ccsds.apid: APID mapping functions for F´ data """
1
+ """ccsds.apid: APID mapping functions for F´ data"""
2
+
2
3
  from fprime_gds.common.utils.data_desc_type import DataDescType
3
- from fprime.common.models.serialize.numerical_types import U32Type
4
+ from fprime.common.models.serialize.numerical_types import NumericalType
5
+
4
6
 
5
7
  class APID(object):
6
- """ APID implementations """
7
- #TODO: use the DataDescType configured by loading the dictionary
8
+ """APID implementations"""
9
+
10
+ # TODO: use the DataDescType configured by loading the dictionary
8
11
 
9
12
  @classmethod
10
13
  def from_type(cls, data_type: DataDescType):
11
- """ Map from data description type to APID """
14
+ """Map from data description type to APID"""
12
15
  return data_type.value
13
16
 
14
17
  @classmethod
15
- def from_data(cls, data):
16
- """ Map from data bytes to APID """
17
- u32_type = U32Type()
18
- u32_type.deserialize(data, offset=0)
19
- return cls.from_type(DataDescType(u32_type.val))
18
+ def from_data(cls, data, packet_descriptor_type: NumericalType):
19
+ """Map from data bytes to APID"""
20
+ packet_descriptor_type.deserialize(data, offset=0)
21
+ return cls.from_type(DataDescType(packet_descriptor_type.val))
@@ -10,6 +10,7 @@ from spacepackets.ccsds.spacepacket import SpacePacketHeader, PacketType, SpaceP
10
10
  from fprime_gds.common.communication.framing import FramerDeframer
11
11
  from fprime_gds.plugin.definitions import gds_plugin_implementation, gds_plugin
12
12
  from fprime_gds.common.utils.data_desc_type import DataDescType
13
+ from fprime_gds.common.utils.config_manager import ConfigManager
13
14
 
14
15
  from .apid import APID
15
16
  import logging
@@ -29,17 +30,21 @@ class SpacePacketFramerDeframer(FramerDeframer):
29
30
  IDLE_APID = 0x7FF # max 11 bit value per protocol specification
30
31
 
31
32
  def __init__(self):
32
- # self.sequence_number = 0
33
33
  # Map APID to sequence counts
34
34
  self.apid_to_sequence_count_map = dict()
35
35
  for key in DataDescType:
36
36
  self.apid_to_sequence_count_map[key.value] = 0
37
+ self.packet_descriptor_type = ConfigManager.get_instance().get_type(
38
+ "FwPacketDescriptorType"
39
+ )
37
40
 
38
41
  def frame(self, data):
39
42
  """Frame the supplied data in Space Packet"""
40
43
  # The protocol defines length token to be number of bytes minus 1
41
44
  data_length_token = len(data) - 1
42
- apid = APID.from_data(data)
45
+ # Extract the APID from the data
46
+ # F' has the packet descriptor (= APID currently) as first n bytes of the data
47
+ apid = APID.from_data(data, self.packet_descriptor_type)
43
48
  space_header = SpacePacketHeader(
44
49
  packet_type=PacketType.TC,
45
50
  apid=apid,
@@ -47,7 +47,7 @@ class FramerDeframer(abc.ABC):
47
47
  self, data: bytes, no_copy=False
48
48
  ) -> tuple[(bytes | None), bytes, bytes]:
49
49
  """
50
- Deframes the incoming data from the specified format.
50
+ Deframes the incoming data from the specified format.
51
51
  Produces:
52
52
  - One packet, or None if no packet found
53
53
  - leftover bytes (not consumed yet)
@@ -80,7 +80,7 @@ class FramerDeframer(abc.ABC):
80
80
  # Deframe and return only on None
81
81
  (deframed, data, discarded) = self.deframe(data, no_copy=True)
82
82
  discarded_aggregate += discarded
83
- if deframed is None: # No more packets available, return aggregate
83
+ if deframed is None: # No more packets available, return aggregate
84
84
  return packets, data, discarded_aggregate
85
85
  packets.append(deframed)
86
86
 
@@ -20,6 +20,7 @@ purpose is to define the interface for an encoder.
20
20
 
21
21
  @bug No known bugs
22
22
  """
23
+
23
24
  import abc
24
25
  import logging
25
26
 
@@ -61,7 +61,7 @@ class StandardPipeline:
61
61
  dictionaries,
62
62
  file_store,
63
63
  logging_prefix=None,
64
- data_logging_enabled=True
64
+ data_logging_enabled=True,
65
65
  ):
66
66
  """
67
67
  Setup the standard pipeline for moving data from the middleware layer through the GDS layers using the standard
@@ -56,7 +56,8 @@ def pytest_addoption(parser):
56
56
  parser.addoption(
57
57
  "--deployment-config",
58
58
  action="store",
59
- help="Path to JSON configuration file for mapping deployment components"
59
+ type=Path,
60
+ help="Path to JSON configuration file for mapping deployment components",
60
61
  )
61
62
 
62
63
  def pytest_configure(config):
@@ -3,6 +3,7 @@ DataDescType:
3
3
 
4
4
  Defines an enumeration that represents each type of data packet that can be downlinked.
5
5
  """
6
+
6
7
  from enum import Enum
7
8
 
8
9
 
@@ -318,7 +318,6 @@ class ConfigDrivenParser(ParserBase):
318
318
 
319
319
  DEFAULT_CONFIGURATION_PATH = Path("fprime-gds.yml")
320
320
 
321
-
322
321
  @classmethod
323
322
  def set_default_configuration(cls, path: Path):
324
323
  """Set path for (global) default configuration file
@@ -417,7 +416,7 @@ class ConfigDrivenParser(ParserBase):
417
416
  relative_base = args.config.parent.absolute()
418
417
 
419
418
  def path_constructor(loader, node):
420
- """ Processes !PATH annotations as relative to current file """
419
+ """Processes !PATH annotations as relative to current file"""
421
420
  calculated_path = relative_base / loader.construct_scalar(node)
422
421
  return calculated_path
423
422
 
@@ -1028,7 +1027,7 @@ class DictionaryParser(DetectionParser):
1028
1027
  elif args.dictionary is None:
1029
1028
  args = super().handle_arguments(args, **kwargs)
1030
1029
  args.dictionary = find_dict(args.deployment)
1031
-
1030
+
1032
1031
  # Setup dictionaries encoders and decoders
1033
1032
  dictionaries = Dictionaries()
1034
1033
 
@@ -1108,7 +1107,7 @@ class StandardPipelineParser(CompositeParser):
1108
1107
  "dictionaries": args_ns.dictionaries,
1109
1108
  "file_store": args_ns.files_storage_directory,
1110
1109
  "logging_prefix": args_ns.logs,
1111
- "data_logging_enabled": not args_ns.disable_data_logging
1110
+ "data_logging_enabled": not args_ns.disable_data_logging,
1112
1111
  }
1113
1112
  pipeline = pipeline if pipeline else StandardPipeline()
1114
1113
  pipeline.transport_implementation = args_ns.connection_transport
@@ -1131,6 +1130,7 @@ class CommParser(CompositeParser):
1131
1130
  CommExtraParser,
1132
1131
  MiddleWareParser,
1133
1132
  LogDeployParser,
1133
+ DictionaryParser, # needed to get types from dictionary for framing
1134
1134
  ]
1135
1135
 
1136
1136
  def __init__(self):
@@ -51,8 +51,6 @@ def main():
51
51
  Plugins.system(["communication", "framing"])
52
52
  args, _ = fprime_gds.executables.cli.ParserBase.parse_args(
53
53
  [
54
- fprime_gds.executables.cli.LogDeployParser,
55
- fprime_gds.executables.cli.MiddleWareParser,
56
54
  fprime_gds.executables.cli.CommParser,
57
55
  fprime_gds.executables.cli.PluginArgumentParser,
58
56
  ],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fprime-gds
3
- Version: 4.0.2a4
3
+ Version: 4.0.2a5
4
4
  Summary: F Prime Flight Software Ground Data System layer
5
5
  Author-email: Michael Starch <Michael.D.Starch@jpl.nasa.gov>, Thomas Boyer-Chammard <Thomas.Boyer.Chammard@jpl.nasa.gov>
6
6
  License:
@@ -7,7 +7,7 @@ fprime_gds/common/transport.py,sha256=uYXWkM8TYEYz1vfY4AEn0PF8Gu4tkYmJ5t4w1YY1yW
7
7
  fprime_gds/common/zmq_transport.py,sha256=E_iBZ5sA4JKB99MWSOM6XnPrO-mbFyRvD9eQp9te6-Y,12397
8
8
  fprime_gds/common/communication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  fprime_gds/common/communication/checksum.py,sha256=f6W0Tr68U-XGnFmysMqsFzoGYZVE8clKf-VIJja_1YM,741
10
- fprime_gds/common/communication/framing.py,sha256=GnEUgHiTc0dEJ3coaVmcA03NXk8ehHfPaywB7hNnoO8,12658
10
+ fprime_gds/common/communication/framing.py,sha256=0i8idvfaWJXesdNcUjpKtB2gErks3voQW69RaJFaAW0,12658
11
11
  fprime_gds/common/communication/ground.py,sha256=9SD3AoyHA43yNE8UYkWnu5nEJt1PgyB3sU3QLDc4eDY,3619
12
12
  fprime_gds/common/communication/updown.py,sha256=UhfCIIA2eM5g2FsIhOGJJH6HzHurUPgcKIJ5fsLb2lE,9888
13
13
  fprime_gds/common/communication/adapters/__init__.py,sha256=ivGtzUTqhBYuve5mhN9VOHITwgZjNMVv7sxuac2Ll3c,470
@@ -15,10 +15,10 @@ fprime_gds/common/communication/adapters/base.py,sha256=i3mf4HC-4tuf4mNkhdXCKlng
15
15
  fprime_gds/common/communication/adapters/ip.py,sha256=vxSGbxQYNCC4M0Zp0wvA7VTwsDFQ0i6uqRuOHks1ibA,17322
16
16
  fprime_gds/common/communication/adapters/uart.py,sha256=5WkA8xpQ8E7nv2DbN168fibz1l-GddJUKnf6Hcd4hvU,7194
17
17
  fprime_gds/common/communication/ccsds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- fprime_gds/common/communication/ccsds/apid.py,sha256=Y5K_xHLo1bmpxOlkt-TSLulCXbKIQrbYfa3GXhadqEE,686
18
+ fprime_gds/common/communication/ccsds/apid.py,sha256=svYD4a1wIk6M1NRdLB2AJe1OLAbkRIQiSI0Mniz3Dbc,726
19
19
  fprime_gds/common/communication/ccsds/chain.py,sha256=Rkhls55BUwFU0cMlRMY183hlFpfqidQJ9ZUE1kdfi38,4637
20
20
  fprime_gds/common/communication/ccsds/space_data_link.py,sha256=pDi1JpmYBuKGsDgTX80Wp8PU_CDtDPtkzdnX1FXN5eM,7385
21
- fprime_gds/common/communication/ccsds/space_packet.py,sha256=27phwn8MfBFfdjS5Vl0Lfe38xfss6xSZnxGkJcQa92g,5190
21
+ fprime_gds/common/communication/ccsds/space_packet.py,sha256=Fys13Ka5uoMeSrnUNYn5Mp58s1RMa-uEyjN5_ACNCaU,5501
22
22
  fprime_gds/common/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  fprime_gds/common/data_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  fprime_gds/common/data_types/ch_data.py,sha256=RP9zSyzNcH0nJ3MYyW_IATnmnHYZ6d0KmoJUJantdBI,6111
@@ -39,7 +39,7 @@ fprime_gds/common/distributor/distributor.py,sha256=6XevwW9c75Un-tT0JXCE_savhvBU
39
39
  fprime_gds/common/encoders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  fprime_gds/common/encoders/ch_encoder.py,sha256=TBrTJ7TK4WwCh6KAspozh63WcPxrMImloB8tz7qeulw,2878
41
41
  fprime_gds/common/encoders/cmd_encoder.py,sha256=iFPi6uMlMPlApC47p9YKRjKJxMvz46p15Yy3NnGTyaE,3497
42
- fprime_gds/common/encoders/encoder.py,sha256=jaN-uLHRGAzAs33ZdPm2FTdh3mAvsOCtqO6Ov9hspyI,2997
42
+ fprime_gds/common/encoders/encoder.py,sha256=IqcKlBTOQIpzdxOKbPF_iYevdbgF3vrYCXeooo5iURk,2998
43
43
  fprime_gds/common/encoders/event_encoder.py,sha256=aM_3hWWx4OrLKF3-MlhmGSBYnzt-4iktSzMVrcUbfB8,3140
44
44
  fprime_gds/common/encoders/file_encoder.py,sha256=G9uUXQP-oD2eW_GJuGNBrN7xPafKFhmgKiNi-zvZz-g,3830
45
45
  fprime_gds/common/encoders/pkt_encoder.py,sha256=6hzwrAEg1tjGw9yGycWMuNgbGCoe87Cd-7eP1rvy2d4,3126
@@ -103,7 +103,7 @@ fprime_gds/common/pipeline/files.py,sha256=J2zm0sucvImtmSnv0iUp5uTpvUO8nlmz2lUdM
103
103
  fprime_gds/common/pipeline/histories.py,sha256=7KyboNnm9OARQk4meVPSSeYpeqH0G8RWRiy0BLBL1rw,3671
104
104
  fprime_gds/common/pipeline/publishing.py,sha256=A0Hb4RpK7RCBDN9BEiJZr9WQMSrmohYXCFOuzl23mPo,3953
105
105
  fprime_gds/common/pipeline/router.py,sha256=-P1wI0KXEh_snOzDaq8CjEoWuM_zRm8vUMR1T0oY9qQ,2327
106
- fprime_gds/common/pipeline/standard.py,sha256=w6L9kj6phA0twSB-TfEtZIcMWWZwNBm5wzSmz1lyNEA,9239
106
+ fprime_gds/common/pipeline/standard.py,sha256=_uyosawD7n5adwOx1qTOrPIMtIgpUhGvGcmgVQVRbRw,9240
107
107
  fprime_gds/common/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
108
  fprime_gds/common/templates/ch_template.py,sha256=1MoDZsia0dI_CvnIttwyKLhbQhum35OcJnFc50Xohuo,3893
109
109
  fprime_gds/common/templates/cmd_template.py,sha256=n91z4WhFgHwTu6_fQqy7JqpkEObAkllIeEy0AR0DvrQ,5455
@@ -114,20 +114,20 @@ fprime_gds/common/templates/prm_template.py,sha256=qd0UX4ARZuPWvnFbU_DO3HkQY4QgM
114
114
  fprime_gds/common/testing_fw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
115
  fprime_gds/common/testing_fw/api.py,sha256=HcstOYK1_TYyzxo2O3TsI3QKtQbm6FBP-kG_7ZT1bDM,68091
116
116
  fprime_gds/common/testing_fw/predicates.py,sha256=CsHsVs_EVXCLQLd2NVOvy8MxmUQVxLMr3i1ouEUqOtQ,18371
117
- fprime_gds/common/testing_fw/pytest_integration.py,sha256=CAvuH9_3RuKplKQVB3t_jerPr-LPzwPWoM6z3lMs16g,6203
117
+ fprime_gds/common/testing_fw/pytest_integration.py,sha256=32lXFh4evwOsiKT-VA7w2PVg2jj1NSrsd8V66ApSSRA,6223
118
118
  fprime_gds/common/tools/README.md,sha256=WVEciyfsbEVGmb9xR5A6Ioy5pBVnCsWOIJfySLeq9YM,2325
119
119
  fprime_gds/common/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  fprime_gds/common/tools/params.py,sha256=htnMLlUW9HmBo4Qc7kYhnWr1sO6bK2mckdskLt5rDUk,9323
121
121
  fprime_gds/common/tools/seqgen.py,sha256=O57igktjWku5OJhBqezhCjPYUmh4GZM-9qKCChqEW7g,6034
122
122
  fprime_gds/common/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
123
  fprime_gds/common/utils/config_manager.py,sha256=dMqN204UKLiZzIs7-d--fdYMQ8kBzTX56xexkgFq18s,5550
124
- fprime_gds/common/utils/data_desc_type.py,sha256=0AkEMfEa5refd_moovf1hkgKiNakADRzv4soghvf9a4,883
124
+ fprime_gds/common/utils/data_desc_type.py,sha256=qoYTi_GC3OOHP66TNsIyO7Qo6wiRBlfB1gHW15dm_Ig,884
125
125
  fprime_gds/common/utils/event_severity.py,sha256=7qPXHrDaM_REJ7sKBUEJTZIE0D4qVnVajsPDUuHg7sI,300
126
126
  fprime_gds/common/utils/string_util.py,sha256=u_2iahRG3ROu3lAAt_KVcK226gEByElXqrA8mH8eDpI,3584
127
127
  fprime_gds/executables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
128
128
  fprime_gds/executables/apps.py,sha256=_OLWxby1XvYmmDcecsOAKu34XGf952_ya5uRWf_8Y3I,15127
129
- fprime_gds/executables/cli.py,sha256=OgP0RYrqasTzFXP8r3L1UAlGq0wKGVLb5_Vr6nxFpGc,52643
130
- fprime_gds/executables/comm.py,sha256=08rO0o0MJgTRngB7Ygu2IL_gEAWKF7WFvFyro1CqReE,5214
129
+ fprime_gds/executables/cli.py,sha256=E7LP8BtpY1QDugXBmgMH6Bk-WA5ktFSGyjgNM_xJ3Kk,52710
130
+ fprime_gds/executables/comm.py,sha256=CI_PeD5fYC0_JsLeaj9OdJhzeRnlJbZRqPE0II29WOQ,5101
131
131
  fprime_gds/executables/data_product_writer.py,sha256=e1Rp2LT_Cpg08f0Ki8GhirC7Wn6LtYiAef7KLAkZHUY,37773
132
132
  fprime_gds/executables/dictionary_merge.py,sha256=3Zy8LcbEdBwmNX2GLN_Nr1DfbLyWYHg-y4jdjTVCXgY,7966
133
133
  fprime_gds/executables/fprime_cli.py,sha256=9_eNU7AzUOMhz4FLPkD_byA9C13c509wGPZN-kdw9Ok,12429
@@ -248,10 +248,10 @@ fprime_gds/flask/static/third-party/webfonts/fa-solid-900.woff2,sha256=mDS4KtJuK
248
248
  fprime_gds/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
249
249
  fprime_gds/plugin/definitions.py,sha256=QlxW1gNvoiqGMslSJjh3dTFZuv0igFHawN__3XJ0Wns,5355
250
250
  fprime_gds/plugin/system.py,sha256=M9xb-8jBhCUUx3X1z2uAP8Wx_v6NkL8JeaFgGcMnQqY,13432
251
- fprime_gds-4.0.2a4.dist-info/licenses/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
252
- fprime_gds-4.0.2a4.dist-info/licenses/NOTICE.txt,sha256=vXjA_xRcQhd83Vfk5D_vXg5kOjnnXvLuMi5vFKDEVmg,1612
253
- fprime_gds-4.0.2a4.dist-info/METADATA,sha256=jJXlRA8gO9KhN8WGHJ6J_vx59671yO7OHe_XNNtYLAM,24576
254
- fprime_gds-4.0.2a4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
255
- fprime_gds-4.0.2a4.dist-info/entry_points.txt,sha256=zESAeUBvVYSuzzinWIqNWaewa8nYDDImEX4jBzdyThs,559
256
- fprime_gds-4.0.2a4.dist-info/top_level.txt,sha256=6vzFLIX6ANfavKaXFHDMSLFtS94a6FaAsIWhjgYuSNE,27
257
- fprime_gds-4.0.2a4.dist-info/RECORD,,
251
+ fprime_gds-4.0.2a5.dist-info/licenses/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
252
+ fprime_gds-4.0.2a5.dist-info/licenses/NOTICE.txt,sha256=vXjA_xRcQhd83Vfk5D_vXg5kOjnnXvLuMi5vFKDEVmg,1612
253
+ fprime_gds-4.0.2a5.dist-info/METADATA,sha256=-ZUxd0T4sY7RGn_nEhta2bWU-JJUoD7_cJOSqmU6904,24576
254
+ fprime_gds-4.0.2a5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
255
+ fprime_gds-4.0.2a5.dist-info/entry_points.txt,sha256=zESAeUBvVYSuzzinWIqNWaewa8nYDDImEX4jBzdyThs,559
256
+ fprime_gds-4.0.2a5.dist-info/top_level.txt,sha256=6vzFLIX6ANfavKaXFHDMSLFtS94a6FaAsIWhjgYuSNE,27
257
+ fprime_gds-4.0.2a5.dist-info/RECORD,,