![]() |
Fledge
An open source edge computing platform for industrial users
|
#include <piwebapi.h>
Public Member Functions | |
void | setAuthMethod (std::string &authMethod) |
void | setAuthBasicCredentials (std::string &authBasicCredentials) |
int | GetVersion (const string &host, string &version, bool logMessage=true) |
Calls the PI Web API to retrieve the version. More... | |
string | errorMessageHandler (const string &msg) |
Handles PI Web API error message considering the possible cases: More... | |
The PIWebAPI class.
string PIWebAPI::errorMessageHandler | ( | const string & | msg | ) |
Handles PI Web API error message considering the possible cases:
json | JSON message generated by PIWebAPI containing the error |
int PIWebAPI::GetVersion | ( | const string & | host, |
string & | version, | ||
bool | logMessage = true |
||
) |
Calls the PI Web API to retrieve the version.
host | Reference of the server running PI Web API in the format: hostName + ":" + port |
version | The returned version string of the PI Web API server |
logMessage | If true, log an error message if there is a failure (default: true) |