WIP on events_plain_json_00
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use crate::numops::NumOps;
|
||||
use crate::pulse_offs_from_abs;
|
||||
use crate::streams::{Collectable, Collector, ToJsonBytes, ToJsonResult};
|
||||
use crate::ts_offs_from_abs;
|
||||
use crate::waveevents::WaveEvents;
|
||||
@@ -13,6 +12,7 @@ use crate::TimeBinnableDyn;
|
||||
use crate::TimeBinnableType;
|
||||
use crate::TimeBinnableTypeAggregator;
|
||||
use crate::TimeBins;
|
||||
use crate::{pulse_offs_from_abs, FrameType};
|
||||
use crate::{Fits, FitsInside, NewEmpty, ReadPbv, Sitemty, SubFrId, TimeBinned, WithLen};
|
||||
use chrono::{TimeZone, Utc};
|
||||
use err::Error;
|
||||
@@ -42,6 +42,15 @@ where
|
||||
const FRAME_TYPE_ID: u32 = crate::MIN_MAX_AVG_DIM_1_BINS_FRAME_TYPE_ID + NTY::SUB;
|
||||
}
|
||||
|
||||
impl<NTY> FrameType for MinMaxAvgDim1Bins<NTY>
|
||||
where
|
||||
NTY: SubFrId,
|
||||
{
|
||||
fn frame_type_id(&self) -> u32 {
|
||||
<Self as FrameTypeInnerStatic>::FRAME_TYPE_ID
|
||||
}
|
||||
}
|
||||
|
||||
impl<NTY> fmt::Debug for MinMaxAvgDim1Bins<NTY>
|
||||
where
|
||||
NTY: fmt::Debug,
|
||||
@@ -199,7 +208,7 @@ where
|
||||
}
|
||||
|
||||
fn from_buf(buf: &[u8]) -> Result<Self, Error> {
|
||||
let dec = serde_cbor::from_slice(&buf)?;
|
||||
let dec = rmp_serde::from_slice(&buf)?;
|
||||
Ok(dec)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user