本文整理汇总了C++中PushCommand函数的典型用法代码示例。如果您正苦于以下问题:C++ PushCommand函数的具体用法?C++ PushCommand怎么用?C++ PushCommand使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PushCommand函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EUDAQ_WARN
void TimepixProducer::OnStopRun()
{
pixelmanCtrl->m_commHistRunCtrl.AddString(_T("End Of Run."));
if ( GetRunStatusFlag() == TimepixProducer::RUN_STOPPED )
{
// give a warning to eudaq and do nothing
EUDAQ_WARN("StopRun requested when run not active");
SetStatus(eudaq::Status::LVL_WARN, "StopRun requested when run not active");
}
else
{
// send STOP_RUN command to the daq thread
PushCommand( STOP_RUN );
// wait for the daq thread to lower the run active flag
while ( GetRunStatusFlag() == RUN_ACTIVE )
{
Sleep(1);
}
//EUDAQ_DEBUG("Sending EORE");
Sleep(1000);
SendEvent(eudaq::RawDataEvent::EORE(_T("Timepix"),GetRunNumber(), GetEventNumber()));
//std::cout << "Stop Run" << std::endl;
//MessageBox(NULL, "End Of Run", "Message from Runcontrol",NULL);
EUDAQ_INFO("Run Stopped");
SetStatus(eudaq::Status::LVL_OK, "Run Stopped");
}
}
示例2: ClearAIList
void ArAIProperty::CommandMoveTo(ArObjID targetID, float range /*= 0.0f*/)
{
if (!mAIList.empty())
{
if (mAIList.front()->GetType() == ENUM_AI_TYPE_MOVETOTARGET)
return;
}
if (ArGameApp::Get()->GetEntityManager()->IsHero(GetEntity<ArGameEntity>()->GetID()))
{
double time = Driver->GetElapsedSecond();
if (time - mLastMoveTime < DEF_AI_MOVE_REQUEST_MIN_TIME)
{
return;
}
mLastMoveTime = time;
}
if (GetEntity<ArGameEntity>()->IsDead())
{
return;
}
ClearAIList();
auto pCmd = DI_NEW ArAIMoveToTargetCommand(mEntity, targetID, range);
PushCommand(pCmd);
}
示例3: System_AskForPermission
void System_AskForPermission(SystemPermission permission) {
switch (permission) {
case SYSTEM_PERMISSION_STORAGE:
PushCommand("ask_permission", "storage");
break;
}
}
示例4: PushCommand
void UFlareSpacecraftNavigationSystem::PushCommandLinearBrake(const FVector& VelocityTarget)
{
FFlareShipCommandData Command;
Command.Type = EFlareCommandDataType::CDT_BrakeLocation;
Command.VelocityTarget = VelocityTarget;
PushCommand(Command);
}
示例5: PushCommand
void TimepixProducer::OnReset()
{
pixelmanCtrl->m_commHistRunCtrl.AddString(_T("Reset."));
PushCommand( RESET );
//std::cout << "Reset" << std::endl;
//SetStatus(eudaq::Status::LVL_OK);
}
示例6: cmd
void Controller::Resize(uint32_t width, uint32_t height) {
if (mStatus == State::kRunning || mStatus == State::kPaused) {
Command cmd(Cmd::kResize);
cmd.arg1 = width;
cmd.arg2 = height;
PushCommand(cmd);
}
}
示例7: locker
void Controller::Resume() {
if (mStatus == State::kPaused) {
std::unique_lock<std::mutex> locker(mConditionMutex);
mStatus = State::kRunning;
PushCommand(Cmd::kResume);
mCondition.notify_all();
}
}
示例8: PushSetCameraMatrix
internal rc_set_camera_matrix*
PushSetCameraMatrix(render_buffer* RenderBuffer, mat4 Matrix)
{
rc_set_camera_matrix Command = {0};
Command.Matrix = Matrix;
return (rc_set_camera_matrix*)PushCommand(RenderBuffer, RenderCommand_SetCameraMatrix, &Command);
}
示例9: PushLoadTexture
internal rc_load_texture*
PushLoadTexture(render_buffer* RenderBuffer, texture_slot* TextureSlot, bool32 Interpolate, char* Filename)
{
rc_load_texture Command = {0};
Command.TextureSlot = TextureSlot;
Command.Filename = Filename;
return (rc_load_texture*)PushCommand(RenderBuffer, RenderCommand_LoadTexture, &Command);
}
示例10: SetDone
void TimepixProducer::OnTerminate()
{
DEVID devId = pixelmanCtrl->mpxDevId[pixelmanCtrl->mpxCurrSel].deviceId;
pixelmanCtrl->mpxCtrlAbortOperation(devId);
pixelmanCtrl->m_commHistRunCtrl.AddString(_T("Terminated (I'll be back)"));
//std::cout << "Terminate (press enter)" << std::endl;
SetDone( true );
PushCommand( TERMINATE );
}
示例11: PushDrawRectMultitextured
internal rc_draw_rect_multitextured*
PushDrawRectMultitextured(render_buffer* RenderBuffer, vec2 Mid, vec2 Size)
{
rc_draw_rect_multitextured Command = {0};
Command.Mid = Mid;
Command.Size = Size;
Command.Color = Vec4i(1, 1, 1, 1);
return (rc_draw_rect_multitextured*)PushCommand(RenderBuffer, RenderCommand_DrawRectMultitextured, &Command);
}
示例12: PushDrawRectOutline
internal rc_draw_rect_outline*
PushDrawRectOutline(render_buffer* RenderBuffer, vec2 Mid, vec2 Size, vec4 Color)
{
rc_draw_rect_outline Command = {0};
Command.Mid = Mid;
Command.Size = Size;
Command.Color = Color;
return (rc_draw_rect_outline*)PushCommand(RenderBuffer, RenderCommand_DrawRectOutline, &Command);
}
示例13: PushDrawLine
internal rc_draw_line*
PushDrawLine(render_buffer* RenderBuffer, vec2 Start, vec2 End, vec4 Color)
{
rc_draw_line Command = {0};
Command.Start = Start;
Command.End = End;
Command.Color = Color;
return (rc_draw_line*)PushCommand(RenderBuffer, RenderCommand_DrawLine, &Command);
}
示例14: PushLoadFont
internal rc_load_font*
PushLoadFont(render_buffer* RenderBuffer, font_slot* FontSlot, char* Filename, float Height)
{
rc_load_font Command = {0};
Command.FontSlot = FontSlot;
Command.Filename = Filename;
Command.Height = Height;
Command.OversampleX = 2;
Command.OversampleY = 2;
return (rc_load_font*)PushCommand(RenderBuffer, RenderCommand_LoadFont, &Command);
}
示例15: Resume
void Controller::Stop() {
if (mStatus == State::kRunning || mStatus == State::kPaused) {
if (mStatus == State::kPaused) {
Resume();
}
PushCommand(Cmd::kStop);
if (mWorker.joinable()) {
mWorker.join();
}
}
}