Jpp
18.0.0-rc.4
the software that should make you happy
|
#include <iostream>
#include <stdint.h>
#include <stddef.h>
#include <string>
#include <stdexcept>
#include <fstream>
#include <ctime>
#include <cerrno>
#include <cstring>
#include <cstdlib>
#include <boost/asio.hpp>
#include <boost/program_options.hpp>
#include <sys/ioctl.h>
#include "structs.hpp"
#include "datatypes.hpp"
#include "version.hpp"
#include "ligier_helper.hpp"
#include "consumers.hpp"
#include "dom_map.hpp"
Go to the source code of this file.
Classes | |
class | LigierDataHandler< Consumer > |
class | UdpDataHandler< Consumer > |
Macros | |
#define | GET_IO_SERVICE(s) ((s).get_io_service()) |
Program name: CLBSwissKnife. More... | |
Functions | |
int | get_terminal_width () |
void | handle_signal (boost::asio::signal_set &set, int &terminal_width, boost::system::error_code const &error, int signum) |
boost::asio::ip::tcp::endpoint | make_endpoint (std::string const &address) |
int | main (int argc, char *argv[]) |
Variables | |
static const size_t | buffer_size = 10000 |
static const unsigned int | default_opto_port = 56015 |
static const unsigned int | default_acou_port = 56016 |
static const unsigned int | default_moni_port = 56017 |
#define GET_IO_SERVICE | ( | s | ) | ((s).get_io_service()) |
Program name: CLBSwissKnife.
General description: This program aims to provide a powerful debugging tool for all the kind of data sent by a KM3NeT DOM.
It listens to the specified UDP port and prints out to the screen some informations contained in the read CLB datagrams.
Since version 5.0, it operates in two main modes:
General options: The program is configured via command line parameters. UDP mode is default and can be forced with the -u/–udp command line switch. Ligier mode can be activated with the -l/–ligier switch.
In the systems where the ncurses libraries are present, is possible to use the -g/–gui option to display multiple DOMs data via a text gui, in conjunction of the UDP-mode "-m/--monitoring" option or in the Ligier mode. Press the 'h' key to see the help for GUI mode. Arroy keys can be used to select a dom and to scroll the list.
With the "--map" option the user can specify a map file to be used to match the DOM IDs of incoming data. The DOM map file is an ASCII file reporting assignments of DOM IDs or MAC addresses with names. Each assignment must be separated by a semicolon. An example of map file follows:
08:00:30:BE:B7:A2 = CLB19; 817805038 = CLB13;
By default, CLBSwissKnife will try to load the file
~/.doms.csk
as a map file. The user can write the information about its setup to this file and let CLBSK use it without specifying any "--map" option.
Use: $ CLBSwissKnife -h for a detailed help and $ CLBSwissKnife -v for version information.
UDP-mode options: The user can specify the port to bind and/or the data type:
With the "-f/--dump-file" option is also possible to specify a destination file in which the incoming data will be stored for offline analysis.
In the monitoring-mode, with the "-r/--royweb" option it is possible to send the hit rates to a ROyWeb server. This option accept 3 parameters separated by a colon character (":"), which are:
Es: CLBSwissKnife -m -r HitRates-DOMd-CHc:localhost:9999
A default HR_n.c:localhost:9999 is used, otherwise all three parameters must be set at once.
Moreover, the time difference between two consecutive monitoring packets is sent to the ROy server with the tag "Time_difference". This is useful in order to highlight possible packet losses when a single CLB is used.
Ligier-mode options: The Ligier mode allows the user to monitor CLB data using a Ligier connection. To be activated a "-l/--ligier" flag must be present in the command line.
Ligier endpoint can be set with "-s/--server", while the tag can be set with the "-t/--tag". Proper default values are available and are listed in the on-line help.
E-mail: carme Date: 27 October 2014 lo.p elleg rino @bo.i nfn. it
Definition at line 147 of file clb_swiss_knife.cpp.
int get_terminal_width | ( | ) |
Definition at line 157 of file clb_swiss_knife.cpp.
void handle_signal | ( | boost::asio::signal_set & | set, |
int & | terminal_width, | ||
boost::system::error_code const & | error, | ||
int | signum | ||
) |
Definition at line 936 of file clb_swiss_knife.cpp.
|
inline |
Definition at line 430 of file clb_swiss_knife.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 450 of file clb_swiss_knife.cpp.
|
static |
Definition at line 175 of file clb_swiss_knife.cpp.
|
static |
Definition at line 177 of file clb_swiss_knife.cpp.
|
static |
Definition at line 178 of file clb_swiss_knife.cpp.
|
static |
Definition at line 179 of file clb_swiss_knife.cpp.