| 1 |
#ifndef SCIP_HANDLE_H |
| 2 |
#define SCIP_HANDLE_H |
| 3 |
|
| 4 |
/*! |
| 5 |
\file |
| 6 |
\brief SCIP nh |
| 7 |
|
| 8 |
\author Satofumi KAMIMURA |
| 9 |
|
| 10 |
$Id$ |
| 11 |
*/ |
| 12 |
|
| 13 |
#include <memory> |
| 14 |
#include <vector> |
| 15 |
#include <string> |
| 16 |
|
| 17 |
namespace beego { |
| 18 |
class ConnectionInterface; |
| 19 |
class SensorParameter; |
| 20 |
|
| 21 |
/*! |
| 22 |
\brief SCIP2.0 §ä |
| 23 |
*/ |
| 24 |
class ScipHandler { |
| 25 |
ScipHandler(const ScipHandler& rhs); |
| 26 |
ScipHandler& operator = (const ScipHandler& rhs); |
| 27 |
|
| 28 |
struct pImpl; |
| 29 |
const std::auto_ptr<pImpl> pimpl; |
| 30 |
|
| 31 |
public: |
| 32 |
enum { |
| 33 |
QT_Recv = -9, |
| 34 |
|
| 35 |
NoWaitReply = true, |
| 36 |
WaitReply = false, |
| 37 |
}; |
| 38 |
ScipHandler(void); |
| 39 |
~ScipHandler(void); |
| 40 |
const char* what(void); |
| 41 |
|
| 42 |
void setConnection(ConnectionInterface* con); |
| 43 |
ConnectionInterface* getConnection(void); |
| 44 |
void disconnect(void); |
| 45 |
bool isConnected(void) const; |
| 46 |
bool adjustBaudrate(long baudrate); |
| 47 |
bool setBaudrate(long baudrate); |
| 48 |
bool getVersionInfo(std::vector<std::string>& lines); |
| 49 |
bool loadSensorParameter(SensorParameter* parameter); |
| 50 |
void setSensorParameter(const SensorParameter* parameter); |
| 51 |
void setCaptureTimes(int times); |
| 52 |
void sendCaptureMessage(char cmd = 'M'); |
| 53 |
int recvCaptureData(long* data, size_t max_size, size_t& timestamp); |
| 54 |
int capture(long data[], size_t max_size, size_t& timestamp); |
| 55 |
|
| 56 |
// !!! ąĚ ˝čĚ\bhźÍAČńĆŠľ˝˘ |
| 57 |
int stopCapture(void); |
| 58 |
void forceStopCapture(bool no_wait_reply); |
| 59 |
|
| 60 |
void setFrameSkipFrames(size_t skip_frames); |
| 61 |
void setDataGroups(size_t groups); |
| 62 |
void setCaptureRange(int first_index, int last_index); |
| 63 |
int getFrontIndex(void) const; |
| 64 |
long getMinDistance(void) const; |
| 65 |
long getMaxDistance(void) const; |
| 66 |
int getMaxDataLength(void) const; |
| 67 |
int getScanRpm(void); |
| 68 |
void setLaserOutput(bool on); |
| 69 |
double index2rad(const int index); |
| 70 |
int rad2index(const double radian); |
| 71 |
size_t getImmediateTimestamp(int* estimated_delay); |
| 72 |
}; |
| 73 |
}; |
| 74 |
|
| 75 |
#endif /* !SCIP_HANDLE_H */ |