boos::asio- based SuperCom
来源:互联网 发布:网络语言暴力的例子 编辑:程序博客网 时间:2024/05/01 06:29
NameSpace.h
#ifndef NAMESPACE_H_
#define NAMESPACE_H_
#define NS_SUPERCOM SuperCom
#define NS_SUPERCOM_START namespace NS_SUPERCOM {
#define NS_SUPERCOM_END }
#define USE_NS_SUPERCOM using namespace NS_SUPERCOM;
#endif
ComBus.h
#ifndef COMBUS_H_
#define COMBUS_H_
#include <string>
#include <map>
#include <boost/shared_ptr.hpp>
#include "Namespace.h"
NS_SUPERCOM_START
class Device;
typedef boost::shared_ptr<Device> BSPDevice;
typedef std::map<int, BSPDevice > DeviceContainer;
class Block;
typedef boost::shared_ptr<Block> BSPBlock;
class ComBus
{
public:
ComBus();
virtual ~ComBus();
int GetID();
void SetID(int id);
// ---------------- Device operate
BSPDevice GetDevice(int devID);
void AddDevice(BSPDevice pDev);
void RemoveDevice();
void ClearDevice();
bool HasDevice(int devID);
private:
int m_id;
std::string m_name;
int m_baudRate;
int m_databit;
std::string m_parity;
std::string m_stopbits;
DeviceContainer m_devices;
};
typedef boost::shared_ptr<ComBus> BSPComBus;
typedef std::map<int, BSPComBus > ComBusContainer;
class BusManager
{
public:
int PeekRecvMsg(int devID);
BSPBlock GetRecvMsg(int devID);
int Send(int devID, char * buf, int sz);
private:
ComBusContainer m_comBuses;
};
NS_SUPERCOM_END
#endif
- boos::asio- based SuperCom
- Boos::asio服务器开发之连接管理
- c++ asio: line-based echo server
- boos相关内容
- ASIO
- asio
- asio
- ASIO
- boos.Program_options使用记录
- Decoding Baby Boos UVALive
- UVA 12897 Decoding Baby Boos
- UVALive 6917Decoding Baby Boos(签到)
- Boost Asio
- asio overview
- asio overview
- asio overview
- boost asio
- Boost.asio
- 认识JVM--第一篇
- 为了下载!
- Android 应用程序版本
- Cmake introduction 3
- C++ socket实现获取局域网IP&MAC
- boos::asio- based SuperCom
- 认识JVM--第二篇
- Android中webview和js之间的交互
- 新婚夫妇过年花掉四月工资 新娘赌气自杀
- JVM第三篇(简单demo)
- 使用Mono.Cecil辅助ASP.NET MVC使用dynamic类型Model
- LR中Generation Log、Recording Log和Replay Log日志文件
- [推荐] 一个android个人开发者的总结[问题点数:40分]
- 系统架构-性能篇章1(应用系统性能1)