Find active channels and deliver values

This commit is contained in:
Dominik Werder
2022-06-03 16:57:59 +02:00
parent 775650c2d8
commit 3cd1b7a640
49 changed files with 1002 additions and 270 deletions

View File

@@ -56,6 +56,7 @@ pub async fn get_binned(
let channel = Channel {
backend: channel_backend.clone(),
name: channel_name.into(),
series: None,
};
let agg_kind = AggKind::DimXBins1;
let range = NanoRange::from_date_time(beg_date, end_date);

View File

@@ -102,6 +102,7 @@ where
let channel = Channel {
backend: channel_backend.into(),
name: channel_name.into(),
series:None,
};
let range = NanoRange::from_date_time(beg_date, end_date);
let mut query = BinnedQuery::new(channel, range, bin_count, agg_kind);

View File

@@ -119,6 +119,7 @@ fn get_sls_archive_1() -> Result<(), Error> {
let channel = Channel {
backend: "sls-archive".into(),
name: "ABOMA-CH-6G:U-DCLINK".into(),
series: None,
};
let begstr = "2021-11-10T01:00:00Z";
let endstr = "2021-11-10T01:01:00Z";
@@ -140,6 +141,7 @@ fn get_sls_archive_3() -> Result<(), Error> {
let channel = Channel {
backend: "sls-archive".into(),
name: "ARIDI-PCT:CURRENT".into(),
series: None,
};
let begstr = "2021-11-09T00:00:00Z";
let endstr = "2021-11-11T00:10:00Z";
@@ -161,6 +163,7 @@ fn get_sls_archive_wave_2() -> Result<(), Error> {
let channel = Channel {
backend: "sls-archive".into(),
name: "ARIDI-MBF-X:CBM-IN".into(),
series: None,
};
let begstr = "2021-11-09T10:00:00Z";
let endstr = "2021-11-10T06:00:00Z";
@@ -192,6 +195,7 @@ async fn get_binned_json_common(
let channel = Channel {
backend: channel_backend.into(),
name: channel_name.into(),
series: None,
};
let range = NanoRange::from_date_time(beg_date, end_date);
let mut query = BinnedQuery::new(channel, range, bin_count, agg_kind);

View File

@@ -8,6 +8,7 @@ fn get_scalar_2_events() -> Result<(), Error> {
let channel = Channel {
backend: "sls-archive".into(),
name: "ARIDI-PCT:CURRENT".into(),
series: None,
};
let begstr = "2021-11-10T00:00:00Z";
let endstr = "2021-11-10T00:10:00Z";
@@ -50,6 +51,7 @@ fn get_scalar_2_binned() -> Result<(), Error> {
let channel = Channel {
backend: "sls-archive".into(),
name: "ARIDI-PCT:CURRENT".into(),
series: None,
};
let begstr = "2021-11-10T00:00:00Z";
let endstr = "2021-11-10T00:10:00Z";
@@ -71,6 +73,7 @@ fn get_wave_1_events() -> Result<(), Error> {
let channel = Channel {
backend: "sls-archive".into(),
name: "ARIDI-MBF-X:CBM-IN".into(),
series: None,
};
let begstr = "2021-11-09T00:00:00Z";
let endstr = "2021-11-09T00:10:00Z";
@@ -111,6 +114,7 @@ fn get_wave_1_binned() -> Result<(), Error> {
let channel = Channel {
backend: "sls-archive".into(),
name: "ARIDI-MBF-X:CBM-IN".into(),
series: None,
};
let begstr = "2021-11-09T00:00:00Z";
let endstr = "2021-11-11T00:10:00Z";

View File

@@ -62,6 +62,7 @@ where
let channel = Channel {
backend: channel_backend.into(),
name: channel_name.into(),
series: None,
};
let range = NanoRange::from_date_time(beg_date, end_date);
let query = PlainEventsBinaryQuery::new(channel, range, 1024 * 4);
@@ -272,6 +273,7 @@ pub async fn get_plain_events_json(
let channel = Channel {
backend: channel_backend.into(),
name: channel_name.into(),
series: None,
};
let range = NanoRange::from_date_time(beg_date, end_date);
let query = PlainEventsJsonQuery::new(channel, range, 1024 * 4, None, false);

View File

@@ -172,6 +172,7 @@ async fn get_json_common(
let channel = Channel {
backend: channel_backend.into(),
name: channel_name.into(),
series: None,
};
let range = NanoRange::from_date_time(beg_date, end_date);
let mut query = BinnedQuery::new(channel, range, bin_count, agg_kind);