Skip to content

Commit

Permalink
prepare 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
XdoctorwhoZ committed Dec 4, 2024
1 parent 6514331 commit 2be9fad
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
26 changes: 9 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,32 @@
[package]
name = "panduza-rust-platform"
version = "0.5.0"
version = "0.5.1"
edition = "2021"


[dependencies]

# Main base code for Panduza platform and plugins
panduza-platform-core = { git = "https://github.com/Panduza/panduza-platform-core", tag = "0.1.5" }
panduza-platform-core = { git = "https://github.com/Panduza/panduza-platform-core", tag = "0.1.6" }
# Main async framework for the platform
tokio = { version = "1.40.0", features = ["full", "tracing"] }


#
clap = { version = "4.5.21", features = ["derive"] }


#
libloading = "0.8"

#
dirs = "3.0.2"

# MQTT async client
rumqttc = "0.24.0"

#
rumqttd = { git = "https://github.com/Panduza/rumqtt", tag = "0.0.0" }

#
config = "0.14.0"

# Async trait support
async-trait = "0.1.77"

# Futures support
futures = "0.3.17"


#
serde = { "version" = "1.0.0", features = ["derive"] }

# Json serialization & deserialization
Expand Down Expand Up @@ -99,13 +91,13 @@ rust_decimal_macros = "1.35"
# crate-type = ["lib"] => because plugins need to be compile as simple lib when built-in
# ---
# Fake devices
pza-plugin-fakes = { git = "https://github.com/Panduza/pza-plugin-fakes", tag = "0.1.0", optional = true }
pza-plugin-fakes = { git = "https://github.com/Panduza/pza-plugin-fakes", tag = "0.1.1", optional = true }
# ---
# Korad devices
pza-plugin-korad = { git = "https://github.com/Panduza/pza-plugin-korad", tag = "1.0.4", optional = true }
pza-plugin-korad = { git = "https://github.com/Panduza/pza-plugin-korad", tag = "1.0.5", optional = true }
# ---
# Hameg devices
pza-plugin-hameg = { git = "https://github.com/Panduza/pza-plugin-hameg", tag = "1.0.3", optional = true }
pza-plugin-hameg = { git = "https://github.com/Panduza/pza-plugin-hameg", tag = "1.0.4", optional = true }


[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cargo run -- -l
cargo run
2 changes: 1 addition & 1 deletion run_with_builtin.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cargo run --features built-in-drivers -- -l
cargo run --features built-in-drivers
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use clap::Parser;
pub struct Args {
/// Enable logs on stdout
#[arg(short, long)]
log_stdout_enable: bool,
quiet_log: bool,

/// Also display broker logs
#[arg(short, long)]
Expand All @@ -60,7 +60,7 @@ fn print_platform_header(args: &Args) {
println!("");
println!(
"- Stdout logs : {}",
if args.log_stdout_enable {
if !args.quiet_log {
"ENABLED"
} else {
"DISABLED"
Expand Down Expand Up @@ -117,7 +117,7 @@ async fn main() {
// Manage logs
// Init tracing subscriber
panduza_platform_core::tracing::init(
args.log_stdout_enable,
!args.quiet_log,
args.broker_log_enable,
args.debug_log,
args.trace_log,
Expand All @@ -128,7 +128,7 @@ async fn main() {
// - 1 broker
// - 1 runtime pour les services de bases
// - N plugins runtime
let mut platform = Platform::new(args.log_stdout_enable, args.debug_log, args.trace_log);
let mut platform = Platform::new(!args.quiet_log, args.debug_log, args.trace_log);

//
// Log minimal set of information
Expand Down
8 changes: 4 additions & 4 deletions src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,10 @@ impl Platform {
self.logger.info("----- SERVICE : START SCANNING -----");
// self.logger.info(format!("ORDER: {:?}", po));

#[cfg(feature = "built-in-drivers")]
for scanner in built_in::plugin_scanners() {
let result = scanner.scan();
}
// #[cfg(feature = "built-in-drivers")]
// for scanner in built_in::plugin_scanners() {
// let result = scanner.scan();
// }

let _res = self.plugin_manager.scan().unwrap();
println!("{:?}", _res);
Expand Down

0 comments on commit 2be9fad

Please sign in to comment.