Privacy
An open-source, flexible 3D physical simulation framework
mars::sim::MotorPositionSensor Class Reference

#include <MotorPositionSensor.h>

Public Member Functions

 MotorPositionSensor (interfaces::ControlCenter *control, const unsigned long id, const std::string &name)
 
 ~MotorPositionSensor (void)
 
virtual int getMonsterData (char *data) const
 
virtual int getSensorData (interfaces::sReal **data) const
 
virtual void receiveData (const data_broker::DataInfo &info, const data_broker::DataPackage &package, int callbackParam)
 The DataBroker will call this method to notify the receiver of whenever the condition for which the receiver registered occur. More...
 
- Public Member Functions inherited from mars::interfaces::SensorInterface
 SensorInterface (ControlCenter *center)
 
virtual ~SensorInterface ()
 
- Public Member Functions inherited from mars::interfaces::BaseSensor
 BaseSensor ()
 
virtual ~BaseSensor ()
 
 BaseSensor (unsigned long id, std::string name)
 
unsigned long getID () const
 
const std::string getName () const
 
virtual int getAsciiData (char *data) const
 
void getCoreExchange (core_objects_exchange *obj) const
 
virtual configmaps::ConfigMap createConfig () const
 
- Public Member Functions inherited from mars::data_broker::ReceiverInterface
 ReceiverInterface ()
 
virtual ~ReceiverInterface ()
 

Private Attributes

std::vector< motorPositionDatavalues
 
long positionIndex
 

Additional Inherited Members

- Static Public Member Functions inherited from mars::interfaces::BaseSensor
static BaseConfigparseConfig (ControlCenter *control, configmaps::ConfigMap *config)
 
- Public Attributes inherited from mars::interfaces::BaseSensor
unsigned long id
 
std::string name
 
unsigned long updateRate
 
- Protected Attributes inherited from mars::interfaces::SensorInterface
ControlCentercontrol
 

Detailed Description

Definition at line 47 of file MotorPositionSensor.h.

Constructor & Destructor Documentation

◆ MotorPositionSensor()

mars::sim::MotorPositionSensor::MotorPositionSensor ( interfaces::ControlCenter control,
const unsigned long  id,
const std::string &  name 
)

Definition at line 42 of file MotorPositionSensor.cpp.

◆ ~MotorPositionSensor()

mars::sim::MotorPositionSensor::~MotorPositionSensor ( void  )

Definition at line 71 of file MotorPositionSensor.cpp.

Member Function Documentation

◆ getMonsterData()

int mars::sim::MotorPositionSensor::getMonsterData ( char *  data) const
virtual

Definition at line 77 of file MotorPositionSensor.cpp.

◆ getSensorData()

int mars::sim::MotorPositionSensor::getSensorData ( interfaces::sReal **  data) const
virtual

Reimplemented from mars::interfaces::BaseSensor.

Definition at line 95 of file MotorPositionSensor.cpp.

◆ receiveData()

void mars::sim::MotorPositionSensor::receiveData ( const data_broker::DataInfo info,
const data_broker::DataPackage dataPackage,
int  callbackParam 
)
virtual

The DataBroker will call this method to notify the receiver of whenever the condition for which the receiver registered occur.

Parameters
infoInformation about the DataPackage.
dataPackageThe DataPackage containing all the data.
callbackParamThe int the receiver passed during registration. The default (the receiver didn't provide a callbackParam) is 0. This can be used to easily distinguish different registrations.

Implements mars::data_broker::ReceiverInterface.

Definition at line 109 of file MotorPositionSensor.cpp.

Member Data Documentation

◆ positionIndex

long mars::sim::MotorPositionSensor::positionIndex
private

Definition at line 63 of file MotorPositionSensor.h.

◆ values

std::vector<motorPositionData> mars::sim::MotorPositionSensor::values
private

Definition at line 62 of file MotorPositionSensor.h.


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