fakeMotionControlMicro: This device implements a minimal subset of mandatory interfaces to run with controlBoard_nws_yarp.
More...
#include <fake/fakeMotionControlMicro/FakeMotionControlMicro.h>
Inheritance diagram for FakeMotionControlMicro:Public Member Functions | |
| FakeMotionControlMicro () | |
| ~FakeMotionControlMicro () | |
| bool | open (yarp::os::Searchable &par) override |
| Open the DeviceDriver. | |
| bool | close () override |
| Close the DeviceDriver. | |
| bool | fromConfig (yarp::os::Searchable &config) |
| virtual bool | initialised () |
| bool | alloc (int njoints) |
| Allocated buffers. | |
| void | resizeBuffers () |
| Resize previously allocated buffers. | |
| bool | threadInit () override |
| Initialization method. | |
| void | threadRelease () override |
| Release method. | |
| yarp::dev::ReturnValue | getLastJointFaultRaw (int j, int &fault, std::string &message) override |
| yarp::dev::ReturnValue | getNumberOfMotorEncodersRaw (int *num) override |
| Get the number of available motor encoders. | |
| yarp::dev::ReturnValue | resetMotorEncoderRaw (int j) override |
| Reset motor encoder, single motor. | |
| yarp::dev::ReturnValue | resetMotorEncodersRaw () override |
| Reset motor encoders. | |
| yarp::dev::ReturnValue | setMotorEncoderRaw (int j, double val) override |
| Set the value of the motor encoder for a given motor. | |
| yarp::dev::ReturnValue | setMotorEncodersRaw (const double *vals) override |
| Set the value of all motor encoders. | |
| yarp::dev::ReturnValue | getMotorEncoderRaw (int j, double *v) override |
| Read the value of a motor encoder. | |
| yarp::dev::ReturnValue | getMotorEncodersRaw (double *encs) override |
| Read the position of all motor encoders. | |
| yarp::dev::ReturnValue | getMotorEncoderSpeedRaw (int j, double *sp) override |
| Read the instantaneous speed of a motor encoder. | |
| yarp::dev::ReturnValue | getMotorEncoderSpeedsRaw (double *spds) override |
| Read the instantaneous speed of all motor encoders. | |
| yarp::dev::ReturnValue | getMotorEncoderAccelerationRaw (int j, double *spds) override |
| Read the instantaneous acceleration of a motor encoder. | |
| yarp::dev::ReturnValue | getMotorEncoderAccelerationsRaw (double *accs) override |
| Read the instantaneous acceleration of all motor encoders. | |
| yarp::dev::ReturnValue | getMotorEncodersTimedRaw (double *encs, double *stamps) override |
| Read the instantaneous position of all motor encoders. | |
| yarp::dev::ReturnValue | getMotorEncoderTimedRaw (int m, double *encs, double *stamp) override |
| Read the instantaneous position of a motor encoder. | |
| yarp::dev::ReturnValue | getMotorEncoderCountsPerRevolutionRaw (int m, double *v) override |
| Gets number of counts per revolution for motor encoder m. | |
| yarp::dev::ReturnValue | setMotorEncoderCountsPerRevolutionRaw (int m, const double cpr) override |
| Sets number of counts per revolution for motor encoder m. | |
| yarp::dev::ReturnValue | getAxes (size_t &ax) override |
| Get the number of controlled axes. | |
| yarp::dev::ReturnValue | resetEncoderRaw (int j) override |
| Reset encoder, single joint. | |
| yarp::dev::ReturnValue | resetEncodersRaw () override |
| Reset encoders. | |
| yarp::dev::ReturnValue | setEncoderRaw (int j, double val) override |
| Set the value of the encoder for a given joint. | |
| yarp::dev::ReturnValue | setEncodersRaw (const double *vals) override |
| Set the value of all encoders. | |
| yarp::dev::ReturnValue | getEncoderRaw (int j, double *v) override |
| Read the value of an encoder. | |
| yarp::dev::ReturnValue | getEncodersRaw (double *encs) override |
| Read the position of all axes. | |
| yarp::dev::ReturnValue | getEncoderSpeedRaw (int j, double *sp) override |
| Read the instantaneous speed of an axis. | |
| yarp::dev::ReturnValue | getEncoderSpeedsRaw (double *spds) override |
| Read the instantaneous acceleration of an axis. | |
| yarp::dev::ReturnValue | getEncoderAccelerationRaw (int j, double *spds) override |
| Read the instantaneous acceleration of an axis. | |
| yarp::dev::ReturnValue | getEncoderAccelerationsRaw (double *accs) override |
| Read the instantaneous acceleration of all axes. | |
| yarp::dev::ReturnValue | getEncodersTimedRaw (double *encs, double *stamps) override |
| Read the instantaneous acceleration of all axes. | |
| yarp::dev::ReturnValue | getEncoderTimedRaw (int j, double *encs, double *stamp) override |
| Read the instantaneous acceleration of all axes. | |
| yarp::dev::ReturnValue | getAxisNameRaw (int axis, std::string &name) override |
| yarp::dev::ReturnValue | getJointTypeRaw (int axis, yarp::dev::JointTypeEnum &type) override |
| void | run () override |
| Loop function. | |
Public Member Functions inherited from yarp::os::PeriodicThread | |
| PeriodicThread (double period, ShouldUseSystemClock useSystemClock=ShouldUseSystemClock::No, PeriodicThreadClock clockAccuracy=PeriodicThreadClock::Relative) | |
| Constructor. | |
| PeriodicThread (double period, PeriodicThreadClock clockAccuracy) | |
| Constructor. | |
| virtual | ~PeriodicThread () |
| bool | start () |
| Call this to start the thread. | |
| void | step () |
| Call this to "step" the thread rather than starting it. | |
| void | stop () |
| Call this to stop the thread, this call blocks until the thread is terminated (and releaseThread() called). | |
| void | askToStop () |
| Stop the thread. | |
| bool | isRunning () const |
| Returns true when the thread is started, false otherwise. | |
| bool | isSuspended () const |
| Returns true when the thread is suspended, false otherwise. | |
| bool | setPeriod (double period) |
| Set the (new) period of the thread. | |
| double | getPeriod () const |
| Return the current period of the thread. | |
| void | suspend () |
| Suspend the thread, the thread keeps running by doLoop is never executed. | |
| void | resume () |
| Resume the thread if previously suspended. | |
| void | resetStat () |
| Reset thread statistics. | |
| double | getEstimatedPeriod () const |
| Return estimated period since last reset. | |
| void | getEstimatedPeriod (double &av, double &std) const |
| Return estimated period since last reset. | |
| unsigned int | getIterations () const |
| Return the number of iterations performed since last reset. | |
| double | getEstimatedUsed () const |
| Return the estimated duration of the run() function since last reset. | |
| void | getEstimatedUsed (double &av, double &std) const |
| Return estimated duration of the run() function since last reset. | |
| int | setPriority (int priority, int policy=-1) |
| Set the priority and scheduling policy of the thread, if the OS supports that. | |
| int | getPriority () const |
| Query the current priority of the thread, if the OS supports that. | |
| int | getPolicy () const |
| Query the current scheduling policy of the thread, if the OS supports that. | |
Public Member Functions inherited from yarp::dev::DeviceDriver | |
| DeviceDriver () | |
| DeviceDriver (const DeviceDriver &other)=delete | |
| DeviceDriver (DeviceDriver &&other) noexcept=delete | |
| DeviceDriver & | operator= (const DeviceDriver &other)=delete |
| DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
| virtual | ~DeviceDriver () |
| virtual std::string | id () const |
| Return the id assigned to the PolyDriver. | |
| virtual void | setId (const std::string &id) |
| Set the id for this device. | |
| template<class T > | |
| bool | view (T *&x) |
| Get an interface to the device driver. | |
| virtual DeviceDriver * | getImplementation () |
| Some drivers are bureaucrats, pointing at others. | |
Public Member Functions inherited from yarp::dev::IEncodersTimedRaw | |
| virtual | ~IEncodersTimedRaw () |
| Destructor. | |
Public Member Functions inherited from yarp::dev::IEncodersRaw | |
| virtual | ~IEncodersRaw () |
| Destructor. | |
Public Member Functions inherited from yarp::dev::IMotorEncodersRaw | |
| virtual | ~IMotorEncodersRaw () |
| Destructor. | |
Public Member Functions inherited from yarp::dev::IAxisInfoRaw | |
| virtual | ~IAxisInfoRaw () |
| Destructor. | |
Public Member Functions inherited from yarp::dev::IJointFaultRaw | |
| virtual | ~IJointFaultRaw () |
Public Member Functions inherited from yarp::dev::ImplementJointFault | |
| ImplementJointFault (yarp::dev::IJointFaultRaw *y) | |
| virtual | ~ImplementJointFault () |
| Destructor. | |
| yarp::dev::ReturnValue | getLastJointFault (int j, int &fault, std::string &message) override |
Public Member Functions inherited from yarp::dev::IJointFault | |
| virtual | ~IJointFault () |
Public Member Functions inherited from yarp::dev::ImplementAxisInfo | |
| ImplementAxisInfo (yarp::dev::IAxisInfoRaw *y) | |
| virtual | ~ImplementAxisInfo () |
| yarp::dev::ReturnValue | getAxes (size_t &ax) override |
| Get the number of controlled axes. | |
| yarp::dev::ReturnValue | getAxisName (int axis, std::string &name) override |
| yarp::dev::ReturnValue | getJointType (int axis, yarp::dev::JointTypeEnum &type) override |
Public Member Functions inherited from yarp::dev::IAxisInfo | |
| virtual | ~IAxisInfo () |
| Destructor. | |
Public Member Functions inherited from yarp::dev::ImplementEncodersTimed | |
| ImplementEncodersTimed (yarp::dev::IEncodersTimedRaw *y) | |
| virtual | ~ImplementEncodersTimed () |
| yarp::dev::ReturnValue | getAxes (size_t &ax) override |
| Get the number of controlled axes. | |
| yarp::dev::ReturnValue | resetEncoder (int j) override |
| Reset encoder, single joint. | |
| yarp::dev::ReturnValue | resetEncoders () override |
| Reset encoders. | |
| yarp::dev::ReturnValue | setEncoder (int j, double val) override |
| Set the value of the encoder for a given joint. | |
| yarp::dev::ReturnValue | setEncoders (const double *vals) override |
| Set the value of all encoders. | |
| yarp::dev::ReturnValue | getEncoder (int j, double *v) override |
| Read the value of an encoder. | |
| yarp::dev::ReturnValue | getEncodersTimed (double *encs, double *time) override |
| Read the instantaneous acceleration of all axes. | |
| yarp::dev::ReturnValue | getEncoderTimed (int j, double *v, double *t) override |
| Read the instantaneous acceleration of all axes. | |
| yarp::dev::ReturnValue | getEncoders (double *encs) override |
| Read the position of all axes. | |
| yarp::dev::ReturnValue | getEncoderSpeed (int j, double *spds) override |
| Read the istantaneous speed of an axis. | |
| yarp::dev::ReturnValue | getEncoderSpeeds (double *spds) override |
| Read the instantaneous speed of all axes. | |
| yarp::dev::ReturnValue | getEncoderAcceleration (int j, double *spds) override |
| Read the instantaneous acceleration of an axis. | |
| yarp::dev::ReturnValue | getEncoderAccelerations (double *accs) override |
| Read the instantaneous acceleration of all axes. | |
Public Member Functions inherited from yarp::dev::IEncodersTimed | |
| virtual | ~IEncodersTimed () |
| Destructor. | |
Public Member Functions inherited from yarp::dev::IEncoders | |
| virtual | ~IEncoders () |
| Destructor. | |
Public Member Functions inherited from yarp::dev::ImplementMotorEncoders | |
| ImplementMotorEncoders (yarp::dev::IMotorEncodersRaw *y) | |
| virtual | ~ImplementMotorEncoders () |
| yarp::dev::ReturnValue | getNumberOfMotorEncoders (int *num) override |
| Get the number of available motor encoders. | |
| yarp::dev::ReturnValue | resetMotorEncoder (int m) override |
| Reset motor encoder, single motor. | |
| yarp::dev::ReturnValue | resetMotorEncoders () override |
| Reset motor encoders. | |
| yarp::dev::ReturnValue | setMotorEncoder (int m, const double val) override |
| Set the value of the motor encoder for a given motor. | |
| yarp::dev::ReturnValue | setMotorEncoders (const double *vals) override |
| Set the value of all motor encoders. | |
| yarp::dev::ReturnValue | setMotorEncoderCountsPerRevolution (int m, const double cpr) override |
| Sets number of counts per revolution for motor encoder m. | |
| yarp::dev::ReturnValue | getMotorEncoderCountsPerRevolution (int m, double *cpr) override |
| Gets number of counts per revolution for motor encoder m. | |
| yarp::dev::ReturnValue | getMotorEncoder (int m, double *v) override |
| Read the value of a motor encoder. | |
| yarp::dev::ReturnValue | getMotorEncodersTimed (double *encs, double *time) override |
| Read the instantaneous position of all motor encoders. | |
| yarp::dev::ReturnValue | getMotorEncoderTimed (int m, double *v, double *t) override |
| Read the instantaneous position of a motor encoder. | |
| yarp::dev::ReturnValue | getMotorEncoders (double *encs) override |
| Read the position of all motor encoders. | |
| yarp::dev::ReturnValue | getMotorEncoderSpeed (int m, double *spds) override |
| Read the instantaneous speed of a motor encoder. | |
| yarp::dev::ReturnValue | getMotorEncoderSpeeds (double *spds) override |
| Read the instantaneous speed of all motor encoders. | |
| yarp::dev::ReturnValue | getMotorEncoderAcceleration (int m, double *spds) override |
| Read the instantaneous acceleration of a motor encoder. | |
| yarp::dev::ReturnValue | getMotorEncoderAccelerations (double *accs) override |
| Read the instantaneous acceleration of all motor encoders. | |
Public Member Functions inherited from yarp::dev::IMotorEncoders | |
| virtual | ~IMotorEncoders () |
| Destructor. | |
Public Member Functions inherited from FakeMotionControlMicro_ParamsParser | |
| FakeMotionControlMicro_ParamsParser () | |
| ~FakeMotionControlMicro_ParamsParser () override=default | |
| bool | parseParams (const yarp::os::Searchable &config) override |
| Parse the DeviceDriver parameters. | |
| std::string | getDeviceClassName () const override |
| Get the name of the DeviceDriver class. | |
| std::string | getDeviceName () const override |
| Get the name of the device (i.e. | |
| std::string | getDocumentationOfDeviceParams () const override |
| Get the documentation of the DeviceDriver's parameters. | |
| std::vector< std::string > | getListOfParams () const override |
| Return a list of all params used by the device. | |
| bool | getParamValue (const std::string ¶mName, std::string ¶mValue) const override |
| Return the value (represented as a string) of the requested parameter. | |
| std::string | getConfiguration () const override |
| Return the configuration of the device. | |
Public Member Functions inherited from yarp::dev::IDeviceDriverParams | |
| virtual | ~IDeviceDriverParams () |
Additional Inherited Members | |
Public Attributes inherited from FakeMotionControlMicro_ParamsParser | |
| const std::string | m_device_classname = {"FakeMotionControlMicro"} |
| const std::string | m_device_name = {"fakeMotionControlMicro"} |
| bool | m_parser_is_strict = false |
| const parser_version_type | m_parser_version = {} |
| std::string | m_provided_configuration |
| const std::string | m_GENERAL_Joints_defaultValue = {"1"} |
| const std::string | m_GENERAL_AxisMap_defaultValue = {""} |
| const std::string | m_GENERAL_AxisName_defaultValue = {""} |
| const std::string | m_GENERAL_AxisType_defaultValue = {""} |
| const std::string | m_GENERAL_Encoder_defaultValue = {""} |
| int | m_GENERAL_Joints = {1} |
| std::vector< int > | m_GENERAL_AxisMap = {} |
| std::vector< std::string > | m_GENERAL_AxisName = {} |
| std::vector< std::string > | m_GENERAL_AxisType = {} |
| std::vector< int > | m_GENERAL_Encoder = {} |
Protected Member Functions inherited from yarp::os::PeriodicThread | |
| virtual void | beforeStart () |
| Called just before a new thread starts. | |
| virtual void | afterStart (bool success) |
| Called just after a new thread starts (or fails to start), this is executed by the same thread that calls start(). | |
Protected Member Functions inherited from yarp::dev::ImplementJointFault | |
| bool | initialize (int size, const int *amap) |
| Initialize the internal data and alloc memory. | |
| bool | uninitialize () |
| Clean up internal data and memory. | |
Protected Member Functions inherited from yarp::dev::ImplementAxisInfo | |
| bool | initialize (int size, const int *amap) |
| Initialize the internal data and alloc memory. | |
| bool | uninitialize () |
| Clean up internal data and memory. | |
Protected Member Functions inherited from yarp::dev::ImplementEncodersTimed | |
| bool | initialize (int size, const int *amap, const double *enc, const double *zos) |
| Initialize the internal data and alloc memory. | |
| bool | uninitialize () |
| Clean up internal data and memory. | |
Protected Member Functions inherited from yarp::dev::ImplementMotorEncoders | |
| bool | initialize (int size, const int *amap, const double *enc, const double *zos) |
| Initialize the internal data and alloc memory. | |
| bool | uninitialize () |
| Clean up internal data and memory. | |
Protected Attributes inherited from yarp::dev::ImplementJointFault | |
| yarp::dev::IJointFaultRaw * | m_iraw =nullptr |
| void * | m_helper =nullptr |
| std::mutex | m_imp_mutex |
| std::vector< int > | m_buffer_ints |
| std::vector< double > | m_buffer_doubles |
Protected Attributes inherited from yarp::dev::ImplementAxisInfo | |
| IAxisInfoRaw * | m_iraw =nullptr |
| void * | m_helper =nullptr |
| std::vector< int > | m_buffer_ints |
| std::vector< double > | m_buffer_doubles |
| std::vector< double > | m_buffer_doubles2 |
| std::mutex | m_imp_mutex |
Protected Attributes inherited from yarp::dev::ImplementEncodersTimed | |
| IEncodersTimedRaw * | m_iraw =nullptr |
| void * | m_helper =nullptr |
| std::vector< int > | m_buffer_ints |
| std::vector< double > | m_buffer_doubles |
| std::vector< double > | m_buffer_doubles2 |
| std::mutex | m_imp_mutex |
Protected Attributes inherited from yarp::dev::ImplementMotorEncoders | |
| IMotorEncodersRaw * | m_iraw =nullptr |
| void * | m_helper =nullptr |
| std::vector< int > | m_buffer_ints |
| std::vector< double > | m_buffer_doubles |
| std::vector< double > | m_buffer_doubles2 |
| std::mutex | m_imp_mutex |
fakeMotionControlMicro: This device implements a minimal subset of mandatory interfaces to run with controlBoard_nws_yarp.
It is thus a smaller, limited version than fakeMotionControl.
Parameters required by this device are shown in class: FakeMotionControlMicro_ParamsParser
Definition at line 30 of file FakeMotionControlMicro.h.
| FakeMotionControlMicro::FakeMotionControlMicro | ( | ) |
Definition at line 146 of file FakeMotionControlMicro.cpp.
| FakeMotionControlMicro::~FakeMotionControlMicro | ( | ) |
Definition at line 170 of file FakeMotionControlMicro.cpp.
Allocated buffers.
Definition at line 113 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 331 of file FakeMotionControlMicro.cpp.
| bool FakeMotionControlMicro::fromConfig | ( | yarp::os::Searchable & | config | ) |
Definition at line 248 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Get the number of controlled axes.
This command asks the number of controlled axes for the current physical interface.
Implements yarp::dev::IEncodersRaw.
Definition at line 589 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Implements yarp::dev::IAxisInfoRaw.
Definition at line 567 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous acceleration of an axis.
| j | axis number |
| spds | pointer to the array that will contain the output |
Implements yarp::dev::IEncodersRaw.
Definition at line 415 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous acceleration of all axes.
| accs | pointer to the array that will contain the output |
Implements yarp::dev::IEncodersRaw.
Definition at line 423 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the value of an encoder.
| j | encoder number |
| v | pointer to storage for the return value |
Implements yarp::dev::IEncodersRaw.
Definition at line 375 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous speed of an axis.
| j | axis number |
| sp | pointer to storage for the output |
Implements yarp::dev::IEncodersRaw.
Definition at line 398 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous acceleration of an axis.
| spds | pointer to storage for the output values |
Implements yarp::dev::IEncodersRaw.
Definition at line 405 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the position of all axes.
| encs | pointer to the array that will contain the output |
Implements yarp::dev::IEncodersRaw.
Definition at line 386 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous acceleration of all axes.
| encs | pointer to the array that will contain the output |
| stamps | pointer to the array that will contain individual timestamps |
Implements yarp::dev::IEncodersTimedRaw.
Definition at line 435 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous acceleration of all axes.
| j | axis index |
| encs | encoder value |
| stamp | corresponding timestamp |
Implements yarp::dev::IEncodersTimedRaw.
Definition at line 446 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Reimplemented from yarp::dev::IAxisInfoRaw.
Definition at line 574 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Implements yarp::dev::IJointFaultRaw.
Definition at line 580 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous acceleration of a motor encoder.
| m | motor number |
| acc | pointer to the array that will contain the output |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 527 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous acceleration of all motor encoders.
| accs | pointer to the array that will contain the output |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 533 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Gets number of counts per revolution for motor encoder m.
| m | motor number |
| cpr | vals pointer to the new value |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 479 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the value of a motor encoder.
| m | motor encoder number |
| v | pointer to storage for the return value |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 494 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous speed of a motor encoder.
| m | motor number |
| sp | pointer to storage for the output |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 511 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous speed of all motor encoders.
| spds | pointer to storage for the output values |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 517 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the position of all motor encoders.
| encs | pointer to the array that will contain the output |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 500 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous position of all motor encoders.
| encs | pointer to the array that will contain the output |
| time | pointer to the array that will contain individual timestamps |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 543 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Read the instantaneous position of a motor encoder.
| m | motor index |
| encs | encoder value (pointer to) |
| time | corresponding timestamp (pointer to) |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 555 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Get the number of available motor encoders.
| m | pointer to a value representing the number of available motor encoders. |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 458 of file FakeMotionControlMicro.cpp.
|
virtual |
Definition at line 176 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Open the DeviceDriver.
| config | is a list of parameters for the device. Which parameters are effective for your device can vary. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 196 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Reset encoder, single joint.
Set the encoder value to zero
| j | encoder number |
Implements yarp::dev::IEncodersRaw.
Definition at line 365 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Reset encoders.
Set the encoders value to zero
Implements yarp::dev::IEncodersRaw.
Definition at line 370 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Reset motor encoder, single motor.
Set the encoder value to zero.
| m | motor number |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 484 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Reset motor encoders.
Set the motor encoders value to zero.
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 489 of file FakeMotionControlMicro.cpp.
| void FakeMotionControlMicro::resizeBuffers | ( | ) |
Resize previously allocated buffers.
Definition at line 94 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Loop function.
This is the thread itself. The thread calls the run() function every <period> ms. At the end of each run, the thread will sleep the amounth of time required, taking into account the time spent inside the loop function. Example: requested period is 10ms, the run() function take 3ms to be executed, the thread will sleep for 7ms.
Note: after each run is completed, the thread will call a yield() in order to facilitate other threads to run.
Implements yarp::os::PeriodicThread.
Definition at line 35 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Set the value of the encoder for a given joint.
| j | encoder number |
| val | new value |
Implements yarp::dev::IEncodersRaw.
Definition at line 355 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Set the value of all encoders.
| vals | pointer to the new values |
Implements yarp::dev::IEncodersRaw.
Definition at line 360 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Sets number of counts per revolution for motor encoder m.
| m | motor number |
| cpr | new value |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 474 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Set the value of the motor encoder for a given motor.
| m | motor number |
| val | new value |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 464 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Set the value of all motor encoders.
| vals | pointer to the new values |
Implements yarp::dev::IMotorEncodersRaw.
Definition at line 469 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Initialization method.
The thread executes this function when it starts and before "run". This is a good place to perform initialization tasks that need to be done by the thread itself (device drivers initialization, memory allocation etc). If the function returns false the thread quits and never calls "run". The return value of threadInit() is notified to the class and passed as a parameter to afterStart(). Note that afterStart() is called by the same thread that is executing the "start" method.
Reimplemented from yarp::os::PeriodicThread.
Definition at line 181 of file FakeMotionControlMicro.cpp.
|
overridevirtual |
Release method.
The thread executes this function once when it exits, after the last "run". This is a good place to release resources that were initialized in threadInit() (release memory, and device driver resources).
Reimplemented from yarp::os::PeriodicThread.
Definition at line 192 of file FakeMotionControlMicro.cpp.