File tree 4 files changed +9
-5
lines changed
4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ Release notes for the `space_packet_parser` library
14
14
- Add support for creating a packet definition from Python objects and serializing it as XML.
15
15
- BUGFIX: Fix kbps calculation in packet generator for showing progress.
16
16
- Add support for string and float encoded enumerated lookup parameters.
17
- - Add properties to extract the CCSDS Header items from the `` RawPacketData `` object directly.
18
- e.g. `` RawPacketData .apid``
17
+ - Add properties to extract the CCSDS Header items from the `` CCSDSPacketBytes `` object directly.
18
+ e.g. `` CCSDSPacketBytes .apid``
19
19
- Add a `` create_ccsds_packet `` function that can create a CCSDS Packet
20
20
with the given header items and data. This is useful for creating
21
21
mock packets in testing and experimentation for creating debugging
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ We aim to provide examples of usage patterns. Please see the `examples` director
45
45
a specific example you want to see demonstrated, please open a GitHub Issue or Discussion for support.
46
46
47
47
## Packet Objects
48
- The object returned from the ` packet_generator ` is a ` CCSDSPacket ` (unless you're yielding parsing
48
+ The object returned from the ` packet_generator ` is a ` Packet ` (unless you're yielding parsing
49
49
exceptions for debugging). This object subclasses a python dictionary and behaves as a dictionary. To retrieve
50
50
a parameter value from the yielded packet, you can iterate over its ` items() ` or you can access individual parameters
51
51
by name.
Original file line number Diff line number Diff line change @@ -282,7 +282,10 @@ class to extract the header fields with specific methods.
282
282
make up the user data (accessed with ``CCSDSPacket.user_data``). To access the
283
283
raw bytes of the packet, use the ``CCSDSPacket.raw_data`` attribute.
284
284
"""
285
- pass
285
+ def __init__ (self , * args , ** kwargs ):
286
+ warnings .warn ("The CCSDSPacket class is deprecated and will be removed in a future release. "
287
+ "Use the Packet class instead (no CCSDS prefix)." )
288
+ super ().__init__ (* args , ** kwargs )
286
289
287
290
288
291
def ccsds_generator (
Original file line number Diff line number Diff line change @@ -127,7 +127,8 @@ def test_packet_data_lookups():
127
127
def test_ccsds_packet_data_lookups ():
128
128
# Deprecated CCSDSPacket class, an instance of the new Packet class
129
129
# can be removed in a future version
130
- assert isinstance (packets .CCSDSPacket (), packets .Packet )
130
+ with pytest .warns (UserWarning , match = "The CCSDSPacket class is deprecated" ):
131
+ assert isinstance (packets .CCSDSPacket (), packets .Packet )
131
132
132
133
133
134
def test_continuation_packets (test_data_dir ):
You can’t perform that action at this time.
0 commit comments