2015-08-09 23:58:03 +02:00
|
|
|
# Tools {#tools}
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
VILLASnode comes with a couple of tools to test and debug connectivity and configurations.
|
|
|
|
All VILLASnode tools are available as subcommands to the `villas` wrapper:
|
2015-12-11 19:20:50 +01:00
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
### `villas node`
|
2015-08-09 23:58:03 +02:00
|
|
|
|
2015-12-11 19:20:50 +01:00
|
|
|
Starts the simulator to simulator server. The server acts as a central gateway to forward simulation data.
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
Usage: villas-node CONFIG
|
2015-12-11 19:20:50 +01:00
|
|
|
CONFIG is a required path to a configuration file
|
|
|
|
|
|
|
|
Supported node types:
|
|
|
|
- file: support for file log / replay node type
|
|
|
|
- socket: Network socket (libnl3)
|
|
|
|
- gtfpga: GTFPGA PCIe card (libpci)
|
|
|
|
- ngsi: OMA Next Generation Services Interface 10 (libcurl, libjansson, libuuid)
|
|
|
|
- websocket: Send and receive samples of a WebSocket connection (libwebsockets)
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
### `villas pipe`
|
2015-12-11 19:20:50 +01:00
|
|
|
|
|
|
|
The `pipe` subcommand allows to read and write samples to `stdin` / `stdout`.
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
Usage: villas-pipe CONFIG [-r] NODE
|
2015-12-11 19:20:50 +01:00
|
|
|
CONFIG path to a configuration file
|
|
|
|
NODE the name of the node to which samples are sent and received from
|
|
|
|
-r swap read / write endpoints)
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
### `villas signal`
|
2015-12-11 19:20:50 +01:00
|
|
|
|
|
|
|
The `signal` subcommand is a signal generator which writes samples to `stdout`.
|
|
|
|
This command can be combined with the `pipe` subcommand.
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
Usage: villas-signal SIGNAL [OPTIONS]
|
2016-02-11 20:14:12 +01:00
|
|
|
SIGNAL is on of: 'mixed', 'random', 'sine', 'triangle', 'square', 'ramp'
|
|
|
|
-v NUM specifies how many values a message should contain
|
|
|
|
-r HZ how many messages per second
|
|
|
|
-f HZ the frequency of the signal
|
|
|
|
-a FLT the amplitude
|
|
|
|
-d FLT the standard deviation for 'random' signals
|
|
|
|
-l NUM only send LIMIT messages and stop
|
2015-12-11 19:20:50 +01:00
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
### `villas test`
|
2015-12-11 19:20:50 +01:00
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
Usage: villas-test CONFIG TEST NODE [ARGS]
|
2015-12-11 19:20:50 +01:00
|
|
|
CONFIG path to a configuration file
|
|
|
|
TEST the name of the test to execute: 'rtt'
|
|
|
|
NODE name of the node which shoud be used
|
2015-08-09 23:58:03 +02:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
1. Start server:
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
$ villas node etc/example.conf
|
2015-08-09 23:58:03 +02:00
|
|
|
|
|
|
|
2. Receive/dump data to file
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
$ villas pipe etc/example.conf node_name > dump.csv
|
2015-08-09 23:58:03 +02:00
|
|
|
|
|
|
|
3. Replay recorded data:
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
$ villas pipe etc/example.conf -r node_name < dump.csv
|
2015-08-09 23:58:03 +02:00
|
|
|
|
|
|
|
4. Send random generated values:
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
$ villas signal random 4 100 | villas pipe etc/example.conf destination_node
|
2015-08-09 23:58:03 +02:00
|
|
|
|
|
|
|
5. Test ping/pong latency:
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
$ villas test latency etc/example.conf test_node
|