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

	if (_readWord16 (CAN_GET_PID_ERROR, axis, value) != YARP_OK)
	{
		*((double *)tmp->parameters) = 0;
		return YARP_FAIL;
	}

	*((double *)tmp->parameters) = double(value);
	return YARP_OK;
}
/// cmd is a SingleAxisParameters struct with a double argument.
cmd is a SingleAxisParameters struct with a double argument.
cmd is a SingleAxisParameters struct with a double argument .
int YARPEsdCanDeviceDriver::getPidError (void *cmd)
{
	SingleAxisParameters *tmp = (SingleAxisParameters *) cmd;
	const int axis = tmp->axis;
	ACE_ASSERT (axis >= 0 && axis <= (ESD_MAX_CARDS-1)*2);
	short value;
	if (_readWord16 (CAN_GET_PID_ERROR, axis, value) != YARP_OK)
	{
		*((double *)tmp->parameters) = 0;
		return YARP_FAIL;
	}
	*((double *)tmp->parameters) = double(value);
	return YARP_OK;
}
int YARPEsdCanDeviceDriver :: getPidError ( void * cmd ) { SingleAxisParameters * tmp = ( SingleAxisParameters * ) cmd ; const int axis = tmp -> axis ; ACE_ASSERT ( axis >= 0 && axis <= ( ESD_MAX_CARDS - 1 ) * 2 ) ; short value ; if ( _readWord16 ( CAN_GET_PID_ERROR , axis , value ) != YARP_OK ) { * ( ( double * ) tmp -> parameters ) = 0 ; return YARP_FAIL ; } * ( ( double * ) tmp -> parameters ) = double ( value ) ; return YARP_OK ; }
cmd is a SingleAxisParameters struct with a double argument.
cmd is a SingleAxisParameters struct with a double argument .