REC RPC library
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
rec::rpc Namespace Reference

Namespaces

 serialization
 

Classes

class  Client
 RPC client base class. More...
 
class  ClientInfo
 RPC client info. More...
 
struct  CustomRequestHandlerBase
 Custom request handler interface. More...
 
class  Exception
 Exception class. More...
 
struct  HTTPGetHandlerBase
 HTTP GET handler interface. More...
 
class  MapInfo
 
struct  NotifierBase
 RPC response notifier wrapper interface. More...
 
struct  RPCFunctionBase
 RPC function wrapper interface. More...
 
class  Server
 RPC server base class. More...
 
struct  TopicListenerBase
 topic listener wrapper interface More...
 

Typedefs

typedef QSet< ClientInfoClientInfoSet
 Set of ClientInfos typedef. More...
 
typedef QMap< QString, ClientInfoClientInfoMap
 Map of ClientInfos typedef. More...
 

Enumerations

enum  ErrorCode {
  NoError = 0, NoConnection, NotAnRPCServer, IncompatibleServer,
  UnknownFunction, ExecutionCancelled, ExecutionTimeout, WrongDataFormat,
  NoSuchTopic, ImproperTopicName, TopicAlreadyExists, AccessDenied,
  ImproperFunctionName, LocalTopicNull, HTTPNotFount = 100, HTTPBadRequest,
  HTTPMovedPermanently, UnknownError, User = 200
}
 Pre-defined error codes. More...
 

Functions

REC_RPC_EXPORT int getLibraryMajorVersion ()
 Get the library's major version. More...
 
REC_RPC_EXPORT int getLibraryMinorVersion ()
 Get the library's minor version. More...
 
REC_RPC_EXPORT int getLibraryPatchVersion ()
 Get the library's patch version. More...
 
REC_RPC_EXPORT QString getLibraryVersionSuffix ()
 Get the library's version suffix. More...
 
REC_RPC_EXPORT int getLibraryDate ()
 Get the library's version date. More...
 
REC_RPC_EXPORT void getLibraryVersion (int *major, int *minor, int *patch, QString *suffix, int *date)
 Get the library's version. More...
 
REC_RPC_EXPORT QString getLibraryVersionString ()
 Get the library's version as string. More...
 
static REC_RPC_FUNCTION_IS_NOT_USED float deg2rad (float deg)
 
static REC_RPC_FUNCTION_IS_NOT_USED float rad2deg (float rad)
 
static char * encodeInt32 (char *data, const qint32 value)
 
static char * encodeUInt32 (char *data, const quint32 value)
 
static const char * decodeInt32 (const char *data, qint32 *value)
 
static const char * decodeUInt32 (const char *data, quint32 *value)
 
static qint32 decodeInt32 (const char *data)
 
static quint32 decodeUInt32 (const char *data)
 
static REC_RPC_FUNCTION_IS_NOT_USED QPointF getPoint (const MapInfo &mapInfo, const tf::Pose &p)
 
static REC_RPC_FUNCTION_IS_NOT_USED QPointF getPoint (const MapInfo &mapInfo, const geometry_msgs::Point &p)
 
static REC_RPC_FUNCTION_IS_NOT_USED QVector< QPointF > getPoints (tf::TransformListener *tf, const MapInfo &mapInfo, const sensor_msgs::PointCloud &pointCloudIn)
 
static REC_RPC_FUNCTION_IS_NOT_USED double getYaw (const tf::Pose &p)
 
static REC_RPC_FUNCTION_IS_NOT_USED bool poseStampedToMap (tf::TransformListener *tf, const MapInfo &mapInfo, const geometry_msgs::PoseStamped &pose, QPointF *point, double *rotation_deg)
 
static REC_RPC_FUNCTION_IS_NOT_USED bool poseToMap (tf::TransformListener *tf, const MapInfo &mapInfo, const geometry_msgs::Pose &pose, const std::string &sourceFrame, const ros::Time &time, QPointF *point, double *rotation_deg)
 
static REC_RPC_FUNCTION_IS_NOT_USED bool toMap (tf::TransformListener *tf, const MapInfo &mapInfo, const geometry_msgs::Point &position, const std::string &sourceFrame, const ros::Time &time, QPointF *point)
 
static REC_RPC_FUNCTION_IS_NOT_USED bool toMap (tf::TransformListener *tf, const MapInfo &mapInfo, const geometry_msgs::Pose &pose, const std::string &sourceFrame, const ros::Time &time, QPointF *point, double *rotation_deg)
 
static REC_RPC_FUNCTION_IS_NOT_USED geometry_msgs::Pose toPose (const MapInfo &mapInfo, const QPointF &point, double rot_degrees)
 
static REC_RPC_FUNCTION_IS_NOT_USED QImage fromOccupancyGrid (const nav_msgs::OccupancyGridConstPtr &msg)
 

Variables

const int defaultPort = 9280
 The TCP port which will be used by default if no other one is specified. More...
 
static const float PI = 3.14159265358979323846f
 

Typedef Documentation

typedef QMap< QString, ClientInfo > rec::rpc::ClientInfoMap

Map of ClientInfos typedef.

Definition at line 172 of file rec_rpc_ClientInfo.h.

Set of ClientInfos typedef.

Definition at line 170 of file rec_rpc_ClientInfo.h.

Enumeration Type Documentation

Pre-defined error codes.

Enumerator
NoError 

No error.

NoConnection 

Connection was lost or could not been established.

NotAnRPCServer 

The server the client is trying to connect to is not a RPC server.

IncompatibleServer 

The server the client is trying to connect to is incompatible (because it sent a greeting that is different from the one expected.

UnknownFunction 

The function the client is trying to call does not exist on the server.

ExecutionCancelled 

The function execution on the server has been cancelled for unknown reasons.

ExecutionTimeout 

A timeout during function execution has occurred.

WrongDataFormat 

RPC function parameters or return values or topic data have an incompativle data type or format.

NoSuchTopic 

The topic the client or server is trying to access does not exist.

ImproperTopicName 

The topic name specified in ADD_TOPIC is not permitted.

TopicAlreadyExists 

A topic with the name specified in ADD_TOPIC already exists.

AccessDenied 

A client is trying to publish data on a server-only topic.

ImproperFunctionName 

The function name specified in REGISTER_FUNCTION is not permitted.

LocalTopicNull 

The data in the local shared memory is Null

HTTPNotFount 

The page that was requested via HTTP does not exist.

HTTPBadRequest 

The browser sent an invalid HTTP request.

HTTPMovedPermanently 

The page requestet via HTTP has moved to a new location. The new location can be retrieved by calling detail().

UnknownError 

An unknown error occurred.

User 

Definition at line 42 of file rec_rpc_Exception.h.

Function Documentation

static const char* rec::rpc::decodeInt32 ( const char *  data,
qint32 *  value 
)
static

Definition at line 67 of file rec_rpc_utils.h.

static qint32 rec::rpc::decodeInt32 ( const char *  data)
static

Definition at line 85 of file rec_rpc_utils.h.

static const char* rec::rpc::decodeUInt32 ( const char *  data,
quint32 *  value 
)
static

Definition at line 76 of file rec_rpc_utils.h.

static quint32 rec::rpc::decodeUInt32 ( const char *  data)
static

Definition at line 94 of file rec_rpc_utils.h.

static REC_RPC_FUNCTION_IS_NOT_USED float rec::rpc::deg2rad ( float  deg)
static

Definition at line 39 of file rec_rpc_utils.h.

Referenced by toPose().

static char* rec::rpc::encodeInt32 ( char *  data,
const qint32  value 
)
static

Definition at line 49 of file rec_rpc_utils.h.

static char* rec::rpc::encodeUInt32 ( char *  data,
const quint32  value 
)
static

Definition at line 58 of file rec_rpc_utils.h.

static REC_RPC_FUNCTION_IS_NOT_USED QImage rec::rpc::fromOccupancyGrid ( const nav_msgs::OccupancyGridConstPtr &  msg)
static

Definition at line 259 of file ROSHelper.h.

REC_RPC_EXPORT int rec::rpc::getLibraryDate ( )

Get the library's version date.

Returns
The date when this version of the library was released (format is YYYYMMDD).
REC_RPC_EXPORT int rec::rpc::getLibraryMajorVersion ( )

Get the library's major version.

Returns
The library's major version.
REC_RPC_EXPORT int rec::rpc::getLibraryMinorVersion ( )

Get the library's minor version.

Returns
The library's minor version.
REC_RPC_EXPORT int rec::rpc::getLibraryPatchVersion ( )

Get the library's patch version.

Returns
The library's patch version.
REC_RPC_EXPORT void rec::rpc::getLibraryVersion ( int *  major,
int *  minor,
int *  patch,
QString *  suffix,
int *  date 
)

Get the library's version.

Parameters
majorPointer to the major version.
minorPointer to the minor version.
patchPointer to the patch version.
suffixPointer to the suffix.
datePointer to the version date (format is YYYYMMDD).
REC_RPC_EXPORT QString rec::rpc::getLibraryVersionString ( )

Get the library's version as string.

Returns
The library's version as string.
REC_RPC_EXPORT QString rec::rpc::getLibraryVersionSuffix ( )

Get the library's version suffix.

Returns
A string that is appended to the version number (like "a" or "beta").
static REC_RPC_FUNCTION_IS_NOT_USED QPointF rec::rpc::getPoint ( const MapInfo mapInfo,
const tf::Pose &  p 
)
static

Definition at line 87 of file ROSHelper.h.

References rec::rpc::MapInfo::offset, and rec::rpc::MapInfo::resolution.

Referenced by getPoints(), and poseStampedToMap().

static REC_RPC_FUNCTION_IS_NOT_USED QPointF rec::rpc::getPoint ( const MapInfo mapInfo,
const geometry_msgs::Point &  p 
)
static

Definition at line 95 of file ROSHelper.h.

References rec::rpc::MapInfo::offset, and rec::rpc::MapInfo::resolution.

static REC_RPC_FUNCTION_IS_NOT_USED QVector< QPointF > rec::rpc::getPoints ( tf::TransformListener *  tf,
const MapInfo mapInfo,
const sensor_msgs::PointCloud &  pointCloudIn 
)
static

Definition at line 103 of file ROSHelper.h.

References rec::rpc::MapInfo::frame_id, and getPoint().

static REC_RPC_FUNCTION_IS_NOT_USED double rec::rpc::getYaw ( const tf::Pose &  p)
static

Definition at line 137 of file ROSHelper.h.

References rad2deg().

Referenced by poseStampedToMap().

static REC_RPC_FUNCTION_IS_NOT_USED bool rec::rpc::poseStampedToMap ( tf::TransformListener *  tf,
const MapInfo mapInfo,
const geometry_msgs::PoseStamped &  pose,
QPointF *  point,
double *  rotation_deg 
)
static

Definition at line 148 of file ROSHelper.h.

References rec::rpc::MapInfo::frame_id, getPoint(), and getYaw().

Referenced by poseToMap(), and toMap().

static REC_RPC_FUNCTION_IS_NOT_USED bool rec::rpc::poseToMap ( tf::TransformListener *  tf,
const MapInfo mapInfo,
const geometry_msgs::Pose &  pose,
const std::string &  sourceFrame,
const ros::Time &  time,
QPointF *  point,
double *  rotation_deg 
)
static

Definition at line 185 of file ROSHelper.h.

References poseStampedToMap().

static REC_RPC_FUNCTION_IS_NOT_USED float rec::rpc::rad2deg ( float  rad)
static

Definition at line 44 of file rec_rpc_utils.h.

References PI.

Referenced by getYaw().

static REC_RPC_FUNCTION_IS_NOT_USED bool rec::rpc::toMap ( tf::TransformListener *  tf,
const MapInfo mapInfo,
const geometry_msgs::Point &  position,
const std::string &  sourceFrame,
const ros::Time &  time,
QPointF *  point 
)
static

Definition at line 202 of file ROSHelper.h.

References poseStampedToMap().

static REC_RPC_FUNCTION_IS_NOT_USED bool rec::rpc::toMap ( tf::TransformListener *  tf,
const MapInfo mapInfo,
const geometry_msgs::Pose &  pose,
const std::string &  sourceFrame,
const ros::Time &  time,
QPointF *  point,
double *  rotation_deg 
)
static

Definition at line 220 of file ROSHelper.h.

References poseStampedToMap().

static REC_RPC_FUNCTION_IS_NOT_USED geometry_msgs::Pose rec::rpc::toPose ( const MapInfo mapInfo,
const QPointF &  point,
double  rot_degrees 
)
static

Definition at line 237 of file ROSHelper.h.

References deg2rad(), rec::rpc::MapInfo::offset, and rec::rpc::MapInfo::resolution.

Variable Documentation

const int rec::rpc::defaultPort = 9280

The TCP port which will be used by default if no other one is specified.

Definition at line 138 of file rec_rpc_common.h.

const float rec::rpc::PI = 3.14159265358979323846f
static

Definition at line 37 of file rec_rpc_utils.h.

Referenced by rad2deg().