Skip to content

Commit

Permalink
feat!: Migrate samples/simple-client to examples
Browse files Browse the repository at this point in the history
which removes it as workspace and allows cargo to index it.
  • Loading branch information
AiyionPrime committed Jul 31, 2024
1 parent 2cf4631 commit 0f04ab5
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 47 deletions.
9 changes: 0 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ members = [
"lib",
"integration",
"samples/demo-server",
"samples/simple-client",
"samples/chess-server",
"tools/certificate-creator"
]
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,13 @@ minimal client and server programs respectively.
# In one bash
cargo run --example simple-server
# In another bash
cd opcua/samples/simple-client
cargo run
cargo run --example simple-client
```

The full list of samples:

1. [`simple-server`](lib/examples/simple-server) - an OPC UA server that adds 4 variables v1, v2, v3 and v4 and updates them from a timer via push and pull mechanisms.
2. [`simple-client`](samples/simple-client) - an OPC UA client that connects to a server and subscribes to the values of v1, v2, v3 and v4.
2. [`simple-client`](lib/examples/simple-client) - an OPC UA client that connects to a server and subscribes to the values of v1, v2, v3 and v4.
3. [`discovery-client`](lib/examples/discovery-client) - an OPC UA client that connects to a discovery server and lists the servers registered on it.
4. [`chess-server`](samples/chess-server) - an OPC UA server that connects to a chess engine as its back end and updates variables representing the state of the game.
5. [`demo-server`](samples/demo-server) - an OPC UA server that is more complex than the simple server and can be used for compliance testing.
Expand Down
2 changes: 1 addition & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn main() {

This server will accept connections, allow you to browse the address space and subscribe to variables.

Refer to the [`samples/simple-server/`](../samples/simple-server) and [`samples/simple-client/`](../samples/simple-client) examples
Refer to the [`samples/simple-server/`](../samples/simple-server) and [`lib/examples/simple-client/`](../lib/examples/simple-client) examples
for something that adds variables to the address space and changes their values.

## Types
Expand Down
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ serde_json = "1.0"
opcua = { path = ".", features = ["console-logging"] }

# Examples
## discovery-client, event-client, mqtt-client
## discovery-client, event-client, mqtt-client, simple-client
pico-args = "0.5"
rumqttc = "0.23"
tokio = { version = "1", features = ["full"] }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
To run this sample:

1. Launch either the `lib/examples/simple-server`, or `3rd-party/node-opcua-server`. Both servers expose the same variables.
2. Run as `cargo run`
2. Run as `cargo run --examples simple-client`

The client connects to the server, creates a subscription to variables v1,
v2, v3, v4 and continues to print out changes to those values without terminating.
Expand Down
File renamed without changes.
14 changes: 0 additions & 14 deletions samples/simple-client/Cargo.toml

This file was deleted.

17 changes: 0 additions & 17 deletions samples/simple-client/simple-client.iml

This file was deleted.

0 comments on commit 0f04ab5

Please sign in to comment.