use re-export in example now

This commit is contained in:
Robin Müller 2023-01-10 17:16:57 +01:00
parent af8a7e3e7a
commit 622dfb2089
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
8 changed files with 24 additions and 39 deletions

20
Cargo.lock generated
View File

@ -552,7 +552,7 @@ checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
[[package]] [[package]]
name = "satrs-core" name = "satrs-core"
version = "0.1.0" version = "0.1.0-pre0"
dependencies = [ dependencies = [
"bus", "bus",
"crossbeam-channel", "crossbeam-channel",
@ -568,7 +568,7 @@ dependencies = [
"postcard", "postcard",
"serde", "serde",
"serde_json", "serde_json",
"spacepackets 0.4.0 (git+https://egit.irs.uni-stuttgart.de/rust/spacepackets.git)", "spacepackets 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zerocopy", "zerocopy",
] ]
@ -581,7 +581,6 @@ dependencies = [
"delegate", "delegate",
"satrs-core", "satrs-core",
"satrs-mib", "satrs-mib",
"spacepackets 0.4.0 (git+https://egit.irs.uni-stuttgart.de/rust/spacepackets.git?branch=all_features)",
"zerocopy", "zerocopy",
] ]
@ -699,19 +698,8 @@ dependencies = [
[[package]] [[package]]
name = "spacepackets" name = "spacepackets"
version = "0.4.0" version = "0.4.0"
source = "git+https://egit.irs.uni-stuttgart.de/rust/spacepackets.git?branch=all_features#03b94fbcde150af685837241a096d6b04f1f5b29" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ checksum = "9199251260fa674673a195bbe68703ba8d7ac0875d97df05cd4b5618218da054"
"chrono",
"crc",
"delegate",
"num-traits",
"zerocopy",
]
[[package]]
name = "spacepackets"
version = "0.4.0"
source = "git+https://egit.irs.uni-stuttgart.de/rust/spacepackets.git#481de83fdb657b8de299b63f1b504299d5e85e31"
dependencies = [ dependencies = [
"chrono", "chrono",
"crc", "crc",

View File

@ -192,7 +192,10 @@ impl RequestId {
/// If a verification operation fails, the passed token will be returned as well. This allows /// If a verification operation fails, the passed token will be returned as well. This allows
/// re-trying the operation at a later point. /// re-trying the operation at a later point.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct VerificationOrSendErrorWithToken<E, T>(pub EcssTmErrorWithSend<E>, pub VerificationToken<T>); pub struct VerificationOrSendErrorWithToken<E, T>(
pub EcssTmErrorWithSend<E>,
pub VerificationToken<T>,
);
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct VerificationErrorWithToken<T>(pub EcssTmError, pub VerificationToken<T>); pub struct VerificationErrorWithToken<T>(pub EcssTmError, pub VerificationToken<T>);

View File

@ -11,10 +11,6 @@ delegate = "0.8"
zerocopy = "0.6" zerocopy = "0.6"
csv = "1" csv = "1"
[dependencies.spacepackets]
git = "https://egit.irs.uni-stuttgart.de/rust/spacepackets.git"
branch = "all_features"
[dependencies.satrs-core] [dependencies.satrs-core]
path = "../satrs-core" path = "../satrs-core"

View File

@ -1,9 +1,9 @@
use satrs_core::pus::verification::RequestId; use satrs_core::pus::verification::RequestId;
use satrs_core::{
spacepackets::ecss::PusPacket, spacepackets::tc::PusTc, spacepackets::tm::PusTm,
spacepackets::SpHeader,
};
use satrs_example::{OBSW_SERVER_ADDR, SERVER_PORT}; use satrs_example::{OBSW_SERVER_ADDR, SERVER_PORT};
use spacepackets::ecss::PusPacket;
use spacepackets::tc::PusTc;
use spacepackets::tm::PusTm;
use spacepackets::SpHeader;
use std::net::{IpAddr, SocketAddr, UdpSocket}; use std::net::{IpAddr, SocketAddr, UdpSocket};
use std::time::Duration; use std::time::Duration;

View File

@ -1,6 +1,6 @@
use crate::tmtc::{MpscStoreAndSendError, PusTcSource, PUS_APID}; use crate::tmtc::{MpscStoreAndSendError, PusTcSource, PUS_APID};
use satrs_core::spacepackets::{CcsdsPacket, SpHeader};
use satrs_core::tmtc::{CcsdsPacketHandler, ReceivesCcsdsTc}; use satrs_core::tmtc::{CcsdsPacketHandler, ReceivesCcsdsTc};
use spacepackets::{CcsdsPacket, SpHeader};
pub struct CcsdsReceiver { pub struct CcsdsReceiver {
pub tc_source: PusTcSource, pub tc_source: PusTcSource,

View File

@ -24,11 +24,13 @@ use satrs_core::pus::verification::{
}; };
use satrs_core::pus::{EcssTmErrorWithSend, EcssTmSenderCore}; use satrs_core::pus::{EcssTmErrorWithSend, EcssTmSenderCore};
use satrs_core::seq_count::SeqCountProviderSimple; use satrs_core::seq_count::SeqCountProviderSimple;
use satrs_core::spacepackets::{
time::cds::TimeProvider,
time::TimeWriter,
tm::{PusTm, PusTmSecondaryHeader},
SequenceFlags, SpHeader,
};
use satrs_example::{RequestTargetId, OBSW_SERVER_ADDR, SERVER_PORT}; use satrs_example::{RequestTargetId, OBSW_SERVER_ADDR, SERVER_PORT};
use spacepackets::time::cds::TimeProvider;
use spacepackets::time::TimeWriter;
use spacepackets::tm::{PusTm, PusTmSecondaryHeader};
use spacepackets::{SequenceFlags, SpHeader};
use std::collections::HashMap; use std::collections::HashMap;
use std::net::{IpAddr, SocketAddr}; use std::net::{IpAddr, SocketAddr};
use std::sync::mpsc::{channel, TryRecvError}; use std::sync::mpsc::{channel, TryRecvError};

View File

@ -12,12 +12,11 @@ use satrs_core::pus::verification::{
use satrs_core::res_code::ResultU16; use satrs_core::res_code::ResultU16;
use satrs_core::tmtc::tm_helper::PusTmWithCdsShortHelper; use satrs_core::tmtc::tm_helper::PusTmWithCdsShortHelper;
use satrs_core::tmtc::{AddressableId, PusServiceProvider}; use satrs_core::tmtc::{AddressableId, PusServiceProvider};
use satrs_core::{
spacepackets::ecss::PusPacket, spacepackets::tc::PusTc, spacepackets::time::cds::TimeProvider,
spacepackets::time::TimeWriter, spacepackets::SpHeader,
};
use satrs_example::{hk_err, tmtc_err}; use satrs_example::{hk_err, tmtc_err};
use spacepackets::ecss::PusPacket;
use spacepackets::tc::PusTc;
use spacepackets::time::cds::TimeProvider;
use spacepackets::time::TimeWriter;
use spacepackets::SpHeader;
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::mpsc::Sender; use std::sync::mpsc::Sender;

View File

@ -15,13 +15,10 @@ use crate::requests::RequestWithToken;
use satrs_core::pool::{SharedPool, StoreAddr, StoreError}; use satrs_core::pool::{SharedPool, StoreAddr, StoreError};
use satrs_core::pus::event_man::EventRequestWithToken; use satrs_core::pus::event_man::EventRequestWithToken;
use satrs_core::pus::verification::StdVerifReporterWithSender; use satrs_core::pus::verification::StdVerifReporterWithSender;
use satrs_core::spacepackets::{ecss::PusPacket, tc::PusTc, tm::PusTm, SpHeader};
use satrs_core::tmtc::{ use satrs_core::tmtc::{
CcsdsDistributor, CcsdsError, PusServiceProvider, ReceivesCcsdsTc, ReceivesEcssPusTc, CcsdsDistributor, CcsdsError, PusServiceProvider, ReceivesCcsdsTc, ReceivesEcssPusTc,
}; };
use spacepackets::ecss::PusPacket;
use spacepackets::tc::PusTc;
use spacepackets::tm::PusTm;
use spacepackets::SpHeader;
pub const PUS_APID: u16 = 0x02; pub const PUS_APID: u16 = 0x02;