96 operator const void*()
const {
return isAck() ? this :
nullptr; }
const char * mip_cmd_result_to_string(enum mip_cmd_result result)
bool mip_cmd_result_is_reply(enum mip_cmd_result result)
bool mip_cmd_result_is_ack(enum mip_cmd_result result)
mip_cmd_result
Represents the status of a MIP command.
Definition: mip_result.h:24
bool mip_cmd_result_is_status(enum mip_cmd_result result)
bool mip_cmd_result_is_finished(enum mip_cmd_result result)
@ MIP_STATUS_WAITING
Waiting for command reply (timeout timer has started).
Definition: mip_result.h:28
@ MIP_NACK_INVALID_CHECKSUM
Reserved.
Definition: mip_result.h:34
@ MIP_STATUS_PENDING
Command has been queued but the I/O update hasn't run yet.
Definition: mip_result.h:29
@ MIP_STATUS_TIMEDOUT
Reply was not received before timeout expired.
Definition: mip_result.h:27
@ MIP_ACK_OK
Command completed successfully.
Definition: mip_result.h:32
@ MIP_STATUS_ERROR
Command could not be executed (error sending/receiving)
Definition: mip_result.h:25
@ MIP_NACK_COMMAND_FAILED
The device could not complete the command.
Definition: mip_result.h:36
@ MIP_NACK_COMMAND_UNKNOWN
Command not supported.
Definition: mip_result.h:33
@ MIP_STATUS_NONE
Command has been initialized but not queued yet.
Definition: mip_result.h:30
@ MIP_STATUS_CANCELLED
Command was canceled in software.
Definition: mip_result.h:26
@ MIP_NACK_INVALID_PARAM
A parameter was not a supported value.
Definition: mip_result.h:35
@ MIP_NACK_COMMAND_TIMEOUT
Internal device timeout. Use MIP_STATUS_TIMEDOUT for command timeouts.
Definition: mip_result.h:37
A collection of C++ classes and functions covering the full mip api.
Definition: commands_3dm.c:11
Represents the status of a MIP command.
Definition: mip_result.h:67
bool operator==(CmdResult other) const
Definition: mip_result.h:99
static constexpr C::mip_cmd_result STATUS_PENDING
Definition: mip_result.h:83
C::mip_cmd_result value
Definition: mip_result.h:86
CmdResult()
Definition: mip_result.h:88
CmdResult & operator=(const CmdResult &other)=default
const char * name() const
Definition: mip_result.h:105
bool operator!=(C::mip_cmd_result other) const
Definition: mip_result.h:103
static constexpr C::mip_cmd_result NACK_COMMAND_FAILED
The device could not complete the command.
Definition: mip_result.h:79
static constexpr C::mip_cmd_result NACK_COMMAND_TIMEOUT
Internal device timeout. Use MIP_STATUS_TIMEDOUT for command timeouts.
Definition: mip_result.h:80
static constexpr C::mip_cmd_result STATUS_ERROR
Command could not be executed (error sending/receiving)
Definition: mip_result.h:68
static constexpr C::mip_cmd_result ACK_OK
Command completed successfully.
Definition: mip_result.h:75
static constexpr C::mip_cmd_result STATUS_WAITING
Waiting for command reply (timeout timer has started).
Definition: mip_result.h:71
static constexpr C::mip_cmd_result NACK_INVALID_CHECKSUM
Reserved.
Definition: mip_result.h:77
static constexpr C::mip_cmd_result STATUS_CANCELLED
Command was canceled in software.
Definition: mip_result.h:69
CmdResult & operator=(C::mip_cmd_result other)
Definition: mip_result.h:92
static constexpr C::mip_cmd_result STATUS_TIMEDOUT
Reply was not received before timeout expired.
Definition: mip_result.h:70
bool operator==(C::mip_cmd_result other) const
Definition: mip_result.h:102
bool isFinished() const
Definition: mip_result.h:109
bool operator!=(CmdResult other) const
Definition: mip_result.h:100
bool isReplyCode() const
Definition: mip_result.h:107
CmdResult(C::mip_cmd_result result)
Definition: mip_result.h:89
bool isAck() const
Definition: mip_result.h:110
static CmdResult fromAckNack(uint8_t code)
Definition: mip_result.h:94
bool operator!() const
Definition: mip_result.h:97
static constexpr C::mip_cmd_result NACK_COMMAND_UNKNOWN
Command not supported.
Definition: mip_result.h:76
static constexpr C::mip_cmd_result STATUS_NONE
Command has been initialized but not queued yet.
Definition: mip_result.h:73
bool isStatusCode() const
Definition: mip_result.h:108
static constexpr C::mip_cmd_result NACK_INVALID_PARAM
A parameter was not a supported value.
Definition: mip_result.h:78
static constexpr C::mip_cmd_result STATUS_QUEUED
Command has been queued but the I/O update hasn't run yet.
Definition: mip_result.h:72