src/libYARP_dev/esdcan/linux/yarp/YARPEsdCanDeviceDriver.cpp
int YARPEsdCanDeviceDriver::getBCastPosition (void *cmd)
{
	EsdCanResources& r = RES(system_resources);
	SingleAxisParameters *tmp = (SingleAxisParameters *) cmd;
	const int axis = tmp->axis;
	ACE_ASSERT (axis >= 0 && axis <= r.getJoints());
	
    _mutex.Wait();
	*((double *)tmp->parameters) = double(r._bcastRecvBuffer[axis]._position);
    _mutex.Post();

	return YARP_OK;
}
///
/// reads an array of double from the broadcast message position buffer.
/// LATER: add a check of timing/error message.
///
reads an array of double from the broadcast message position buffer.
LATER: add a check of timing/error message.
reads an array of double from the broadcast message position buffer . LATER : add a check of timing / error message .
int YARPEsdCanDeviceDriver::getBCastPosition (void *cmd)
{
	EsdCanResources& r = RES(system_resources);
	SingleAxisParameters *tmp = (SingleAxisParameters *) cmd;
	const int axis = tmp->axis;
	ACE_ASSERT (axis >= 0 && axis <= r.getJoints());
    _mutex.Wait();
	*((double *)tmp->parameters) = double(r._bcastRecvBuffer[axis]._position);
    _mutex.Post();
	return YARP_OK;
}
int YARPEsdCanDeviceDriver :: getBCastPosition ( void * cmd ) { EsdCanResources & r = RES ( system_resources ) ; SingleAxisParameters * tmp = ( SingleAxisParameters * ) cmd ; const int axis = tmp -> axis ; ACE_ASSERT ( axis >= 0 && axis <= r . getJoints ( ) ) ; _mutex . Wait ( ) ; * ( ( double * ) tmp -> parameters ) = double ( r . _bcastRecvBuffer [ axis ] . _position ) ; _mutex . Post ( ) ; return YARP_OK ; }
reads an array of double from the broadcast message position buffer.
reads an array of double from the broadcast message position buffer .