syswindow
1.0
|
#include <syswin_client.h>
Public Member Functions | |
SysWinClient (void) | |
~SysWinClient (void) | |
SysWinErrorCode | ConnectServer (std::string ip, std::string port) |
SysWinErrorCode | Authenticate (std::string user, std::string password) |
SysWinErrorCode | AddModule (std::string module_id, std::string name) |
SysWinErrorCode | AddWidget (std::string module_id, std::string widget_id, WidgetType type, std::string name) |
SysWinErrorCode | UpdateLineChartWidget (std::string module_id, std::string widget_id, float x, float y) |
SysWinErrorCode | UpdateSingleValueWidget (std::string module_id, std::string widget_id, std::string value) |
SysWinErrorCode | UpdateProgressBarWidget (std::string module_id, std::string widget_id, double value, double max_value) |
SysWinErrorCode | UpdatePieChartWidget (std::string module_id, std::string widget_id, std::string label, double value) |
SysWinErrorCode | UpdateBarChartWidget (std::string module_id, std::string widget_id, std::string label, double value) |
SysWinErrorCode | UpdateListWidget (std::string module_id, std::string widget_id, std::string text) |
SysWinErrorCode | UpdateImageWidget (std::string module_id, std::string widget_id, void *data, int width, int height, int bpp) |
SysWinErrorCode | UpdateImageWidget (std::string module_id, std::string widget_id, std::string path) |
SysWinErrorCode | AddProcessorCountWidget (std::string module_id, std::string widget_id, std::string name) |
SysWinErrorCode | AddSystemNameWidget (std::string module_id, std::string widget_id, std::string name) |
SysWinErrorCode | AddLoggedInUserWidget (std::string module_id, std::string widget_id, std::string name) |
SysWinErrorCode | AddTotalSystemMemoryWidget (std::string module_id, std::string widget_id, std::string name) |
SysWinErrorCode | AddAvailableSystemMemoryWidget (std::string module_id, std::string widget_id, std::string name, long update_interval_secs) |
SysWinErrorCode | AddOSNameWidget (std::string module_id, std::string widget_id, std::string name) |
SysWinErrorCode | AddProcessMemoryUsageWidget (std::string module_id, std::string widget_id, std::string name, long pid, long update_interval_secs) |
SysWinErrorCode | AddProcessThreadUsageWidget (std::string module_id, std::string widget_id, std::string name, long pid, long update_interval_secs) |
SysWinErrorCode | AddProcessCPUUsageWidget (std::string module_id, std::string widget_id, std::string name, long pid, long update_interval_secs) |
SysWinErrorCode | AddProcessHandleCountWidget (std::string module_id, std::string widget_id, std::string name, long pid, long update_interval_secs) |
std::string | GetProcessName (long pid) |
long | GetProcessID () |
std::string | GetProcessFullPath (long pid) |
std::string | GetArchitecture (long pid) |
ekomsys::SysWinClient::SysWinClient | ( | void | ) |
ekomsys::SysWinClient::~SysWinClient | ( | void | ) |
SysWinErrorCode ekomsys::SysWinClient::AddAvailableSystemMemoryWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name, | ||
long | update_interval_secs | ||
) |
Adds the widget showing the available system memory of the host machine
[in] | module_id | Module identifier. |
SysWinErrorCode ekomsys::SysWinClient::AddLoggedInUserWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name | ||
) |
Adds the widget showing the logged in user
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | name | Name of the widget. |
SysWinErrorCode ekomsys::SysWinClient::AddModule | ( | std::string | module_id, |
std::string | name | ||
) |
Adds a module in the application. Adding a module adds a separate tab on the dashboard. User can add multiple modules and can group the related widgets under the same module.
[in] | module_id | Module identifier. |
[in] | name | Module name. |
This identifer will be used to identify the widget on the server so its important to keep it unique in the application
SysWinErrorCode ekomsys::SysWinClient::AddOSNameWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name | ||
) |
Adds the widget showing the Operating System of the host machine
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | name | Name of the widget. |
SysWinErrorCode ekomsys::SysWinClient::AddProcessCPUUsageWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name, | ||
long | pid, | ||
long | update_interval_secs | ||
) |
Adds the widget showing the CPU usage of a process
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | name | Name of the widget. |
[in] | process_id | PID of the process. |
SysWinErrorCode ekomsys::SysWinClient::AddProcessHandleCountWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name, | ||
long | pid, | ||
long | update_interval_secs | ||
) |
Adds the widget showing the handles used by a process
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | name | Name of the widget. |
[in] | process_id | PID of the process. |
SysWinErrorCode ekomsys::SysWinClient::AddProcessMemoryUsageWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name, | ||
long | pid, | ||
long | update_interval_secs | ||
) |
Adds the widget showing the memory usage of a process
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | name | Name of the widget. |
[in] | process_id | PID of the process. |
SysWinErrorCode ekomsys::SysWinClient::AddProcessorCountWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name | ||
) |
Adds the widget showing the processor count on the host machine
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | name | Name of the widget. |
SysWinErrorCode ekomsys::SysWinClient::AddProcessThreadUsageWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name, | ||
long | pid, | ||
long | update_interval_secs | ||
) |
Adds the widget showing the threads used by a process
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | name | Name of the widget. |
[in] | process_id | PID of the process. |
SysWinErrorCode ekomsys::SysWinClient::AddSystemNameWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name | ||
) |
Adds the widget showing the machine name of the host machine
[in] | module_id | Module identifier. |
SysWinErrorCode ekomsys::SysWinClient::AddTotalSystemMemoryWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | name | ||
) |
Adds the widget showing the total system memory of the host machine
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | name | Name of the widget. |
[in] | update_interval | Update interval in seconds. |
SysWinErrorCode ekomsys::SysWinClient::AddWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
WidgetType | type, | ||
std::string | name | ||
) |
Adds a widget in the dashboard. Adding a widget adds a widget on the dashboard under the specified module. User can add multiple widgets in a module
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | type | Widget type. |
[in] | name | Widget name. |
This identifer will be used to identify the widget on the server so its important to keep it unique in the module
SysWinErrorCode ekomsys::SysWinClient::Authenticate | ( | std::string | user, |
std::string | password | ||
) |
Authenticated with the server using username and password. Server will use the same credentials to authenticate with the web applciation and if user has registered to use online services than server will push the data to the web application.
[in] | user | Username of the client. |
[in] | password | Password. |
SysWinErrorCode ekomsys::SysWinClient::ConnectServer | ( | std::string | ip, |
std::string | port | ||
) |
Connect to the sysd server.
[in] | ip | IP Address of the server. |
[in] | port | Port where the server is listening, default port is 40000. |
std::string ekomsys::SysWinClient::GetArchitecture | ( | long | pid | ) |
Gets the process architecture
[in] | module_id | Module identifier. |
[in] | process_id | PID of the process. |
std::string ekomsys::SysWinClient::GetProcessFullPath | ( | long | pid | ) |
Gets the process full path given its PID
[in] | module_id | Module identifier. |
[in] | process_id | PID of the process. |
long ekomsys::SysWinClient::GetProcessID | ( | ) |
Gets the host application process PID
std::string ekomsys::SysWinClient::GetProcessName | ( | long | pid | ) |
Gets the process name given its PID
[in] | module_id | Module identifier. |
[in] | process_id | PID of the process. |
SysWinErrorCode ekomsys::SysWinClient::UpdateBarChartWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | label, | ||
double | value | ||
) |
Appends the data to the bar chart widget
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | label | Label. |
[in] | value | Value for the label. |
SysWinErrorCode ekomsys::SysWinClient::UpdateImageWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
void * | data, | ||
int | width, | ||
int | height, | ||
int | bpp | ||
) |
Appends the data to the image widget. The image data here can be in RGBA or RGB format.
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | data | Image data. |
[in] | width | Image width. |
[in] | height | Image height. |
[in] | bpp | Bits per pixel, for RGBA its 32, for RGB its 24. |
SysWinErrorCode ekomsys::SysWinClient::UpdateImageWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | path | ||
) |
Appends the image widget with data from the image file. The image data here is the data from the image file.
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | file_path | Path of the image file. |
SysWinErrorCode ekomsys::SysWinClient::UpdateLineChartWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
float | x, | ||
float | y | ||
) |
Appends the data to the line chart widget
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | x | x value of the data. |
[in] | y | y value of the data. |
SysWinErrorCode ekomsys::SysWinClient::UpdateListWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | text | ||
) |
Appends the data to the list widget
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | text | Text to add to the widget. |
SysWinErrorCode ekomsys::SysWinClient::UpdatePieChartWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | label, | ||
double | value | ||
) |
Appends the data to the pie-chart widget
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | label | Label. |
[in] | value | Value for the label. |
SysWinErrorCode ekomsys::SysWinClient::UpdateProgressBarWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
double | value, | ||
double | max_value | ||
) |
Appends the data to the progress bar widget
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | value | value of the data. |
[in] | max_value | Maximum value of the data. |
SysWinErrorCode ekomsys::SysWinClient::UpdateSingleValueWidget | ( | std::string | module_id, |
std::string | widget_id, | ||
std::string | value | ||
) |
Appends the data to the single value widget
[in] | module_id | Module identifier. |
[in] | widget_id | Widget identifier. |
[in] | value | value of the data. |