Home CommandObject
CommandObject Class
CommandObject::CommandObject \param
parent More...
Public Types
enum | State { Waiting, Executing, Pending, Timeout, RightReplied, WrongReplied } |
Public Functions
CommandObject(AbstractProtocol *parent = 0) | |
QByteArray | contents() const |
int | getMaxExecuteTimes() const |
int | getTimeout() const |
AbstractProtocol * | protocolBelongs() |
QByteArray | reply() const |
void | setContents(const QByteArray &value) |
void | setMaxExecuteTimes(int value) |
void | setReply(const QByteArray &value) |
void | setState(const State &value) |
void | setTimeout(int value) |
State | state() const |
Signals
void | stateChanged(const State &m_state) |
Member Type Documentation
enum CommandObject::State
命令的执行状态
- Command::Waiting 表示该命令在队列中等待查询
- Command::Executing 表示该命令位于队列首部,正在查询,此时与之相应的计时器启动计时
- Command::Pending 表示该命令暂时被挂起,计时器暂停计时
- Command::Timeout 表示该命令在一定时间内尚未接收到回复(即指令执行失败)
- Command::RightReplied 表示该命令已经收到正常回复
- Command::WrongReplied 表示该命令已经收到回复,但回复并不与该指令对应(目前无法判断)
Member Function Documentation
CommandObject::CommandObject(AbstractProtocol *parent = 0)
Default constructs an instance of CommandObject.
QByteArray CommandObject::contents() const
See also setContents().
int CommandObject::getMaxExecuteTimes() const
int CommandObject::getTimeout() const
AbstractProtocol *CommandObject::protocolBelongs()
QByteArray CommandObject::reply() const
See also setReply().
void CommandObject::setContents(const QByteArray &value)
See also contents().
void CommandObject::setMaxExecuteTimes(int value)
void CommandObject::setReply(const QByteArray &value)
See also reply().
void CommandObject::setState(const State &value)
See also state().
void CommandObject::setTimeout(int value)
State CommandObject::state() const
See also setState().