Public Member Functions | Private Types | Private Member Functions | Private Attributes
labust::control::CNRRemoteRadio Class Reference

#include <CNRRemoteRadio.hpp>

List of all members.

Public Member Functions

 CNRRemoteRadio ()
void onInit ()
void start ()
 ~CNRRemoteRadio ()

Private Types

enum  { sync_length = 3, chksum_size = 2 }
enum  {
  id_field = 3, data1_field = 4, data2_field = 8, mode_field = 12,
  launch_field = 4
}
enum  {
  stopbit, startbit, manualbit, automaticbit,
  remotebit
}
enum  { cart = 0, bart = 1, station = 2 }
enum  { latlonmux = 10000000 }

Private Member Functions

void dummyRequest ()
void onCurrentMode (const std_msgs::Int32::ConstPtr &mode)
void onIncomingData (const boost::system::error_code &error, const size_t &transferred)
void onLaunch (const std_msgs::Bool::ConstPtr &launch)
void onStateHat (const auv_msgs::NavSts::ConstPtr &estimate)
void onSync (const boost::system::error_code &error, const size_t &transferred)
void onTimeout ()
void reply ()
void replyBuoy ()
void start_receive ()

Private Attributes

std::vector< uint8_tbuffer
double buoyDistance
boost::mutex cdataMux
ros::ServiceClient client
boost::mutex clientMux
ros::Subscriber curMode
double currLat
double currLon
double currYaw
double desiredHeading
double desiredLat
double desiredLon
bool doDummyRequest
bool doLaunch
ros::Subscriber extPoint
ros::Publisher hlMsg
int32_t id
boost::asio::io_service io
boost::thread iorunner
ros::Subscriber joyIn
ros::Publisher joyOut
uint8_t lastmode
ros::Time lastModemMsg
ros::Publisher launched
ros::Subscriber launchFlag
ros::NodeHandle nh
ros::NodeHandle ph
boost::asio::serial_port port
ros::Publisher posCOut
ros::Publisher posOut
uint8_t ringBuffer [sync_length]
ros::Subscriber stateHat
ros::Subscriber stateMeas
double timeout
bool wasLaunched
double yawInc

Detailed Description

The class that implements the CART side of the CNR remote station control protocol.

Definition at line 66 of file CNRRemoteRadio.hpp.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
sync_length 
chksum_size 

Definition at line 68 of file CNRRemoteRadio.hpp.

anonymous enum [private]
Enumerator:
id_field 
data1_field 
data2_field 
mode_field 
launch_field 

Definition at line 70 of file CNRRemoteRadio.hpp.

anonymous enum [private]
Enumerator:
stopbit 
startbit 
manualbit 
automaticbit 
remotebit 

Definition at line 71 of file CNRRemoteRadio.hpp.

anonymous enum [private]
Enumerator:
cart 
bart 
station 

Definition at line 72 of file CNRRemoteRadio.hpp.

anonymous enum [private]
Enumerator:
latlonmux 

Definition at line 74 of file CNRRemoteRadio.hpp.


Constructor & Destructor Documentation

Main constructor

Definition at line 59 of file CNRRemoteRadio.cpp.

Main deconstructor

Definition at line 78 of file CNRRemoteRadio.cpp.


Member Function Documentation

void CNRRemoteRadio::dummyRequest ( ) [private]

Send the buoy reply message.

Definition at line 462 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::onCurrentMode ( const std_msgs::Int32::ConstPtr &  mode) [private]

Handle the measurements.

Definition at line 123 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::onIncomingData ( const boost::system::error_code &  error,
const size_t &  transferred 
) [private]

Handle incoming modem data.

Definition at line 182 of file CNRRemoteRadio.cpp.

Initialize and setup the manager.

Definition at line 85 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::onLaunch ( const std_msgs::Bool::ConstPtr &  launch) [private]

Handle the launch.

Definition at line 126 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::onStateHat ( const auv_msgs::NavSts::ConstPtr &  estimate) [private]

Handle the estimates.

Definition at line 131 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::onSync ( const boost::system::error_code &  error,
const size_t &  transferred 
) [private]

Handle incoming modem data.

Definition at line 145 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::onTimeout ( ) [private]

Modem timeout detection.

Definition at line 477 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::reply ( ) [private]

Send the reply message.

Definition at line 418 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::replyBuoy ( ) [private]

Send the buoy reply message.

Definition at line 441 of file CNRRemoteRadio.cpp.

Start the radio node.

Definition at line 520 of file CNRRemoteRadio.cpp.

void CNRRemoteRadio::start_receive ( ) [private]

Start the receiving thread.

Definition at line 139 of file CNRRemoteRadio.cpp.


Member Data Documentation

The asio streambuffer.

Definition at line 174 of file CNRRemoteRadio.hpp.

Definition at line 146 of file CNRRemoteRadio.hpp.

The data protector.

Definition at line 170 of file CNRRemoteRadio.hpp.

The service client.

Definition at line 182 of file CNRRemoteRadio.hpp.

Definition at line 170 of file CNRRemoteRadio.hpp.

Definition at line 154 of file CNRRemoteRadio.hpp.

Definition at line 146 of file CNRRemoteRadio.hpp.

Definition at line 146 of file CNRRemoteRadio.hpp.

Definition at line 146 of file CNRRemoteRadio.hpp.

Definition at line 146 of file CNRRemoteRadio.hpp.

Definition at line 146 of file CNRRemoteRadio.hpp.

Definition at line 146 of file CNRRemoteRadio.hpp.

Dummy requester.

Definition at line 190 of file CNRRemoteRadio.hpp.

Definition at line 190 of file CNRRemoteRadio.hpp.

The subscribed topics.

Definition at line 154 of file CNRRemoteRadio.hpp.

Definition at line 150 of file CNRRemoteRadio.hpp.

My id.

Definition at line 186 of file CNRRemoteRadio.hpp.

boost::asio::io_service labust::control::CNRRemoteRadio::io [private]

The io service.

Definition at line 158 of file CNRRemoteRadio.hpp.

The io service thread.

Definition at line 166 of file CNRRemoteRadio.hpp.

Definition at line 154 of file CNRRemoteRadio.hpp.

The publishers.

Definition at line 150 of file CNRRemoteRadio.hpp.

Last mode field.

Definition at line 194 of file CNRRemoteRadio.hpp.

The last arrived message.

Definition at line 142 of file CNRRemoteRadio.hpp.

Definition at line 150 of file CNRRemoteRadio.hpp.

Definition at line 154 of file CNRRemoteRadio.hpp.

The ROS node handles.

Definition at line 138 of file CNRRemoteRadio.hpp.

Definition at line 138 of file CNRRemoteRadio.hpp.

boost::asio::serial_port labust::control::CNRRemoteRadio::port [private]

The serial port

Definition at line 162 of file CNRRemoteRadio.hpp.

Definition at line 150 of file CNRRemoteRadio.hpp.

Definition at line 150 of file CNRRemoteRadio.hpp.

The sync buffer.

Definition at line 178 of file CNRRemoteRadio.hpp.

Definition at line 154 of file CNRRemoteRadio.hpp.

Definition at line 154 of file CNRRemoteRadio.hpp.

The timeout length.

Definition at line 146 of file CNRRemoteRadio.hpp.

Definition at line 190 of file CNRRemoteRadio.hpp.

Definition at line 146 of file CNRRemoteRadio.hpp.


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


cart2
Author(s): Gyula Nagy
autogenerated on Fri Feb 7 2014 11:37:19