package nomadgui.Telemetry;

import distinct.rpc.*;

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

public class posRawState implements XDRType {
  public float[] kalmanGain = new float[100];
  public float[] gpsPosCovar = new float[9];
  public float[] gpsRotCovar = new float[9];
  public float[] compassRotCovar = new float[9];
  public float[] imuRotCovar = new float[9];
  public float[] imuPosCovar = new float[9];
  public int msecs;
  public int week;

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

public posRawState()
{}

/**
 * Creates an object of class posRawState.
 * @param     arg_kalmanGain The value of the kalmanGain component.
 * @param     arg_gpsPosCovar The value of the gpsPosCovar component.
 * @param     arg_gpsRotCovar The value of the gpsRotCovar component.
 * @param     arg_compassRotCovar The value of the compassRotCovar component.
 * @param     arg_imuRotCovar The value of the imuRotCovar component.
 * @param     arg_imuPosCovar The value of the imuPosCovar component.
 * @param     arg_msecs The value of the msecs component.
 * @param     arg_week The value of the week component.
 */

public posRawState(float[] arg_kalmanGain, float[] arg_gpsPosCovar, float[] arg_gpsRotCovar, float[] arg_compassRotCovar, float[] arg_imuRotCovar, float[] arg_imuPosCovar, int arg_msecs, int arg_week)
{
  kalmanGain = arg_kalmanGain;
  gpsPosCovar = arg_gpsPosCovar;
  gpsRotCovar = arg_gpsRotCovar;
  compassRotCovar = arg_compassRotCovar;
  imuRotCovar = arg_imuRotCovar;
  imuPosCovar = arg_imuPosCovar;
  msecs = arg_msecs;
  week = arg_week;
}

/**
 * Encodes an object of class posRawState 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 < 100; i_v++){
    xdrs.xdr_encode_float(kalmanGain[i_v]);
  }
  for (int i_v = 0; i_v < 9; i_v++){
    xdrs.xdr_encode_float(gpsPosCovar[i_v]);
  }
  for (int i_v = 0; i_v < 9; i_v++){
    xdrs.xdr_encode_float(gpsRotCovar[i_v]);
  }
  for (int i_v = 0; i_v < 9; i_v++){
    xdrs.xdr_encode_float(compassRotCovar[i_v]);
  }
  for (int i_v = 0; i_v < 9; i_v++){
    xdrs.xdr_encode_float(imuRotCovar[i_v]);
  }
  for (int i_v = 0; i_v < 9; i_v++){
    xdrs.xdr_encode_float(imuPosCovar[i_v]);
  }
  xdrs.xdr_encode_int(msecs);
  xdrs.xdr_encode_int(week);
}

/**
 * Decodes an object of class posRawState 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
{
  kalmanGain = new float[100];
  for (int i_v = 0; i_v < 100; i_v++){
    kalmanGain[i_v] = xdrs.xdr_decode_float();
  }
  gpsPosCovar = new float[9];
  for (int i_v = 0; i_v < 9; i_v++){
    gpsPosCovar[i_v] = xdrs.xdr_decode_float();
  }
  gpsRotCovar = new float[9];
  for (int i_v = 0; i_v < 9; i_v++){
    gpsRotCovar[i_v] = xdrs.xdr_decode_float();
  }
  compassRotCovar = new float[9];
  for (int i_v = 0; i_v < 9; i_v++){
    compassRotCovar[i_v] = xdrs.xdr_decode_float();
  }
  imuRotCovar = new float[9];
  for (int i_v = 0; i_v < 9; i_v++){
    imuRotCovar[i_v] = xdrs.xdr_decode_float();
  }
  imuPosCovar = new float[9];
  for (int i_v = 0; i_v < 9; i_v++){
    imuPosCovar[i_v] = xdrs.xdr_decode_float();
  }
  msecs = xdrs.xdr_decode_int();
  week = xdrs.xdr_decode_int();
}
}
