src/libYARP_dev/esdcan/linux/yarp/YARPEsdCanDeviceDriver.cpp
int YARPEsdCanDeviceDriver::getRefPosition (void *cmd)
{
	SingleAxisParameters *tmp = (SingleAxisParameters *) cmd;
	const int axis = tmp->axis;
	ACE_ASSERT (axis >= 0 && axis <= (ESD_MAX_CARDS-1)*2);
	
	int value = 0;
	if (_readDWord (CAN_GET_DESIRED_POSITION, axis, value) == YARP_OK)
		*((double *)(tmp->parameters)) = double (value);
	else
		return YARP_FAIL;

	return YARP_OK;
}
/// cmd is a SingleAxis pointer with double arg
cmd is a SingleAxis pointer with double arg
cmd is a SingleAxis pointer with double arg
int YARPEsdCanDeviceDriver::getRefPosition (void *cmd)
{
	SingleAxisParameters *tmp = (SingleAxisParameters *) cmd;
	const int axis = tmp->axis;
	ACE_ASSERT (axis >= 0 && axis <= (ESD_MAX_CARDS-1)*2);
	int value = 0;
	if (_readDWord (CAN_GET_DESIRED_POSITION, axis, value) == YARP_OK)
		*((double *)(tmp->parameters)) = double (value);
	else
		return YARP_FAIL;
	return YARP_OK;
}
int YARPEsdCanDeviceDriver :: getRefPosition ( void * cmd ) { SingleAxisParameters * tmp = ( SingleAxisParameters * ) cmd ; const int axis = tmp -> axis ; ACE_ASSERT ( axis >= 0 && axis <= ( ESD_MAX_CARDS - 1 ) * 2 ) ; int value = 0 ; if ( _readDWord ( CAN_GET_DESIRED_POSITION , axis , value ) == YARP_OK ) * ( ( double * ) ( tmp -> parameters ) ) = double ( value ) ; else return YARP_FAIL ; return YARP_OK ; }
cmd is a SingleAxis pointer with double arg
cmd is a SingleAxis pointer with double arg