-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/robamu-org/tmtccmd
- Loading branch information
Showing
47 changed files
with
260 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from tmtccmd.pus.obj_id import ObjectId | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from __future__ import annotations | ||
import enum | ||
|
||
from spacepackets.ecss.conf import get_default_tc_apid | ||
from spacepackets.ecss.pus_17_test import Subservices | ||
from tmtccmd.config.definitions import QueueCommands | ||
from tmtccmd.tc.definitions import PusTelecommand, TcQueueT | ||
|
||
|
||
class CustomSubservices(enum.IntEnum): | ||
TC_GEN_EVENT = 128 | ||
|
||
|
||
def pack_service_17_ping_command(ssc: int, apid: int = -1) -> PusTelecommand: | ||
"""Generate a simple ping PUS telecommand packet""" | ||
if apid == -1: | ||
apid = get_default_tc_apid() | ||
return PusTelecommand( | ||
service=17, subservice=Subservices.TC_PING.value, ssc=ssc, apid=apid | ||
) | ||
|
||
|
||
def pack_generic_service17_test( | ||
init_ssc: int, tc_queue: TcQueueT, apid: int = -1 | ||
) -> int: | ||
if apid == -1: | ||
apid = get_default_tc_apid() | ||
new_ssc = init_ssc | ||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 17")) | ||
# ping test | ||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 17: Ping Test")) | ||
tc_queue.appendleft(pack_service_17_ping_command(ssc=new_ssc).pack_command_tuple()) | ||
new_ssc += 1 | ||
# enable event | ||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 17: Enable Event")) | ||
command = PusTelecommand(service=5, subservice=5, ssc=new_ssc, apid=apid) | ||
tc_queue.appendleft(command.pack_command_tuple()) | ||
new_ssc += 1 | ||
# test event | ||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 17: Trigger event")) | ||
command = PusTelecommand( | ||
service=17, subservice=CustomSubservices.TC_GEN_EVENT, ssc=new_ssc, apid=apid | ||
) | ||
tc_queue.appendleft(command.pack_command_tuple()) | ||
new_ssc += 1 | ||
# invalid subservice | ||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 17: Invalid subservice")) | ||
command = PusTelecommand(service=17, subservice=243, ssc=new_ssc, apid=apid) | ||
tc_queue.appendleft(command.pack_command_tuple()) | ||
new_ssc += 1 | ||
return new_ssc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import enum | ||
|
||
|
||
class Subservices(enum.IntEnum): | ||
TC_MODE_COMMAND = 1 | ||
TC_MODE_COMMAND_FORCES = 2 | ||
TC_MODE_READ = 3 | ||
TC_MODE_ANNOUNCE = 4 | ||
TC_MODE_ANNOUNCE_RECURSIVE = 5 | ||
TM_MODE_REPLY = 6 | ||
TM_CANT_REACH_MODE = 7 | ||
TM_WRONG_MODE_REPLY = 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import enum | ||
|
||
|
||
class Subservices(enum.IntEnum): | ||
TC_SET_HEALTH = 1 | ||
TM_HEALTH_SET = 2 | ||
TC_ANNOUNCE_HEALTH = 3 | ||
TC_ANNOUNCE_HEALTH_ALL = 4 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import enum | ||
|
||
|
||
class Subservices(enum.IntEnum): | ||
FUNCTIONAL_CMD = 128 | ||
DATA_REPLY = 130 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.