src/libYARP_dev/esdcan/linux/yarp/YARPEsdCanDeviceDriver.cpp
int YARPEsdCanDeviceDriver::getRefAccelerations (void *cmd)
{
	EsdCanResources& r = RES(system_resources);
	double *out = (double *) cmd;
	int i;
	short value = 0;

	for(i = 0; i < r.getJoints(); i++)
	{
		if (_readWord16 (CAN_GET_DESIRED_ACCELER, i, value) == YARP_OK)
			_ref_accs[i] = out[i] = double (value);
		else
			return YARP_FAIL;
	}

	return YARP_OK;
}
/// cmd is an array of double (LATER: to be optimized).
cmd is an array of double (LATER: to be optimized).
cmd is an array of double ( LATER : to be optimized ) .
int YARPEsdCanDeviceDriver::getRefAccelerations (void *cmd)
{
	EsdCanResources& r = RES(system_resources);
	double *out = (double *) cmd;
	int i;
	short value = 0;
	for(i = 0; i < r.getJoints(); i++)
	{
		if (_readWord16 (CAN_GET_DESIRED_ACCELER, i, value) == YARP_OK)
			_ref_accs[i] = out[i] = double (value);
		else
			return YARP_FAIL;
	}
	return YARP_OK;
}
int YARPEsdCanDeviceDriver :: getRefAccelerations ( void * cmd ) { EsdCanResources & r = RES ( system_resources ) ; double * out = ( double * ) cmd ; int i ; short value = 0 ; for ( i = 0 ; i < r . getJoints ( ) ; i ++ ) { if ( _readWord16 ( CAN_GET_DESIRED_ACCELER , i , value ) == YARP_OK ) _ref_accs [ i ] = out [ i ] = double ( value ) ; else return YARP_FAIL ; } return YARP_OK ; }
cmd is an array of double (LATER: to be optimized).
cmd is an array of double ( LATER : to be optimized ) .