MRPT  2.0.1
Classes | Namespaces | Macros | Functions
CGenericSensor.h File Reference
#include <mrpt/config/CConfigFileBase.h>
#include <mrpt/obs/CObservation.h>
#include <mrpt/typemeta/TEnumType.h>
#include <map>
#include <mutex>
Include dependency graph for CGenericSensor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mrpt::hwdrivers::TSensorClassId
 A structure for runtime ID class type information in the context of hwdrivers::CGenericSensor. More...
 
class  mrpt::hwdrivers::CGenericSensor
 A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabber. More...
 

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::hwdrivers
 Contains classes for various device interfaces.
 

Macros

#define SENSOR_CLASS_ID(class_name)
 
#define SENSOR_IS_CLASS(ptrObj, class_name)   (ptrObj->GetRuntimeClass() == SENSOR_CLASS_ID(class_name))
 
#define DEFINE_GENERIC_SENSOR(class_name)
 This declaration must be inserted in all CGenericSensor classes definition, within the class declaration. More...
 
#define IMPLEMENTS_GENERIC_SENSOR(class_name, NameSpace)
 This must be inserted in all CGenericSensor classes implementation files: More...
 

Functions

 MRPT_FILL_ENUM_MEMBER (mrpt::hwdrivers::CGenericSensor, ssInitializing)
 
 MRPT_FILL_ENUM_MEMBER (mrpt::hwdrivers::CGenericSensor, ssWorking)
 
 MRPT_FILL_ENUM_MEMBER (mrpt::hwdrivers::CGenericSensor, ssError)
 
 MRPT_FILL_ENUM_MEMBER (mrpt::hwdrivers::CGenericSensor, ssUninitialized)
 

Macro Definition Documentation

◆ DEFINE_GENERIC_SENSOR

#define DEFINE_GENERIC_SENSOR (   class_name)
Value:
public: \
static mrpt::hwdrivers::TSensorClassId class##class_name; \
const mrpt::hwdrivers::TSensorClassId* GetRuntimeClass() const override; \
static mrpt::hwdrivers::CGenericSensor* CreateObject(); \
static void doRegister() \
{ \
}
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
#define SENSOR_CLASS_ID(class_name)
void registerClass(const mrpt::rtti::TRuntimeClassId *pNewClass)
Register a class into the MRPT internal list of "CObject" descendents.
A structure for runtime ID class type information in the context of hwdrivers::CGenericSensor.

This declaration must be inserted in all CGenericSensor classes definition, within the class declaration.

Definition at line 302 of file CGenericSensor.h.

◆ IMPLEMENTS_GENERIC_SENSOR

#define IMPLEMENTS_GENERIC_SENSOR (   class_name,
  NameSpace 
)
Value:
mrpt::hwdrivers::CGenericSensor* NameSpace::class_name::CreateObject() \
{ \
return static_cast<hwdrivers::CGenericSensor*>( \
new NameSpace::class_name); \
} \
mrpt::hwdrivers::TSensorClassId NameSpace::class_name::class##class_name = \
{#class_name, NameSpace::class_name::CreateObject}; \
NameSpace::class_name::GetRuntimeClass() const \
{ \
return SENSOR_CLASS_ID(class_name); \
}
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
#define SENSOR_CLASS_ID(class_name)
A structure for runtime ID class type information in the context of hwdrivers::CGenericSensor.

This must be inserted in all CGenericSensor classes implementation files:

Definition at line 314 of file CGenericSensor.h.

◆ SENSOR_CLASS_ID

#define SENSOR_CLASS_ID (   class_name)
Value:
static_cast<const mrpt::hwdrivers::TSensorClassId*>( \
&mrpt::hwdrivers::class_name::class##class_name)
A structure for runtime ID class type information in the context of hwdrivers::CGenericSensor.

Definition at line 292 of file CGenericSensor.h.

◆ SENSOR_IS_CLASS

#define SENSOR_IS_CLASS (   ptrObj,
  class_name 
)    (ptrObj->GetRuntimeClass() == SENSOR_CLASS_ID(class_name))

Definition at line 296 of file CGenericSensor.h.

Function Documentation

◆ MRPT_FILL_ENUM_MEMBER() [1/4]

MRPT_FILL_ENUM_MEMBER ( mrpt::hwdrivers::CGenericSensor  ,
ssInitializing   
)

◆ MRPT_FILL_ENUM_MEMBER() [2/4]

MRPT_FILL_ENUM_MEMBER ( mrpt::hwdrivers::CGenericSensor  ,
ssWorking   
)

◆ MRPT_FILL_ENUM_MEMBER() [3/4]

MRPT_FILL_ENUM_MEMBER ( mrpt::hwdrivers::CGenericSensor  ,
ssError   
)

◆ MRPT_FILL_ENUM_MEMBER() [4/4]

MRPT_FILL_ENUM_MEMBER ( mrpt::hwdrivers::CGenericSensor  ,
ssUninitialized   
)



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020