#include <vssp.h>
Public Member Functions | |
void | connect (const char *ip, const unsigned int port, decltype(cb_connect_) cb) |
boost::asio::io_service & | getIoService () |
bool | poll () |
void | receivePackets () |
void | registerAuxCallback (decltype(cb_aux_) cb) |
void | registerCallback (decltype(cb_point_) cb) |
void | registerErrorCallback (decltype(cb_error_) cb) |
void | registerPingCallback (decltype(cb_ping_) cb) |
void | requestAuxData (const bool start=1) |
void | requestData (const bool intensity=1, const bool start=1) |
void | requestHorizontalTable () |
void | requestPing () |
void | requestVerticalTable (const int itl=1) |
void | setAutoReset (const bool enable) |
void | setHorizontalInterlace (const int itl) |
void | setInterlace (const int itl) |
void | setTimeout (const double to) |
void | setVerticalInterlace (const int itl) |
void | spin () |
void | stop () |
VsspDriver () | |
Private Member Functions | |
void | onConnect (const boost::system::error_code &error) |
void | onRead (const boost::system::error_code &error) |
void | onSend (const boost::system::error_code &error, boost::shared_ptr< std::string > data) |
void | onTimeout (const boost::system::error_code &error) |
void | onTimeoutConnect (const boost::system::error_code &error) |
template<class DATA_TYPE > | |
bool | rangeToXYZ (const vssp::RangeHeader &range_header, const vssp::RangeHeaderV2R1 &range_header_v2r1, const vssp::RangeIndex &range_index, const boost::shared_array< const uint16_t > &index, const boost::shared_array< vssp::XYZI > &points) |
void | send (const std::string cmd) |
Private Attributes | |
AuxFactorArray | aux_factor_ |
boost::asio::streambuf | buf_ |
boost::function< void(const vssp::Header &, const vssp::AuxHeader &, const boost::shared_array< vssp::Aux > &, const boost::posix_time::ptime &)> | cb_aux_ |
boost::function< void(bool)> | cb_connect_ |
boost::function< void(const vssp::Header &, const std::string &, const boost::posix_time::ptime &)> | cb_error_ |
boost::function< void(const vssp::Header &, const boost::posix_time::ptime &)> | cb_ping_ |
boost::function< void(const vssp::Header &, const vssp::RangeHeader &, const vssp::RangeIndex &, const boost::shared_array< uint16_t > &, const boost::shared_array < vssp::XYZI > &, const boost::posix_time::ptime &)> | cb_point_ |
bool | closed_ |
boost::asio::io_service | io_service_ |
boost::asio::ip::tcp::socket | socket_ |
boost::shared_array< const double > | tbl_h_ |
bool | tbl_h_loaded_ |
std::vector < boost::shared_array< const TableSincos > > | tbl_v_ |
bool | tbl_v_loaded_ |
std::vector< bool > | tbl_vn_loaded_ |
double | timeout_ |
boost::asio::deadline_timer | timer_ |
vssp::VsspDriver::VsspDriver | ( | ) | [inline] |
void vssp::VsspDriver::connect | ( | const char * | ip, |
const unsigned int | port, | ||
decltype(cb_connect_) | cb | ||
) | [inline] |
boost::asio::io_service& vssp::VsspDriver::getIoService | ( | ) | [inline] |
void vssp::VsspDriver::onConnect | ( | const boost::system::error_code & | error | ) | [inline, private] |
void vssp::VsspDriver::onRead | ( | const boost::system::error_code & | error | ) | [inline, private] |
void vssp::VsspDriver::onSend | ( | const boost::system::error_code & | error, |
boost::shared_ptr< std::string > | data | ||
) | [inline, private] |
void vssp::VsspDriver::onTimeout | ( | const boost::system::error_code & | error | ) | [inline, private] |
void vssp::VsspDriver::onTimeoutConnect | ( | const boost::system::error_code & | error | ) | [inline, private] |
bool vssp::VsspDriver::poll | ( | ) | [inline] |
bool vssp::VsspDriver::rangeToXYZ | ( | const vssp::RangeHeader & | range_header, |
const vssp::RangeHeaderV2R1 & | range_header_v2r1, | ||
const vssp::RangeIndex & | range_index, | ||
const boost::shared_array< const uint16_t > & | index, | ||
const boost::shared_array< vssp::XYZI > & | points | ||
) | [inline, private] |
void vssp::VsspDriver::receivePackets | ( | ) | [inline] |
void vssp::VsspDriver::registerAuxCallback | ( | decltype(cb_aux_) | cb | ) | [inline] |
void vssp::VsspDriver::registerCallback | ( | decltype(cb_point_) | cb | ) | [inline] |
void vssp::VsspDriver::registerErrorCallback | ( | decltype(cb_error_) | cb | ) | [inline] |
void vssp::VsspDriver::registerPingCallback | ( | decltype(cb_ping_) | cb | ) | [inline] |
void vssp::VsspDriver::requestAuxData | ( | const bool | start = 1 | ) | [inline] |
void vssp::VsspDriver::requestData | ( | const bool | intensity = 1 , |
const bool | start = 1 |
||
) | [inline] |
void vssp::VsspDriver::requestHorizontalTable | ( | ) | [inline] |
void vssp::VsspDriver::requestPing | ( | ) | [inline] |
void vssp::VsspDriver::requestVerticalTable | ( | const int | itl = 1 | ) | [inline] |
void vssp::VsspDriver::send | ( | const std::string | cmd | ) | [inline, private] |
void vssp::VsspDriver::setAutoReset | ( | const bool | enable | ) | [inline] |
void vssp::VsspDriver::setHorizontalInterlace | ( | const int | itl | ) | [inline] |
void vssp::VsspDriver::setInterlace | ( | const int | itl | ) | [inline] |
void vssp::VsspDriver::setTimeout | ( | const double | to | ) | [inline] |
void vssp::VsspDriver::setVerticalInterlace | ( | const int | itl | ) | [inline] |
void vssp::VsspDriver::spin | ( | ) | [inline] |
void vssp::VsspDriver::stop | ( | ) | [inline] |
AuxFactorArray vssp::VsspDriver::aux_factor_ [private] |
boost::asio::streambuf vssp::VsspDriver::buf_ [private] |
boost::function<void( const vssp::Header &, const vssp::AuxHeader &, const boost::shared_array<vssp::Aux> &, const boost::posix_time::ptime &)> vssp::VsspDriver::cb_aux_ [private] |
boost::function<void(bool)> vssp::VsspDriver::cb_connect_ [private] |
boost::function<void( const vssp::Header &, const std::string &, const boost::posix_time::ptime &)> vssp::VsspDriver::cb_error_ [private] |
boost::function<void( const vssp::Header &, const boost::posix_time::ptime &)> vssp::VsspDriver::cb_ping_ [private] |
boost::function<void( const vssp::Header &, const vssp::RangeHeader &, const vssp::RangeIndex &, const boost::shared_array<uint16_t> &, const boost::shared_array<vssp::XYZI> &, const boost::posix_time::ptime &)> vssp::VsspDriver::cb_point_ [private] |
bool vssp::VsspDriver::closed_ [private] |
boost::asio::io_service vssp::VsspDriver::io_service_ [private] |
boost::asio::ip::tcp::socket vssp::VsspDriver::socket_ [private] |
boost::shared_array<const double> vssp::VsspDriver::tbl_h_ [private] |
bool vssp::VsspDriver::tbl_h_loaded_ [private] |
std::vector<boost::shared_array<const TableSincos> > vssp::VsspDriver::tbl_v_ [private] |
bool vssp::VsspDriver::tbl_v_loaded_ [private] |
std::vector<bool> vssp::VsspDriver::tbl_vn_loaded_ [private] |
double vssp::VsspDriver::timeout_ [private] |
boost::asio::deadline_timer vssp::VsspDriver::timer_ [private] |