WIP on get channel info for arch app
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use crate::agg::streams::{Appendable, StreamItem};
|
||||
use crate::binned::{FilterFittingInside, RangeCompletableItem, RangeOverlapInfo, ReadableFromFile};
|
||||
use crate::Sitemty;
|
||||
use crate::agg::streams::Appendable;
|
||||
use crate::binned::{FilterFittingInside, RangeOverlapInfo, ReadableFromFile};
|
||||
use futures_core::Stream;
|
||||
use futures_util::StreamExt;
|
||||
use items::{RangeCompletableItem, Sitemty, StreamItem};
|
||||
use netpod::log::*;
|
||||
use netpod::{BinnedRange, NanoRange};
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -8,6 +8,7 @@ use crate::binned::{
|
||||
};
|
||||
use crate::decode::EventValues;
|
||||
use err::Error;
|
||||
use items::{SitemtyFrameType, SubFrId};
|
||||
use netpod::log::*;
|
||||
use netpod::timeunits::{MS, SEC};
|
||||
use netpod::{x_bin_count, AggKind, NanoRange, Shape};
|
||||
@@ -44,6 +45,13 @@ pub struct XBinnedScalarEvents<NTY> {
|
||||
avgs: Vec<f32>,
|
||||
}
|
||||
|
||||
impl<NTY> SitemtyFrameType for XBinnedScalarEvents<NTY>
|
||||
where
|
||||
NTY: SubFrId,
|
||||
{
|
||||
const FRAME_TYPE_ID: u32 = 0x600 + NTY::SUB;
|
||||
}
|
||||
|
||||
impl<NTY> XBinnedScalarEvents<NTY> {
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
@@ -381,6 +389,13 @@ pub struct XBinnedWaveEvents<NTY> {
|
||||
avgs: Vec<Vec<f32>>,
|
||||
}
|
||||
|
||||
impl<NTY> SitemtyFrameType for XBinnedWaveEvents<NTY>
|
||||
where
|
||||
NTY: SubFrId,
|
||||
{
|
||||
const FRAME_TYPE_ID: u32 = 0x900 + NTY::SUB;
|
||||
}
|
||||
|
||||
impl<NTY> XBinnedWaveEvents<NTY> {
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
@@ -719,6 +734,13 @@ pub struct WaveEvents<NTY> {
|
||||
pub vals: Vec<Vec<NTY>>,
|
||||
}
|
||||
|
||||
impl<NTY> SitemtyFrameType for WaveEvents<NTY>
|
||||
where
|
||||
NTY: SubFrId,
|
||||
{
|
||||
const FRAME_TYPE_ID: u32 = 0x800 + NTY::SUB;
|
||||
}
|
||||
|
||||
impl<NTY> WaveEvents<NTY> {
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::agg::streams::{Appendable, StreamItem};
|
||||
use crate::binned::{MakeBytesFrame, RangeCompletableItem, RangeOverlapInfo};
|
||||
use crate::agg::streams::Appendable;
|
||||
use crate::binned::{MakeBytesFrame, RangeOverlapInfo};
|
||||
use crate::frame::makeframe::make_frame;
|
||||
use bytes::{BufMut, Bytes, BytesMut};
|
||||
use err::Error;
|
||||
use items::{RangeCompletableItem, SitemtyFrameType, StreamItem};
|
||||
use netpod::log::*;
|
||||
use netpod::NanoRange;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -16,6 +17,10 @@ pub struct MinMaxAvgScalarEventBatch {
|
||||
pub avgs: Vec<f32>,
|
||||
}
|
||||
|
||||
impl SitemtyFrameType for MinMaxAvgScalarEventBatch {
|
||||
const FRAME_TYPE_ID: u32 = 0x300;
|
||||
}
|
||||
|
||||
impl MinMaxAvgScalarEventBatch {
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
use crate::agg::streams::{Appendable, StreamItem, ToJsonBytes};
|
||||
use crate::agg::streams::{Appendable, ToJsonBytes};
|
||||
use crate::agg::{Fits, FitsInside};
|
||||
use crate::binned::{MakeBytesFrame, RangeCompletableItem};
|
||||
use crate::binned::MakeBytesFrame;
|
||||
use crate::frame::makeframe::make_frame;
|
||||
use bytes::{BufMut, Bytes, BytesMut};
|
||||
use err::Error;
|
||||
use items::{RangeCompletableItem, SitemtyFrameType, StreamItem};
|
||||
use netpod::log::*;
|
||||
use netpod::timeunits::SEC;
|
||||
use netpod::NanoRange;
|
||||
@@ -21,6 +22,10 @@ pub struct MinMaxAvgScalarBinBatch {
|
||||
pub avgs: Vec<f32>,
|
||||
}
|
||||
|
||||
impl SitemtyFrameType for MinMaxAvgScalarBinBatch {
|
||||
const FRAME_TYPE_ID: u32 = 0x200;
|
||||
}
|
||||
|
||||
impl MinMaxAvgScalarBinBatch {
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
|
||||
+1
-15
@@ -1,20 +1,6 @@
|
||||
use crate::binned::WithLen;
|
||||
use crate::streamlog::LogItem;
|
||||
use err::Error;
|
||||
use netpod::EventDataReadStats;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub enum StatsItem {
|
||||
EventDataReadStats(EventDataReadStats),
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub enum StreamItem<T> {
|
||||
DataItem(T),
|
||||
Log(LogItem),
|
||||
Stats(StatsItem),
|
||||
}
|
||||
use serde::Serialize;
|
||||
|
||||
pub trait Collector: Send + Unpin + WithLen {
|
||||
type Input: Collectable;
|
||||
|
||||
Reference in New Issue
Block a user