void TestCommonData::Start() { mCommand.N_Operation = CommandID(); mCommand.Start_Oper = true; mCommand.Stop_Oper = false; mCommand.Nasos_M2 = app::Settings::Instance().MainPupm() == "M2"; mCommand.OP15_25_Continum = false; mCommand.Next_Amp = false; mCommand.Write(); StartTime.start(); }
ApplicationCommandInfo ApplicationSettingsFile::getStopAllSoundCommandInfo() { ApplicationCommandInfo commandInfo(CommandID(SoundHotKeyConfigFile::COMMANDS_BASE - 1)); commandInfo.setInfo("Stop All Sounds", "Stops all sounds that are playing", juce::String::empty, 0); if (stopAllSoundsKeys.size() > 0) { const KeyPress &defaultKeyPress = stopAllSoundsKeys.getUnchecked(0); commandInfo.addDefaultKeypress(defaultKeyPress.getKeyCode(), defaultKeyPress.getModifiers()); } return commandInfo; }
ret_ CNetworkHandle::OnMessage(const ub_1 *pMsg, size_ nSize, const TMsgInfo *pMsgInfo) { #ifdef _DEBUG_ if (!pMsg) return PARAMETER_NULL | PARAMETER_1; if (0 == nSize) return PARAMETER_ERROR | PARAMETER_2; if (!pMsgInfo) return PARAMETER_NULL | PARAMETER_3; #endif CNetworkConf *pConf = (CNetworkConf *)GetConf(); #ifdef _DEBUG_ if (!pConf) return NO_ELEMENT_IN_CONTAINER; #endif CPDUInfo *pPDUInfo = null_v; try { v_ CommandID((size_ *)(pMsg + pConf->GetCommandID()->Offset(pMsg, nSize))); ret_ Ret = pConf->IdentifyID(CommandID, pPDUInfo, DIRECTION_IN); if (SUCCESS != Ret) return Ret; } catch (error_code err) { return err; } TMU tmu; tmu.pPDUInfo = pPDUInfo; tmu.pMessage = (ub_1 *)pMsg; tmu.nSize = nSize; tmu.pMsgInfo = (TMsgInfo *)pMsgInfo; CContainer *pContainer = CUIManager::Instance()->GetCurContainer(); if (pContainer) pContainer->OnMessage(&tmu); return SUCCESS; }
ret_ CNetworkHandle::CheckSend(const CPDUInfo *pPDUInfo, const ub_1 *pMsg, size_ nSize) { #ifdef _DEBUG_ if (!pPDUInfo) return PARAMETER_NULL | PARAMETER_1; if (!pMsg) return PARAMETER_NULL | PARAMETER_2; if (0 == nSize) return PARAMETER_ERROR | PARAMETER_3; #endif CNetworkConf *pConf = (CNetworkConf *)GetConf(); #ifdef _DEBUG_ if (!pConf) return NO_ELEMENT_IN_CONTAINER; #endif // try { size_ *pnSize = (size_ *)(pMsg + pConf->GetSizeID()->Offset(pMsg, nSize)); *pnSize = nSize; } catch (error_code err) { return err; } // try { v_ CommandID((size_ *)(pMsg + pConf->GetCommandID()->Offset(pMsg, nSize))); ret_ Ret = pConf->IdentifyPDU(pPDUInfo, CommandID, DIRECTION_OUT); if (SUCCESS != Ret) return Ret; } catch (error_code err) { return err; } return SUCCESS; }