restore no_std compatibility
All checks were successful
Rust/sat-rs/pipeline/pr-main This commit looks good
All checks were successful
Rust/sat-rs/pipeline/pr-main This commit looks good
This commit is contained in:
parent
b30375b14a
commit
849ce723e3
@ -141,26 +141,6 @@ pub struct EventManager<
|
|||||||
phantom: core::marker::PhantomData<(SP, EV, AUX)>,
|
phantom: core::marker::PhantomData<(SP, EV, AUX)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper type which constrains the sender map and listener map generics to the [DefaultSenderMap]
|
|
||||||
/// and the [DefaultListenerMap]. It uses regular mpsc channels as the message queue backend.
|
|
||||||
pub type EventManagerWithMpsc<EV = EventU32, AUX = Params> = EventManager<
|
|
||||||
MpscEventReceiver,
|
|
||||||
DefaultSenderMap<EventSenderMpsc<EV>, EV, AUX>,
|
|
||||||
DefaultListenerMap,
|
|
||||||
EventSenderMpsc<EV>,
|
|
||||||
>;
|
|
||||||
|
|
||||||
/// Helper type which constrains the sender map and listener map generics to the [DefaultSenderMap]
|
|
||||||
/// and the [DefaultListenerMap]. It uses
|
|
||||||
/// [bounded mpsc senders](https://doc.rust-lang.org/std/sync/mpsc/struct.SyncSender.html) as the
|
|
||||||
/// message queue backend.
|
|
||||||
pub type EventManagerWithBoundedMpsc<EV = EventU32, AUX = Params> = EventManager<
|
|
||||||
MpscEventReceiver,
|
|
||||||
DefaultSenderMap<EventSenderMpscBounded<EV>, EV, AUX>,
|
|
||||||
DefaultListenerMap,
|
|
||||||
EventSenderMpscBounded<EV>,
|
|
||||||
>;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum EventRoutingResult<EV: GenericEvent, AUX> {
|
pub enum EventRoutingResult<EV: GenericEvent, AUX> {
|
||||||
/// No event was received
|
/// No event was received
|
||||||
@ -322,6 +302,26 @@ pub mod alloc_mod {
|
|||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
/// Helper type which constrains the sender map and listener map generics to the [DefaultSenderMap]
|
||||||
|
/// and the [DefaultListenerMap]. It uses regular mpsc channels as the message queue backend.
|
||||||
|
pub type EventManagerWithMpsc<EV = EventU32, AUX = Params> = EventManager<
|
||||||
|
MpscEventReceiver,
|
||||||
|
DefaultSenderMap<EventSenderMpsc<EV>, EV, AUX>,
|
||||||
|
DefaultListenerMap,
|
||||||
|
EventSenderMpsc<EV>,
|
||||||
|
>;
|
||||||
|
|
||||||
|
/// Helper type which constrains the sender map and listener map generics to the [DefaultSenderMap]
|
||||||
|
/// and the [DefaultListenerMap]. It uses
|
||||||
|
/// [bounded mpsc senders](https://doc.rust-lang.org/std/sync/mpsc/struct.SyncSender.html) as the
|
||||||
|
/// message queue backend.
|
||||||
|
pub type EventManagerWithBoundedMpsc<EV = EventU32, AUX = Params> = EventManager<
|
||||||
|
MpscEventReceiver,
|
||||||
|
DefaultSenderMap<EventSenderMpscBounded<EV>, EV, AUX>,
|
||||||
|
DefaultListenerMap,
|
||||||
|
EventSenderMpscBounded<EV>,
|
||||||
|
>;
|
||||||
|
|
||||||
impl<
|
impl<
|
||||||
ER: EventReceiveProvider<EV, AUX>,
|
ER: EventReceiveProvider<EV, AUX>,
|
||||||
SP: EventSendProvider<EV, AUX>,
|
SP: EventSendProvider<EV, AUX>,
|
||||||
|
@ -43,20 +43,19 @@
|
|||||||
//! This includes the [ParamsHeapless] enumeration for contained values which do not require heap
|
//! This includes the [ParamsHeapless] enumeration for contained values which do not require heap
|
||||||
//! allocation, and the [Params] which enumerates [ParamsHeapless] and some additional types which
|
//! allocation, and the [Params] which enumerates [ParamsHeapless] and some additional types which
|
||||||
//! require [alloc] support but allow for more flexbility.
|
//! require [alloc] support but allow for more flexbility.
|
||||||
#[cfg(feature = "alloc")]
|
|
||||||
use crate::pool::StoreAddr;
|
use crate::pool::StoreAddr;
|
||||||
#[cfg(feature = "alloc")]
|
|
||||||
use alloc::string::{String, ToString};
|
|
||||||
#[cfg(feature = "alloc")]
|
|
||||||
use alloc::vec::Vec;
|
|
||||||
use core::fmt::Debug;
|
use core::fmt::Debug;
|
||||||
use core::mem::size_of;
|
use core::mem::size_of;
|
||||||
use paste::paste;
|
use paste::paste;
|
||||||
use spacepackets::ecss::{EcssEnumU16, EcssEnumU32, EcssEnumU64, EcssEnumU8};
|
use spacepackets::ecss::{EcssEnumU16, EcssEnumU32, EcssEnumU64, EcssEnumU8};
|
||||||
|
pub use spacepackets::util::ToBeBytes;
|
||||||
use spacepackets::util::UnsignedEnum;
|
use spacepackets::util::UnsignedEnum;
|
||||||
use spacepackets::ByteConversionError;
|
use spacepackets::ByteConversionError;
|
||||||
|
|
||||||
pub use spacepackets::util::ToBeBytes;
|
#[cfg(feature = "alloc")]
|
||||||
|
use alloc::string::{String, ToString};
|
||||||
|
#[cfg(feature = "alloc")]
|
||||||
|
use alloc::vec::Vec;
|
||||||
|
|
||||||
/// Generic trait which is used for objects which can be converted into a raw network (big) endian
|
/// Generic trait which is used for objects which can be converted into a raw network (big) endian
|
||||||
/// byte format.
|
/// byte format.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user