Merge pull request 'restructure the crate' (#111) from restructure-crate into main
All checks were successful
Rust/sat-rs/pipeline/head This commit looks good
All checks were successful
Rust/sat-rs/pipeline/head This commit looks good
Reviewed-on: #111
This commit is contained in:
commit
c635c7eed3
@ -1,9 +1,10 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"satrs-core",
|
"satrs",
|
||||||
"satrs-mib",
|
"satrs-mib",
|
||||||
"satrs-example",
|
"satrs-example",
|
||||||
|
"satrs-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
exclude = [
|
exclude = [
|
||||||
|
@ -22,12 +22,12 @@ This project currently contains following crates:
|
|||||||
Primary information resource in addition to the API documentation, hosted
|
Primary information resource in addition to the API documentation, hosted
|
||||||
[here](https://documentation.irs.uni-stuttgart.de/projects/sat-rs/). It can be useful to read
|
[here](https://documentation.irs.uni-stuttgart.de/projects/sat-rs/). It can be useful to read
|
||||||
this first before delving into the example application and the API documentation.
|
this first before delving into the example application and the API documentation.
|
||||||
* [`satrs-core`](https://egit.irs.uni-stuttgart.de/rust/satrs-launchpad/src/branch/main/satrs-core):
|
* [`satrs`](https://egit.irs.uni-stuttgart.de/rust/sat-rs/src/branch/main/satrs):
|
||||||
Core components of sat-rs.
|
Primary crate.
|
||||||
* [`satrs-example`](https://egit.irs.uni-stuttgart.de/rust/satrs-launchpad/src/branch/main/satrs-example):
|
* [`satrs-example`](https://egit.irs.uni-stuttgart.de/rust/sat-rs/src/branch/main/satrs-example):
|
||||||
Example of a simple example on-board software using various sat-rs components which can be run
|
Example of a simple example on-board software using various sat-rs components which can be run
|
||||||
on a host computer or on any system with a standard runtime like a Raspberry Pi.
|
on a host computer or on any system with a standard runtime like a Raspberry Pi.
|
||||||
* [`satrs-mib`](https://egit.irs.uni-stuttgart.de/rust/satrs-launchpad/src/branch/main/satrs-mib):
|
* [`satrs-mib`](https://egit.irs.uni-stuttgart.de/rust/sat-rs/src/branch/main/satrs-mib):
|
||||||
Components to build a mission information base from the on-board software directly.
|
Components to build a mission information base from the on-board software directly.
|
||||||
* [`satrs-example-stm32f3-disco`](https://egit.irs.uni-stuttgart.de/rust/sat-rs/src/branch/main/satrs-example-stm32f3-disco):
|
* [`satrs-example-stm32f3-disco`](https://egit.irs.uni-stuttgart.de/rust/sat-rs/src/branch/main/satrs-example-stm32f3-disco):
|
||||||
Example of a simple example on-board software using sat-rs components on a bare-metal system
|
Example of a simple example on-board software using sat-rs components on a bare-metal system
|
||||||
|
2
automation/Jenkinsfile
vendored
2
automation/Jenkinsfile
vendored
@ -47,7 +47,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Check Cross Embedded Bare Metal') {
|
stage('Check Cross Embedded Bare Metal') {
|
||||||
steps {
|
steps {
|
||||||
sh 'cargo check -p satrs-core --target thumbv7em-none-eabihf --no-default-features'
|
sh 'cargo check -p satrs --target thumbv7em-none-eabihf --no-default-features'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Check Cross Embedded Linux') {
|
stage('Check Cross Embedded Linux') {
|
||||||
|
@ -19,13 +19,13 @@ num_enum = "0.7"
|
|||||||
thiserror = "1"
|
thiserror = "1"
|
||||||
derive-new = "0.5"
|
derive-new = "0.5"
|
||||||
|
|
||||||
[dependencies.satrs-core]
|
[dependencies.satrs]
|
||||||
version = "0.1.0-alpha.3"
|
# version = "0.1.0-alpha.3"
|
||||||
# path = "../satrs-core"
|
path = "../satrs"
|
||||||
|
|
||||||
[dependencies.satrs-mib]
|
[dependencies.satrs-mib]
|
||||||
version = "0.1.0-alpha.2"
|
# version = "0.1.0-alpha.2"
|
||||||
# path = "../satrs-mib"
|
path = "../satrs-mib"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
dyn_tmtc = []
|
dyn_tmtc = []
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
use std::sync::mpsc::{self, TryRecvError};
|
use std::sync::mpsc::{self, TryRecvError};
|
||||||
|
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use satrs_core::pus::verification::VerificationReporterWithSender;
|
use satrs::pus::verification::VerificationReporterWithSender;
|
||||||
use satrs_core::pus::{EcssTmSender, PusTmWrapper};
|
use satrs::pus::{EcssTmSender, PusTmWrapper};
|
||||||
use satrs_core::spacepackets::ecss::hk::Subservice as HkSubservice;
|
use satrs::spacepackets::ecss::hk::Subservice as HkSubservice;
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
hk::HkRequest,
|
hk::HkRequest,
|
||||||
spacepackets::{
|
spacepackets::{
|
||||||
ecss::tm::{PusTmCreator, PusTmSecondaryHeader},
|
ecss::tm::{PusTmCreator, PusTmSecondaryHeader},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use satrs_core::pus::verification::RequestId;
|
use satrs::pus::verification::RequestId;
|
||||||
use satrs_core::spacepackets::ecss::tc::PusTcCreator;
|
use satrs::spacepackets::ecss::tc::PusTcCreator;
|
||||||
use satrs_core::spacepackets::ecss::tm::PusTmReader;
|
use satrs::spacepackets::ecss::tm::PusTmReader;
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
spacepackets::ecss::{PusPacket, WritablePusPacket},
|
spacepackets::ecss::{PusPacket, WritablePusPacket},
|
||||||
spacepackets::SpHeader,
|
spacepackets::SpHeader,
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use satrs_core::pus::ReceivesEcssPusTc;
|
use satrs::pus::ReceivesEcssPusTc;
|
||||||
use satrs_core::spacepackets::{CcsdsPacket, SpHeader};
|
use satrs::spacepackets::{CcsdsPacket, SpHeader};
|
||||||
use satrs_core::tmtc::{CcsdsPacketHandler, ReceivesCcsdsTc};
|
use satrs::tmtc::{CcsdsPacketHandler, ReceivesCcsdsTc};
|
||||||
use satrs_example::config::PUS_APID;
|
use satrs_example::config::PUS_APID;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
use satrs_core::res_code::ResultU16;
|
use satrs::res_code::ResultU16;
|
||||||
use satrs_mib::res_code::ResultU16Info;
|
use satrs_mib::res_code::ResultU16Info;
|
||||||
use satrs_mib::resultcode;
|
use satrs_mib::resultcode;
|
||||||
use std::net::Ipv4Addr;
|
use std::net::Ipv4Addr;
|
||||||
|
|
||||||
use num_enum::{IntoPrimitive, TryFromPrimitive};
|
use num_enum::{IntoPrimitive, TryFromPrimitive};
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
events::{EventU32TypedSev, SeverityInfo},
|
events::{EventU32TypedSev, SeverityInfo},
|
||||||
pool::{StaticMemoryPool, StaticPoolConfig},
|
pool::{StaticMemoryPool, StaticPoolConfig},
|
||||||
};
|
};
|
||||||
@ -42,20 +42,20 @@ pub mod tmtc_err {
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const INVALID_PUS_SERVICE: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 0);
|
pub const INVALID_PUS_SERVICE: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 0);
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const INVALID_PUS_SUBSERVICE: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 1);
|
pub const INVALID_PUS_SUBSERVICE: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 1);
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const PUS_SERVICE_NOT_IMPLEMENTED: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 2);
|
pub const PUS_SERVICE_NOT_IMPLEMENTED: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 2);
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const UNKNOWN_TARGET_ID: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 3);
|
pub const UNKNOWN_TARGET_ID: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 3);
|
||||||
|
|
||||||
#[resultcode(
|
#[resultcode(
|
||||||
info = "Not enough data inside the TC application data field. Optionally includes: \
|
info = "Not enough data inside the TC application data field. Optionally includes: \
|
||||||
8 bytes of failure data containing 2 failure parameters, \
|
8 bytes of failure data containing 2 failure parameters, \
|
||||||
P1 (u32 big endian): Expected data length, P2: Found data length"
|
P1 (u32 big endian): Expected data length, P2: Found data length"
|
||||||
)]
|
)]
|
||||||
pub const NOT_ENOUGH_APP_DATA: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 2);
|
pub const NOT_ENOUGH_APP_DATA: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 2);
|
||||||
|
|
||||||
pub const TMTC_RESULTS: &[ResultU16Info] = &[
|
pub const TMTC_RESULTS: &[ResultU16Info] = &[
|
||||||
INVALID_PUS_SERVICE_EXT,
|
INVALID_PUS_SERVICE_EXT,
|
||||||
@ -69,13 +69,13 @@ pub mod hk_err {
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const TARGET_ID_MISSING: ResultU16 = ResultU16::const_new(GroupId::Hk as u8, 0);
|
pub const TARGET_ID_MISSING: ResultU16 = ResultU16::new(GroupId::Hk as u8, 0);
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const UNIQUE_ID_MISSING: ResultU16 = ResultU16::const_new(GroupId::Hk as u8, 1);
|
pub const UNIQUE_ID_MISSING: ResultU16 = ResultU16::new(GroupId::Hk as u8, 1);
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const UNKNOWN_TARGET_ID: ResultU16 = ResultU16::const_new(GroupId::Hk as u8, 2);
|
pub const UNKNOWN_TARGET_ID: ResultU16 = ResultU16::new(GroupId::Hk as u8, 2);
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const COLLECTION_INTERVAL_MISSING: ResultU16 = ResultU16::const_new(GroupId::Hk as u8, 3);
|
pub const COLLECTION_INTERVAL_MISSING: ResultU16 = ResultU16::new(GroupId::Hk as u8, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::enum_variant_names)]
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use std::sync::mpsc::{self, SendError};
|
use std::sync::mpsc::{self, SendError};
|
||||||
|
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
event_man::{
|
event_man::{
|
||||||
EventManager, EventManagerWithMpscQueue, MpscEventReceiver, MpscEventU32SendProvider,
|
EventManager, EventManagerWithMpscQueue, MpscEventReceiver, MpscEventU32SendProvider,
|
||||||
SendEventProvider,
|
SendEventProvider,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use derive_new::new;
|
use derive_new::new;
|
||||||
use satrs_core::spacepackets::ByteConversionError;
|
use satrs::spacepackets::ByteConversionError;
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||||
pub enum AcsHkIds {
|
pub enum AcsHkIds {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use derive_new::new;
|
use derive_new::new;
|
||||||
use satrs_core::spacepackets::ecss::tc::IsPusTelecommand;
|
use satrs::spacepackets::ecss::tc::IsPusTelecommand;
|
||||||
use satrs_core::spacepackets::ecss::PusPacket;
|
use satrs::spacepackets::ecss::PusPacket;
|
||||||
use satrs_core::spacepackets::{ByteConversionError, CcsdsPacket};
|
use satrs::spacepackets::{ByteConversionError, CcsdsPacket};
|
||||||
use satrs_core::tmtc::TargetId;
|
use satrs::tmtc::TargetId;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ use crate::pus::stack::PusStack;
|
|||||||
use crate::tm_funnel::{TmFunnelDynamic, TmFunnelStatic};
|
use crate::tm_funnel::{TmFunnelDynamic, TmFunnelStatic};
|
||||||
use log::info;
|
use log::info;
|
||||||
use pus::test::create_test_service_dynamic;
|
use pus::test::create_test_service_dynamic;
|
||||||
use satrs_core::hal::std::tcp_server::ServerConfig;
|
use satrs::hal::std::tcp_server::ServerConfig;
|
||||||
use satrs_core::hal::std::udp_server::UdpTcServer;
|
use satrs::hal::std::udp_server::UdpTcServer;
|
||||||
use satrs_core::tmtc::tm_helper::SharedTmPool;
|
use satrs::tmtc::tm_helper::SharedTmPool;
|
||||||
use satrs_example::config::pool::{create_sched_tc_pool, create_static_pools};
|
use satrs_example::config::pool::{create_sched_tc_pool, create_static_pools};
|
||||||
use satrs_example::config::tasks::{
|
use satrs_example::config::tasks::{
|
||||||
FREQ_MS_AOCS, FREQ_MS_EVENT_HANDLING, FREQ_MS_PUS_STACK, FREQ_MS_UDP_TMTC,
|
FREQ_MS_AOCS, FREQ_MS_EVENT_HANDLING, FREQ_MS_PUS_STACK, FREQ_MS_UDP_TMTC,
|
||||||
@ -41,12 +41,12 @@ use crate::tmtc::{
|
|||||||
PusTcSourceProviderSharedPool, SharedTcPool, TcSourceTaskDynamic, TcSourceTaskStatic,
|
PusTcSourceProviderSharedPool, SharedTcPool, TcSourceTaskDynamic, TcSourceTaskStatic,
|
||||||
};
|
};
|
||||||
use crate::udp::{StaticUdpTmHandler, UdpTmtcServer};
|
use crate::udp::{StaticUdpTmHandler, UdpTmtcServer};
|
||||||
use satrs_core::pus::event_man::EventRequestWithToken;
|
use satrs::pus::event_man::EventRequestWithToken;
|
||||||
use satrs_core::pus::verification::{VerificationReporterCfg, VerificationReporterWithSender};
|
use satrs::pus::verification::{VerificationReporterCfg, VerificationReporterWithSender};
|
||||||
use satrs_core::pus::{EcssTmSender, MpscTmAsVecSender, MpscTmInSharedPoolSender};
|
use satrs::pus::{EcssTmSender, MpscTmAsVecSender, MpscTmInSharedPoolSender};
|
||||||
use satrs_core::spacepackets::{time::cds::TimeProvider, time::TimeWriter};
|
use satrs::spacepackets::{time::cds::TimeProvider, time::TimeWriter};
|
||||||
use satrs_core::tmtc::{CcsdsDistributor, TargetId};
|
use satrs::tmtc::{CcsdsDistributor, TargetId};
|
||||||
use satrs_core::ChannelId;
|
use satrs::ChannelId;
|
||||||
use satrs_example::TargetIdWithApid;
|
use satrs_example::TargetIdWithApid;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::net::{IpAddr, SocketAddr};
|
use std::net::{IpAddr, SocketAddr};
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
use crate::requests::{ActionRequest, Request, RequestWithToken};
|
use crate::requests::{ActionRequest, Request, RequestWithToken};
|
||||||
use log::{error, warn};
|
use log::{error, warn};
|
||||||
use satrs_core::pool::{SharedStaticMemoryPool, StoreAddr};
|
use satrs::pool::{SharedStaticMemoryPool, StoreAddr};
|
||||||
use satrs_core::pus::verification::{
|
use satrs::pus::verification::{
|
||||||
FailParams, TcStateAccepted, VerificationReporterWithSender, VerificationToken,
|
FailParams, TcStateAccepted, VerificationReporterWithSender, VerificationToken,
|
||||||
};
|
};
|
||||||
use satrs_core::pus::{
|
use satrs::pus::{
|
||||||
EcssTcAndToken, EcssTcInMemConverter, EcssTcInSharedStoreConverter, EcssTcInVecConverter,
|
EcssTcAndToken, EcssTcInMemConverter, EcssTcInSharedStoreConverter, EcssTcInVecConverter,
|
||||||
EcssTcReceiver, EcssTmSender, MpscTcReceiver, MpscTmAsVecSender, MpscTmInSharedPoolSender,
|
EcssTcReceiver, EcssTmSender, MpscTcReceiver, MpscTmAsVecSender, MpscTmInSharedPoolSender,
|
||||||
PusPacketHandlerResult, PusPacketHandlingError, PusServiceBase, PusServiceHelper,
|
PusPacketHandlerResult, PusPacketHandlingError, PusServiceBase, PusServiceHelper,
|
||||||
};
|
};
|
||||||
use satrs_core::spacepackets::ecss::tc::PusTcReader;
|
use satrs::spacepackets::ecss::tc::PusTcReader;
|
||||||
use satrs_core::spacepackets::ecss::PusPacket;
|
use satrs::spacepackets::ecss::PusPacket;
|
||||||
use satrs_core::tmtc::tm_helper::SharedTmPool;
|
use satrs::tmtc::tm_helper::SharedTmPool;
|
||||||
use satrs_core::ChannelId;
|
use satrs::ChannelId;
|
||||||
use satrs_example::config::{tmtc_err, TcReceiverId, TmSenderId, PUS_APID};
|
use satrs_example::config::{tmtc_err, TcReceiverId, TmSenderId, PUS_APID};
|
||||||
use satrs_example::TargetIdWithApid;
|
use satrs_example::TargetIdWithApid;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
|
|
||||||
use log::{error, warn};
|
use log::{error, warn};
|
||||||
use satrs_core::pool::{SharedStaticMemoryPool, StoreAddr};
|
use satrs::pool::{SharedStaticMemoryPool, StoreAddr};
|
||||||
use satrs_core::pus::event_man::EventRequestWithToken;
|
use satrs::pus::event_man::EventRequestWithToken;
|
||||||
use satrs_core::pus::event_srv::PusService5EventHandler;
|
use satrs::pus::event_srv::PusService5EventHandler;
|
||||||
use satrs_core::pus::verification::VerificationReporterWithSender;
|
use satrs::pus::verification::VerificationReporterWithSender;
|
||||||
use satrs_core::pus::{
|
use satrs::pus::{
|
||||||
EcssTcAndToken, EcssTcInMemConverter, EcssTcInSharedStoreConverter, EcssTcInVecConverter,
|
EcssTcAndToken, EcssTcInMemConverter, EcssTcInSharedStoreConverter, EcssTcInVecConverter,
|
||||||
MpscTcReceiver, MpscTmAsVecSender, MpscTmInSharedPoolSender, PusPacketHandlerResult,
|
MpscTcReceiver, MpscTmAsVecSender, MpscTmInSharedPoolSender, PusPacketHandlerResult,
|
||||||
PusServiceHelper,
|
PusServiceHelper,
|
||||||
};
|
};
|
||||||
use satrs_core::tmtc::tm_helper::SharedTmPool;
|
use satrs::tmtc::tm_helper::SharedTmPool;
|
||||||
use satrs_core::ChannelId;
|
use satrs::ChannelId;
|
||||||
use satrs_example::config::{TcReceiverId, TmSenderId, PUS_APID};
|
use satrs_example::config::{TcReceiverId, TmSenderId, PUS_APID};
|
||||||
|
|
||||||
pub fn create_event_service_static(
|
pub fn create_event_service_static(
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
use crate::requests::{Request, RequestWithToken};
|
use crate::requests::{Request, RequestWithToken};
|
||||||
use log::{error, warn};
|
use log::{error, warn};
|
||||||
use satrs_core::hk::{CollectionIntervalFactor, HkRequest};
|
use satrs::hk::{CollectionIntervalFactor, HkRequest};
|
||||||
use satrs_core::pool::{SharedStaticMemoryPool, StoreAddr};
|
use satrs::pool::{SharedStaticMemoryPool, StoreAddr};
|
||||||
use satrs_core::pus::verification::{
|
use satrs::pus::verification::{
|
||||||
FailParams, StdVerifReporterWithSender, VerificationReporterWithSender,
|
FailParams, StdVerifReporterWithSender, VerificationReporterWithSender,
|
||||||
};
|
};
|
||||||
use satrs_core::pus::{
|
use satrs::pus::{
|
||||||
EcssTcAndToken, EcssTcInMemConverter, EcssTcInSharedStoreConverter, EcssTcInVecConverter,
|
EcssTcAndToken, EcssTcInMemConverter, EcssTcInSharedStoreConverter, EcssTcInVecConverter,
|
||||||
EcssTcReceiver, EcssTmSender, MpscTcReceiver, MpscTmAsVecSender, MpscTmInSharedPoolSender,
|
EcssTcReceiver, EcssTmSender, MpscTcReceiver, MpscTmAsVecSender, MpscTmInSharedPoolSender,
|
||||||
PusPacketHandlerResult, PusPacketHandlingError, PusServiceBase, PusServiceHelper,
|
PusPacketHandlerResult, PusPacketHandlingError, PusServiceBase, PusServiceHelper,
|
||||||
};
|
};
|
||||||
use satrs_core::spacepackets::ecss::{hk, PusPacket};
|
use satrs::spacepackets::ecss::{hk, PusPacket};
|
||||||
use satrs_core::tmtc::tm_helper::SharedTmPool;
|
use satrs::tmtc::tm_helper::SharedTmPool;
|
||||||
use satrs_core::ChannelId;
|
use satrs::ChannelId;
|
||||||
use satrs_example::config::{hk_err, tmtc_err, TcReceiverId, TmSenderId, PUS_APID};
|
use satrs_example::config::{hk_err, tmtc_err, TcReceiverId, TmSenderId, PUS_APID};
|
||||||
use satrs_example::TargetIdWithApid;
|
use satrs_example::TargetIdWithApid;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
use crate::tmtc::MpscStoreAndSendError;
|
use crate::tmtc::MpscStoreAndSendError;
|
||||||
use log::warn;
|
use log::warn;
|
||||||
use satrs_core::pus::verification::{FailParams, StdVerifReporterWithSender};
|
use satrs::pus::verification::{FailParams, StdVerifReporterWithSender};
|
||||||
use satrs_core::pus::{EcssTcAndToken, PusPacketHandlerResult, TcInMemory};
|
use satrs::pus::{EcssTcAndToken, PusPacketHandlerResult, TcInMemory};
|
||||||
use satrs_core::spacepackets::ecss::tc::PusTcReader;
|
use satrs::spacepackets::ecss::tc::PusTcReader;
|
||||||
use satrs_core::spacepackets::ecss::PusServiceId;
|
use satrs::spacepackets::ecss::PusServiceId;
|
||||||
use satrs_core::spacepackets::time::cds::TimeProvider;
|
use satrs::spacepackets::time::cds::TimeProvider;
|
||||||
use satrs_core::spacepackets::time::TimeWriter;
|
use satrs::spacepackets::time::TimeWriter;
|
||||||
use satrs_example::config::{tmtc_err, CustomPusServiceId};
|
use satrs_example::config::{tmtc_err, CustomPusServiceId};
|
||||||
use std::sync::mpsc::Sender;
|
use std::sync::mpsc::Sender;
|
||||||
|
|
||||||
|
@ -2,17 +2,17 @@ use std::sync::mpsc;
|
|||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use log::{error, info, warn};
|
use log::{error, info, warn};
|
||||||
use satrs_core::pool::{PoolProvider, StaticMemoryPool, StoreAddr};
|
use satrs::pool::{PoolProvider, StaticMemoryPool, StoreAddr};
|
||||||
use satrs_core::pus::scheduler::{PusScheduler, TcInfo};
|
use satrs::pus::scheduler::{PusScheduler, TcInfo};
|
||||||
use satrs_core::pus::scheduler_srv::PusService11SchedHandler;
|
use satrs::pus::scheduler_srv::PusService11SchedHandler;
|
||||||
use satrs_core::pus::verification::VerificationReporterWithSender;
|
use satrs::pus::verification::VerificationReporterWithSender;
|
||||||
use satrs_core::pus::{
|
use satrs::pus::{
|
||||||
EcssTcAndToken, EcssTcInMemConverter, EcssTcInSharedStoreConverter, EcssTcInVecConverter,
|
EcssTcAndToken, EcssTcInMemConverter, EcssTcInSharedStoreConverter, EcssTcInVecConverter,
|
||||||
MpscTcReceiver, MpscTmAsVecSender, MpscTmInSharedPoolSender, PusPacketHandlerResult,
|
MpscTcReceiver, MpscTmAsVecSender, MpscTmInSharedPoolSender, PusPacketHandlerResult,
|
||||||
PusServiceHelper,
|
PusServiceHelper,
|
||||||
};
|
};
|
||||||
use satrs_core::tmtc::tm_helper::SharedTmPool;
|
use satrs::tmtc::tm_helper::SharedTmPool;
|
||||||
use satrs_core::ChannelId;
|
use satrs::ChannelId;
|
||||||
use satrs_example::config::{TcReceiverId, TmSenderId, PUS_APID};
|
use satrs_example::config::{TcReceiverId, TmSenderId, PUS_APID};
|
||||||
|
|
||||||
use crate::tmtc::PusTcSourceProviderSharedPool;
|
use crate::tmtc::PusTcSourceProviderSharedPool;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use satrs_core::pus::EcssTcInMemConverter;
|
use satrs::pus::EcssTcInMemConverter;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
action::Pus8Wrapper, event::Pus5Wrapper, hk::Pus3Wrapper, scheduler::Pus11Wrapper,
|
action::Pus8Wrapper, event::Pus5Wrapper, hk::Pus3Wrapper, scheduler::Pus11Wrapper,
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use satrs_core::params::Params;
|
use satrs::params::Params;
|
||||||
use satrs_core::pool::{SharedStaticMemoryPool, StoreAddr};
|
use satrs::pool::{SharedStaticMemoryPool, StoreAddr};
|
||||||
use satrs_core::pus::test::PusService17TestHandler;
|
use satrs::pus::test::PusService17TestHandler;
|
||||||
use satrs_core::pus::verification::{FailParams, VerificationReporterWithSender};
|
use satrs::pus::verification::{FailParams, VerificationReporterWithSender};
|
||||||
use satrs_core::pus::{
|
use satrs::pus::{
|
||||||
EcssTcAndToken, EcssTcInMemConverter, EcssTcInVecConverter, MpscTcReceiver, MpscTmAsVecSender,
|
EcssTcAndToken, EcssTcInMemConverter, EcssTcInVecConverter, MpscTcReceiver, MpscTmAsVecSender,
|
||||||
MpscTmInSharedPoolSender, PusPacketHandlerResult, PusServiceHelper,
|
MpscTmInSharedPoolSender, PusPacketHandlerResult, PusServiceHelper,
|
||||||
};
|
};
|
||||||
use satrs_core::spacepackets::ecss::tc::PusTcReader;
|
use satrs::spacepackets::ecss::tc::PusTcReader;
|
||||||
use satrs_core::spacepackets::ecss::PusPacket;
|
use satrs::spacepackets::ecss::PusPacket;
|
||||||
use satrs_core::spacepackets::time::cds::TimeProvider;
|
use satrs::spacepackets::time::cds::TimeProvider;
|
||||||
use satrs_core::spacepackets::time::TimeWriter;
|
use satrs::spacepackets::time::TimeWriter;
|
||||||
use satrs_core::tmtc::tm_helper::SharedTmPool;
|
use satrs::tmtc::tm_helper::SharedTmPool;
|
||||||
use satrs_core::ChannelId;
|
use satrs::ChannelId;
|
||||||
use satrs_core::{events::EventU32, pus::EcssTcInSharedStoreConverter};
|
use satrs::{events::EventU32, pus::EcssTcInSharedStoreConverter};
|
||||||
use satrs_example::config::{tmtc_err, TcReceiverId, TmSenderId, PUS_APID, TEST_EVENT};
|
use satrs_example::config::{tmtc_err, TcReceiverId, TmSenderId, PUS_APID, TEST_EVENT};
|
||||||
use std::sync::mpsc::{self, Sender};
|
use std::sync::mpsc::{self, Sender};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use derive_new::new;
|
use derive_new::new;
|
||||||
use satrs_core::hk::HkRequest;
|
use satrs::hk::HkRequest;
|
||||||
use satrs_core::mode::ModeRequest;
|
use satrs::mode::ModeRequest;
|
||||||
use satrs_core::pus::verification::{TcStateAccepted, VerificationToken};
|
use satrs::pus::verification::{TcStateAccepted, VerificationToken};
|
||||||
use satrs_example::TargetIdWithApid;
|
use satrs_example::TargetIdWithApid;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
@ -4,7 +4,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
hal::std::tcp_server::{ServerConfig, TcpSpacepacketsServer},
|
hal::std::tcp_server::{ServerConfig, TcpSpacepacketsServer},
|
||||||
spacepackets::PacketId,
|
spacepackets::PacketId,
|
||||||
tmtc::{CcsdsDistributor, CcsdsError, TmPacketSourceCore},
|
tmtc::{CcsdsDistributor, CcsdsError, TmPacketSourceCore},
|
||||||
|
@ -4,7 +4,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use log::info;
|
use log::info;
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
pool::{PoolProvider, StoreAddr},
|
pool::{PoolProvider, StoreAddr},
|
||||||
seq_count::{CcsdsSimpleSeqCountProvider, SequenceCountProviderCore},
|
seq_count::{CcsdsSimpleSeqCountProvider, SequenceCountProviderCore},
|
||||||
spacepackets::{
|
spacepackets::{
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
use log::warn;
|
use log::warn;
|
||||||
use satrs_core::pus::{EcssTcAndToken, ReceivesEcssPusTc};
|
use satrs::pus::{EcssTcAndToken, ReceivesEcssPusTc};
|
||||||
use satrs_core::spacepackets::SpHeader;
|
use satrs::spacepackets::SpHeader;
|
||||||
use std::sync::mpsc::{self, Receiver, SendError, Sender, TryRecvError};
|
use std::sync::mpsc::{self, Receiver, SendError, Sender, TryRecvError};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
use crate::pus::PusReceiver;
|
use crate::pus::PusReceiver;
|
||||||
use satrs_core::pool::{PoolProvider, SharedStaticMemoryPool, StoreAddr, StoreError};
|
use satrs::pool::{PoolProvider, SharedStaticMemoryPool, StoreAddr, StoreError};
|
||||||
use satrs_core::spacepackets::ecss::tc::PusTcReader;
|
use satrs::spacepackets::ecss::tc::PusTcReader;
|
||||||
use satrs_core::spacepackets::ecss::PusPacket;
|
use satrs::spacepackets::ecss::PusPacket;
|
||||||
use satrs_core::tmtc::ReceivesCcsdsTc;
|
use satrs::tmtc::ReceivesCcsdsTc;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Error)]
|
#[derive(Debug, Clone, PartialEq, Eq, Error)]
|
||||||
pub enum MpscStoreAndSendError {
|
pub enum MpscStoreAndSendError {
|
||||||
@ -133,7 +133,7 @@ impl TcSourceTaskStatic {
|
|||||||
Ok((pus_tc, _)) => {
|
Ok((pus_tc, _)) => {
|
||||||
self.pus_receiver
|
self.pus_receiver
|
||||||
.handle_tc_packet(
|
.handle_tc_packet(
|
||||||
satrs_core::pus::TcInMemory::StoreAddr(addr),
|
satrs::pus::TcInMemory::StoreAddr(addr),
|
||||||
pus_tc.service(),
|
pus_tc.service(),
|
||||||
&pus_tc,
|
&pus_tc,
|
||||||
)
|
)
|
||||||
@ -182,7 +182,7 @@ impl TcSourceTaskDynamic {
|
|||||||
Ok((pus_tc, _)) => {
|
Ok((pus_tc, _)) => {
|
||||||
self.pus_receiver
|
self.pus_receiver
|
||||||
.handle_tc_packet(
|
.handle_tc_packet(
|
||||||
satrs_core::pus::TcInMemory::Vec(tc.clone()),
|
satrs::pus::TcInMemory::Vec(tc.clone()),
|
||||||
pus_tc.service(),
|
pus_tc.service(),
|
||||||
&pus_tc,
|
&pus_tc,
|
||||||
)
|
)
|
||||||
|
@ -4,7 +4,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
hal::std::udp_server::{ReceiveResult, UdpTcServer},
|
hal::std::udp_server::{ReceiveResult, UdpTcServer},
|
||||||
pool::{PoolProviderWithGuards, SharedStaticMemoryPool, StoreAddr},
|
pool::{PoolProviderWithGuards, SharedStaticMemoryPool, StoreAddr},
|
||||||
tmtc::CcsdsError,
|
tmtc::CcsdsError,
|
||||||
@ -113,7 +113,7 @@ mod tests {
|
|||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
|
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
spacepackets::{
|
spacepackets::{
|
||||||
ecss::{tc::PusTcCreator, WritablePusPacket},
|
ecss::{tc::PusTcCreator, WritablePusPacket},
|
||||||
SpHeader,
|
SpHeader,
|
||||||
|
@ -7,7 +7,7 @@ authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
|||||||
description = """
|
description = """
|
||||||
Helper crate of the sat-rs framework to build a mission information base (MIB) from the
|
Helper crate of the sat-rs framework to build a mission information base (MIB) from the
|
||||||
On-Board Software (OBSW) code directly."""
|
On-Board Software (OBSW) code directly."""
|
||||||
homepage = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
homepage = "https://absatsw.uni-stuttgart.de/projects/sat-rs"
|
||||||
repository = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
repository = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
keywords = ["no-std", "space", "aerospace"]
|
keywords = ["no-std", "space", "aerospace"]
|
||||||
@ -22,16 +22,14 @@ serde-hex = "0.1.0"
|
|||||||
version = "1"
|
version = "1"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.satrs-core]
|
[dependencies.satrs-shared]
|
||||||
version = "0.1.0-alpha.3"
|
# version = "0.1.0"
|
||||||
# path = "../satrs-core"
|
path = "../satrs-shared"
|
||||||
# git = "https://egit.irs.uni-stuttgart.de/rust/sat-rs.git"
|
features = ["serde"]
|
||||||
# branch = "main"
|
|
||||||
# rev = "35e1f7a983f6535c5571186e361fe101d4306b89"
|
|
||||||
|
|
||||||
[dependencies.satrs-mib-codegen]
|
[dependencies.satrs-mib-codegen]
|
||||||
path = "codegen"
|
path = "codegen"
|
||||||
version = "0.1.0-alpha.2"
|
version = "0.1.0"
|
||||||
|
|
||||||
[dependencies.serde]
|
[dependencies.serde]
|
||||||
version = "1"
|
version = "1"
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
satrs-mib
|
satrs-mib
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
This helper crate contains the procedural macros for the sat-rs framework.
|
||||||
|
You can find more information on the [homepage](https://egit.irs.uni-stuttgart.de/rust/sat-rs).
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "satrs-mib-codegen"
|
name = "satrs-mib-codegen"
|
||||||
version = "0.1.0-alpha.2"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "satrs-mib proc macro implementation"
|
description = "satrs-mib proc macro implementation"
|
||||||
homepage = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
homepage = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
||||||
@ -19,12 +19,10 @@ path = "tests/tests.rs"
|
|||||||
quote = "1"
|
quote = "1"
|
||||||
proc-macro2 = "1"
|
proc-macro2 = "1"
|
||||||
|
|
||||||
[dependencies.satrs-core]
|
[dependencies.syn]
|
||||||
version = "0.1.0-alpha.3"
|
version = "2"
|
||||||
# path = "../../satrs-core"
|
features = ["full"]
|
||||||
# git = "https://egit.irs.uni-stuttgart.de/rust/sat-rs.git"
|
|
||||||
# branch = "main"
|
|
||||||
# rev = "35e1f7a983f6535c5571186e361fe101d4306b89"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
trybuild = { version = "1", features = ["diff"] }
|
trybuild = { version = "1", features = ["diff"] }
|
||||||
@ -32,6 +30,6 @@ trybuild = { version = "1", features = ["diff"] }
|
|||||||
[dev-dependencies.satrs-mib]
|
[dev-dependencies.satrs-mib]
|
||||||
path = ".."
|
path = ".."
|
||||||
|
|
||||||
[dependencies.syn]
|
[dev-dependencies.satrs-shared]
|
||||||
version = "2"
|
# version = "0.1.0"
|
||||||
features = ["full"]
|
path = "../../satrs-shared"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
//! Basic check which just verifies that everything compiles
|
//! Basic check which just verifies that everything compiles
|
||||||
use satrs_core::res_code::ResultU16;
|
|
||||||
use satrs_mib::resultcode;
|
use satrs_mib::resultcode;
|
||||||
|
use satrs_shared::res_code::ResultU16;
|
||||||
|
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
const _TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
|
const _TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
//! Basic check which just verifies that everything compiles
|
//! Basic check which just verifies that everything compiles
|
||||||
use satrs_core::res_code::ResultU16;
|
|
||||||
use satrs_mib::resultcode;
|
use satrs_mib::resultcode;
|
||||||
|
use satrs_shared::res_code::ResultU16;
|
||||||
|
|
||||||
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
||||||
const _TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
|
const _TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use satrs_core::res_code::ResultU16;
|
|
||||||
use satrs_mib::res_code::ResultU16Info;
|
use satrs_mib::res_code::ResultU16Info;
|
||||||
use satrs_mib::resultcode;
|
use satrs_mib::resultcode;
|
||||||
|
use satrs_shared::res_code::ResultU16;
|
||||||
|
|
||||||
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
||||||
const TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
|
const TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
|
||||||
// Create named reference of auto-generated struct, which can be used by IDEs etc.
|
// Create named reference of auto-generated struct, which can be used by IDEs etc.
|
||||||
const TEST_RESULT_EXT_REF: &ResultU16Info = &TEST_RESULT_EXT;
|
const TEST_RESULT_EXT_REF: &ResultU16Info = &TEST_RESULT_EXT;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
pub use stdmod::*;
|
pub use stdmod::*;
|
||||||
|
|
||||||
pub use satrs_core::res_code::ResultU16;
|
pub use satrs_shared::res_code::ResultU16;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_hex::{SerHex, StrictCapPfx};
|
use serde_hex::{SerHex, StrictCapPfx};
|
||||||
@ -96,8 +96,8 @@ mod tests {
|
|||||||
// Special solution for this crate because the code generated by a macro will use
|
// Special solution for this crate because the code generated by a macro will use
|
||||||
// satrs_mib::res_code::*
|
// satrs_mib::res_code::*
|
||||||
use crate as satrs_mib;
|
use crate as satrs_mib;
|
||||||
use satrs_core::res_code::ResultU16;
|
|
||||||
use satrs_mib::resultcode;
|
use satrs_mib::resultcode;
|
||||||
|
use satrs_shared::res_code::ResultU16;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
@ -106,12 +106,12 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const INVALID_PUS_SERVICE: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 0);
|
pub const INVALID_PUS_SERVICE: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 0);
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const INVALID_PUS_SUBSERVICE: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 1);
|
pub const INVALID_PUS_SUBSERVICE: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 1);
|
||||||
|
|
||||||
#[resultcode(info = "Not enough data inside the TC application data field")]
|
#[resultcode(info = "Not enough data inside the TC application data field")]
|
||||||
pub const NOT_ENOUGH_APP_DATA: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 2);
|
pub const NOT_ENOUGH_APP_DATA: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 2);
|
||||||
|
|
||||||
pub const TMTC_RESULTS: &[ResultU16Info] = &[
|
pub const TMTC_RESULTS: &[ResultU16Info] = &[
|
||||||
INVALID_PUS_SERVICE_EXT,
|
INVALID_PUS_SERVICE_EXT,
|
||||||
@ -119,12 +119,12 @@ mod tests {
|
|||||||
NOT_ENOUGH_APP_DATA_EXT,
|
NOT_ENOUGH_APP_DATA_EXT,
|
||||||
];
|
];
|
||||||
|
|
||||||
const CSV_NAME: &'static str = "dummy.csv";
|
const CSV_NAME: &str = "dummy.csv";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_printout() {
|
fn test_printout() {
|
||||||
let mut wtrb = csv::WriterBuilder::new();
|
let mut wtrb = csv::WriterBuilder::new();
|
||||||
wtrb.delimiter(';' as u8);
|
wtrb.delimiter(b';');
|
||||||
print_resultcodes_as_csv(wtrb, TMTC_RESULTS).expect("Priting result codes failed");
|
print_resultcodes_as_csv(wtrb, TMTC_RESULTS).expect("Priting result codes failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ mod tests {
|
|||||||
let csvpath = Path::new(CSV_NAME);
|
let csvpath = Path::new(CSV_NAME);
|
||||||
let mut wtrb = csv::WriterBuilder::new();
|
let mut wtrb = csv::WriterBuilder::new();
|
||||||
let file = File::create(csvpath).expect("Creating CSV file failed");
|
let file = File::create(csvpath).expect("Creating CSV file failed");
|
||||||
wtrb.delimiter(';' as u8);
|
wtrb.delimiter(b';');
|
||||||
write_resultcodes_to_csv(wtrb, TMTC_RESULTS, file).expect("CSV export failed");
|
write_resultcodes_to_csv(wtrb, TMTC_RESULTS, file).expect("CSV export failed");
|
||||||
assert!(csvpath.exists());
|
assert!(csvpath.exists());
|
||||||
let file = File::open(csvpath).expect("Opening CSV file failed");
|
let file = File::open(csvpath).expect("Opening CSV file failed");
|
||||||
|
18
satrs-shared/CHANGELOG.md
Normal file
18
satrs-shared/CHANGELOG.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Change Log
|
||||||
|
=======
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v0.1.1] 2024-02-12
|
||||||
|
|
||||||
|
- Added missing `#![no_std]` attribute for library
|
||||||
|
- Fixed unit tests
|
||||||
|
|
||||||
|
# [v0.1.0] 2024-02-12
|
||||||
|
|
||||||
|
Initial release.
|
28
satrs-shared/Cargo.toml
Normal file
28
satrs-shared/Cargo.toml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
[package]
|
||||||
|
name = "satrs-shared"
|
||||||
|
description = "Components shared by multiple sat-rs crates"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||||
|
homepage = "https://absatsw.uni-stuttgart.de/projects/sat-rs"
|
||||||
|
repository = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
||||||
|
license = "Apache-2.0"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
|
||||||
|
[dependencies.serde]
|
||||||
|
version = "1"
|
||||||
|
default-features = false
|
||||||
|
optional = true
|
||||||
|
|
||||||
|
[dependencies.spacepackets]
|
||||||
|
version = "0.9"
|
||||||
|
default-features = false
|
||||||
|
|
||||||
|
[features]
|
||||||
|
serde = ["dep:serde", "spacepackets/serde"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]
|
5
satrs-shared/README.md
Normal file
5
satrs-shared/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
satrs-shared
|
||||||
|
=========
|
||||||
|
|
||||||
|
Subcrate for some shared sat-rs framework components not expected to change very often.
|
||||||
|
You can find more information on the [homepage](https://egit.irs.uni-stuttgart.de/rust/sat-rs).
|
3
satrs-shared/src/lib.rs
Normal file
3
satrs-shared/src/lib.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
//! This library contains modules shared amongst various sat-rs framework crates.
|
||||||
|
#![no_std]
|
||||||
|
pub mod res_code;
|
@ -4,6 +4,7 @@ use spacepackets::ecss::{EcssEnumU16, EcssEnumeration};
|
|||||||
use spacepackets::util::UnsignedEnum;
|
use spacepackets::util::UnsignedEnum;
|
||||||
use spacepackets::ByteConversionError;
|
use spacepackets::ByteConversionError;
|
||||||
|
|
||||||
|
/// Simple [u16] based result code type which also allows to group related resultcodes.
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
pub struct ResultU16 {
|
pub struct ResultU16 {
|
||||||
@ -12,7 +13,7 @@ pub struct ResultU16 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ResultU16 {
|
impl ResultU16 {
|
||||||
pub const fn const_new(group_id: u8, unique_id: u8) -> Self {
|
pub const fn new(group_id: u8, unique_id: u8) -> Self {
|
||||||
Self {
|
Self {
|
||||||
group_id,
|
group_id,
|
||||||
unique_id,
|
unique_id,
|
||||||
@ -58,3 +59,26 @@ impl EcssEnumeration for ResultU16 {
|
|||||||
16
|
16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
const RESULT_CODE_CONST: ResultU16 = ResultU16::new(1, 1);
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
pub fn test_basic() {
|
||||||
|
let result_code = ResultU16::new(1, 1);
|
||||||
|
assert_eq!(result_code.unique_id(), 1);
|
||||||
|
assert_eq!(result_code.group_id(), 1);
|
||||||
|
assert_eq!(result_code, RESULT_CODE_CONST);
|
||||||
|
assert_eq!(result_code.raw(), (1_u16 << 8) | 1);
|
||||||
|
assert_eq!(result_code.pfc(), 16);
|
||||||
|
assert_eq!(result_code.size(), 2);
|
||||||
|
let mut buf: [u8; 2] = [0; 2];
|
||||||
|
let written = result_code.write_to_be_bytes(&mut buf).unwrap();
|
||||||
|
assert_eq!(written, 2);
|
||||||
|
assert_eq!(buf[0], 1);
|
||||||
|
assert_eq!(buf[1], 1);
|
||||||
|
}
|
||||||
|
}
|
@ -1,16 +1,16 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "satrs-core"
|
name = "satrs"
|
||||||
version = "0.1.0-alpha.3"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.61"
|
rust-version = "1.61"
|
||||||
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||||
description = "Core components of the sat-rs framework to build software for remote systems"
|
description = "A framework to build software for remote systems"
|
||||||
homepage = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
homepage = "https://absatsw.uni-stuttgart.de/projects/sat-rs"
|
||||||
repository = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
repository = "https://egit.irs.uni-stuttgart.de/rust/sat-rs"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
keywords = ["no-std", "space", "aerospace"]
|
keywords = ["no-std", "space", "aerospace"]
|
||||||
categories = ["aerospace", "aerospace::space-protocols", "no-std", "hardware-support", "embedded"]
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
categories = ["aerospace", "aerospace::space-protocols", "no-std", "hardware-support", "embedded"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
delegate = ">0.7, <=0.10"
|
delegate = ">0.7, <=0.10"
|
||||||
@ -70,12 +70,13 @@ version = "0.5.4"
|
|||||||
features = ["all"]
|
features = ["all"]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
|
[dependencies.satrs-shared]
|
||||||
|
# version = "0.1.0"
|
||||||
|
path = "../satrs-shared"
|
||||||
|
|
||||||
[dependencies.spacepackets]
|
[dependencies.spacepackets]
|
||||||
version = "0.9.0"
|
version = "0.9"
|
||||||
default-features = false
|
default-features = false
|
||||||
# git = "https://egit.irs.uni-stuttgart.de/rust/spacepackets.git"
|
|
||||||
# rev = "297cfad22637d3b07a1b27abe56d9a607b5b82a7"
|
|
||||||
# branch = "main"
|
|
||||||
|
|
||||||
[dependencies.cobs]
|
[dependencies.cobs]
|
||||||
git = "https://github.com/robamu/cobs.rs.git"
|
git = "https://github.com/robamu/cobs.rs.git"
|
201
satrs/LICENSE-APACHE
Normal file
201
satrs/LICENSE-APACHE
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
1
satrs/NOTICE
Normal file
1
satrs/NOTICE
Normal file
@ -0,0 +1 @@
|
|||||||
|
This software contains code developed at the University of Stuttgart's Institute of Space Systems.
|
@ -5,5 +5,4 @@ satrs-core
|
|||||||
======
|
======
|
||||||
|
|
||||||
This crate contains the core components of the sat-rs framework.
|
This crate contains the core components of the sat-rs framework.
|
||||||
You can find more information on [homepage](https://egit.irs.uni-stuttgart.de/rust/sat-rs).
|
You can find more information on the [homepage](https://egit.irs.uni-stuttgart.de/rust/sat-rs).
|
||||||
|
|
@ -13,7 +13,7 @@ use cobs::{decode_in_place, encode, max_encoding_length};
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// use cobs::decode_in_place_report;
|
/// use cobs::decode_in_place_report;
|
||||||
/// use satrs_core::encoding::{encode_packet_with_cobs};
|
/// use satrs::encoding::{encode_packet_with_cobs};
|
||||||
//
|
//
|
||||||
/// const SIMPLE_PACKET: [u8; 5] = [1, 2, 3, 4, 5];
|
/// const SIMPLE_PACKET: [u8; 5] = [1, 2, 3, 4, 5];
|
||||||
/// const INVERTED_PACKET: [u8; 5] = [5, 4, 3, 2, 1];
|
/// const INVERTED_PACKET: [u8; 5] = [5, 4, 3, 2, 1];
|
@ -18,7 +18,7 @@
|
|||||||
//! # Examples
|
//! # Examples
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! use satrs_core::events::{EventU16, EventU32, EventU32TypedSev, Severity, SeverityHigh, SeverityInfo};
|
//! use satrs::events::{EventU16, EventU32, EventU32TypedSev, Severity, SeverityHigh, SeverityInfo};
|
||||||
//!
|
//!
|
||||||
//! const MSG_RECVD: EventU32TypedSev<SeverityInfo> = EventU32TypedSev::const_new(1, 0);
|
//! const MSG_RECVD: EventU32TypedSev<SeverityInfo> = EventU32TypedSev::const_new(1, 0);
|
||||||
//! const MSG_FAILED: EventU32 = EventU32::const_new(Severity::LOW, 1, 1);
|
//! const MSG_FAILED: EventU32 = EventU32::const_new(Severity::LOW, 1, 1);
|
@ -20,8 +20,8 @@ use std::vec::Vec;
|
|||||||
/// ```
|
/// ```
|
||||||
/// use std::net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket};
|
/// use std::net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket};
|
||||||
/// use spacepackets::ecss::WritablePusPacket;
|
/// use spacepackets::ecss::WritablePusPacket;
|
||||||
/// use satrs_core::hal::std::udp_server::UdpTcServer;
|
/// use satrs::hal::std::udp_server::UdpTcServer;
|
||||||
/// use satrs_core::tmtc::{ReceivesTc, ReceivesTcCore};
|
/// use satrs::tmtc::{ReceivesTc, ReceivesTcCore};
|
||||||
/// use spacepackets::SpHeader;
|
/// use spacepackets::SpHeader;
|
||||||
/// use spacepackets::ecss::tc::PusTcCreator;
|
/// use spacepackets::ecss::tc::PusTcCreator;
|
||||||
///
|
///
|
@ -1,4 +1,4 @@
|
|||||||
//! # Core components of the sat-rs framework
|
//! # sat-rs: A framework to build on-board software for remote systems
|
||||||
//!
|
//!
|
||||||
//! You can find more information about the sat-rs framework on the
|
//! You can find more information about the sat-rs framework on the
|
||||||
//! [homepage](https://egit.irs.uni-stuttgart.de/rust/sat-rs).
|
//! [homepage](https://egit.irs.uni-stuttgart.de/rust/sat-rs).
|
@ -10,7 +10,7 @@
|
|||||||
//! ```rust
|
//! ```rust
|
||||||
//! use std::any::Any;
|
//! use std::any::Any;
|
||||||
//! use std::error::Error;
|
//! use std::error::Error;
|
||||||
//! use satrs_core::objects::{ManagedSystemObject, ObjectId, ObjectManager, SystemObject};
|
//! use satrs::objects::{ManagedSystemObject, ObjectId, ObjectManager, SystemObject};
|
||||||
//!
|
//!
|
||||||
//! struct ExampleSysObj {
|
//! struct ExampleSysObj {
|
||||||
//! id: ObjectId,
|
//! id: ObjectId,
|
@ -13,7 +13,7 @@
|
|||||||
//! ## Example for primitive type wrapper
|
//! ## Example for primitive type wrapper
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! use satrs_core::params::{ParamsRaw, ToBeBytes, U32Pair, WritableToBeBytes};
|
//! use satrs::params::{ParamsRaw, ToBeBytes, U32Pair, WritableToBeBytes};
|
||||||
//!
|
//!
|
||||||
//! let u32_pair = U32Pair(0x1010, 25);
|
//! let u32_pair = U32Pair(0x1010, 25);
|
||||||
//! assert_eq!(u32_pair.0, 0x1010);
|
//! assert_eq!(u32_pair.0, 0x1010);
|
@ -10,7 +10,7 @@
|
|||||||
//! # Example for the [StaticMemoryPool]
|
//! # Example for the [StaticMemoryPool]
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! use satrs_core::pool::{PoolProvider, StaticMemoryPool, StaticPoolConfig};
|
//! use satrs::pool::{PoolProvider, StaticMemoryPool, StaticPoolConfig};
|
||||||
//!
|
//!
|
||||||
//! // 4 buckets of 4 bytes, 2 of 8 bytes and 1 of 16 bytes
|
//! // 4 buckets of 4 bytes, 2 of 8 bytes and 1 of 16 bytes
|
||||||
//! let pool_cfg = StaticPoolConfig::new(vec![(4, 4), (2, 8), (1, 16)], false);
|
//! let pool_cfg = StaticPoolConfig::new(vec![(4, 4), (2, 8), (1, 16)], false);
|
@ -8,7 +8,7 @@ use spacepackets::time::cds::TimeProvider;
|
|||||||
|
|
||||||
/// This is a helper class for [std] environments to handle generic PUS 11 (scheduling service)
|
/// This is a helper class for [std] environments to handle generic PUS 11 (scheduling service)
|
||||||
/// packets. This handler is able to handle the most important PUS requests for a scheduling
|
/// packets. This handler is able to handle the most important PUS requests for a scheduling
|
||||||
/// service which provides the [PusSchedulerInterface].
|
/// service which provides the [PusSchedulerProvider].
|
||||||
///
|
///
|
||||||
/// Please note that this class does not do the regular periodic handling like releasing any
|
/// Please note that this class does not do the regular periodic handling like releasing any
|
||||||
/// telecommands inside the scheduler. The user can retrieve the wrapped scheduler via the
|
/// telecommands inside the scheduler. The user can retrieve the wrapped scheduler via the
|
@ -15,11 +15,11 @@
|
|||||||
//! ```
|
//! ```
|
||||||
//! use std::sync::{Arc, mpsc, RwLock};
|
//! use std::sync::{Arc, mpsc, RwLock};
|
||||||
//! use std::time::Duration;
|
//! use std::time::Duration;
|
||||||
//! use satrs_core::pool::{PoolProviderWithGuards, StaticMemoryPool, StaticPoolConfig};
|
//! use satrs::pool::{PoolProviderWithGuards, StaticMemoryPool, StaticPoolConfig};
|
||||||
//! use satrs_core::pus::verification::{VerificationReporterCfg, VerificationReporterWithSender};
|
//! use satrs::pus::verification::{VerificationReporterCfg, VerificationReporterWithSender};
|
||||||
//! use satrs_core::seq_count::SeqCountProviderSimple;
|
//! use satrs::seq_count::SeqCountProviderSimple;
|
||||||
//! use satrs_core::pus::MpscTmInSharedPoolSender;
|
//! use satrs::pus::MpscTmInSharedPoolSender;
|
||||||
//! use satrs_core::tmtc::tm_helper::SharedTmPool;
|
//! use satrs::tmtc::tm_helper::SharedTmPool;
|
||||||
//! use spacepackets::ecss::PusPacket;
|
//! use spacepackets::ecss::PusPacket;
|
||||||
//! use spacepackets::SpHeader;
|
//! use spacepackets::SpHeader;
|
||||||
//! use spacepackets::ecss::tc::{PusTcCreator, PusTcSecondaryHeader};
|
//! use spacepackets::ecss::tc::{PusTcCreator, PusTcSecondaryHeader};
|
1
satrs/src/res_code.rs
Normal file
1
satrs/src/res_code.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
pub use satrs_shared::res_code::*;
|
@ -18,8 +18,8 @@
|
|||||||
//! # Example
|
//! # Example
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use satrs_core::tmtc::ccsds_distrib::{CcsdsPacketHandler, CcsdsDistributor};
|
//! use satrs::tmtc::ccsds_distrib::{CcsdsPacketHandler, CcsdsDistributor};
|
||||||
//! use satrs_core::tmtc::{ReceivesTc, ReceivesTcCore};
|
//! use satrs::tmtc::{ReceivesTc, ReceivesTcCore};
|
||||||
//! use spacepackets::{CcsdsPacket, SpHeader};
|
//! use spacepackets::{CcsdsPacket, SpHeader};
|
||||||
//! use spacepackets::ecss::WritablePusPacket;
|
//! use spacepackets::ecss::WritablePusPacket;
|
||||||
//! use spacepackets::ecss::tc::{PusTc, PusTcCreator};
|
//! use spacepackets::ecss::tc::{PusTc, PusTcCreator};
|
@ -19,8 +19,8 @@
|
|||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use spacepackets::ecss::WritablePusPacket;
|
//! use spacepackets::ecss::WritablePusPacket;
|
||||||
//! use satrs_core::tmtc::pus_distrib::{PusDistributor, PusServiceProvider};
|
//! use satrs::tmtc::pus_distrib::{PusDistributor, PusServiceProvider};
|
||||||
//! use satrs_core::tmtc::{ReceivesTc, ReceivesTcCore};
|
//! use satrs::tmtc::{ReceivesTc, ReceivesTcCore};
|
||||||
//! use spacepackets::SpHeader;
|
//! use spacepackets::SpHeader;
|
||||||
//! use spacepackets::ecss::tc::{PusTcCreator, PusTcReader};
|
//! use spacepackets::ecss::tc::{PusTcCreator, PusTcReader};
|
||||||
//! struct ConcretePusHandler {
|
//! struct ConcretePusHandler {
|
@ -1,4 +1,4 @@
|
|||||||
use satrs_core::pool::{PoolGuard, PoolProvider, StaticMemoryPool, StaticPoolConfig, StoreAddr};
|
use satrs::pool::{PoolGuard, PoolProvider, StaticMemoryPool, StaticPoolConfig, StoreAddr};
|
||||||
use std::ops::DerefMut;
|
use std::ops::DerefMut;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
use std::sync::mpsc::{Receiver, Sender};
|
use std::sync::mpsc::{Receiver, Sender};
|
@ -1,6 +1,6 @@
|
|||||||
#![allow(dead_code, unused_imports)]
|
#![allow(dead_code, unused_imports)]
|
||||||
|
|
||||||
use satrs_core::events::{
|
use satrs::events::{
|
||||||
EventU32, EventU32TypedSev, GenericEvent, HasSeverity, LargestEventRaw, LargestGroupIdRaw,
|
EventU32, EventU32TypedSev, GenericEvent, HasSeverity, LargestEventRaw, LargestGroupIdRaw,
|
||||||
Severity, SeverityInfo, SeverityLow, SeverityMedium,
|
Severity, SeverityInfo, SeverityLow, SeverityMedium,
|
||||||
};
|
};
|
@ -1,13 +1,11 @@
|
|||||||
use satrs_core::event_man::{
|
use satrs::event_man::{
|
||||||
EventManagerWithMpscQueue, MpscEventU32Receiver, MpscEventU32SendProvider, SendEventProvider,
|
EventManagerWithMpscQueue, MpscEventU32Receiver, MpscEventU32SendProvider, SendEventProvider,
|
||||||
};
|
};
|
||||||
use satrs_core::events::{EventU32, EventU32TypedSev, Severity, SeverityInfo};
|
use satrs::events::{EventU32, EventU32TypedSev, Severity, SeverityInfo};
|
||||||
use satrs_core::params::U32Pair;
|
use satrs::params::U32Pair;
|
||||||
use satrs_core::params::{Params, ParamsHeapless, WritableToBeBytes};
|
use satrs::params::{Params, ParamsHeapless, WritableToBeBytes};
|
||||||
use satrs_core::pus::event_man::{
|
use satrs::pus::event_man::{DefaultPusMgmtBackendProvider, EventReporter, PusEventDispatcher};
|
||||||
DefaultPusMgmtBackendProvider, EventReporter, PusEventDispatcher,
|
use satrs::pus::MpscTmAsVecSender;
|
||||||
};
|
|
||||||
use satrs_core::pus::MpscTmAsVecSender;
|
|
||||||
use spacepackets::ecss::tm::PusTmReader;
|
use spacepackets::ecss::tm::PusTmReader;
|
||||||
use spacepackets::ecss::{PusError, PusPacket};
|
use spacepackets::ecss::{PusError, PusPacket};
|
||||||
use std::sync::mpsc::{channel, SendError, TryRecvError};
|
use std::sync::mpsc::{channel, SendError, TryRecvError};
|
@ -1,14 +1,12 @@
|
|||||||
//#[cfg(feature = "crossbeam")]
|
//#[cfg(feature = "crossbeam")]
|
||||||
pub mod crossbeam_test {
|
pub mod crossbeam_test {
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use satrs_core::pool::{
|
use satrs::pool::{PoolProvider, PoolProviderWithGuards, StaticMemoryPool, StaticPoolConfig};
|
||||||
PoolProvider, PoolProviderWithGuards, StaticMemoryPool, StaticPoolConfig,
|
use satrs::pus::verification::{
|
||||||
};
|
|
||||||
use satrs_core::pus::verification::{
|
|
||||||
FailParams, RequestId, VerificationReporterCfg, VerificationReporterWithSender,
|
FailParams, RequestId, VerificationReporterCfg, VerificationReporterWithSender,
|
||||||
};
|
};
|
||||||
use satrs_core::pus::CrossbeamTmInStoreSender;
|
use satrs::pus::CrossbeamTmInStoreSender;
|
||||||
use satrs_core::tmtc::tm_helper::SharedTmPool;
|
use satrs::tmtc::tm_helper::SharedTmPool;
|
||||||
use spacepackets::ecss::tc::{PusTcCreator, PusTcReader, PusTcSecondaryHeader};
|
use spacepackets::ecss::tc::{PusTcCreator, PusTcReader, PusTcSecondaryHeader};
|
||||||
use spacepackets::ecss::tm::PusTmReader;
|
use spacepackets::ecss::tm::PusTmReader;
|
||||||
use spacepackets::ecss::{EcssEnumU16, EcssEnumU8, PusPacket, WritablePusPacket};
|
use spacepackets::ecss::{EcssEnumU16, EcssEnumU8, PusPacket, WritablePusPacket};
|
@ -22,7 +22,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use hashbrown::HashSet;
|
use hashbrown::HashSet;
|
||||||
use satrs_core::{
|
use satrs::{
|
||||||
encoding::cobs::encode_packet_with_cobs,
|
encoding::cobs::encode_packet_with_cobs,
|
||||||
hal::std::tcp_server::{ServerConfig, TcpSpacepacketsServer, TcpTmtcInCobsServer},
|
hal::std::tcp_server::{ServerConfig, TcpSpacepacketsServer, TcpTmtcInCobsServer},
|
||||||
tmtc::{ReceivesTcCore, TmPacketSourceCore},
|
tmtc::{ReceivesTcCore, TmPacketSourceCore},
|
Loading…
Reference in New Issue
Block a user