#include <DiverMsg.hpp>
Classes | |
struct | AutoDiver |
struct | AutoTopside |
Public Types | |
enum | { msgByteCount = 6 } |
enum | { nextKMLSet = 6, endOfKML = 7, initReq = 8 } |
enum | { type = 0, z, lat, lon, def, msg, kmlno, kmlx, kmly, img, empty, chksum, num_elements } |
typedef std::vector< int > | BitMap |
typedef std::map< int, BitMap > | BitsCollection |
Public Member Functions | |
template<class MsgType > | |
void | decode (uint64_t data, int type=-1) |
void | decode (uint64_t data, int type=-1) |
DEFINE_MAPPED_MESSAGES (topsideMap,(PositionInit, 0,(0, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0))(Position_18, 1,(7, 18, 18, 0, 0, 0, 0, 0, 0, 1, 0))(PositionMsg, 2,(7, 7, 7, 0, 18, 0, 0, 0, 0, 5, 0))(PositionImg, 3,(7, 7, 0, 0, 0, 0, 0, 0, 23, 0, 0))(Position_14Def, 4,(7, 14, 14, 5, 0, 0, 0, 0, 0, 4, 0))(PositionMsgDef, 5,(7, 7, 7, 5, 18, 0, 0, 0, 0, 0, 0))(PositionImgDef, 6,(7, 7, 7, 5, 0, 0, 0, 0, 18, 0, 0))(PositionKml, 7,(7, 7, 7, 0, 0, 3, 10, 10, 0, 0, 0))(PositionChk, 8,(7, 7, 7, 0, 0, 0, 0, 0, 0, 17, 6))(PositionMsgChk, 9,(7, 7, 7, 0, 12, 0, 0, 0, 0, 5, 6))(PositionImgChk, 10,(7, 7, 7, 0, 0, 0, 0, 0, 17, 0, 6))(PositionDefChk, 11,(7, 7, 7, 5, 0, 0, 0, 0, 0, 12, 6))(PositionMsgDefChk, 12,(7, 7, 7, 5, 12, 0, 0, 0, 0, 0, 6))(PositionImgDefChk, 13,(7, 7, 7, 5, 0, 0, 0, 0, 12, 0, 6))) | |
DEFINE_MAPPED_MESSAGES (diverMap,(PositionInitAck, 0,(0, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0))(MsgReply, 1,(0, 0, 0, 0, 42, 0, 0, 0, 0, 2, 0))(ImgReply, 2,(0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0))(DefReply, 3,(0, 0, 0, 5, 0, 0, 0, 0, 0, 39, 0))(MsgDefReply, 4,(0, 0, 0, 5, 36, 0, 0, 0, 0, 3, 0))(ImgDefReply, 5,(0, 0, 0, 5, 39, 0, 0, 0, 0, 0, 0))(MsgChkReply, 6,(0, 0, 0, 0, 36, 0, 0, 0, 0, 2, 6))(ImgChkReply, 7,(0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 6))(KmlReply, 11,(0, 0, 0, 0, 0, 3, 10, 10, 0, 21, 0))) | |
DiverMsg (bool default_topside=true) | |
template<class MsgType > | |
uint64_t | encode (int msg_type=-1) |
uint64_t | encode (int type=-1) |
template<class MsgType > | |
void | fromString (const std::string &msg, int type=-1) |
void | fromString (const std::string &msg, int type=-1) |
template<class MsgType > | |
std::string | toString (int type=-1) |
std::string | toString (int type=-1) |
Static Public Member Functions | |
static uint8_t | testType (const std::string &data) |
static uint8_t | testType (uint64_t data, size_t msgSize=48) |
Public Attributes | |
std::vector< int64_t > | data |
bool | default_topside |
double | depth |
double | depthRes |
double | kml_latitude |
double | kml_longitude |
double | latitude |
LatLon2Bits | llEncoder |
double | longitude |
Static Public Attributes | |
static BitsCollection | diverMap |
static BitsCollection | topsideMap |
The diver message list. Keep in mind that the final string version of the message contains the bit number as the first byte. The bytes are flipped due to little-big endian issues. Additional dynamic or static message sets can be utilized by the DiverMsg union by defining structures similar to AutoDiver, AutoTopside that will provide the necessary collection of bitmasks - extension feature.
Document extension feature
Add auto-load messages from ROS.
Separate the diver and topside messages into separate subclasses.
Definition at line 91 of file DiverMsg.hpp.
typedef std::vector<int> labust::tritech::DiverMsg::BitMap |
Definition at line 118 of file DiverMsg.hpp.
typedef std::map<int, BitMap > labust::tritech::DiverMsg::BitsCollection |
Definition at line 119 of file DiverMsg.hpp.
anonymous enum |
The maximum length of the message.
Definition at line 96 of file DiverMsg.hpp.
anonymous enum |
Default messages enum
Definition at line 100 of file DiverMsg.hpp.
anonymous enum |
The list of encoded variables.
Definition at line 104 of file DiverMsg.hpp.
labust::tritech::DiverMsg::DiverMsg | ( | bool | default_topside = true | ) | [inline] |
Definition at line 151 of file DiverMsg.hpp.
void labust::tritech::DiverMsg::decode | ( | uint64_t | data, |
int | type = -1 |
||
) | [inline] |
Definition at line 214 of file DiverMsg.hpp.
void labust::tritech::DiverMsg::decode | ( | uint64_t | data, |
int | type = -1 |
||
) | [inline] |
Definition at line 225 of file DiverMsg.hpp.
labust::tritech::DiverMsg::DEFINE_MAPPED_MESSAGES | ( | topsideMap | , |
(PositionInit, 0,(0, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0))(Position_18, 1,(7, 18, 18, 0, 0, 0, 0, 0, 0, 1, 0))(PositionMsg, 2,(7, 7, 7, 0, 18, 0, 0, 0, 0, 5, 0))(PositionImg, 3,(7, 7, 0, 0, 0, 0, 0, 0, 23, 0, 0))(Position_14Def, 4,(7, 14, 14, 5, 0, 0, 0, 0, 0, 4, 0))(PositionMsgDef, 5,(7, 7, 7, 5, 18, 0, 0, 0, 0, 0, 0))(PositionImgDef, 6,(7, 7, 7, 5, 0, 0, 0, 0, 18, 0, 0))(PositionKml, 7,(7, 7, 7, 0, 0, 3, 10, 10, 0, 0, 0))(PositionChk, 8,(7, 7, 7, 0, 0, 0, 0, 0, 0, 17, 6))(PositionMsgChk, 9,(7, 7, 7, 0, 12, 0, 0, 0, 0, 5, 6))(PositionImgChk, 10,(7, 7, 7, 0, 0, 0, 0, 0, 17, 0, 6))(PositionDefChk, 11,(7, 7, 7, 5, 0, 0, 0, 0, 0, 12, 6))(PositionMsgDefChk, 12,(7, 7, 7, 5, 12, 0, 0, 0, 0, 0, 6))(PositionImgDefChk, 13,(7, 7, 7, 5, 0, 0, 0, 0, 12, 0, 6)) | |||
) |
labust::tritech::DiverMsg::DEFINE_MAPPED_MESSAGES | ( | diverMap | , |
(PositionInitAck, 0,(0, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0))(MsgReply, 1,(0, 0, 0, 0, 42, 0, 0, 0, 0, 2, 0))(ImgReply, 2,(0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0))(DefReply, 3,(0, 0, 0, 5, 0, 0, 0, 0, 0, 39, 0))(MsgDefReply, 4,(0, 0, 0, 5, 36, 0, 0, 0, 0, 3, 0))(ImgDefReply, 5,(0, 0, 0, 5, 39, 0, 0, 0, 0, 0, 0))(MsgChkReply, 6,(0, 0, 0, 0, 36, 0, 0, 0, 0, 2, 6))(ImgChkReply, 7,(0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 6))(KmlReply, 11,(0, 0, 0, 0, 0, 3, 10, 10, 0, 21, 0)) | |||
) |
uint64_t labust::tritech::DiverMsg::encode | ( | int | msg_type = -1 | ) | [inline] |
Definition at line 174 of file DiverMsg.hpp.
uint64_t labust::tritech::DiverMsg::encode | ( | int | type = -1 | ) | [inline] |
Definition at line 191 of file DiverMsg.hpp.
void labust::tritech::DiverMsg::fromString | ( | const std::string & | msg, |
int | type = -1 |
||
) | [inline] |
Definition at line 231 of file DiverMsg.hpp.
void labust::tritech::DiverMsg::fromString | ( | const std::string & | msg, |
int | type = -1 |
||
) | [inline] |
Definition at line 250 of file DiverMsg.hpp.
static uint8_t labust::tritech::DiverMsg::testType | ( | const std::string & | data | ) | [inline, static] |
Definition at line 255 of file DiverMsg.hpp.
static uint8_t labust::tritech::DiverMsg::testType | ( | uint64_t | data, |
size_t | msgSize = 48 |
||
) | [inline, static] |
Definition at line 260 of file DiverMsg.hpp.
std::string labust::tritech::DiverMsg::toString | ( | int | type = -1 | ) | [inline] |
Definition at line 197 of file DiverMsg.hpp.
std::string labust::tritech::DiverMsg::toString | ( | int | type = -1 | ) | [inline] |
Definition at line 208 of file DiverMsg.hpp.
std::vector<int64_t> labust::tritech::DiverMsg::data |
Definition at line 265 of file DiverMsg.hpp.
Definition at line 268 of file DiverMsg.hpp.
Definition at line 267 of file DiverMsg.hpp.
Definition at line 267 of file DiverMsg.hpp.
Definition at line 120 of file DiverMsg.hpp.
Definition at line 267 of file DiverMsg.hpp.
Definition at line 267 of file DiverMsg.hpp.
Definition at line 267 of file DiverMsg.hpp.
Definition at line 266 of file DiverMsg.hpp.
Definition at line 267 of file DiverMsg.hpp.
Definition at line 120 of file DiverMsg.hpp.