Skip to content

Commit

Permalink
fix: Let create_subscription use the provided node id
Browse files Browse the repository at this point in the history
instead of a hardcoded string.
This slipped during oop refactoring.

Co-authored-by: Philipp Caspers <[email protected]>
  • Loading branch information
AiyionPrime and philipp-caspers committed Aug 1, 2024
1 parent 4ad68d7 commit 52cfdf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simple_opc_ua_subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl SimpleSubscriber {
pub fn create_subscription<F>(
&self,
namespace: u16,
node_id: &str,
node_id: &'static str,
callback: F,
period_ms: u64,
) -> Result<(), StatusCode>
Expand Down Expand Up @@ -103,7 +103,7 @@ impl SimpleSubscriber {
println!("Created a subscription with id = {}", subscription_id);

// Create some monitored items
let items_to_create: Vec<MonitoredItemCreateRequest> = ["ticks_since_launch"]
let items_to_create: Vec<MonitoredItemCreateRequest> = [node_id]
.iter()
.map(|v| NodeId::new(namespace, *v).into())
.collect();
Expand Down

0 comments on commit 52cfdf6

Please sign in to comment.