1 #ifndef _NORTH_SERVICE_H 2 #define _NORTH_SERVICE_H 14 #include <north_plugin.h> 15 #include <service_handler.h> 16 #include <storage_client.h> 17 #include <config_category.h> 18 #include <filter_plugin.h> 20 #include <condition_variable> 21 #include <audit_logger.h> 22 #include <perfmonitors.h> 24 #define SERVICE_NAME "Fledge North" 37 const std::string& token =
"");
39 void start(std::string& coreAddress,
40 unsigned short corePort);
44 void configChange(
const std::string&,
const std::string&);
45 void configChildCreate(
const std::string& ,
const std::string&,
const std::string&){};
46 void configChildDelete(
const std::string& ,
const std::string&){};
47 bool isRunning() {
return !m_shutdown; };
48 const std::string& getName() {
return m_name; };
49 const std::string& getPluginName() {
return m_pluginName; };
52 bool write(
const std::string& name,
const std::string& value,
const ControlDestination);
53 bool write(
const std::string& name,
const std::string& value,
const ControlDestination,
const std::string& arg);
54 int operation(
const std::string& name,
int paramCount,
char *names[],
char *parameters[],
const ControlDestination);
55 int operation(
const std::string& name,
int paramCount,
char *names[],
char *parameters[],
const ControlDestination,
const std::string& arg);
56 void setDryRun() { m_dryRun =
true; };
57 bool getDryRun() {
return m_dryRun; };
63 void createConfigCategories(
DefaultConfigCategory configCategory, std::string parent_name,std::string current_name);
66 std::string controlSource();
67 bool sendToService(
const std::string& southService,
const std::string& name,
const std::string& value);
68 bool sendToDispatcher(
const std::string& path,
const std::string& payload);
72 std::string m_pluginName;
75 volatile bool m_shutdown;
80 std::condition_variable m_cv;
83 const std::string m_token;
86 bool m_requestRestart;
Fledge Logger class used to log to syslog.
Definition: logger.h:26
The NorthService class.
Definition: north_service.h:34
DefaultConfigCategory.
Definition: config_category.h:236
A class used in the North service to load data from the buffer.
Definition: data_load.h:24
Definition: config_category.h:56
virtual ~NorthService()
Destructor for the north service.
Definition: north.cpp:320
Definition: data_sender.h:25
void stop()
Stop the storage service/.
Definition: north.cpp:603
void configChange(const std::string &, const std::string &)
Configuration change notification.
Definition: north.cpp:789
Definition: plugin_data.h:15
NorthService(const std::string &name, const std::string &token="")
Constructor for the north service.
Definition: north.cpp:296
A singleton class for access to the audit logger within services.
Definition: audit_logger.h:21
Class that represents a north plugin.
Definition: north_plugin.h:33
Client for accessing the storage service.
Definition: storage_client.h:43
void start(std::string &coreAddress, unsigned short corePort)
Start the north service.
Definition: north.cpp:346
void shutdown()
Shutdown request.
Definition: north.cpp:757
void restart()
Restart request.
Definition: north.cpp:772
void alertFailures()
Raise an alert that we are having issues sending data.
Definition: north.cpp:1325
void clearFailures()
Clear the failure alert for sending data.
Definition: north.cpp:1339
The AssetTracker class provides the asset tracking functionality.
Definition: asset_tracking.h:239
ServiceAuthHandler adds security to the base class ServiceHandler.
Definition: service_handler.h:35