From 09bef401c07e62f897eed99a627133b7d4bd9b60 Mon Sep 17 00:00:00 2001 From: lkoester Date: Wed, 24 Apr 2024 16:26:54 +0200 Subject: [PATCH] added data reply to camera handler, now only missing tmtcpy counterpart --- scripts/ims100_testapp | Bin 34280 -> 0 bytes src/handlers/camera.rs | 28 +++++++++++++++++++++------- src/pus/action.rs | 29 +++++++++++++++++++++++------ 3 files changed, 44 insertions(+), 13 deletions(-) delete mode 100644 scripts/ims100_testapp diff --git a/scripts/ims100_testapp b/scripts/ims100_testapp deleted file mode 100644 index 956a66bec1ef8a5c9c53f0ad28e7b8f680cb41fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34280 zcmeHw4SZD9weLQ2PLi1nUr7fD++FN@s?W28OORL_}TWqaYEB96{ZEa16sVHb^i`H6O?*G5fIg^ti zwte^A_xru~ejZraYwfl6+H0@z-fghS1qaKIG~MLN4({&+`wt2+^O&jm}$PzU9fui3yTL4VL@ zUer+pU>y1Xyy=6*Z{4h%EZBW&y4ErDk6PcC*31Bp{v8LfUKfGzSR$%`R|3k7I5Q6~ z=s89l+$4QJ1!1WXSB7wwfzwuAG(Hb7o&>H-0r`O0ByhO^mq={n56d{#rPq_*9;c2*vOv=KOasublK>?E zUYF^?sJ}nA6pDGanN9^x`bCR0>ED8HFIHr`nSdJm2hc~ndZGg4R+^Un;WYZ)wEXT! zekL`@q1E%42Y`K?ale+&9Y>Z4d3F@+IQ{u62P zNsB$?Pfz3j9DJ)k#-;I(rqQvq{5GZO|7x0j^=bU;(&*dM=&RCbC5<-wH_dPYE=}X# zl}0~GLE~ci&2fZLPQaB!jLXRoV__`PRym&|VC8(_TiJB2FA$6e+d_$CFy3@+T{s#E zHu;;wLE-bYbwne+MA9Em`h2?Rn1axGi_}N$p^ikQ*X#4gLWmO0iKNenNhG5&UrRKS z#4sG~OpIc+N28Q$^F@TOH53V1nIMx^TDNCxMQy>PFB0s6Dt}whnkX5Kh7-P6JQPX# zlEH8gr3zU2U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X z6su4kyg+y1%;2CqD#`-?57?WKTQXs+|F7>8Oxv6Y$9Uvx?Wo{Fwy!Jb-|TCR{8#lv z;4)*&p7H)Mo=hZhh(313jQmEXFWJHO9T992#9DUL*A|X8<27CYZ)K; z!DKMtuJm5+q(sc-3; zdj1w-{dH>=Un^huq^&ZJv1II9zIyGF#jAa5mn~brw8_`BcnMwtU-0tA{EX#QS3+H_EGxB?!Sn{_16r=GgkNOJ-s{$^vTWKz=TeeNem+XAGJxYc< z66CKz1`<)@jg0(}ORJE@vQe*lt?`!k0mfTfs|Nj*zct4E#)UfcZuW3>*bw(FMzDJchMk)Q!Jq080W!TV0y<#+d!XHW< zaf!v8^!*6>s}`$0Y=+i%GJ37*=IOtIYL(W10M#0k{${}V^;4^e{)?*CnADp(V{?U- z_m_XHH}x7q{(vq#Y;N-zr6T>8SFKEocjT*#zxfA%g*(yHfft1c@%B)L?IwoTkHL6M zxaBQr@sgFUq`%Feuvg2i-_G#X&E4)#v(f^nN94Y$%Sr$7dHx{e%)G!#;ok(F2Vj-*xqZMr z!b6mlW4iAFa2|n_;OD z909*?nv&yl*I~$w<-Z}wF`oMPJaptkFVoh7G`RuD{g4gXxJ-SeX>wmdN4=kpNRzuPP44ow_|DYQUQB)S z)8xwVN+n=2q0>}dXULg;*|`xX44RD!a!f*4W5@xOm!lQmADWem7|QUvE=|rGMn5;1 z;G2G76x+Oc#X8Uw(1$NYL^FW)6#&@BS-0lZ--XrKG0Mxjw8}kxJH{MKz9#ygUcsiF diff --git a/src/handlers/camera.rs b/src/handlers/camera.rs index 3fdbb26..6145649 100644 --- a/src/handlers/camera.rs +++ b/src/handlers/camera.rs @@ -35,11 +35,14 @@ use satrs::hk::HkRequest; use satrs::request::{GenericMessage, MessageMetadata, UniqueApidTargetId}; use satrs::tmtc::PacketAsVec; use serde::{Deserialize, Serialize}; -use std::process::Command; +use std::process::{Command, Output}; use std::sync::mpsc; use satrs::pus::action::{ActionReplyPus, ActionReplyVariant}; +use satrs::pus::EcssTmtcError; +use crate::pus::action::send_data_reply; -const IMS_TESTAPP: &str = "scripts/ims100_testapp"; +// const IMS_TESTAPP: &str = "scripts/ims100_testapp"; +const IMS_TESTAPP: &str = "ims100_testapp"; const DEFAULT_SINGLE_CAM_PARAMS: CameraPictureParameters = CameraPictureParameters { R: 8, @@ -141,6 +144,7 @@ pub enum CameraError { DeserializeError, ListFileError, IoError(std::io::Error), + EcssTmtcError(EcssTmtcError), } impl From for CameraError { @@ -149,6 +153,12 @@ impl From for CameraError { } } +impl From for CameraError { + fn from(value: EcssTmtcError) -> Self { + Self::EcssTmtcError(value) + } +} + impl fmt::Display for CameraError { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { match self { @@ -170,6 +180,9 @@ impl fmt::Display for CameraError { CameraError::IoError(io_error) => { write!(f, "{}", io_error) } + CameraError::EcssTmtcError(ecss_tmtc_error) => { + write!(f ,"{}", ecss_tmtc_error) + } } } } @@ -276,12 +289,14 @@ impl IMS100BatchHandler { _ => return Err(CameraError::VariantNotImplemented), }, }; - self.take_picture(param)?; + let output = self.take_picture(param)?; + debug!("Sending action reply!"); + send_data_reply(self.id, output.stdout, &self.stamp_helper, &self.tm_tx)?; self.action_reply_tx.send(GenericMessage::new(*requestor_info, ActionReplyPus::new(action_request.action_id, ActionReplyVariant::Completed))).unwrap(); Ok(()) } - pub fn take_picture(&mut self, param: CameraPictureParameters) -> Result<(), CameraError> { + pub fn take_picture(&mut self, param: CameraPictureParameters) -> Result { info!("Taking image!"); let mut cmd = Command::new(IMS_TESTAPP); cmd.arg("-R") @@ -305,12 +320,11 @@ impl IMS100BatchHandler { .arg(¶m.E.to_string()) .arg("-w") .arg(¶m.W.to_string()); - let output = cmd.output()?; - debug!("{}", String::from_utf8_lossy(&output.stdout)); + debug!("Imager Output: {}", String::from_utf8_lossy(&output.stdout)); - Ok(()) + Ok(output) } pub fn list_current_images(&self) -> Result, CameraError> { diff --git a/src/pus/action.rs b/src/pus/action.rs index 7d597e4..66d86c7 100644 --- a/src/pus/action.rs +++ b/src/pus/action.rs @@ -1,5 +1,4 @@ use log::{error, warn}; -use ops_sat_rs::config::components::PUS_ACTION_SERVICE; use ops_sat_rs::config::tmtc_err; use satrs::action::{ActionRequest, ActionRequestVariant}; use satrs::params::WritableToBeBytes; @@ -10,17 +9,17 @@ use satrs::pus::verification::{ FailParams, FailParamsWithStep, TcStateAccepted, TcStateStarted, VerificationReporter, VerificationReportingProvider, VerificationToken, }; -use satrs::pus::{ - ActiveRequestProvider, EcssTcAndToken, EcssTcInVecConverter, EcssTmSender, EcssTmtcError, - GenericConversionError, PusPacketHandlerResult, PusReplyHandler, PusServiceHelper, - PusTcToRequestConverter, -}; +use satrs::pus::{ActiveRequestProvider, EcssTcAndToken, EcssTcInVecConverter, EcssTmSender, EcssTmtcError, GenericConversionError, PusPacketHandlerResult, PusReplyHandler, PusServiceHelper, PusTcToRequestConverter, PusTmVariant}; use satrs::request::{GenericMessage, UniqueApidTargetId}; use satrs::spacepackets::ecss::tc::PusTcReader; use satrs::spacepackets::ecss::{EcssEnumU16, PusPacket}; use satrs::tmtc::PacketAsVec; use std::sync::mpsc; use std::time::Duration; +use satrs::spacepackets::ecss::tm::{PusTmCreator, PusTmSecondaryHeader}; +use satrs::spacepackets::SpHeader; +use ops_sat_rs::config::components::PUS_ACTION_SERVICE; +use ops_sat_rs::TimeStampHelper; use crate::requests::GenericRequestRouter; @@ -29,6 +28,8 @@ use super::{ PusTargetedRequestService, TargetedPusService, }; +pub const DATA_REPLY: u8 = 130; + pub struct ActionReplyHandler { fail_data_buf: [u8; 128], } @@ -270,6 +271,22 @@ impl TargetedPusService for ActionServiceWrapper { } } +pub fn send_data_reply(apid_target: UniqueApidTargetId, reply_data: Vec, stamp_helper: &TimeStampHelper, tm_sender: &TmSender) -> Result<(), EcssTmtcError> { + let sp_header = SpHeader::new_from_apid(apid_target.apid); + let sec_header = PusTmSecondaryHeader::new(8, DATA_REPLY, 0, 0, stamp_helper.stamp()); + let mut data = Vec::new(); + data.extend(apid_target.apid.to_be_bytes()); + data.extend(apid_target.unique_id.to_be_bytes()); + data.extend(reply_data); + let data_reply_tm = PusTmCreator::new( + sp_header, + sec_header, + &data, + true, + ); + tm_sender.send_tm(apid_target.id(), PusTmVariant::Direct(data_reply_tm)) +} + #[cfg(test)] mod tests { use satrs::pus::test_util::{