fprime-gds 4.0.0a3__py3-none-any.whl → 4.0.0a4__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.
- fprime_gds/common/communication/adapters/ip.py +14 -9
- fprime_gds/common/communication/ccsds/space_packet.py +0 -1
- fprime_gds/common/distributor/distributor.py +2 -1
- fprime_gds/common/loaders/pkt_json_loader.py +4 -0
- fprime_gds/common/pipeline/dictionaries.py +9 -1
- {fprime_gds-4.0.0a3.dist-info → fprime_gds-4.0.0a4.dist-info}/METADATA +1 -1
- {fprime_gds-4.0.0a3.dist-info → fprime_gds-4.0.0a4.dist-info}/RECORD +12 -12
- {fprime_gds-4.0.0a3.dist-info → fprime_gds-4.0.0a4.dist-info}/WHEEL +0 -0
- {fprime_gds-4.0.0a3.dist-info → fprime_gds-4.0.0a4.dist-info}/entry_points.txt +0 -0
- {fprime_gds-4.0.0a3.dist-info → fprime_gds-4.0.0a4.dist-info}/licenses/LICENSE.txt +0 -0
- {fprime_gds-4.0.0a3.dist-info → fprime_gds-4.0.0a4.dist-info}/licenses/NOTICE.txt +0 -0
- {fprime_gds-4.0.0a3.dist-info → fprime_gds-4.0.0a4.dist-info}/top_level.txt +0 -0
@@ -50,13 +50,11 @@ class IpAdapter(fprime_gds.common.communication.adapters.base.BaseAdapter):
|
|
50
50
|
both. This data is concatenated and returned up the stack for processing.
|
51
51
|
"""
|
52
52
|
|
53
|
-
# Interval to send a KEEPALIVE packet. None will turn off KEEPALIVE.
|
54
|
-
KEEPALIVE_INTERVAL = 0.500
|
55
53
|
# Data to send out as part of the KEEPALIVE packet. Should not be null nor empty.
|
56
54
|
KEEPALIVE_DATA = b"sitting well"
|
57
55
|
MAXIMUM_DATA_SIZE = 4096
|
58
56
|
|
59
|
-
def __init__(self, address, port, server=True):
|
57
|
+
def __init__(self, address, port, server=True, keepalive_interval=0.5):
|
60
58
|
"""
|
61
59
|
Initialize this adapter by creating a handler for UDP and TCP. A thread for the KEEPALIVE application packets
|
62
60
|
will be created, if the interval is not none. Handlers are servers unless server=False.
|
@@ -64,7 +62,8 @@ class IpAdapter(fprime_gds.common.communication.adapters.base.BaseAdapter):
|
|
64
62
|
self.address = address
|
65
63
|
self.port = port
|
66
64
|
self.stop = False
|
67
|
-
self.
|
65
|
+
self.keepalive_thread = None
|
66
|
+
self.keepalive_interval = keepalive_interval
|
68
67
|
self.tcp = TcpHandler(address, port, server=server)
|
69
68
|
self.udp = UdpHandler(address, port, server=server)
|
70
69
|
self.thtcp = None
|
@@ -91,11 +90,11 @@ class IpAdapter(fprime_gds.common.communication.adapters.base.BaseAdapter):
|
|
91
90
|
self.thudp.daemon = True
|
92
91
|
self.thudp.start()
|
93
92
|
# Start up a keep-alive ping if desired. This will hit the TCP uplink, and die if the connection is down
|
94
|
-
if
|
95
|
-
self.
|
96
|
-
target=self.th_alive, name="KeepCommAliveThread", args=[
|
93
|
+
if self.keepalive_interval > 0.0:
|
94
|
+
self.keepalive_thread = threading.Thread(
|
95
|
+
target=self.th_alive, name="KeepCommAliveThread", args=[self.keepalive_interval]
|
97
96
|
)
|
98
|
-
self.
|
97
|
+
self.keepalive_thread.start()
|
99
98
|
except (ValueError, TypeError) as exc:
|
100
99
|
LOGGER.error(
|
101
100
|
f"Failed to start keep-alive thread. {type(exc).__name__}: {str(exc)}"
|
@@ -186,6 +185,12 @@ class IpAdapter(fprime_gds.common.communication.adapters.base.BaseAdapter):
|
|
186
185
|
"default": True,
|
187
186
|
"help": "Run the IP adapter as the client (connects to FSW running TcpServer)",
|
188
187
|
},
|
188
|
+
("--keepalive-interval",): {
|
189
|
+
"dest": "keepalive_interval",
|
190
|
+
"type": float,
|
191
|
+
"default": 0.5000,
|
192
|
+
"help": "Keep alive packet interval. 0.0 = off, default = 0.5",
|
193
|
+
},
|
189
194
|
}
|
190
195
|
|
191
196
|
@classmethod
|
@@ -195,7 +200,7 @@ class IpAdapter(fprime_gds.common.communication.adapters.base.BaseAdapter):
|
|
195
200
|
return cls
|
196
201
|
|
197
202
|
@classmethod
|
198
|
-
def check_arguments(cls, address, port, server=True):
|
203
|
+
def check_arguments(cls, address, port, server=True, keepalive_interval=0.5):
|
199
204
|
"""
|
200
205
|
Code that should check arguments of this adapter. If there is a problem with this code, then a "ValueError"
|
201
206
|
should be raised describing the problem with these arguments.
|
@@ -199,9 +199,10 @@ class Distributor(DataHandler):
|
|
199
199
|
(length, data_desc, msg) = self.parse_raw_msg_api(raw_msg)
|
200
200
|
|
201
201
|
data_desc_key = data_desc_type.DataDescType(data_desc).name
|
202
|
-
|
203
202
|
for d in self.__decoders[data_desc_key]:
|
204
203
|
try:
|
205
204
|
d.data_callback(msg)
|
206
205
|
except DecodingException as dexc:
|
207
206
|
LOGGER.warning("Decoding error occurred: %s. Skipping.", dexc)
|
207
|
+
else:
|
208
|
+
LOGGER.warning("No decoder registered for: %s", data_desc_type.DataDescType(data_desc).name)
|
@@ -19,6 +19,10 @@ class PktJsonLoader(JsonLoader):
|
|
19
19
|
SET_NAME = "name"
|
20
20
|
MEMBERS = "members"
|
21
21
|
|
22
|
+
def get_packet_set_names(self, path):
|
23
|
+
""" Get the list of packet sets """
|
24
|
+
return [packet_set[self.SET_NAME] for packet_set in self.json_dict[self.PACKETS_FIELD]]
|
25
|
+
|
22
26
|
def get_id_dict(self, path, packet_set_name: str, ch_name_dict: dict):
|
23
27
|
if path in self.saved_dicts and packet_set_name in self.saved_dicts[path]:
|
24
28
|
(id_dict, name_dict) = self.saved_dicts[path][packet_set_name]
|
@@ -128,8 +128,16 @@ class Dictionaries:
|
|
128
128
|
msg = f"[ERROR] Dictionary '{dictionary}' does not exist."
|
129
129
|
raise Exception(msg)
|
130
130
|
# Check for packet specification
|
131
|
-
if self._metadata["dictionary_type"] == "json"
|
131
|
+
if self._metadata["dictionary_type"] == "json":
|
132
132
|
packet_loader = fprime_gds.common.loaders.pkt_json_loader.PktJsonLoader(dictionary)
|
133
|
+
if packet_set_name is None:
|
134
|
+
names = packet_loader.get_packet_set_names(None)
|
135
|
+
if len(names) == 0:
|
136
|
+
self._packet_dict = None
|
137
|
+
return
|
138
|
+
elif len(names) > 1:
|
139
|
+
raise Exception("[ERROR] Multiple packet sets, must set --packet-set-name")
|
140
|
+
packet_set_name = names[0]
|
133
141
|
self._packet_dict = packet_loader.get_id_dict(
|
134
142
|
None, packet_set_name, self._channel_name_dict
|
135
143
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fprime-gds
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.0a4
|
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:
|
@@ -12,13 +12,13 @@ fprime_gds/common/communication/ground.py,sha256=9SD3AoyHA43yNE8UYkWnu5nEJt1PgyB
|
|
12
12
|
fprime_gds/common/communication/updown.py,sha256=UhfCIIA2eM5g2FsIhOGJJH6HzHurUPgcKIJ5fsLb2lE,9888
|
13
13
|
fprime_gds/common/communication/adapters/__init__.py,sha256=ivGtzUTqhBYuve5mhN9VOHITwgZjNMVv7sxuac2Ll3c,470
|
14
14
|
fprime_gds/common/communication/adapters/base.py,sha256=i3mf4HC-4tuf4mNkhdXCKlngRhODyTriia2pw6XBoSQ,3393
|
15
|
-
fprime_gds/common/communication/adapters/ip.py,sha256=
|
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
18
|
fprime_gds/common/communication/ccsds/apid.py,sha256=Y5K_xHLo1bmpxOlkt-TSLulCXbKIQrbYfa3GXhadqEE,686
|
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=
|
21
|
+
fprime_gds/common/communication/ccsds/space_packet.py,sha256=27phwn8MfBFfdjS5Vl0Lfe38xfss6xSZnxGkJcQa92g,5190
|
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
|
@@ -35,7 +35,7 @@ fprime_gds/common/decoders/event_decoder.py,sha256=BH1Q_489ZgBhqMutG-WwMGikpXsqi
|
|
35
35
|
fprime_gds/common/decoders/file_decoder.py,sha256=Ky2U8bli3YL6GbT9jSSvI73ySOtf0cdZLK4FXTuWjfA,2542
|
36
36
|
fprime_gds/common/decoders/pkt_decoder.py,sha256=kW8k3OSbMy96w6MzsGWp656lAQvwxrIznWkD3Sbi8Ig,3329
|
37
37
|
fprime_gds/common/distributor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
|
-
fprime_gds/common/distributor/distributor.py,sha256=
|
38
|
+
fprime_gds/common/distributor/distributor.py,sha256=KMQcr4fFncDewCMAUR64Yy5OIRdF2CCzmfGNE5J6wIY,7917
|
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=5wG5854ozmxctnYou3q9MdQNkTQEmpCiT4oBVgNRZdE,3499
|
@@ -74,7 +74,7 @@ fprime_gds/common/loaders/event_json_loader.py,sha256=DPVJQ1wIY3r13rxTWrE9n7i6kS
|
|
74
74
|
fprime_gds/common/loaders/event_xml_loader.py,sha256=Q3Vm7ROTVgolSp5umkNMp0Eh95sir6ZAyAegrSjkiis,2875
|
75
75
|
fprime_gds/common/loaders/fw_type_json_loader.py,sha256=Ybtfv0jNnzcTrnmFfi6EujAbLlA4Oocj3EMFBVRXlCM,2048
|
76
76
|
fprime_gds/common/loaders/json_loader.py,sha256=YTvNkVRbaeDAKDs79J5RV7Z8zeO7x0_a8aIz5KLq9rA,9300
|
77
|
-
fprime_gds/common/loaders/pkt_json_loader.py,sha256=
|
77
|
+
fprime_gds/common/loaders/pkt_json_loader.py,sha256=OuHYXE0FP33oAh0z6AScUdLgFg9VzXI8rqPJz5pdTdw,5080
|
78
78
|
fprime_gds/common/loaders/pkt_xml_loader.py,sha256=ZS4qchqQnIBx0Tw69ehP8yqm1g_uYSQzmnijR3FxqJg,4795
|
79
79
|
fprime_gds/common/loaders/prm_json_loader.py,sha256=YCSg3PhVsJTD1FgY_h0i8wV3TNikcZSrczHCzrTM6JM,2896
|
80
80
|
fprime_gds/common/loaders/xml_loader.py,sha256=8AlTTHddJbJqUr6St-zJI8CTqoPuCNtNoRBmdwCorcg,14820
|
@@ -89,7 +89,7 @@ fprime_gds/common/models/common/event.py,sha256=gSFrCJT9ZddGJfkf3fGCCqk0aMIQV-SN
|
|
89
89
|
fprime_gds/common/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
90
90
|
fprime_gds/common/parsers/seq_file_parser.py,sha256=6DZrA0jmt8IqsutfK7pdLtYn4oVHO593rWgAOH63yRg,9587
|
91
91
|
fprime_gds/common/pipeline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
|
-
fprime_gds/common/pipeline/dictionaries.py,sha256=
|
92
|
+
fprime_gds/common/pipeline/dictionaries.py,sha256=oZwRhGsrSRt9ptlMkUKsbFbxgoumE7MXwf0xkq1dKCg,7943
|
93
93
|
fprime_gds/common/pipeline/encoding.py,sha256=PttJ8NmXm75mLXyhlmxOJqE8RFt46q1dThaV19PyAr4,7216
|
94
94
|
fprime_gds/common/pipeline/files.py,sha256=J2zm0sucvImtmSnv0iUp5uTpvUO8nlmz2lUdMuMC5aM,2244
|
95
95
|
fprime_gds/common/pipeline/histories.py,sha256=7KyboNnm9OARQk4meVPSSeYpeqH0G8RWRiy0BLBL1rw,3671
|
@@ -238,10 +238,10 @@ fprime_gds/flask/static/third-party/webfonts/fa-solid-900.woff2,sha256=mDS4KtJuK
|
|
238
238
|
fprime_gds/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
239
239
|
fprime_gds/plugin/definitions.py,sha256=QlxW1gNvoiqGMslSJjh3dTFZuv0igFHawN__3XJ0Wns,5355
|
240
240
|
fprime_gds/plugin/system.py,sha256=M9xb-8jBhCUUx3X1z2uAP8Wx_v6NkL8JeaFgGcMnQqY,13432
|
241
|
-
fprime_gds-4.0.
|
242
|
-
fprime_gds-4.0.
|
243
|
-
fprime_gds-4.0.
|
244
|
-
fprime_gds-4.0.
|
245
|
-
fprime_gds-4.0.
|
246
|
-
fprime_gds-4.0.
|
247
|
-
fprime_gds-4.0.
|
241
|
+
fprime_gds-4.0.0a4.dist-info/licenses/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
242
|
+
fprime_gds-4.0.0a4.dist-info/licenses/NOTICE.txt,sha256=vXjA_xRcQhd83Vfk5D_vXg5kOjnnXvLuMi5vFKDEVmg,1612
|
243
|
+
fprime_gds-4.0.0a4.dist-info/METADATA,sha256=RAq6BEVxVXtPSIGAg-p23Xd4Zdww9JEHJzeO8imSsLc,24549
|
244
|
+
fprime_gds-4.0.0a4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
245
|
+
fprime_gds-4.0.0a4.dist-info/entry_points.txt,sha256=qFBHIR7CZ5CEeSEdZ-ZVQN9ZfUOZfm0PvvDZAAheuLk,445
|
246
|
+
fprime_gds-4.0.0a4.dist-info/top_level.txt,sha256=6vzFLIX6ANfavKaXFHDMSLFtS94a6FaAsIWhjgYuSNE,27
|
247
|
+
fprime_gds-4.0.0a4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|