Added callback interface to implement 'interest'
This commit is contained in:
@ -12,11 +12,14 @@ This objects data structure:
|
|||||||
typedef struct __CONFVIRTMOT {
|
typedef struct __CONFVIRTMOT {
|
||||||
pObjectDescriptor pDes;
|
pObjectDescriptor pDes;
|
||||||
pIDrivable pDriv;
|
pIDrivable pDriv;
|
||||||
|
pICallBack pCall;
|
||||||
|
char *name;
|
||||||
char *scriptName;
|
char *scriptName;
|
||||||
char *readScript;
|
char *readScript;
|
||||||
int motorList;
|
int motorList;
|
||||||
float targetValue;
|
float targetValue;
|
||||||
int targetReached;
|
int targetReached;
|
||||||
|
int posCount;
|
||||||
char scriptError[512];
|
char scriptError[512];
|
||||||
int parseOK;
|
int parseOK;
|
||||||
}ConfigurableVirtualMotor, *pConfigurableVirtualMotor;
|
}ConfigurableVirtualMotor, *pConfigurableVirtualMotor;
|
||||||
@ -25,11 +28,14 @@ The fields are:
|
|||||||
\begin{description}
|
\begin{description}
|
||||||
\item[pDes] The standard object descriptor.
|
\item[pDes] The standard object descriptor.
|
||||||
\item[pDriv] The drivable interface
|
\item[pDriv] The drivable interface
|
||||||
|
\item[pCall] The callback interface
|
||||||
|
\item[name] The name of the virtual motor
|
||||||
\item[scriptName] The name of the program to calculate the new positions
|
\item[scriptName] The name of the program to calculate the new positions
|
||||||
of the real motors.
|
of the real motors.
|
||||||
\item[readScript] A script to read back the current value of the virtual motor.
|
\item[readScript] A script to read back the current value of the virtual motor.
|
||||||
\item[motorList] A list of the motors to start and control.
|
\item[motorList] A list of the motors to start and control.
|
||||||
\item[targetValue] The target value we wanted to have.
|
\item[targetValue] The target value we wanted to have.
|
||||||
|
\item[posCount] This counter prevents the callback from being invoked too often. The frequency is currently set to every 10 cycles through the task loop.
|
||||||
\item[targetReached] A flag which becomes true when a check has showed that
|
\item[targetReached] A flag which becomes true when a check has showed that
|
||||||
all desired motors have reached their targets.
|
all desired motors have reached their targets.
|
||||||
\item[scriptError] A temporary buffer holding all errors encountered
|
\item[scriptError] A temporary buffer holding all errors encountered
|
||||||
|
Reference in New Issue
Block a user