Browse Subversion Repository
Contents of /simulator/sci_ctrlSim.cpp
Parent Directory
| Revision Log
Revision 191 -
( show annotations)
( download)
( as text)
Fri Jan 4 02:49:36 2008 UTC
(16 years, 4 months ago)
by satofumi
File MIME type: text/x-c++src
File size: 460 byte(s)
using namespace beego
| 1 |
/*! |
| 2 |
\file |
| 3 |
\brief シミュレーション用の sci_ctrl |
| 4 |
|
| 5 |
\author Satofumi KAMIMURA |
| 6 |
|
| 7 |
$Id$ |
| 8 |
*/ |
| 9 |
|
| 10 |
#include "sci_ctrlSim.h" |
| 11 |
#include "ConnectionInterface.h" |
| 12 |
|
| 13 |
|
| 14 |
int sci_read(sci_port port, char* buffer, int size) { |
| 15 |
return port->recv(buffer, size, 0); |
| 16 |
} |
| 17 |
|
| 18 |
|
| 19 |
int sci_readable(sci_port port) { |
| 20 |
return port->size(); |
| 21 |
} |
| 22 |
|
| 23 |
|
| 24 |
int sci_write(sci_port port, const char* data, int size) { |
| 25 |
return port->send(data, size); |
| 26 |
} |
| 27 |
|
| 28 |
|
| 29 |
void sci_stop(sci_port port) { |
| 30 |
port->disconnect(); |
| 31 |
} |
|