WIP on events_plain_json_00
This commit is contained in:
+2
-4
@@ -8,11 +8,9 @@ edition = "2021"
|
||||
path = "src/dq.rs"
|
||||
|
||||
[dependencies]
|
||||
#serde = { version = "1.0", features = ["derive"] }
|
||||
#serde_json = "1.0"
|
||||
tokio = { version = "1.18.1", features = ["rt-multi-thread", "io-util", "net", "time", "sync", "fs"] }
|
||||
tokio = { version = "1.21.1", features = ["rt-multi-thread", "io-util", "net", "time", "sync", "fs"] }
|
||||
futures-util = "0.3.14"
|
||||
clap = { version = "3.0.6", features = ["derive", "cargo"] }
|
||||
clap = { version = "4.0", features = ["derive", "cargo"] }
|
||||
chrono = "0.4.19"
|
||||
bytes = "1.0.1"
|
||||
err = { path = "../err" }
|
||||
|
||||
+11
-10
@@ -1,14 +1,15 @@
|
||||
use clap::Parser;
|
||||
use clap::{ArgAction, Parser};
|
||||
use err::Error;
|
||||
use netpod::timeunits::*;
|
||||
use std::{path::PathBuf, str::FromStr};
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[clap(name = "DAQ buffer tools", version)]
|
||||
#[command(author, version)]
|
||||
pub struct Opts {
|
||||
#[clap(short, long, parse(from_occurrences))]
|
||||
#[arg(short, long, action(ArgAction::Count))]
|
||||
pub verbose: u32,
|
||||
#[clap(subcommand)]
|
||||
#[command(subcommand)]
|
||||
pub subcmd: SubCmd,
|
||||
}
|
||||
|
||||
@@ -21,19 +22,19 @@ pub enum SubCmd {
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct ConvertArchiverApplianceChannel {
|
||||
/// Prefix for keyspaces, e.g. specify `daq` to get scalar keyspace directory `daq_2`.
|
||||
#[clap(long)]
|
||||
#[arg(long)]
|
||||
keyspace_prefix: String,
|
||||
/// Name of the channel to convert.
|
||||
#[clap(long)]
|
||||
#[arg(long)]
|
||||
channel_name: String,
|
||||
/// Look for archiver appliance data at given path.
|
||||
#[clap(long)]
|
||||
#[arg(long)]
|
||||
input_dir: PathBuf,
|
||||
/// Generate Databuffer format at given path.
|
||||
#[clap(long)]
|
||||
#[arg(long)]
|
||||
output_dir: PathBuf,
|
||||
/// Size of the time-bins in the generated Databuffer format.\nUnit-suffixes: `h` (hours), `d` (days)
|
||||
#[clap(default_value = "1d", long)]
|
||||
#[arg(default_value = "1d", long)]
|
||||
time_bin_size: TimeBinSize,
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
use clap::Parser;
|
||||
use clap::{ArgAction, Parser};
|
||||
use err::Error;
|
||||
use netpod::log::*;
|
||||
use netpod::{ByteOrder, ByteSize, Channel, ChannelConfig, NanoRange, Shape};
|
||||
@@ -8,11 +8,11 @@ use tokio::fs::File;
|
||||
use tokio::io::AsyncReadExt;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[clap(name = "DAQ buffer tools", version)]
|
||||
#[command(name = "DAQ buffer tools", author, version)]
|
||||
pub struct Opts {
|
||||
#[clap(short, long, parse(from_occurrences))]
|
||||
#[arg(short, long, action(ArgAction::Count))]
|
||||
pub verbose: u32,
|
||||
#[clap(subcommand)]
|
||||
#[command(subcommand)]
|
||||
pub subcmd: SubCmd,
|
||||
}
|
||||
|
||||
@@ -24,15 +24,15 @@ pub enum SubCmd {
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct ReadDatabufferConfigfile {
|
||||
#[clap(long)]
|
||||
#[arg(long)]
|
||||
configfile: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct ReadDatabufferDatafile {
|
||||
#[clap(long)]
|
||||
#[arg(long)]
|
||||
configfile: PathBuf,
|
||||
#[clap(long)]
|
||||
#[arg(long)]
|
||||
datafile: PathBuf,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user