Fledge
An open source edge computing platform for industrial users
All Classes Functions Variables Pages
SouthService Class Reference

The SouthService class. More...

#include <south_service.h>

Inheritance diagram for SouthService:
Collaboration diagram for SouthService:

Public Member Functions

 SouthService (const std::string &name, const std::string &token="")
 Constructor for the south service.
 
virtual ~SouthService ()
 Destructor for south service.
 
void start (std::string &coreAddress, unsigned short corePort)
 Start the south service.
 
void stop ()
 Stop the storage service/.
 
void shutdown ()
 Shutdown request.
 
void restart ()
 Restart request.
 
void configChange (const std::string &, const std::string &)
 Configuration change notification using a separate thread. More...
 
void processConfigChange (const std::string &, const std::string &)
 Configuration change notification. More...
 
void configChildCreate (const std::string &, const std::string &, const std::string &)
 
void configChildDelete (const std::string &, const std::string &)
 
bool isRunning ()
 
bool setPoint (const std::string &name, const std::string &value)
 Perform a setPoint operation on the south plugin. More...
 
bool operation (const std::string &name, std::vector< PLUGIN_PARAMETER *> &)
 Perform an operation on the south plugin. More...
 
void setDryRun ()
 
void handlePendingReconf ()
 Handle configuration change notification; called by reconf thread Waits for some reconf operation(s) to get queued up, then works thru' them.
 
- Public Member Functions inherited from ServiceAuthHandler
std::string & getName ()
 
std::string & getType ()
 
bool createSecurityCategories (ManagementClient *mgtClient, bool dryRun)
 Create "${service}Security" category with empty content. More...
 
bool updateSecurityCategory (const std::string &newCategory)
 Update the class objects from security category content update. More...
 
void setInitialAuthenticatedCaller ()
 Set initial value of enabled authentication.
 
void setAuthenticatedCaller (bool enabled)
 Set enabled authentication value. More...
 
bool getAuthenticatedCaller ()
 Return enabled authentication value. More...
 
bool AuthenticationMiddlewareACL (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request, const std::string &serviceName, const std::string &serviceType)
 Authentication Middleware ACL check. More...
 
bool AuthenticationMiddlewareCommon (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request, std::string &callerName, std::string &callerType)
 Authentication Middleware for Dispatcher service. More...
 
void AuthenticationMiddlewarePUT (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request, std::function< void(std::shared_ptr< HttpServer::Response >, std::shared_ptr< HttpServer::Request >)> funcPUT)
 Authentication Middleware for PUT methods. More...
 
void refreshBearerToken ()
 Refresh the bearer token of the runnign service This routine is run by a thread started in createSecurityCategories. More...
 
void respond (std::shared_ptr< HttpServer::Response > response, const std::string &payload)
 
void respond (std::shared_ptr< HttpServer::Response > response, SimpleWeb::StatusCode code, const std::string &payload)
 
bool securityChange (const std::string &payload)
 Request security change action: More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ServiceAuthHandler
static ManagementClientgetMgmtClient ()
 
- Protected Attributes inherited from ServiceAuthHandler
std::string m_name
 
std::string m_type
 
- Static Protected Attributes inherited from ServiceAuthHandler
static ManagementClientm_mgtClient = NULL
 Initialise m_mgtClient object to NULL.
 

Detailed Description

The SouthService class.

This class is the core of the service that provides south side services to Fledge.

Member Function Documentation

◆ configChange()

void SouthService::configChange ( const std::string &  ,
const std::string &   
)
virtual

Configuration change notification using a separate thread.

Parameters
categoryNameCategory name
categoryCategory value

Implements ServiceHandler.

◆ operation()

bool SouthService::operation ( const std::string &  name,
std::vector< PLUGIN_PARAMETER *> &   
)

Perform an operation on the south plugin.

Parameters
nameName of the operation
paramsThe parameters for the operaiton, if any
Returns
Success or failure of the operation

◆ processConfigChange()

void SouthService::processConfigChange ( const std::string &  ,
const std::string &   
)

Configuration change notification.

Parameters
categoryNameCategory name
categoryCategory value

◆ setPoint()

bool SouthService::setPoint ( const std::string &  name,
const std::string &  value 
)

Perform a setPoint operation on the south plugin.

Parameters
nameName of the point to set
valueThe value to set
Returns
Success or failure of the SetPoint operation

The documentation for this class was generated from the following files: