Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Apr 22, 2024
1 parent b1a4664 commit f6a2642
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ PUS ping telemetry reply without a timestamp.

.. testcode:: pus

from spacepackets.ecss.tc import PusTelecommand
from spacepackets.ecss.tm import PusTelemetry
from spacepackets.ecss.tc import PusTc
from spacepackets.ecss.tm import PusTm

ping_cmd = PusTelecommand(service=17, subservice=1, apid=0x01)
ping_cmd = PusTc(service=17, subservice=1, apid=0x01)
cmd_as_bytes = ping_cmd.pack()
print(f"Ping telecommand [17,1] (hex): [{cmd_as_bytes.hex(sep=',')}]")

ping_reply = PusTelemetry(service=17, subservice=2, apid=0x01, time_provider=None)
ping_reply = PusTm(service=17, subservice=2, apid=0x01, time_provider=None)
tm_as_bytes = ping_reply.pack()
print(f"Ping reply [17,2] (hex): [{tm_as_bytes.hex(sep=',')}]")

Expand All @@ -34,9 +34,9 @@ The following example shows how to generate a space packet header:

.. testcode:: ccsds

from spacepackets.ccsds.spacepacket import SpacePacketHeader, PacketType
from spacepackets.ccsds.spacepacket import SpHeader, PacketType

spacepacket_header = SpacePacketHeader(
spacepacket_header = SpHeader(
packet_type=PacketType.TC, apid=0x01, seq_count=0, data_len=0
)
header_as_bytes = spacepacket_header.pack()
Expand Down
2 changes: 1 addition & 1 deletion spacepackets/ecss/tc.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class PusTc(AbstractSpacePacket):
"""Class representation of a PUS telecommand. Can be converted to the raw byte representation
but also unpacked from a raw byte stream. Only PUS C telecommands are supported.
>>> ping_tc = PusTelecommand(service=17, subservice=1, seq_count=22, apid=0x01)
>>> ping_tc = PusTc(service=17, subservice=1, seq_count=22, apid=0x01)
>>> ping_tc.service
17
>>> ping_tc.subservice
Expand Down
2 changes: 1 addition & 1 deletion spacepackets/ecss/tm.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class PusTm(AbstractPusTm):
The following doc example cuts off the timestamp (7 byte CDS Short) and the CRC16 from the ping
packet because those change regularly.
>>> ping_tm = PusTelemetry(service=17, subservice=2, seq_count=5, apid=0x01, time_provider=CdsShortTimestamp.empty()) # noqa
>>> ping_tm = PusTm(service=17, subservice=2, seq_count=5, apid=0x01, time_provider=CdsShortTimestamp.empty()) # noqa
>>> ping_tm.service
17
>>> ping_tm.subservice
Expand Down

0 comments on commit f6a2642

Please sign in to comment.