Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
4715d7a6
Commit
4715d7a6
authored
Jun 25, 2019
by
Micha Müller
Browse files
Finish CaliperSensorBase
parent
bcec3a69
Changes
1
Hide whitespace changes
Inline
Side-by-side
dcdbpusher/sensors/caliper/CaliperSensorBase.h
View file @
4715d7a6
...
...
@@ -29,6 +29,19 @@
* @ingroup pusherplugins
*
* @brief Listen for data sent by Caliper framework.
*
* @details This plugin is an odd one out to accommodate Caliper. It uses UNIX
* sockets to receive data (function or event names and corresponding
* timestamp). It does not periodically poll data but instead checks if
* new data is available at the socket. If data is produced faster by
* Caliper than it can be consumed by this plugin at its current
* frequency data will be consequently lost. Sensors are not
* constructed at program start (during configuration) but during
* runtime. For each new encountered function/event name a new sensor
* is created whose name identifies the function/event. On subsequent
* encounters a value of 1 is pushed for the corresponding sensor.
* Aggregated numbers of encountered function/event names can be
* evaluated afterwards from the database.
*/
#ifndef CALIPER_CALIPERSENSORBASE_H_
...
...
@@ -36,69 +49,36 @@
#include "sensorbase.h"
/*
* TODO
* Add plugin specific includes
*/
/**
* @brief SensorBase specialization for this plugin.
*
* @ingroup cali
*/
* @brief SensorBase specialization for this plugin.
*
* @ingroup cali
*/
class
CaliperSensorBase
:
public
SensorBase
{
public:
CaliperSensorBase
(
const
std
::
string
&
name
)
:
SensorBase
(
name
)
{
/*
* TODO
* Initialize plugin specific attributes
*/
}
CaliperSensorBase
(
const
CaliperSensorBase
&
other
)
:
SensorBase
(
other
)
{
/*
* TODO
* Copy construct plugin specific attributes
*/
}
CaliperSensorBase
(
const
std
::
string
&
name
)
:
SensorBase
(
name
)
{
}
CaliperSensorBase
(
const
CaliperSensorBase
&
other
)
:
SensorBase
(
other
)
{
}
virtual
~
CaliperSensorBase
()
{
}
CaliperSensorBase
&
operator
=
(
const
CaliperSensorBase
&
other
)
{
SensorBase
::
operator
=
(
other
);
virtual
~
CaliperSensorBase
()
{
/*
* TODO
* If necessary, deconstruct plugin specific attributes
*/
}
CaliperSensorBase
&
operator
=
(
const
CaliperSensorBase
&
other
)
{
SensorBase
::
operator
=
(
other
);
/*
* TODO
* Implement assignment operator for plugin specific attributes
*/
return
*
this
;
}
return
*
this
;
}
/*
* TODO
* Getters and Setters for plugin specific attributes
*/
void
printConfig
(
LOG_LEVEL
ll
,
LOGGER
&
lg
)
{
/*
* TODO
* Log attributes here for debug reasons
*/
LOG_VAR
(
ll
)
<<
" NumSpacesAsIndention: "
<<
5
;
}
void
printConfig
(
LOG_LEVEL
ll
,
LOGGER
&
lg
)
{
/* nothing to print */
}
protected:
/*
* TODO
* Add plugin specific attributes here
*/
// no specific attributes
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment