Go to the documentation of this file.00001
00010 #include "UrgCtrl.h"
00011 #include "UrgDevice.h"
00012 #include "RangeSensorParameter.h"
00013
00014 using namespace qrk;
00015
00016
00017 struct UrgCtrl::pImpl
00018 {
00019 UrgDevice urg_;
00020 };
00021
00022
00023 UrgCtrl::UrgCtrl(void) : pimpl(new pImpl)
00024 {
00025 }
00026
00027
00028 UrgCtrl::~UrgCtrl(void)
00029 {
00030 }
00031
00032
00033 void UrgCtrl::captureReceived(void)
00034 {
00035
00036 }
00037
00038
00039 const char* UrgCtrl::what(void) const
00040 {
00041 return pimpl->urg_.what();
00042 }
00043
00044
00045 bool UrgCtrl::connect(const char* device, long baudrate)
00046 {
00047 return pimpl->urg_.connect(device, baudrate);
00048 }
00049
00050
00051 void UrgCtrl::setConnection(Connection* con)
00052 {
00053 pimpl->urg_.setConnection(con);
00054 }
00055
00056
00057 Connection* UrgCtrl::connection(void)
00058 {
00059 return pimpl->urg_.connection();
00060 }
00061
00062
00063 void UrgCtrl::disconnect(void)
00064 {
00065 pimpl->urg_.disconnect();
00066 }
00067
00068
00069 bool UrgCtrl::isConnected(void) const
00070 {
00071 return pimpl->urg_.isConnected();
00072 }
00073
00074
00075 long UrgCtrl::minDistance(void) const
00076 {
00077 return pimpl->urg_.minDistance();
00078 }
00079
00080
00081 long UrgCtrl::maxDistance(void) const
00082 {
00083 return pimpl->urg_.maxDistance();
00084 }
00085
00086
00087 int UrgCtrl::maxScanLines(void) const
00088 {
00089 return pimpl->urg_.maxScanLines();
00090 }
00091
00092
00093 void UrgCtrl::setRetryTimes(size_t times)
00094 {
00095 return pimpl->urg_.setRetryTimes(times);
00096 }
00097
00098
00099 void UrgCtrl::setCapturesSize(size_t size)
00100 {
00101 pimpl->urg_.setCapturesSize(size);
00102 }
00103
00104
00105 int UrgCtrl::scanMsec(void) const
00106 {
00107 return pimpl->urg_.scanMsec();
00108 }
00109
00110
00111 void UrgCtrl::setCaptureMode(RangeCaptureMode mode)
00112 {
00113 pimpl->urg_.setCaptureMode(mode);
00114 }
00115
00116
00117 RangeCaptureMode UrgCtrl::captureMode(void)
00118 {
00119 return pimpl->urg_.captureMode();
00120 }
00121
00122
00123 void UrgCtrl::setCaptureRange(int begin_index, int end_index)
00124 {
00125 pimpl->urg_.setCaptureRange(begin_index, end_index);
00126 }
00127
00128
00129 void UrgCtrl::setCaptureFrameInterval(size_t interval)
00130 {
00131 pimpl->urg_.setCaptureFrameInterval(interval);
00132 }
00133
00134
00135 void UrgCtrl::setCaptureTimes(size_t times)
00136 {
00137 pimpl->urg_.setCaptureTimes(times);
00138 }
00139
00140
00141 size_t UrgCtrl::remainCaptureTimes(void)
00142 {
00143 return pimpl->urg_.remainCaptureTimes();
00144 }
00145
00146
00147 void UrgCtrl::setCaptureSkipLines(size_t skip_lines)
00148 {
00149 pimpl->urg_.setCaptureSkipLines(skip_lines);
00150 }
00151
00152
00153 int UrgCtrl::capture(std::vector<long>& data, long* timestamp)
00154 {
00155 return pimpl->urg_.capture(data, timestamp);
00156 }
00157
00158
00159 int UrgCtrl::captureWithIntensity(std::vector<long>& data,
00160 std::vector<long>& intensity_data,
00161 long* timestamp)
00162 {
00163 return pimpl->urg_.captureWithIntensity(data, intensity_data, timestamp);
00164 }
00165
00166
00167 void UrgCtrl::stop(void)
00168 {
00169 pimpl->urg_.stop();
00170 }
00171
00172
00173 bool UrgCtrl::setTimestamp(int timestamp, int* response_msec,
00174 int* force_delay_msec)
00175 {
00176 return pimpl->urg_.setTimestamp(timestamp, response_msec, force_delay_msec);
00177 }
00178
00179
00180 long UrgCtrl::recentTimestamp(void) const
00181 {
00182 return pimpl->urg_.recentTimestamp();
00183 }
00184
00185
00186 bool UrgCtrl::setLaserOutput(bool on)
00187 {
00188 return pimpl->urg_.setLaserOutput(on);
00189 }
00190
00191
00192 double UrgCtrl::index2rad(const int index) const
00193 {
00194 return pimpl->urg_.index2rad(index);
00195 }
00196
00197
00198 int UrgCtrl::rad2index(const double radian) const
00199 {
00200 return pimpl->urg_.rad2index(radian);
00201 }
00202
00203
00204 void UrgCtrl::setParameter(const RangeSensorParameter& parameter)
00205 {
00206 pimpl->urg_.setParameter(parameter);
00207 }
00208
00209
00210 RangeSensorParameter UrgCtrl::parameter(void) const
00211 {
00212 return pimpl->urg_.parameter();
00213 }
00214
00215
00216 bool UrgCtrl::loadParameter(void)
00217 {
00218 return pimpl->urg_.loadParameter();
00219 }
00220
00221
00222 bool UrgCtrl::versionLines(std::vector<std::string>& lines)
00223 {
00224 return pimpl->urg_.versionLines(lines);
00225 }
00226
00227
00228 bool UrgCtrl::reboot(void)
00229 {
00230 return pimpl->urg_.reboot();
00231 }
00232
00233
00234 bool UrgCtrl::reset(void)
00235 {
00236 return pimpl->urg_.reboot();
00237 }