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

#include <MotorCurrentSensor.h>

Public Member Functions

 MotorCurrentSensor (interfaces::ControlCenter *control, IDListConfig config)
 
 ~MotorCurrentSensor (void)
 
virtual int getAsciiData (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...
 
virtual configmaps::ConfigMap createConfig () const
 
- 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
 
void getCoreExchange (core_objects_exchange *obj) const
 
- Public Member Functions inherited from mars::data_broker::ReceiverInterface
 ReceiverInterface ()
 
virtual ~ReceiverInterface ()
 

Static Public Member Functions

static interfaces::BaseSensorinstanciate (interfaces::ControlCenter *control, interfaces::BaseConfig *config)
 
static interfaces::BaseConfigparseConfig (interfaces::ControlCenter *control, configmaps::ConfigMap *config)
 
- Static Public Member Functions inherited from mars::interfaces::BaseSensor
static BaseConfigparseConfig (ControlCenter *control, configmaps::ConfigMap *config)
 

Private Attributes

IDListConfig config
 
std::vector< double > doubleArray
 
std::string typeName
 
int countIDs
 
int dbCurrentIndex
 

Additional Inherited Members

- 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 45 of file MotorCurrentSensor.h.

Constructor & Destructor Documentation

◆ MotorCurrentSensor()

mars::sim::MotorCurrentSensor::MotorCurrentSensor ( interfaces::ControlCenter control,
IDListConfig  config 
)

Definition at line 57 of file MotorCurrentSensor.cpp.

◆ ~MotorCurrentSensor()

mars::sim::MotorCurrentSensor::~MotorCurrentSensor ( void  )

Definition at line 80 of file MotorCurrentSensor.cpp.

Member Function Documentation

◆ createConfig()

ConfigMap mars::sim::MotorCurrentSensor::createConfig ( ) const
virtual

Reimplemented from mars::interfaces::BaseSensor.

Definition at line 122 of file MotorCurrentSensor.cpp.

◆ getAsciiData()

int mars::sim::MotorCurrentSensor::getAsciiData ( char *  data) const
virtual

Reimplemented from mars::interfaces::BaseSensor.

Definition at line 86 of file MotorCurrentSensor.cpp.

◆ getSensorData()

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

Reimplemented from mars::interfaces::BaseSensor.

Definition at line 101 of file MotorCurrentSensor.cpp.

◆ instanciate()

BaseSensor * mars::sim::MotorCurrentSensor::instanciate ( interfaces::ControlCenter control,
interfaces::BaseConfig config 
)
static

Definition at line 42 of file MotorCurrentSensor.cpp.

◆ parseConfig()

BaseConfig * mars::sim::MotorCurrentSensor::parseConfig ( interfaces::ControlCenter control,
configmaps::ConfigMap config 
)
static

Definition at line 50 of file MotorCurrentSensor.cpp.

◆ receiveData()

void mars::sim::MotorCurrentSensor::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 113 of file MotorCurrentSensor.cpp.

Member Data Documentation

◆ config

IDListConfig mars::sim::MotorCurrentSensor::config
private

Definition at line 68 of file MotorCurrentSensor.h.

◆ countIDs

int mars::sim::MotorCurrentSensor::countIDs
private

Definition at line 71 of file MotorCurrentSensor.h.

◆ dbCurrentIndex

int mars::sim::MotorCurrentSensor::dbCurrentIndex
private

Definition at line 72 of file MotorCurrentSensor.h.

◆ doubleArray

std::vector<double> mars::sim::MotorCurrentSensor::doubleArray
private

Definition at line 69 of file MotorCurrentSensor.h.

◆ typeName

std::string mars::sim::MotorCurrentSensor::typeName
private

Definition at line 70 of file MotorCurrentSensor.h.


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