Compare commits
10 Commits
48f4cd2395
...
satrs-shar
Author | SHA1 | Date | |
---|---|---|---|
6ffd55cec2 | |||
5e51b3de42
|
|||
bd059a2541 | |||
1a4d764f25 | |||
b38c617fae | |||
edcd5491f1 | |||
b4cb034b73 | |||
47c86aea5c | |||
c8bba48e76 | |||
176da4838a
|
@@ -8,18 +8,18 @@ homepage = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
|||||||
repository = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
repository = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
fern = "0.6"
|
fern = "0.7"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
crossbeam-channel = "0.5"
|
crossbeam-channel = "0.5"
|
||||||
delegate = "0.10"
|
delegate = "0.13"
|
||||||
zerocopy = "0.6"
|
zerocopy = "0.8"
|
||||||
csv = "1"
|
csv = "1"
|
||||||
num_enum = "0.7"
|
num_enum = "0.7"
|
||||||
thiserror = "1"
|
thiserror = "2"
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
strum = { version = "0.26", features = ["derive"] }
|
strum = { version = "0.26", features = ["derive"] }
|
||||||
derive-new = "0.5"
|
derive-new = "0.7"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
|
||||||
|
@@ -132,6 +132,7 @@ pub struct MgmData {
|
|||||||
pub struct MpscModeLeafInterface {
|
pub struct MpscModeLeafInterface {
|
||||||
pub request_rx: mpsc::Receiver<GenericMessage<ModeRequest>>,
|
pub request_rx: mpsc::Receiver<GenericMessage<ModeRequest>>,
|
||||||
pub reply_to_pus_tx: mpsc::Sender<GenericMessage<ModeReply>>,
|
pub reply_to_pus_tx: mpsc::Sender<GenericMessage<ModeReply>>,
|
||||||
|
#[allow(dead_code)]
|
||||||
pub reply_to_parent_tx: mpsc::SyncSender<GenericMessage<ModeReply>>,
|
pub reply_to_parent_tx: mpsc::SyncSender<GenericMessage<ModeReply>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
use crossbeam_channel::{bounded, Receiver, Sender};
|
use crossbeam_channel::{bounded, Receiver, Sender};
|
||||||
use std::sync::atomic::{AtomicU16, Ordering};
|
use std::sync::atomic::{AtomicU16, Ordering};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use zerocopy::{AsBytes, FromBytes, NetworkEndian, Unaligned, U16};
|
use zerocopy::{FromBytes, Immutable, IntoBytes, NetworkEndian, Unaligned, U16};
|
||||||
|
|
||||||
trait FieldDataProvider: Send {
|
trait FieldDataProvider: Send {
|
||||||
fn get_data(&self) -> &[u8];
|
fn get_data(&self) -> &[u8];
|
||||||
@@ -35,7 +35,7 @@ struct ExampleMgmSet {
|
|||||||
temperature: u16,
|
temperature: u16,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(FromBytes, AsBytes, Unaligned)]
|
#[derive(FromBytes, IntoBytes, Immutable, Unaligned)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
struct ExampleMgmSetZc {
|
struct ExampleMgmSetZc {
|
||||||
mgm_vec: [u8; 12],
|
mgm_vec: [u8; 12],
|
||||||
|
@@ -88,6 +88,7 @@ impl PowerSwitcherCommandSender<PcduSwitch> for PowerSwitchHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
#[derive(new)]
|
#[derive(new)]
|
||||||
pub struct SwitchRequestInfo {
|
pub struct SwitchRequestInfo {
|
||||||
pub requestor_info: MessageMetadata,
|
pub requestor_info: MessageMetadata,
|
||||||
@@ -99,6 +100,7 @@ pub struct SwitchRequestInfo {
|
|||||||
pub struct TestSwitchHelper {
|
pub struct TestSwitchHelper {
|
||||||
pub switch_requests: RefCell<VecDeque<SwitchRequestInfo>>,
|
pub switch_requests: RefCell<VecDeque<SwitchRequestInfo>>,
|
||||||
pub switch_info_requests: RefCell<VecDeque<PcduSwitch>>,
|
pub switch_info_requests: RefCell<VecDeque<PcduSwitch>>,
|
||||||
|
#[allow(dead_code)]
|
||||||
pub switch_delay_request_count: u32,
|
pub switch_delay_request_count: u32,
|
||||||
pub next_switch_delay: Duration,
|
pub next_switch_delay: Duration,
|
||||||
pub switch_map: RefCell<SwitchMapWrapper>,
|
pub switch_map: RefCell<SwitchMapWrapper>,
|
||||||
|
@@ -44,11 +44,13 @@ pub struct PusTcMpscRouter {
|
|||||||
pub event_tc_sender: Sender<EcssTcAndToken>,
|
pub event_tc_sender: Sender<EcssTcAndToken>,
|
||||||
pub sched_tc_sender: Sender<EcssTcAndToken>,
|
pub sched_tc_sender: Sender<EcssTcAndToken>,
|
||||||
pub hk_tc_sender: Sender<EcssTcAndToken>,
|
pub hk_tc_sender: Sender<EcssTcAndToken>,
|
||||||
|
#[allow(dead_code)]
|
||||||
pub action_tc_sender: Sender<EcssTcAndToken>,
|
pub action_tc_sender: Sender<EcssTcAndToken>,
|
||||||
pub mode_tc_sender: Sender<EcssTcAndToken>,
|
pub mode_tc_sender: Sender<EcssTcAndToken>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct PusTcDistributor<TmSender: EcssTmSender> {
|
pub struct PusTcDistributor<TmSender: EcssTmSender> {
|
||||||
|
#[allow(dead_code)]
|
||||||
pub id: ComponentId,
|
pub id: ComponentId,
|
||||||
pub tm_sender: TmSender,
|
pub tm_sender: TmSender,
|
||||||
pub verif_reporter: VerificationReporter,
|
pub verif_reporter: VerificationReporter,
|
||||||
|
@@ -26,6 +26,7 @@ pub enum CompositeRequest {
|
|||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct GenericRequestRouter {
|
pub struct GenericRequestRouter {
|
||||||
|
#[allow(dead_code)]
|
||||||
pub id: ComponentId,
|
pub id: ComponentId,
|
||||||
// All messages which do not have a dedicated queue.
|
// All messages which do not have a dedicated queue.
|
||||||
pub composite_router_map:
|
pub composite_router_map:
|
||||||
|
@@ -23,7 +23,7 @@ version = "1"
|
|||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.satrs-shared]
|
[dependencies.satrs-shared]
|
||||||
version = ">=0.1.3, <0.2"
|
version = ">=0.1.3, <=0.2"
|
||||||
features = ["serde"]
|
features = ["serde"]
|
||||||
path = "../satrs-shared"
|
path = "../satrs-shared"
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ features = ["full"]
|
|||||||
trybuild = { version = "1", features = ["diff"] }
|
trybuild = { version = "1", features = ["diff"] }
|
||||||
|
|
||||||
[dev-dependencies.satrs-shared]
|
[dev-dependencies.satrs-shared]
|
||||||
version = ">=0.1.3, <0.2"
|
version = ">=0.1.3, <=0.2"
|
||||||
path = "../../satrs-shared"
|
path = "../../satrs-shared"
|
||||||
|
|
||||||
[dev-dependencies.satrs-mib]
|
[dev-dependencies.satrs-mib]
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#[cfg(feature = "alloc")]
|
|
||||||
extern crate alloc;
|
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
extern crate std;
|
extern crate std;
|
||||||
|
|
||||||
|
@@ -9,8 +9,8 @@ edition = "2021"
|
|||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
thiserror = "1"
|
thiserror = "2"
|
||||||
fern = "0.5"
|
fern = "0.7"
|
||||||
strum = { version = "0.26", features = ["derive"] }
|
strum = { version = "0.26", features = ["derive"] }
|
||||||
num_enum = "0.7"
|
num_enum = "0.7"
|
||||||
humantime = "2"
|
humantime = "2"
|
||||||
@@ -25,4 +25,4 @@ features = ["serde"]
|
|||||||
path = "../satrs"
|
path = "../satrs"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
delegate = "0.12"
|
delegate = "0.13"
|
||||||
|
@@ -31,6 +31,7 @@ const PHASE_Z: f32 = 0.2;
|
|||||||
/// might still be possible and is probably sufficient for many OBSW needs.
|
/// might still be possible and is probably sufficient for many OBSW needs.
|
||||||
pub struct MagnetometerModel<ReplyProvider: MgmReplyProvider> {
|
pub struct MagnetometerModel<ReplyProvider: MgmReplyProvider> {
|
||||||
pub switch_state: SwitchStateBinary,
|
pub switch_state: SwitchStateBinary,
|
||||||
|
#[allow(dead_code)]
|
||||||
pub periodicity: Duration,
|
pub periodicity: Duration,
|
||||||
pub external_mag_field: Option<MgmSensorValuesMicroTesla>,
|
pub external_mag_field: Option<MgmSensorValuesMicroTesla>,
|
||||||
pub reply_sender: mpsc::Sender<SimReply>,
|
pub reply_sender: mpsc::Sender<SimReply>,
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "satrs-shared"
|
name = "satrs-shared"
|
||||||
description = "Components shared by multiple sat-rs crates"
|
description = "Components shared by multiple sat-rs crates"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||||
homepage = "https://absatsw.irs.uni-stuttgart.de/projects/sat-rs/"
|
homepage = "https://absatsw.irs.uni-stuttgart.de/projects/sat-rs/"
|
||||||
@@ -22,10 +22,8 @@ version = "0.3"
|
|||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.spacepackets]
|
[dependencies.spacepackets]
|
||||||
version = ">0.9"
|
version = ">0.9, <=0.13"
|
||||||
default-features = false
|
default-features = false
|
||||||
git = "https://egit.irs.uni-stuttgart.de/rust/spacepackets"
|
|
||||||
branch = "main"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
serde = ["dep:serde", "spacepackets/serde"]
|
serde = ["dep:serde", "spacepackets/serde"]
|
||||||
|
@@ -13,9 +13,9 @@ keywords = ["no-std", "space", "aerospace"]
|
|||||||
categories = ["aerospace", "aerospace::space-protocols", "no-std", "hardware-support", "embedded"]
|
categories = ["aerospace", "aerospace::space-protocols", "no-std", "hardware-support", "embedded"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
delegate = ">0.7, <=0.10"
|
delegate = ">0.7, <=0.13"
|
||||||
paste = "1"
|
paste = "1"
|
||||||
derive-new = "0.6"
|
derive-new = ">=0.6, <=0.7"
|
||||||
smallvec = "1"
|
smallvec = "1"
|
||||||
crc = "3"
|
crc = "3"
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ version = ">0.5, <=0.7"
|
|||||||
default-features = false
|
default-features = false
|
||||||
|
|
||||||
[dependencies.spacepackets]
|
[dependencies.spacepackets]
|
||||||
version = "0.12"
|
version = "0.13"
|
||||||
default-features = false
|
default-features = false
|
||||||
|
|
||||||
[dependencies.cobs]
|
[dependencies.cobs]
|
||||||
@@ -46,11 +46,11 @@ version = "1"
|
|||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.hashbrown]
|
[dependencies.hashbrown]
|
||||||
version = "0.14"
|
version = ">=0.14, <=0.15"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.heapless]
|
[dependencies.heapless]
|
||||||
version = "0.7"
|
version = "0.8"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.downcast-rs]
|
[dependencies.downcast-rs]
|
||||||
@@ -68,8 +68,8 @@ default-features = false
|
|||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.thiserror]
|
[dependencies.thiserror]
|
||||||
version = "1"
|
version = "2"
|
||||||
optional = true
|
default-features = false
|
||||||
|
|
||||||
[dependencies.serde]
|
[dependencies.serde]
|
||||||
version = "1"
|
version = "1"
|
||||||
@@ -82,7 +82,7 @@ features = ["all"]
|
|||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.mio]
|
[dependencies.mio]
|
||||||
version = "0.8"
|
version = "1"
|
||||||
features = ["os-poll", "net"]
|
features = ["os-poll", "net"]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ optional = true
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde = "1"
|
serde = "1"
|
||||||
zerocopy = "0.7"
|
zerocopy = "0.8"
|
||||||
once_cell = "1"
|
once_cell = "1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
@@ -112,7 +112,7 @@ std = [
|
|||||||
"serde/std",
|
"serde/std",
|
||||||
"spacepackets/std",
|
"spacepackets/std",
|
||||||
"num_enum/std",
|
"num_enum/std",
|
||||||
"thiserror",
|
"thiserror/std",
|
||||||
"socket2",
|
"socket2",
|
||||||
"mio"
|
"mio"
|
||||||
]
|
]
|
||||||
@@ -128,7 +128,6 @@ crossbeam = ["crossbeam-channel"]
|
|||||||
heapless = ["dep:heapless"]
|
heapless = ["dep:heapless"]
|
||||||
defmt = ["dep:defmt", "spacepackets/defmt"]
|
defmt = ["dep:defmt", "spacepackets/defmt"]
|
||||||
test_util = []
|
test_util = []
|
||||||
doc-images = []
|
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
3
satrs/docs.sh
Executable file
3
satrs/docs.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
export RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options"
|
||||||
|
cargo +nightly doc --all-features --open
|
@@ -3,8 +3,7 @@ Checklist for new releases
|
|||||||
|
|
||||||
# Pre-Release
|
# Pre-Release
|
||||||
|
|
||||||
1. Make sure any new modules are documented sufficiently enough and check docs with
|
1. Make sure any new modules are documented sufficiently enough and check docs by running `docs.sh`.
|
||||||
`cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]' --open`.
|
|
||||||
2. Bump version specifier in `Cargo.toml`.
|
2. Bump version specifier in `Cargo.toml`.
|
||||||
3. Update `CHANGELOG.md`: Convert `unreleased` section into version section with date and add new
|
3. Update `CHANGELOG.md`: Convert `unreleased` section into version section with date and add new
|
||||||
`unreleased` section.
|
`unreleased` section.
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
//! VerificationReportingProvider, VerificationReporterCfg, VerificationReporter
|
//! VerificationReportingProvider, VerificationReporterCfg, VerificationReporter
|
||||||
//! };
|
//! };
|
||||||
//! use satrs::tmtc::{SharedStaticMemoryPool, PacketSenderWithSharedPool};
|
//! use satrs::tmtc::{SharedStaticMemoryPool, PacketSenderWithSharedPool};
|
||||||
//! use satrs::seq_count::SeqCountProviderSimple;
|
//! use satrs::spacepackets::seq_count::SeqCountProviderSimple;
|
||||||
//! use satrs::request::UniqueApidTargetId;
|
//! use satrs::request::UniqueApidTargetId;
|
||||||
//! use spacepackets::ecss::PusPacket;
|
//! use spacepackets::ecss::PusPacket;
|
||||||
//! use spacepackets::SpHeader;
|
//! use spacepackets::SpHeader;
|
||||||
@@ -97,8 +97,8 @@ use spacepackets::ecss::EcssEnumeration;
|
|||||||
use spacepackets::{ByteConversionError, CcsdsPacket, PacketId, PacketSequenceCtrl};
|
use spacepackets::{ByteConversionError, CcsdsPacket, PacketId, PacketSequenceCtrl};
|
||||||
use spacepackets::{SpHeader, MAX_APID};
|
use spacepackets::{SpHeader, MAX_APID};
|
||||||
|
|
||||||
pub use spacepackets::seq_count::SeqCountProviderSimple;
|
|
||||||
pub use spacepackets::ecss::verification::*;
|
pub use spacepackets::ecss::verification::*;
|
||||||
|
pub use spacepackets::seq_count::SeqCountProviderSimple;
|
||||||
|
|
||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
pub use alloc_mod::*;
|
pub use alloc_mod::*;
|
||||||
@@ -1702,7 +1702,7 @@ pub mod tests {
|
|||||||
};
|
};
|
||||||
use crate::pus::{ChannelWithId, PusTmVariant};
|
use crate::pus::{ChannelWithId, PusTmVariant};
|
||||||
use crate::request::MessageMetadata;
|
use crate::request::MessageMetadata;
|
||||||
use crate::seq_count::{CcsdsSimpleSeqCountProvider, SequenceCountProvider};
|
use crate::spacepackets::seq_count::{CcsdsSimpleSeqCountProvider, SequenceCountProvider};
|
||||||
use crate::tmtc::{PacketSenderWithSharedPool, SharedPacketPool};
|
use crate::tmtc::{PacketSenderWithSharedPool, SharedPacketPool};
|
||||||
use crate::ComponentId;
|
use crate::ComponentId;
|
||||||
use alloc::format;
|
use alloc::format;
|
||||||
|
Reference in New Issue
Block a user