In January 2021 we will introduce a 10 GB quota for project repositories. Higher limits for individual projects will be available on request. Please see https://doku.lrz.de/display/PUBLIC/GitLab for more information.

Commit 1b2b109a authored by Micha Müller's avatar Micha Müller

Pusher: Refactor ConfiguratorTemplate once again. Replace partial template...

Pusher: Refactor ConfiguratorTemplate once again. Replace partial template specialization with derived ConfiguratorTemplate for entities
parent 421dcf37
This diff is collapsed.
This diff is collapsed.
......@@ -33,9 +33,15 @@ cat << EOF > ${PLUGIN_NAME}Configurator.h
#ifndef ${PLUGIN_NAME_UPC}_${PLUGIN_NAME_UPC}CONFIGURATOR_H_
#define ${PLUGIN_NAME_UPC}_${PLUGIN_NAME_UPC}CONFIGURATOR_H_
#include "../../includes/ConfiguratorTemplate.h"
#include "${PLUGIN_NAME}SensorGroup.h"
EOF
if [ "$enableEntities" = true ]
then
echo "#include \"../../includes/ConfiguratorTemplateEntity.h\"" >> ${PLUGIN_NAME}Configurator.h
else
echo "#include \"../../includes/ConfiguratorTemplate.h\"" >> ${PLUGIN_NAME}Configurator.h
fi
echo "#include \"${PLUGIN_NAME}SensorGroup.h\"" >> ${PLUGIN_NAME}Configurator.h
if [ "$enableEntities" = true ]
then
......@@ -53,7 +59,7 @@ EOF
if [ "$enableEntities" = true ]
then
echo "class ${PLUGIN_NAME}Configurator : public ConfiguratorTemplate<${PLUGIN_NAME}SensorBase, ${PLUGIN_NAME}SensorGroup, ${PLUGIN_NAME}${ENTITY_NAME}> {" >> ${PLUGIN_NAME}Configurator.h
echo "class ${PLUGIN_NAME}Configurator : public ConfiguratorTemplateEntity<${PLUGIN_NAME}SensorBase, ${PLUGIN_NAME}SensorGroup, ${PLUGIN_NAME}${ENTITY_NAME}> {" >> ${PLUGIN_NAME}Configurator.h
else
echo "class ${PLUGIN_NAME}Configurator : public ConfiguratorTemplate<${PLUGIN_NAME}SensorBase, ${PLUGIN_NAME}SensorGroup> {" >> ${PLUGIN_NAME}Configurator.h
fi
......
......@@ -19,9 +19,9 @@ while getopts "hp:e:a:" opt; do
echo "Usage:"
echo "./generatePlugin.sh -p pluginName"
echo "Options:"
echo "-h\tPrint this help section"
echo "-e xx\tGenerate files for entity"
echo "-a xx\tSpecify name of the author which is to be mentioned in the"
echo "-h Print this help section"
echo "-e xx Generate files for entity"
echo "-a xx Specify name of the author which is to be mentioned in the"
echo "\tsource files"
exit 0
;;
......
......@@ -44,7 +44,7 @@ IPMIConfigurator::IPMIConfigurator() {
IPMIConfigurator::~IPMIConfigurator() {}
bool IPMIConfigurator::readConfig(std::string cfgPath) {
if (ConfiguratorTemplate<IPMISensorBase, IPMISensorGroup, IPMIHost>::readConfig(cfgPath)) {
if (ConfiguratorTemplateEntity<IPMISensorBase, IPMISensorGroup, IPMIHost>::readConfig(cfgPath)) {
for (auto &g : _sensorGroups) {
if (!g->checkConfig()) {
return false;
......
......@@ -28,7 +28,7 @@
#ifndef IPMICONFIGURATOR_H_
#define IPMICONFIGURATOR_H_
#include "../../includes/ConfiguratorTemplate.h"
#include "../../includes/ConfiguratorTemplateEntity.h"
#include "IPMIHost.h"
#include "IPMISensorGroup.h"
......@@ -38,7 +38,7 @@
*
* @ingroup ipmi
*/
class IPMIConfigurator : public ConfiguratorTemplate<IPMISensorBase, IPMISensorGroup, IPMIHost> {
class IPMIConfigurator : public ConfiguratorTemplateEntity<IPMISensorBase, IPMISensorGroup, IPMIHost> {
typedef struct {
uint32_t sessionTimeout;
......
......@@ -28,7 +28,7 @@
#ifndef SRC_SENSORS_PDU_PDUCONFIGURATOR_H_
#define SRC_SENSORS_PDU_PDUCONFIGURATOR_H_
#include "../../includes/ConfiguratorTemplate.h"
#include "../../includes/ConfiguratorTemplateEntity.h"
#include "PDUSensorGroup.h"
#include "PDUUnit.h"
......@@ -38,7 +38,7 @@
*
* @ingroup pdu
*/
class PDUConfigurator : public ConfiguratorTemplate<PDUSensorBase, PDUSensorGroup, PDUUnit> {
class PDUConfigurator : public ConfiguratorTemplateEntity<PDUSensorBase, PDUSensorGroup, PDUUnit> {
public:
PDUConfigurator();
......
......@@ -28,7 +28,7 @@
#ifndef SNMPCONFIGURATOR_H_
#define SNMPCONFIGURATOR_H_
#include "../../includes/ConfiguratorTemplate.h"
#include "../../includes/ConfiguratorTemplateEntity.h"
#include "SNMPConnection.h"
#include "SNMPSensorGroup.h"
......@@ -38,7 +38,7 @@
*
* @ingroup snmp
*/
class SNMPConfigurator : public ConfiguratorTemplate<SNMPSensorBase, SNMPSensorGroup, SNMPConnection> {
class SNMPConfigurator : public ConfiguratorTemplateEntity<SNMPSensorBase, SNMPSensorGroup, SNMPConnection> {
public:
SNMPConfigurator();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment