C++ monitoring implementation of http://www.apcupsd.org.
More...
#include <apcupsd.h>
|
| enum | cable { Custom_Cable_Smart,
USB_Cable
} |
| |
| enum | driver { APC_Smart_UPS__any_,
USB_UPS_Driver
} |
| |
| enum | upsmode { Stand_Alone
} |
| |
| enum | status1 {
ONLINE_ = 0,
NoSignal = 1,
ONBATT_ = 2,
BOOST_ONLINE_ = 4,
CAL_ONBATT_ = 8,
ONLINE_LOWBATT_ = 16
} |
| |
| enum | sense { High,
Medium,
Low
} |
| |
| enum | selftest { OK,
BT,
NG,
NO
} |
| |
|
| static bool | ReadText (std::string, const char *, char *, size_t) |
| |
| static bool | ReadDateTime (std::string, const char *, time_t *) |
| |
| static bool | ReadDate (std::string, const char *, time_t *) |
| |
| static bool | ReadFloat (std::string, const char *, float *) |
| |
| static bool | ReadInt (std::string, const char *, int *) |
| |
C++ monitoring implementation of http://www.apcupsd.org.
Definition at line 32 of file apcupsd.h.
◆ cable
| Enumerator |
|---|
| Custom_Cable_Smart | |
| USB_Cable | |
Definition at line 48 of file apcupsd.h.
◆ driver
| Enumerator |
|---|
| APC_Smart_UPS__any_ | |
| USB_UPS_Driver | |
Definition at line 54 of file apcupsd.h.
◆ selftest
| Enumerator |
|---|
| OK | self test indicates good battery
|
| BT | self test failed due to insufficient battery capacity
|
| NG | self test failed due to overload
|
| NO | No results (i.e. no self test performed in the last 5 minutes)
|
Definition at line 83 of file apcupsd.h.
◆ sense
| Enumerator |
|---|
| High | |
| Medium | |
| Low | |
Definition at line 76 of file apcupsd.h.
◆ status1
| Enumerator |
|---|
| ONLINE_ | |
| NoSignal | Not a real APC status, reserved for compatibility across the board.
|
| ONBATT_ | |
| BOOST_ONLINE_ | |
| CAL_ONBATT_ | |
| ONLINE_LOWBATT_ | |
Definition at line 65 of file apcupsd.h.
◆ upsmode
◆ Apcupsd()
| Devices::Apcupsd::Apcupsd |
( |
| ) |
|
◆ ~Apcupsd()
| Devices::Apcupsd::~Apcupsd |
( |
| ) |
|
◆ Connect()
| void Devices::Apcupsd::Connect |
( |
| ) |
|
|
private |
◆ FrameMove()
| void Devices::Apcupsd::FrameMove |
( |
float |
fElapsedTime | ) |
|
◆ Initialize()
- Todo:
- need to make this configurable? Or get rid of it from this file actually what we need to do is make components out of each of these values so we can FDR it?
Definition at line 24 of file apcupsd.cpp.
◆ Log()
| void Devices::Apcupsd::Log |
( |
char * |
msg, |
|
|
Logger::Level |
level = Logger::Level::Info, |
|
|
int |
errorno = 0 |
|
) |
| const |
|
private |
◆ ReadDate()
| bool Devices::Apcupsd::ReadDate |
( |
std::string |
str, |
|
|
const char * |
pattern, |
|
|
time_t * |
ret |
|
) |
| |
|
staticprivate |
◆ ReadDateTime()
| bool Devices::Apcupsd::ReadDateTime |
( |
std::string |
str, |
|
|
const char * |
pattern, |
|
|
time_t * |
ret |
|
) |
| |
|
staticprivate |
◆ ReadFloat()
| bool Devices::Apcupsd::ReadFloat |
( |
std::string |
str, |
|
|
const char * |
pattern, |
|
|
float * |
retval |
|
) |
| |
|
staticprivate |
◆ ReadInt()
| bool Devices::Apcupsd::ReadInt |
( |
std::string |
str, |
|
|
const char * |
pattern, |
|
|
int * |
retval |
|
) |
| |
|
staticprivate |
◆ ReadText()
| bool Devices::Apcupsd::ReadText |
( |
std::string |
str, |
|
|
const char * |
pattern, |
|
|
char * |
output, |
|
|
size_t |
outputsize |
|
) |
| |
|
staticprivate |
◆ avionicsBayTemp
| float* Devices::Apcupsd::avionicsBayTemp = nullptr |
|
private |
◆ buf
| char Devices::Apcupsd::buf[4096] |
|
private |
◆ bus
| Bus* Devices::Apcupsd::bus = nullptr |
|
private |
◆ config
◆ connected
| bool Devices::Apcupsd::connected = false |
|
private |
◆ datafile
| int Devices::Apcupsd::datafile = 0 |
|
private |
◆ logger
| Logger* Devices::Apcupsd::logger = nullptr |
|
private |
◆ status
| STATUS Devices::Apcupsd::status |
◆ tcp
| SOCKET Devices::Apcupsd::tcp = static_cast<SOCKET>(SOCKET_ERROR) |
|
private |
◆ timeSinceLastUpdate
| float Devices::Apcupsd::timeSinceLastUpdate = 0.0f |
|
private |
The documentation for this class was generated from the following files: