Add introspection docs.

This commit is contained in:
Alexey Rybalchenko 2017-09-01 10:36:55 +02:00 committed by Mohammad Al-Turany
parent 7b37eaa507
commit 09e45e27ab
2 changed files with 21 additions and 1 deletions

View File

@ -16,7 +16,8 @@ Standard FairRoot is running all the different analysis tasks within one process
1. [Device Configuration](docs/Configuration.md#31-device-configuration) 1. [Device Configuration](docs/Configuration.md#31-device-configuration)
2. [Communication Channels Configuration](docs/Configuration.md#32-communication-channels-configuration) 2. [Communication Channels Configuration](docs/Configuration.md#32-communication-channels-configuration)
1. [JSON Parser](docs/Configuration.md#321-json-parser) 1. [JSON Parser](docs/Configuration.md#321-json-parser)
1. [SuboptParser](docs/Configuration.md#322-suboptparser) 2. [SuboptParser](docs/Configuration.md#322-suboptparser)
3. [Introspection](docs/Configuration.md#33-introspection)
4. [Development](docs/Development.md#3-development) 4. [Development](docs/Development.md#3-development)
1. [Testing](docs/Development.md#31-testing) 1. [Testing](docs/Development.md#31-testing)
5. [Examples](docs/Examples.md#4-examples) 5. [Examples](docs/Examples.md#4-examples)

View File

@ -91,4 +91,23 @@ The option key `--channel-config` can be used with the list of key/value pairs,
--channel-config name=output,type=push,method=bind,address=tcp://127.0.0.1:5555 --channel-config name=output,type=push,method=bind,address=tcp://127.0.0.1:5555
``` ```
## 3.3 Introspection
A compiled device executable repots its available configuration. Run the device with one of the following options to see the corresponding help:
- `-h [ --help ]`: All available command line options with their descriptions and default values.
- `--print-options`: All available command line options in a machine-readable format: `<option>:<computed-value>:<<type>>:<description>`.
- `--print-channels`: Prints registered channels in a machine-readable format: `<channel name>:<minimum sub-channels>:<maximum sub-channels>`. There are devices where channels names are not known in advance before the configuration takes place (e.g. FairMQMultiplier has configurable channel names at runtime). This options will only print channels that have been registered in the device by implementing the following method:
```C++
void YourDevice::RegisterChannelEndpoints()
{
// provide channel name, minimum and maximum number of subchannels
RegisterChannelEndpoint("channelA", 1, 10000);
RegisterChannelEndpoint("channelB", 1, 1);
}
```
← [Back](../README.md) ← [Back](../README.md)