Continue CFDP handlers #90
@ -857,7 +857,7 @@ mod tests {
|
|||||||
let mut sp_header = SpHeader::tc_unseg(apid_to_set, 105, 0).unwrap();
|
let mut sp_header = SpHeader::tc_unseg(apid_to_set, 105, 0).unwrap();
|
||||||
let mut sec_header = PusTcSecondaryHeader::new_simple(17, 1);
|
let mut sec_header = PusTcSecondaryHeader::new_simple(17, 1);
|
||||||
sec_header.source_id = src_id_to_set;
|
sec_header.source_id = src_id_to_set;
|
||||||
let ping_tc = PusTcCreator::new(&mut sp_header, sec_header, None, true);
|
let ping_tc = PusTcCreator::new_no_app_data(&mut sp_header, sec_header, true);
|
||||||
let req_id = RequestId::from_tc(&ping_tc);
|
let req_id = RequestId::from_tc(&ping_tc);
|
||||||
assert_eq!(req_id.source_id(), src_id_to_set);
|
assert_eq!(req_id.source_id(), src_id_to_set);
|
||||||
assert_eq!(req_id.apid(), apid_to_set);
|
assert_eq!(req_id.apid(), apid_to_set);
|
||||||
|
@ -154,7 +154,7 @@ mod tests {
|
|||||||
// Create a ping TC, verify acceptance.
|
// Create a ping TC, verify acceptance.
|
||||||
let mut sp_header = SpHeader::tc(TEST_APID, SequenceFlags::Unsegmented, 0, 0).unwrap();
|
let mut sp_header = SpHeader::tc(TEST_APID, SequenceFlags::Unsegmented, 0, 0).unwrap();
|
||||||
let sec_header = PusTcSecondaryHeader::new_simple(17, 1);
|
let sec_header = PusTcSecondaryHeader::new_simple(17, 1);
|
||||||
let ping_tc = PusTcCreator::new(&mut sp_header, sec_header, None, true);
|
let ping_tc = PusTcCreator::new_no_app_data(&mut sp_header, sec_header, true);
|
||||||
let token = verification_handler.add_tc(&ping_tc);
|
let token = verification_handler.add_tc(&ping_tc);
|
||||||
let token = verification_handler
|
let token = verification_handler
|
||||||
.acceptance_success(token, None)
|
.acceptance_success(token, None)
|
||||||
|
@ -1438,6 +1438,7 @@ mod tests {
|
|||||||
fn base_tc_init(app_data: Option<&[u8]>) -> (PusTcCreator, RequestId) {
|
fn base_tc_init(app_data: Option<&[u8]>) -> (PusTcCreator, RequestId) {
|
||||||
let mut sph = SpHeader::tc_unseg(TEST_APID, 0x34, 0).unwrap();
|
let mut sph = SpHeader::tc_unseg(TEST_APID, 0x34, 0).unwrap();
|
||||||
let tc_header = PusTcSecondaryHeader::new_simple(17, 1);
|
let tc_header = PusTcSecondaryHeader::new_simple(17, 1);
|
||||||
|
let app_data = app_data.unwrap_or(&[]);
|
||||||
let pus_tc = PusTcCreator::new(&mut sph, tc_header, app_data, true);
|
let pus_tc = PusTcCreator::new(&mut sph, tc_header, app_data, true);
|
||||||
let req_id = RequestId::new(&pus_tc);
|
let req_id = RequestId::new(&pus_tc);
|
||||||
(pus_tc, req_id)
|
(pus_tc, req_id)
|
||||||
@ -2162,7 +2163,7 @@ mod tests {
|
|||||||
|
|
||||||
let mut sph = SpHeader::tc_unseg(TEST_APID, 0, 0).unwrap();
|
let mut sph = SpHeader::tc_unseg(TEST_APID, 0, 0).unwrap();
|
||||||
let tc_header = PusTcSecondaryHeader::new_simple(17, 1);
|
let tc_header = PusTcSecondaryHeader::new_simple(17, 1);
|
||||||
let pus_tc_0 = PusTcCreator::new(&mut sph, tc_header, None, true);
|
let pus_tc_0 = PusTcCreator::new_no_app_data(&mut sph, tc_header, true);
|
||||||
let init_token = reporter.add_tc(&pus_tc_0);
|
let init_token = reporter.add_tc(&pus_tc_0);
|
||||||
|
|
||||||
// Complete success sequence for a telecommand
|
// Complete success sequence for a telecommand
|
||||||
|
Loading…
Reference in New Issue
Block a user