• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetCmd函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetCmd函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCmd函数的具体用法?C++ GetCmd怎么用?C++ GetCmd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetCmd函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CHECK_DRIVER_ERROR

size_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,代码来源:connection.cpp


示例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,代码来源:des_userinput.c


示例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,代码来源:main.c


示例4: TSBase

TZipIn::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,代码来源:zipfl.cpp


示例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,代码来源:crc_userinput.c


示例6: DriveTask

static 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,代码来源:Drive.c


示例7: Command

        void Command(std::string _Cmd)
        {
            Cmd = _Cmd;

            std::vector<std::string> Args = _ParseArgs();

            GetCmd(Args.at(0), Args);
        }
开发者ID:jackpf,项目名称:SteamProfiles,代码行数:8,代码来源:console.hpp


示例8: Check

bool CDBL_SendDataCmd::Cancel(void)
{
    if (GetBytes2Go() > 0) {
        Check(dbcancel(GetCmd()));
        SetBytes2Go(0);
        return true;
    }

    return false;
}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:10,代码来源:connection.cpp


示例9: GetCmd

int 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,代码来源:mk4too.cpp


示例10: shell_handler

void 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,代码来源:shell.c


示例11: Dot11ConfigGetCmd

HRESULT 
Dot11ConfigGetCmd(
    OUT PCMD_INFO Cmd, 
    int argc, 
    char **argv)
{
    Cmd->IoCtrlCode = 0;
    Cmd->Parameter  = 0;
    
    return GetCmd(Cmd, argc, argv);
}
开发者ID:PaulJing,项目名称:Sora,代码行数:11,代码来源:main.c


示例12: GetCmd

CTpnsMsgBase* 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,代码来源:TpnsMsg.cpp


示例13: main

int 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,代码来源:cmdline.c



注:本文中的GetCmd函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetCode函数代码示例发布时间:2022-05-30
下一篇:
C++ GetClosestGameObjectWithEntry函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap