本文整理汇总了C++中sendCommandMessage函数的典型用法代码示例。如果您正苦于以下问题:C++ sendCommandMessage函数的具体用法?C++ sendCommandMessage怎么用?C++ sendCommandMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sendCommandMessage函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendCommandMessage
void QApplicationCommand::setMistEnabled(bool enable)
{
if (m_connectionState != Connected) {
return;
}
if (enable)
{
sendCommandMessage(pb::MT_EMC_COOLANT_MIST_ON);
}
else
{
sendCommandMessage(pb::MT_EMC_COOLANT_MIST_OFF);
}
}
示例2: if
void QApplicationCommand::jog(QApplicationCommand::JogType type, int axisIndex, double velocity, double distance)
{
if (m_connectionState != Connected) {
return;
}
pb::ContainerType containerType;
pb::EmcCommandParameters *commandParams = m_tx.mutable_emc_command_params();
commandParams->set_index(axisIndex);
if (type == StopJog)
{
containerType = pb::MT_EMC_AXIS_ABORT;
}
else if (type == ContinousJog) {
containerType = pb::MT_EMC_AXIS_JOG;
commandParams->set_velocity(velocity);
}
else if (type == IncrementJog)
{
containerType = pb::MT_EMC_AXIS_INCR_JOG;
commandParams->set_velocity(velocity);
commandParams->set_distance(distance);
}
else
{
m_tx.Clear();
return;
}
sendCommandMessage(containerType);
}
示例3: sendCommandMessage
void QApplicationLauncher::shutdown()
{
if (!m_connected) {
return;
}
sendCommandMessage(pb::MT_LAUNCHER_SHUTDOWN);
}
示例4: DEBUG_TAG
void QApplicationLauncher::start(int index)
{
if (!m_connected) {
return;
}
#ifdef QT_DEBUG
DEBUG_TAG(1, m_commandIdentity, "starting launcher" << index)
#endif
m_tx.set_index(index);
sendCommandMessage(pb::MT_LAUNCHER_START);
}