Status.
More...
#include <misc/pv/status.h>
|
static Status | warn (const std::string &m) |
|
static Status | error (const std::string &m) |
|
static Status | fatal (const std::string &m) |
|
|
static const char * | StatusTypeName [] |
|
static Status | Ok |
|
Status.
This is a class for returning status to clients.
- Author
- mse
Definition at line 28 of file status.h.
◆ StatusType
Status type enum.
Enumerator |
---|
STATUSTYPE_OK | Operation completed successfully.
|
STATUSTYPE_WARNING | Operation completed successfully, but there is a warning message.
|
STATUSTYPE_ERROR | Operation failed due to an error.
|
STATUSTYPE_FATAL | Operation failed due to an unexpected error.
|
Definition at line 34 of file status.h.
◆ Status() [1/3]
epics::pvData::Status::Status |
( |
| ) |
|
|
inline |
Creates OK status; STATUSTYPE_OK, empty message and stackDump.
Definition at line 56 of file status.h.
◆ Status() [2/3]
epics::pvData::Status::Status |
( |
StatusType |
type, |
|
|
std::string const & |
message |
|
) |
| |
◆ Status() [3/3]
epics::pvData::Status::Status |
( |
StatusType |
type, |
|
|
std::string const & |
message, |
|
|
std::string const & |
stackDump |
|
) |
| |
◆ deserialize()
◆ getMessage()
const std::string& epics::pvData::Status::getMessage |
( |
| ) |
const |
|
inline |
Get error message describing an error. Required if error status.
- Returns
- error message.
Definition at line 80 of file status.h.
◆ getStackDump()
const std::string& epics::pvData::Status::getStackDump |
( |
| ) |
const |
|
inline |
Get stack dump where error (exception) happened. Optional.
- Returns
- stack dump.
Definition at line 86 of file status.h.
◆ getType()
StatusType epics::pvData::Status::getType |
( |
| ) |
const |
|
inline |
Get status type.
- Returns
- status type, non-
null
.
Definition at line 74 of file status.h.
◆ isOK()
bool epics::pvData::Status::isOK |
( |
| ) |
const |
|
inline |
Convenient OK test. Same as (getType() == StatusType.OK)
. NOTE: this will return false
on WARNING message although operation succeeded. To check if operation succeeded, use isSuccess
.
- Returns
- OK status.
- See also
- isSuccess()
Definition at line 95 of file status.h.
◆ isSuccess()
bool epics::pvData::Status::isSuccess |
( |
| ) |
const |
|
inline |
Check if operation succeeded (OK or WARNING).
- Returns
- operation success status.
Definition at line 103 of file status.h.
◆ maximize()
void epics::pvData::Status::maximize |
( |
const Status & |
o | ) |
|
override this Status if the other has higher StatusType
ret |= call1();
if(ret)
ret |= call2();
return ret;
◆ serialize()
Serialize field into given buffer.
- Parameters
-
buffer | serialization buffer. |
flusher | flush interface. |
Implements epics::pvData::Serializable.
The documentation for this class was generated from the following file: