/** * Request/reply: Get/set sensor field of view. <br> * <br> * The field of view of the fiducial device can be set using the PLAYER_FIDUCIAL_REQ_GET_FOV * request (response will be null), and queried using a null PLAYER_FIDUCIAL_REQ_GET_FOV request. * <br> * <br> * See the player_fiducial_fov structure from player.h * * @param pff a PlayerFiducialFov structure holding the required data */ public void setFov(PlayerFiducialFov pff) { try { sendHeader(PLAYER_MSGTYPE_REQ, PLAYER_FIDUCIAL_REQ_SET_FOV, 12); XdrBufferEncodingStream xdr = new XdrBufferEncodingStream(12); xdr.beginEncoding(null, 0); xdr.xdrEncodeFloat(pff.getMin_range()); xdr.xdrEncodeFloat(pff.getMax_range()); xdr.xdrEncodeFloat(pff.getView_angle()); xdr.endEncoding(); os.write(xdr.getXdrData(), 0, xdr.getXdrLength()); xdr.close(); os.flush(); } catch (IOException e) { throw new PlayerException( "[Fiducial] : Couldn't request PLAYER_FIDUCIAL_REQ_SET_FOV: " + e.toString(), e); } catch (OncRpcException e) { throw new PlayerException( "[Fiducial] : Error while XDR-encoding SET_FOV request: " + e.toString(), e); } }