Public Member Functions | Private Member Functions | Private Attributes | List of all members
vssp::VsspDriver Class Reference

#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_
 

Detailed Description

Definition at line 51 of file vssp.h.

Constructor & Destructor Documentation

vssp::VsspDriver::VsspDriver ( )
inline

Definition at line 90 of file vssp.h.

Member Function Documentation

void vssp::VsspDriver::connect ( const char *  ip,
const unsigned int  port,
decltype(cb_connect_ cb 
)
inline

Definition at line 107 of file vssp.h.

boost::asio::io_service& vssp::VsspDriver::getIoService ( )
inline

Definition at line 217 of file vssp.h.

void vssp::VsspDriver::onConnect ( const boost::system::error_code &  error)
inlineprivate

Definition at line 245 of file vssp.h.

void vssp::VsspDriver::onRead ( const boost::system::error_code &  error)
inlineprivate

Definition at line 292 of file vssp.h.

void vssp::VsspDriver::onSend ( const boost::system::error_code &  error,
boost::shared_ptr< std::string >  data 
)
inlineprivate

Definition at line 256 of file vssp.h.

void vssp::VsspDriver::onTimeout ( const boost::system::error_code &  error)
inlineprivate

Definition at line 237 of file vssp.h.

void vssp::VsspDriver::onTimeoutConnect ( const boost::system::error_code &  error)
inlineprivate

Definition at line 229 of file vssp.h.

bool vssp::VsspDriver::poll ( )
inline

Definition at line 201 of file vssp.h.

template<class DATA_TYPE >
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 
)
inlineprivate

Definition at line 265 of file vssp.h.

void vssp::VsspDriver::receivePackets ( )
inline

Definition at line 191 of file vssp.h.

void vssp::VsspDriver::registerAuxCallback ( decltype(cb_aux_ cb)
inline

Definition at line 123 of file vssp.h.

void vssp::VsspDriver::registerCallback ( decltype(cb_point_ cb)
inline

Definition at line 119 of file vssp.h.

void vssp::VsspDriver::registerErrorCallback ( decltype(cb_error_ cb)
inline

Definition at line 115 of file vssp.h.

void vssp::VsspDriver::registerPingCallback ( decltype(cb_ping_ cb)
inline

Definition at line 127 of file vssp.h.

void vssp::VsspDriver::requestAuxData ( const bool  start = 1)
inline

Definition at line 176 of file vssp.h.

void vssp::VsspDriver::requestData ( const bool  intensity = 1,
const bool  start = 1 
)
inline

Definition at line 180 of file vssp.h.

void vssp::VsspDriver::requestHorizontalTable ( )
inline

Definition at line 168 of file vssp.h.

void vssp::VsspDriver::requestPing ( )
inline

Definition at line 172 of file vssp.h.

void vssp::VsspDriver::requestVerticalTable ( const int  itl = 1)
inline

Definition at line 151 of file vssp.h.

void vssp::VsspDriver::send ( const std::string  cmd)
inlineprivate

Definition at line 223 of file vssp.h.

void vssp::VsspDriver::setAutoReset ( const bool  enable)
inline

Definition at line 131 of file vssp.h.

void vssp::VsspDriver::setHorizontalInterlace ( const int  itl)
inline

Definition at line 143 of file vssp.h.

void vssp::VsspDriver::setInterlace ( const int  itl)
inline

Definition at line 139 of file vssp.h.

void vssp::VsspDriver::setTimeout ( const double  to)
inline

Definition at line 103 of file vssp.h.

void vssp::VsspDriver::setVerticalInterlace ( const int  itl)
inline

Definition at line 147 of file vssp.h.

void vssp::VsspDriver::spin ( )
inline

Definition at line 209 of file vssp.h.

void vssp::VsspDriver::stop ( )
inline

Definition at line 213 of file vssp.h.

Member Data Documentation

AuxFactorArray vssp::VsspDriver::aux_factor_
private

Definition at line 58 of file vssp.h.

boost::asio::streambuf vssp::VsspDriver::buf_
private

Definition at line 87 of file vssp.h.

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

Definition at line 71 of file vssp.h.

boost::function<void(bool)> vssp::VsspDriver::cb_connect_
private

Definition at line 79 of file vssp.h.

boost::function<void( const vssp::Header &, const std::string &, const boost::posix_time::ptime &)> vssp::VsspDriver::cb_error_
private

Definition at line 78 of file vssp.h.

boost::function<void( const vssp::Header &, const boost::posix_time::ptime &)> vssp::VsspDriver::cb_ping_
private

Definition at line 74 of file vssp.h.

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

Definition at line 66 of file vssp.h.

bool vssp::VsspDriver::closed_
private

Definition at line 57 of file vssp.h.

boost::asio::io_service vssp::VsspDriver::io_service_
private

Definition at line 54 of file vssp.h.

boost::asio::ip::tcp::socket vssp::VsspDriver::socket_
private

Definition at line 55 of file vssp.h.

boost::shared_array<const double> vssp::VsspDriver::tbl_h_
private

Definition at line 80 of file vssp.h.

bool vssp::VsspDriver::tbl_h_loaded_
private

Definition at line 82 of file vssp.h.

std::vector<boost::shared_array<const TableSincos> > vssp::VsspDriver::tbl_v_
private

Definition at line 81 of file vssp.h.

bool vssp::VsspDriver::tbl_v_loaded_
private

Definition at line 83 of file vssp.h.

std::vector<bool> vssp::VsspDriver::tbl_vn_loaded_
private

Definition at line 84 of file vssp.h.

double vssp::VsspDriver::timeout_
private

Definition at line 85 of file vssp.h.

boost::asio::deadline_timer vssp::VsspDriver::timer_
private

Definition at line 56 of file vssp.h.


The documentation for this class was generated from the following file:


hokuyo3d
Author(s): Atsushi Watanabe
autogenerated on Sat Jun 8 2019 04:42:00