ocra-recipes
Doxygen documentation for the ocra-recipes repository
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ocra_recipes::ControlThread Class Referenceabstract

#include <ControlThread.h>

Inheritance diagram for ocra_recipes::ControlThread:
[legend]
Collaboration diagram for ocra_recipes::ControlThread:
[legend]

Classes

class  inputCallback
 

Public Member Functions

 ControlThread (int period, const std::string &taskRpcPortName)
 
 ~ControlThread ()
 
virtual bool threadInit ()
 
virtual void threadRelease ()
 
virtual void run ()
 
virtual bool ct_threadInit ()=0
 
virtual void ct_threadRelease ()=0
 
virtual void ct_run ()=0
 
std::string getThreadType ()
 
bool deactivateTask ()
 
bool activateTask ()
 
std::string getOutputPortName ()
 
std::string getInputPortName ()
 

Public Attributes

int threadId
 

Static Public Attributes

static int CONTROL_THREAD_COUNT = 0
 

Protected Member Functions

void setThreadType (const std::string &_threadType="ControlThread")
 
bool openControlPorts ()
 
bool connectControlPorts ()
 
bool parseInput (yarp::os::Bottle *input)
 
Eigen::VectorXd getCurrentState ()
 
void sendGetStateMessage ()
 
bool getTaskDimensions ()
 
bool getTaskParameters (TaskParameters &TP)
 

Protected Attributes

std::string controlThreadType
 
std::string inputPortName
 
std::string outputPortName
 
yarp::os::Port inputPort
 
yarp::os::Port outputPort
 
std::string taskRpcServerName
 
std::string threadRpcClientName
 
yarp::os::RpcClient threadRpcClient
 
yarp::os::Network yarp
 
bool isFirstInputBottle
 
inputCallbackinpCallback
 
Eigen::VectorXd currentStateVector
 
bool waitingForFirstStateMessage
 
double controlThreadPeriod
 
TaskParameters originalTaskParams
 
TaskParameters currentTaskParams
 
int weightDimension
 
int stateDimension
 
double closePortTimeout
 

Detailed Description

Definition at line 77 of file ControlThread.h.

Constructor & Destructor Documentation

ControlThread::ControlThread ( int  period,
const std::string &  taskRpcPortName 
)

Definition at line 35 of file ControlThread.cpp.

ControlThread::~ControlThread ( )

Definition at line 46 of file ControlThread.cpp.

Member Function Documentation

bool ControlThread::activateTask ( )

Definition at line 242 of file ControlThread.cpp.

bool ControlThread::connectControlPorts ( )
protected

Definition at line 141 of file ControlThread.cpp.

virtual void ocra_recipes::ControlThread::ct_run ( )
pure virtual
virtual bool ocra_recipes::ControlThread::ct_threadInit ( )
pure virtual
virtual void ocra_recipes::ControlThread::ct_threadRelease ( )
pure virtual
bool ControlThread::deactivateTask ( )

Definition at line 229 of file ControlThread.cpp.

Eigen::VectorXd ControlThread::getCurrentState ( )
protected

Definition at line 217 of file ControlThread.cpp.

std::string ocra_recipes::ControlThread::getInputPortName ( )
inline

Definition at line 105 of file ControlThread.h.

std::string ocra_recipes::ControlThread::getOutputPortName ( )
inline

Definition at line 104 of file ControlThread.h.

bool ControlThread::getTaskDimensions ( )
protected

Definition at line 255 of file ControlThread.cpp.

bool ControlThread::getTaskParameters ( TaskParameters TP)
protected

Definition at line 280 of file ControlThread.cpp.

std::string ocra_recipes::ControlThread::getThreadType ( )
inline

Definition at line 100 of file ControlThread.h.

bool ControlThread::openControlPorts ( )
protected

Definition at line 105 of file ControlThread.cpp.

bool ControlThread::parseInput ( yarp::os::Bottle *  input)
protected

Definition at line 180 of file ControlThread.cpp.

void ControlThread::run ( )
virtual

Definition at line 97 of file ControlThread.cpp.

void ControlThread::sendGetStateMessage ( )
protected

Definition at line 222 of file ControlThread.cpp.

void ocra_recipes::ControlThread::setThreadType ( const std::string &  _threadType = "ControlThread")
inlineprotected

Definition at line 122 of file ControlThread.h.

bool ControlThread::threadInit ( )
virtual

Definition at line 52 of file ControlThread.cpp.

void ControlThread::threadRelease ( )
virtual

Definition at line 69 of file ControlThread.cpp.

Member Data Documentation

double ocra_recipes::ControlThread::closePortTimeout
protected

Definition at line 161 of file ControlThread.h.

int ControlThread::CONTROL_THREAD_COUNT = 0
static

Definition at line 87 of file ControlThread.h.

double ocra_recipes::ControlThread::controlThreadPeriod
protected

Definition at line 149 of file ControlThread.h.

std::string ocra_recipes::ControlThread::controlThreadType
protected

Definition at line 124 of file ControlThread.h.

Eigen::VectorXd ocra_recipes::ControlThread::currentStateVector
protected

Definition at line 142 of file ControlThread.h.

TaskParameters ocra_recipes::ControlThread::currentTaskParams
protected

Definition at line 152 of file ControlThread.h.

inputCallback* ocra_recipes::ControlThread::inpCallback
protected

Definition at line 141 of file ControlThread.h.

yarp::os::Port ocra_recipes::ControlThread::inputPort
protected

Definition at line 128 of file ControlThread.h.

std::string ocra_recipes::ControlThread::inputPortName
protected

Definition at line 127 of file ControlThread.h.

bool ocra_recipes::ControlThread::isFirstInputBottle
protected

Definition at line 140 of file ControlThread.h.

TaskParameters ocra_recipes::ControlThread::originalTaskParams
protected

Definition at line 151 of file ControlThread.h.

yarp::os::Port ocra_recipes::ControlThread::outputPort
protected

Definition at line 128 of file ControlThread.h.

std::string ocra_recipes::ControlThread::outputPortName
protected

Definition at line 127 of file ControlThread.h.

int ocra_recipes::ControlThread::stateDimension
protected

Definition at line 155 of file ControlThread.h.

std::string ocra_recipes::ControlThread::taskRpcServerName
protected

Definition at line 131 of file ControlThread.h.

int ocra_recipes::ControlThread::threadId

Definition at line 86 of file ControlThread.h.

yarp::os::RpcClient ocra_recipes::ControlThread::threadRpcClient
protected

Definition at line 132 of file ControlThread.h.

std::string ocra_recipes::ControlThread::threadRpcClientName
protected

Definition at line 131 of file ControlThread.h.

bool ocra_recipes::ControlThread::waitingForFirstStateMessage
protected

Definition at line 146 of file ControlThread.h.

int ocra_recipes::ControlThread::weightDimension
protected

Definition at line 154 of file ControlThread.h.

yarp::os::Network ocra_recipes::ControlThread::yarp
protected

Definition at line 135 of file ControlThread.h.


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