Conscience Core
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CscServoInterface Class Reference

#include <CscServoInterface.h>

Public Member Functions

 CscServoInterface ()
 
bool setupSerialStream (FileDesc &fd, const char *portName)
 
void writePelcoPMessage (int movement, float deltaAngleMotor0, float deltaAngleMotor1)
 
void processUnitSample ()
 
int processResultToRs (CscState *state)
 
bool writeToRs (const char *buffer, unsigned int buf_size)
 
bool isActivated ()
 
void closeSerial ()
 
virtual ~CscServoInterface ()
 
void updateStatusAndProcessAction ()
 
void initUpdateStatusAndProcessActionThread ()
 
void activate (const char *rsPortName)
 
void disactivate ()
 
void reachMotorsAngles (float directionValues[2])
 
int updateRequestedMotorsAngles (float motor0Speed, float motor1Speed)
 
void stopAllMovments ()
 
float getMotoValInPercent (int motorId)
 
void emergencyStop ()
 
void writeSerialMessage (int motor, int targetAngleMotor)
 

Static Public Member Functions

static CscServoInterfacegetInstance ()
 

Public Attributes

const char * rsPortName
 
int rsFd
 

Constructor & Destructor Documentation

◆ CscServoInterface()

CscServoInterface::CscServoInterface ( )
explicit

◆ ~CscServoInterface()

CscServoInterface::~CscServoInterface ( )
virtual

Member Function Documentation

◆ activate()

void CscServoInterface::activate ( const char *  rsPortName)

◆ closeSerial()

void CscServoInterface::closeSerial ( )

◆ disactivate()

void CscServoInterface::disactivate ( )

◆ emergencyStop()

void CscServoInterface::emergencyStop ( )

◆ getInstance()

static CscServoInterface* CscServoInterface::getInstance ( )
inlinestatic

◆ getMotoValInPercent()

float CscServoInterface::getMotoValInPercent ( int  motorId)

◆ initUpdateStatusAndProcessActionThread()

void CscServoInterface::initUpdateStatusAndProcessActionThread ( )

◆ isActivated()

bool CscServoInterface::isActivated ( )

◆ processResultToRs()

int CscServoInterface::processResultToRs ( CscState state)

◆ processUnitSample()

void CscServoInterface::processUnitSample ( )

◆ reachMotorsAngles()

void CscServoInterface::reachMotorsAngles ( float  directionValues[2])

◆ setupSerialStream()

bool CscServoInterface::setupSerialStream ( FileDesc fd,
const char *  portName 
)

◆ stopAllMovments()

void CscServoInterface::stopAllMovments ( )

◆ updateRequestedMotorsAngles()

int CscServoInterface::updateRequestedMotorsAngles ( float  motor0Speed,
float  motor1Speed 
)

◆ updateStatusAndProcessAction()

void CscServoInterface::updateStatusAndProcessAction ( )

◆ writePelcoPMessage()

void CscServoInterface::writePelcoPMessage ( int  movement,
float  deltaAngleMotor0,
float  deltaAngleMotor1 
)

◆ writeSerialMessage()

void CscServoInterface::writeSerialMessage ( int  motor,
int  targetAngleMotor 
)

◆ writeToRs()

bool CscServoInterface::writeToRs ( const char *  buffer,
unsigned int  buf_size 
)

Member Data Documentation

◆ rsFd

int CscServoInterface::rsFd

◆ rsPortName

const char* CscServoInterface::rsPortName

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