这篇教程C++ GetCmd函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetCmd函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCmd函数的具体用法?C++ GetCmd怎么用?C++ GetCmd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetCmd函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CHECK_DRIVER_ERRORsize_t CDBL_SendDataCmd::SendChunk(const void* pChunk, size_t nof_bytes){ CHECK_DRIVER_ERROR( !pChunk || !nof_bytes, "Wrong (zero) arguments." + GetDbgInfo(), 290000 ); if (!GetBytes2Go()) return 0; if (nof_bytes > GetBytes2Go()) nof_bytes = GetBytes2Go(); if (Check(dbmoretext(GetCmd(), (DBINT) nof_bytes, (BYTE*) pChunk)) != SUCCEED) { Check(dbcancel(GetCmd())); DATABASE_DRIVER_ERROR( "dbmoretext failed." + GetDbgInfo(), 290001 ); } SetBytes2Go(GetBytes2Go() - nof_bytes); if (GetBytes2Go() <= 0) { // if (dbsqlok(m_Cmd) != SUCCEED || dbresults(m_Cmd) == FAIL) { if (Check(dbsqlok(GetCmd())) != SUCCEED || GetConnection().x_Results(GetCmd()) == FAIL) { DATABASE_DRIVER_ERROR( "dbsqlok/results failed." + GetDbgInfo(), 290002 ); } } return nof_bytes;}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:29,
示例2: GetMsg//*****************************************************************************////! GetMsg - Gets the Message from User//!//! /param uiDataLength - DataLength Used//! /param pucMsgBuff - Message Buffer into which Message will be populated//!//! /return Pointer to Input Data//!//*****************************************************************************unsigned char*GetMsg( char *pucMsgBuff,unsigned int *uiDataLength){ int iMod=0; unsigned int uiMsgLen,iSize; unsigned char *uiData; UART_PRINT("/n/r Enter the Message /n/r"); uiMsgLen=GetCmd(pucMsgBuff, BUFFER_LEN); // // For ECB and CBC, data should be blocks of 16 bytes. // iSize=uiMsgLen; // if (ui32DesMode != DES_CFG_MODE_CFB) { iMod=uiMsgLen%8; if(iMod!=0) { iSize=((uiMsgLen/8)+1)*8; } } // // Allocate Memory Buffer // *uiDataLength=iSize; uiData=(unsigned char *)malloc(*uiDataLength); memset(uiData,0,*uiDataLength); memcpy(uiData,pucMsgBuff,(uiMsgLen)); return uiData;}
开发者ID:dlugaz,项目名称:All,代码行数:45,
示例3: GetSsidName//****************************************************************************////! Get Ssid name form the user over UART//!//! /param pcSsidName is a pointer to the array which will contain the ssid name//!//! This function//! 1. gets the ssid name string over uart//!//! /return iRetVal is the length of the ssid(user input).////****************************************************************************static int GetSsidName(char *pcSsidName, unsigned int uiMaxLen){ char ucRecvdAPDetails = 0; int iRetVal = 0; char acCmdStore[128]; do { ucRecvdAPDetails = 0; // // Get the AP name to connect over the UART // iRetVal = GetCmd(acCmdStore, sizeof(acCmdStore)); if(iRetVal > 0) { // // Parse the AP name // strncpy(pcSsidName, acCmdStore, iRetVal); if(pcSsidName != NULL) { ucRecvdAPDetails = 1; } } }while(ucRecvdAPDetails == 0); pcSsidName[iRetVal] = '/0'; return(iRetVal);}
开发者ID:Balu1991,项目名称:Wifly_Light,代码行数:43,
示例4: TSBaseTZipIn::TZipIn(const TStr& FNm) : TSBase(), TSIn(), ZipStdoutRd(NULL), ZipStdoutWr(NULL), SNm(FNm.CStr()), FLen(0), CurFPos(0), Bf(NULL), BfC(0), BfL(0) { EAssertR(! FNm.Empty(), "Empty file-name."); EAssertR(TFile::Exists(FNm), TStr::Fmt("File %s does not exist", FNm.CStr()).CStr()); FLen = 0; // non-zip files not supported, need uncompressed file length information // TODO: find the correct set of supported extensions //if (FNm.GetFExt() != ".zip" && FNm.GetFExt() != ".gz") { // printf("*** Error: file %s, compression format %s not supported/n", FNm.CStr(), FNm.GetFExt().CStr()); // EFailR(TStr::Fmt("File %s: compression format %s not supported", FNm.CStr(), FNm.GetFExt().CStr()).CStr()); //} FLen = TZipIn::GetFLen(FNm); // return for malformed files if (FLen == 0) { return; } // empty file #ifdef GLib_WIN // create pipes SECURITY_ATTRIBUTES saAttr; saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); saAttr.bInheritHandle = TRUE; saAttr.lpSecurityDescriptor = NULL; // Create a pipe for the child process's STDOUT. const int PipeBufferSz = 32*1024; EAssertR(CreatePipe(&ZipStdoutRd, &ZipStdoutWr, &saAttr, PipeBufferSz), "Stdout pipe creation failed"); // Ensure the read handle to the pipe for STDOUT is not inherited. SetHandleInformation(ZipStdoutRd, HANDLE_FLAG_INHERIT, 0); #else // no implementation needed #endif CreateZipProcess(GetCmd(FNm), FNm); Bf = new char[MxBfL]; BfC = BfL=-1; FillBf();}
开发者ID:Bradeskojest,项目名称:qminer,代码行数:32,
示例5: ReadFromUser//*****************************************************************************////! ReadFromUser - Populate the parameters from User//!//! /param uiConfig - Configuration Value//! /param uiDataLength- Datalength //! /param puiResult - CRC Result//!//! /return pointer to Input Data//!//*****************************************************************************unsigned int*ReadFromUser(unsigned int *uiConfig,unsigned int *uiDataLength, unsigned int *puiResult){ char ucCmdBuffer[INPUT_MESSAGE_SIZE],*pucMsgBuff; unsigned int *uiData; pucMsgBuff=( char*)&puiPlainMsg[0]; // // Get the Command // UsageDisplay(); UART_PRINT("cmd# "); GetCmd(ucCmdBuffer,INPUT_MESSAGE_SIZE); if(CRCParser(ucCmdBuffer,uiConfig)) { uiData=GetMsg(pucMsgBuff,uiDataLength,uiConfig); memset(puiResult,0,sizeof(unsigned int)); } else { return NULL; } return uiData;}
开发者ID:yuch7,项目名称:cc3200-MCU,代码行数:37,
示例6: DriveTaskstatic void DriveTask(void *pvParameters) { portTickType xLastWakeTime; (void)pvParameters; xLastWakeTime = xTaskGetTickCount(); for(;;) { while (GetCmd()==ERR_OK) { /* returns ERR_RXEMPTY if queue is empty */ /* process incoming commands */ } TACHO_CalcSpeed(); if (DRV_Status.mode==DRV_MODE_SPEED) { PID_Speed(TACHO_GetSpeed(TRUE), DRV_Status.speed.left, TRUE); PID_Speed(TACHO_GetSpeed(FALSE), DRV_Status.speed.right, FALSE); } else if (DRV_Status.mode==DRV_MODE_STOP) { PID_Speed(TACHO_GetSpeed(TRUE), 0, TRUE); PID_Speed(TACHO_GetSpeed(FALSE), 0, FALSE); } else if (DRV_Status.mode==DRV_MODE_POS) { PID_Pos(Q4CLeft_GetPos(), DRV_Status.pos.left, TRUE); PID_Pos(Q4CRight_GetPos(), DRV_Status.pos.right, FALSE); } else if (DRV_Status.mode==DRV_MODE_NONE) { /* do nothing */ } FRTOS1_vTaskDelayUntil(&xLastWakeTime, 5/portTICK_RATE_MS); } /* for */}
开发者ID:sisem,项目名称:intro,代码行数:25,
示例7: Command void Command(std::string _Cmd) { Cmd = _Cmd; std::vector<std::string> Args = _ParseArgs(); GetCmd(Args.at(0), Args); }
开发者ID:jackpf,项目名称:SteamProfiles,代码行数:8,
示例8: Checkbool CDBL_SendDataCmd::Cancel(void){ if (GetBytes2Go() > 0) { Check(dbcancel(GetCmd())); SetBytes2Go(0); return true; } return false;}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:10,
示例9: GetCmdint MkView::SetCmd() { if (objc < 4) return GetCmd(); int index = asIndex(view, objv[2], false); if (_error) return _error; return SetValues(view[index], objc - 3, objv + 3, view);}
开发者ID:electric-cloud,项目名称:metakit,代码行数:10,
示例10: shell_handlervoid shell_handler() { printf(" ---- Shell le coquillage de l'espace V0.1 /n"); while(1){ Prompt(); GetCmd(); if (!ExecCmd()) printf("Commande inconnu, tapez ''help'' pour voir la liste des commandes valides. /n"); }}
开发者ID:Swelo0,项目名称:prog_sys_le_retour,代码行数:10,
示例11: Dot11ConfigGetCmdHRESULT Dot11ConfigGetCmd( OUT PCMD_INFO Cmd, int argc, char **argv){ Cmd->IoCtrlCode = 0; Cmd->Parameter = 0; return GetCmd(Cmd, argc, argv);}
开发者ID:PaulJing,项目名称:Sora,代码行数:11,
示例12: GetCmdCTpnsMsgBase* CTpnsMsgManager::GetMsg(uint8_t *buf, size_t len){ if(HEADER_LEN > len) { return NULL; } uint8_t cmd; int ret = GetCmd(buf, len, cmd); CTpnsMsgBase* pMsg = BuildMsg(cmd, buf + HEADER_LEN, len - HEADER_LEN); return pMsg;}
开发者ID:lj8175,项目名称:practice,代码行数:11,
示例13: mainint main(int argc, char **argv){ /*start cmdline here*/ while(1) { printf("%s::%s>>",prompt,dbname); GetCmd(cmdbuf,MAX_STR_LEN); ExecCmd(cmdbuf); } return;}
开发者ID:kevin007ys,项目名称:nezha,代码行数:11,
注:本文中的GetCmd函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetCode函数代码示例 C++ GetClosestGameObjectWithEntry函数代码示例 |