src/libYARP_dev/esdcan/linux/yarp/YARPEsdCanDeviceDriver.cpp
int YARPEsdCanDeviceDriver::checkMotionDoneSingle (void *cmd)
{
    SingleAxisParameters *tmp = (SingleAxisParameters *) cmd;
	const int axis = tmp->axis;
	ACE_ASSERT (axis >= 0 && axis <= (ESD_MAX_CARDS-1)*2);
	
	short value;
	double *out = (double *)tmp->parameters;

    if (_readWord16 (CAN_MOTION_DONE, axis, value) == YARP_OK)
    {
        *out = double(value);
    }
    else
    {
        *out = 0;
        return YARP_FAIL;
    }

    return YARP_OK;
}
/// check motion done, single axis.
check motion done, single axis.
check motion done single axis .
int YARPEsdCanDeviceDriver::checkMotionDoneSingle (void *cmd)
{
    SingleAxisParameters *tmp = (SingleAxisParameters *) cmd;
	const int axis = tmp->axis;
	ACE_ASSERT (axis >= 0 && axis <= (ESD_MAX_CARDS-1)*2);
	short value;
	double *out = (double *)tmp->parameters;
    if (_readWord16 (CAN_MOTION_DONE, axis, value) == YARP_OK)
    {
        *out = double(value);
    }
    else
    {
        *out = 0;
        return YARP_FAIL;
    }
    return YARP_OK;
}
int YARPEsdCanDeviceDriver :: checkMotionDoneSingle ( void * cmd ) { SingleAxisParameters * tmp = ( SingleAxisParameters * ) cmd ; const int axis = tmp -> axis ; ACE_ASSERT ( axis >= 0 && axis <= ( ESD_MAX_CARDS - 1 ) * 2 ) ; short value ; double * out = ( double * ) tmp -> parameters ; if ( _readWord16 ( CAN_MOTION_DONE , axis , value ) == YARP_OK ) { * out = double ( value ) ; } else { * out = 0 ; return YARP_FAIL ; } return YARP_OK ; }
check motion done, single axis.
check motion done single axis .