just add support for everything
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
This commit is contained in:
@ -78,6 +78,7 @@ impl ProvidesDaysLength for DaysLen24Bits {
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum LengthOfDaySegment {
|
||||
Short16Bits = 0,
|
||||
Long24Bits = 1,
|
||||
@ -94,6 +95,7 @@ pub enum SubmillisPrecision {
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum CdsError {
|
||||
/// CCSDS days value exceeds maximum allowed size or is negative
|
||||
InvalidCcsdsDays(i64),
|
||||
|
@ -37,6 +37,7 @@ pub const MAX_CUC_LEN_SMALL_PREAMBLE: usize = 8;
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum FractionalResolution {
|
||||
/// No fractional part, only second resolution
|
||||
Seconds = 0,
|
||||
@ -105,6 +106,7 @@ pub fn fractional_part_from_subsec_ns(res: FractionalResolution, ns: u64) -> Fra
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum CucError {
|
||||
InvalidCounterWidth(u8),
|
||||
/// Invalid counter supplied.
|
||||
|
@ -33,6 +33,7 @@ pub const NANOS_PER_SECOND: u32 = 1_000_000_000;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum CcsdsTimeCode {
|
||||
CucCcsdsEpoch = 0b001,
|
||||
CucAgencyEpoch = 0b010,
|
||||
@ -65,6 +66,7 @@ pub fn ccsds_time_code_from_p_field(pfield: u8) -> Result<CcsdsTimeCode, u8> {
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct DateBeforeCcsdsEpochError(UnixTime);
|
||||
|
||||
impl Display for DateBeforeCcsdsEpochError {
|
||||
@ -78,6 +80,7 @@ impl Error for DateBeforeCcsdsEpochError {}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
#[non_exhaustive]
|
||||
pub enum TimestampError {
|
||||
InvalidTimeCode { expected: CcsdsTimeCode, found: u8 },
|
||||
@ -262,6 +265,7 @@ pub trait CcsdsTimeProvider {
|
||||
/// similarly to other common time formats and libraries.
|
||||
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct UnixTime {
|
||||
secs: i64,
|
||||
subsec_nanos: u32,
|
||||
|
Reference in New Issue
Block a user