📄 comcommand.h
字号:
#ifndef _COM_COMMAND
#define _COM_COMMAND
/*==============================================================================
SERVICES: OMB TEST CLASS DEFINITION FILE
DESCRIPTION:
This module contains definitions of data types and constants to be used
by the OMB TEST application.
PUBLIC CLASSES AND FUNCTIONS:
(1) OmbTest. It's a class which provides Test Service for OMB.
AUTHOR INFORMATION:
Feng.Tie, tiefeng@mail.eastcomtd.com. Mobile: +86 10 13701013761.
Copyright (c) 2003 EASTCOMM Inc. All Rights Reserved.
==============================================================================*/
//==============================================================================
// Includes and Public Data Declarations
//==============================================================================
//------------------------------------------------------------------------------
// Include Files
//------------------------------------------------------------------------------
#include <stdio.h>
//------------------------------------------------------------------------------
// Constant / Define Declarations
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Defines the class: ComCommand. (Serial I/O Devices Communication)
//------------------------------------------------------------------------------
class ComCommand
{
public:
//------------------------------------------------------------------------------
// Public functions.
//------------------------------------------------------------------------------
ComCommand() ;
STATUS BindDev(const char * devName = "/tyCo/0") ;
STATUS UnbindDev() ;
STATUS WaitKbHit(const char * prompt,int timeout) ;
STATUS WritePrompt(const char * prompt) ;
STATUS ReadCommand(char * command,int len) ;
~ComCommand() ;
private:
//------------------------------------------------------------------------------
// Private properties.
//------------------------------------------------------------------------------
int mComHandle ;
const int mMaxCommandChars = 1024 ;
const int mMaxPromptChars = 1024 ;
} ;
/*==============================================================================
Edit History for File
VERSION 1.0:
2003-03-25 Initial version. (modified by tief)
==============================================================================*/
#endif // _COM_COMMAND
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -