diff --git a/pytmtc/pyclient.py b/pytmtc/pyclient.py index a02d648..e24b519 100755 --- a/pytmtc/pyclient.py +++ b/pytmtc/pyclient.py @@ -143,6 +143,12 @@ class PusHandler(GenericApidHandlerBase): _LOGGER.info(f"Received event packet. Event: {event_u32}") if event_u32.group_id == 0 and event_u32.unique_id == 0: _LOGGER.info("Received test event") + elif service == 8: + if pus_tm.subservice == 130: + _LOGGER.info(f"Received Action Data Reply TM[8,130]") + reply = pus_tm.source_data + reply = reply[6:] + _LOGGER.info(f"Data Reply Content: " + reply.decode('utf-8')) elif service == 17: tm_packet = Service17Tm.unpack( packet, time_reader=CdsShortTimestamp.empty() diff --git a/src/pus/action.rs b/src/pus/action.rs index 66d86c7..cc618d9 100644 --- a/src/pus/action.rs +++ b/src/pus/action.rs @@ -1,4 +1,4 @@ -use log::{error, warn}; +use log::{debug, error, warn}; use ops_sat_rs::config::tmtc_err; use satrs::action::{ActionRequest, ActionRequestVariant}; use satrs::params::WritableToBeBytes; @@ -278,6 +278,7 @@ pub fn send_data_reply(apid_target: UniqueApidTargetId, data.extend(apid_target.apid.to_be_bytes()); data.extend(apid_target.unique_id.to_be_bytes()); data.extend(reply_data); + debug!("{}", String::from_utf8(data.clone()[6..].to_vec()).expect("Error decoding data reply.")); let data_reply_tm = PusTmCreator::new( sp_header, sec_header,