Class NpsInfo

Class Documentation

class NpsInfo

NPS information class.

This class defines the information for each NPS

Public Functions

NpsInfo()
~NpsInfo()
inline long load_nps_info(std::string &input, int &npsnum)

loads NPS information from the configuration file into the class

This function is called whenever the NPS_UNIT key is found in the configuration file, to parse and load all of the information assigned by that key into the appropriate NpsInfo class variables.

The input string specifies: “<nps#> <maxplugs> <host> <port>”

Parameters:

input[in]

Returns:

ERROR or NO_ERROR

inline long load_plug_info(std::string &input, int &npsnum, int &plugnum, std::string &plugname)

loads plug information from the configuration file into the class

This function is called whenever the NPS_PLUG key is found in the configuration file, to parse and load all of the information assigned by that key into the appropriate NpsInfo class variables.

The input string specifies: “<nps#> <plug#> <plugname>”

Parameters:

input[in]

Returns:

ERROR or NO_ERROR

Public Members

int npsnum

an integer assigned to each NPS as an identifier

int maxplugs

the number of outlets on this NPS

std::string host

host name/IP for this NPS

int port

port number for this NPS