#include <commandLineParser.hpp>
|
| CommandLineParser ()=default |
|
void | SetOptions (std::string &broker, std::string &data_stream, int &frequency) |
| Set the options for a data transfer application.
|
|
|
po::options_description | options |
|
po::positional_options_description | positional_options |
|
virtual | ~CommandLineParser () |
|
void | SetOptions (std::string &uri, std::string &config_file, bool &datastreams_list) |
| Set the options for a data broker application.
|
|
void | SetOptions (std::string &filename, std::string &local_broker_uri, std::string &remote_broker_uri, std::string &data_stream, std::string &server_uri, std::string &default_image_scale, bool ×tamp, std::string &overlay_file) |
| Set the command line options for viewer applications.
|
|
void | SetOptions (std::string &broker, std::string &data_stream, int &frequency, std::string &remote_broker, int &mode, bool &statistics, bool &dump_data, std::string &dump_folder) |
| Set the options for a subscriber application.
|
|
void | SetOptions (std::string &broker, std::string &data_stream, int &frequency, int &buffer_size, std::string &image_folder, int &mode, bool &checksum) |
| Set the options for a publisher application with image folder.
|
|
void | SetOptions (std::string &server_uri, std::string &image_widget, std::string &command, std::vector< std::string > &arguments, int32_t &timeout, bool &infinite) |
| Set the options for a remote client application.
|
|
int | Parse (int argc, char *argv[]) |
| Parse the given commandline input.
|
|
void | SetOptions () |
| Set standard command line options.
|
|
Commandline parser class using for parsing arguments on the commandline
◆ CommandLineParser()
ddt::CommandLineParser::CommandLineParser |
( |
| ) |
|
|
default |
◆ ~CommandLineParser()
CommandLineParser::~CommandLineParser |
( |
| ) |
|
|
virtualdefault |
◆ Parse()
int CommandLineParser::Parse |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Parse the given commandline input.
Parses the input and stores it in the options object.
- Parameters
-
argc | Number of arguments. |
argv | Array containing the arguments. |
- Returns
- int Additional flag for debug (1) etc.
◆ SetOptions() [1/7]
void CommandLineParser::SetOptions |
( |
| ) |
|
|
protected |
Set standard command line options.
This method adds the help and debug argument to the options.
◆ SetOptions() [2/7]
void ddt::CommandLineParser::SetOptions |
( |
std::string & |
broker, |
|
|
std::string & |
data_stream, |
|
|
int & |
frequency |
|
) |
| |
Set the options for a data transfer application.
Initializes the options object if not already done, and adds the argument options broker, data_stream and frequency.
- Parameters
-
broker | Takes the URI of the broker. |
data_stream | Takes the name of the data stream. |
frequency | Takes the reading/writing frequency. |
◆ SetOptions() [3/7]
void CommandLineParser::SetOptions |
( |
std::string & |
broker, |
|
|
std::string & |
data_stream, |
|
|
int & |
frequency, |
|
|
int & |
buffer_size, |
|
|
std::string & |
image_folder, |
|
|
int & |
mode, |
|
|
bool & |
checksum |
|
) |
| |
Set the options for a publisher application with image folder.
Initializes the options object if not already done. Calls setOptions(std::string&, std::string&, int&, std::string&) with broker, data_stream, frequency and buffer_size. Adds then image_folder as argument.
- Parameters
-
broker | Takes the URI of the broker. |
data_stream | Takes the name of the data stream. |
frequency | Takes the reading/writing frequency. |
buffer_size | Takes number of elements in the buffer. |
image_folder | Takes the path to the image folder. |
mode | Simulator mode. |
checksum | Turns the computation of the checksum on. |
◆ SetOptions() [4/7]
void CommandLineParser::SetOptions |
( |
std::string & |
broker, |
|
|
std::string & |
data_stream, |
|
|
int & |
frequency, |
|
|
std::string & |
remote_broker, |
|
|
int & |
mode, |
|
|
bool & |
statistics, |
|
|
bool & |
dump_data, |
|
|
std::string & |
dump_folder |
|
) |
| |
Set the options for a subscriber application.
Initializes the options object if not already done. Calls setOptions(std::string&, std::string&, int&) with broker, data_stream and frequency. Adds then remote_broker as argument.
- Parameters
-
broker | Takes the URI of the broker. |
data_stream | Takes the name of the data stream. |
frequency | Takes the reading/writing frequency. |
remote_broker | Takes the URI to a remote Broker. |
mode | Use case of the subscriber simulator. |
statistics | Query the statistics. |
dump_data | Activate dumping of received data as FITS files. |
dump_folder | Folder where to store the dumped FITS files. |
◆ SetOptions() [5/7]
void CommandLineParser::SetOptions |
( |
std::string & |
filename, |
|
|
std::string & |
local_broker_uri, |
|
|
std::string & |
remote_broker_uri, |
|
|
std::string & |
data_stream, |
|
|
std::string & |
server_uri, |
|
|
std::string & |
default_image_scale, |
|
|
bool & |
timestamp, |
|
|
std::string & |
overlay_file |
|
) |
| |
Set the command line options for viewer applications.
Initializes the options object and adds the argument options filename and data_stream.
- Parameters
-
filename | The file to load. |
local_broker_uri | Local Broker URI for data streaming. |
remote_broker_uri | Remote Broker URI to connect with. |
data_stream | The data stream. |
server_uri | Server URI for remote control interface |
default_image_scale | Default scale for the image (specify as whole integers or in the form 1/2, 1/4 etc.) |
timestamp | timestamp of last data sample is displayed |
overlay_file | The overlay file to load |
◆ SetOptions() [6/7]
void CommandLineParser::SetOptions |
( |
std::string & |
server_uri, |
|
|
std::string & |
image_widget, |
|
|
std::string & |
command, |
|
|
std::vector< std::string > & |
arguments, |
|
|
int32_t & |
timeout, |
|
|
bool & |
infinite |
|
) |
| |
Set the options for a remote client application.
Initializes the options object if not already done. Calls setOptions(std::string&, std::string&, std::string&, std::string&, int&) with server_uri, image_widget_name, command_name, arguments and timeout.
- Parameters
-
server_uri | Takes the URI to the Remote Control Server. |
image_widget | Takes the name of the image widget. |
command | Takes the command which is sent to the Remote Control Server. |
arguments | Takes the command arguments. |
timeout | Takes the imeout for the MAL client (reply time). |
infinite | Takes the infinite timeout for the MAL client (reply time is set to 24 h!). |
◆ SetOptions() [7/7]
void CommandLineParser::SetOptions |
( |
std::string & |
uri, |
|
|
std::string & |
config_file, |
|
|
bool & |
datastreams_list |
|
) |
| |
Set the options for a data broker application.
- Parameters
-
uri | Takes the uri of the broker. |
config_file | Takes the path and name of the configuration file (optional). |
◆ options
po::options_description ddt::CommandLineParser::options |
|
protected |
◆ positional_options
po::positional_options_description ddt::CommandLineParser::positional_options |
|
protected |
The documentation for this class was generated from the following files: