package nomadgui.Telemetry;

import distinct.rpc.*;

/**
 * This class was automatically generated by Jrpcgen from the RPC/XDR file "telemetryMsgs.x".<br>
 * laserDerivedState: was struct
 */

public class laserDerivedState implements XDRType {
  public float[] rangeMap = new float[180]; // meters
  public timeStamp time = new timeStamp();

/**
 * Default constructor for objects of class laserDerivedState.
 */

public laserDerivedState()
{}

/**
 * Creates an object of class laserDerivedState.
 * @param     arg_rangeMap The value of the rangeMap component.
 * @param     arg_time The value of the time component.
 */

public laserDerivedState(float[] arg_rangeMap, timeStamp arg_time)
{
  rangeMap = arg_rangeMap;
  time = arg_time;
}

/**
 * Encodes an object of class laserDerivedState in compliance to RFC 1832 (XDR).
 * @param     xdrs The XDR output stream.
 */

public void xdr_encode(XDRStream xdrs)
{
  for (int i_v = 0; i_v < 180; i_v++){
    xdrs.xdr_encode_float(rangeMap[i_v]);
  }
  time.xdr_encode(xdrs);
}

/**
 * Decodes an object of class laserDerivedState in compliance to RFC 1832 (XDR).
 * @param     xdrs The XDR input stream.
 * @exception RPCError When the calls fails for any reason.
 */

public void xdr_decode(XDRStream xdrs) throws RPCError
{
  rangeMap = new float[180];
  for (int i_v = 0; i_v < 180; i_v++){
    rangeMap[i_v] = xdrs.xdr_decode_float();
  }
  time = new timeStamp();
  time.xdr_decode(xdrs);
}
}
