Skip to content

Commit

Permalink
feat!: Migrate samples/chess-server 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 0f04ab5 commit 6a23e46
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 41 deletions.
9 changes: 1 addition & 8 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,6 +11,5 @@ members = [
"lib",
"integration",
"samples/demo-server",
"samples/chess-server",
"tools/certificate-creator"
]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ 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`](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.
4. [`chess-server`](lib/examples/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.
6. [`mqtt-client`](lib/examples/mqtt-client) - an OPC UA client that subscribes to some values and publishes them to an MQTT broker.
7. [`event-client`](lib/examples/event-client) - an OPC UA client that will connect to a server and subscribe to alarms / events.
3 changes: 2 additions & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ serde_json = "1.0"
opcua = { path = ".", features = ["console-logging"] }

# Examples
## discovery-client, event-client, mqtt-client, simple-client
## chess-server, discovery-client, event-client, mqtt-client, simple-client
pico-args = "0.5"
rumqttc = "0.23"
tokio = { version = "1", features = ["full"] }
uci = "0.1.1"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Chess is played to standard rules with castling and en passant. If the game play
a piece being taken or a pawn advanced, the game is reset.

```
cargo run
cargo run --example chess-server
```

Connect to the server with this url `opc.tcp://localhost:1234`.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn main() {
let game = Arc::new(Mutex::new(game::Game::new(&engine_path)));

// Create an OPC UA server with sample configuration and default node set
let server = Server::new(ServerConfig::load(&PathBuf::from("../server.conf")).unwrap());
let server = Server::new(ServerConfig::load(&PathBuf::from("samples/server.conf")).unwrap());

let address_space = server.address_space();

Expand Down
13 changes: 0 additions & 13 deletions samples/chess-server/Cargo.toml

This file was deleted.

15 changes: 0 additions & 15 deletions samples/chess-server/chess-server.iml

This file was deleted.

0 comments on commit 6a23e46

Please sign in to comment.