package nomadgui.Telemetry;

import distinct.rpc.*;

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

public class gpsRawState implements XDRType {
  public double receiveTime;
  public double clockOffset;
  public int numSVSVisible;
  public int[] visibleSvsPRN = new int[10];
  public int[] svFlags1 = new int[10];
  public int[] svFlags2 = new int[10];
  public int[] svsElevation = new int[10];
  public int[] svsAzimuth = new int[10];
  public int[] svsL1SNR = new int[10];
  public int[] svsL2SNR = new int[10];
  public double[] L1PseudoRange = new double[10];
  public double[] L1ContPhase = new double[10];
  public float[] L1Doppler = new float[10];
  public double[] L2ContPhase = new double[10];
  public float[] L2L1PseudoRange = new float[10];
  public int[] issueOfDataEphem = new int[10];
  public int[] L1Slip = new int[10];
  public int[] L2Slip = new int[10];
  public double wgs84Latitude;
  public double wgs84Longitude;
  public double wgs84Altitude;
  public double positionDOP;
  public double latitudeRate;
  public double longitudeRate;
  public double altitudeRate;
  public int msecOfGPSWeek;
  public int positionflags;
  public int numSVSTracked;
  public int[] svsChannelNumber = new int[10];
  public int[] trackedSVS_PRN = new int[10];
  public int msecs;
  public int week;

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

public gpsRawState()
{}

/**
 * Creates an object of class gpsRawState.
 * @param     arg_receiveTime The value of the receiveTime component.
 * @param     arg_clockOffset The value of the clockOffset component.
 * @param     arg_numSVSVisible The value of the numSVSVisible component.
 * @param     arg_visibleSvsPRN The value of the visibleSvsPRN component.
 * @param     arg_svFlags1 The value of the svFlags1 component.
 * @param     arg_svFlags2 The value of the svFlags2 component.
 * @param     arg_svsElevation The value of the svsElevation component.
 * @param     arg_svsAzimuth The value of the svsAzimuth component.
 * @param     arg_svsL1SNR The value of the svsL1SNR component.
 * @param     arg_svsL2SNR The value of the svsL2SNR component.
 * @param     arg_L1PseudoRange The value of the L1PseudoRange component.
 * @param     arg_L1ContPhase The value of the L1ContPhase component.
 * @param     arg_L1Doppler The value of the L1Doppler component.
 * @param     arg_L2ContPhase The value of the L2ContPhase component.
 * @param     arg_L2L1PseudoRange The value of the L2L1PseudoRange component.
 * @param     arg_issueOfDataEphem The value of the issueOfDataEphem component.
 * @param     arg_L1Slip The value of the L1Slip component.
 * @param     arg_L2Slip The value of the L2Slip component.
 * @param     arg_wgs84Latitude The value of the wgs84Latitude component.
 * @param     arg_wgs84Longitude The value of the wgs84Longitude component.
 * @param     arg_wgs84Altitude The value of the wgs84Altitude component.
 * @param     arg_positionDOP The value of the positionDOP component.
 * @param     arg_latitudeRate The value of the latitudeRate component.
 * @param     arg_longitudeRate The value of the longitudeRate component.
 * @param     arg_altitudeRate The value of the altitudeRate component.
 * @param     arg_msecOfGPSWeek The value of the msecOfGPSWeek component.
 * @param     arg_positionflags The value of the positionflags component.
 * @param     arg_numSVSTracked The value of the numSVSTracked component.
 * @param     arg_svsChannelNumber The value of the svsChannelNumber component.
 * @param     arg_trackedSVS_PRN The value of the trackedSVS_PRN component.
 * @param     arg_msecs The value of the msecs component.
 * @param     arg_week The value of the week component.
 */

public gpsRawState(double arg_receiveTime, double arg_clockOffset, int arg_numSVSVisible, int[] arg_visibleSvsPRN, int[] arg_svFlags1, int[] arg_svFlags2, int[] arg_svsElevation, int[] arg_svsAzimuth, int[] arg_svsL1SNR, int[] arg_svsL2SNR, double[] arg_L1PseudoRange, double[] arg_L1ContPhase, float[] arg_L1Doppler, double[] arg_L2ContPhase, float[] arg_L2L1PseudoRange, int[] arg_issueOfDataEphem, int[] arg_L1Slip, int[] arg_L2Slip, double arg_wgs84Latitude, double arg_wgs84Longitude, double arg_wgs84Altitude, double arg_positionDOP, double arg_latitudeRate, double arg_longitudeRate, double arg_altitudeRate, int arg_msecOfGPSWeek, int arg_positionflags, int arg_numSVSTracked, int[] arg_svsChannelNumber, int[] arg_trackedSVS_PRN, int arg_msecs, int arg_week)
{
  receiveTime = arg_receiveTime;
  clockOffset = arg_clockOffset;
  numSVSVisible = arg_numSVSVisible;
  visibleSvsPRN = arg_visibleSvsPRN;
  svFlags1 = arg_svFlags1;
  svFlags2 = arg_svFlags2;
  svsElevation = arg_svsElevation;
  svsAzimuth = arg_svsAzimuth;
  svsL1SNR = arg_svsL1SNR;
  svsL2SNR = arg_svsL2SNR;
  L1PseudoRange = arg_L1PseudoRange;
  L1ContPhase = arg_L1ContPhase;
  L1Doppler = arg_L1Doppler;
  L2ContPhase = arg_L2ContPhase;
  L2L1PseudoRange = arg_L2L1PseudoRange;
  issueOfDataEphem = arg_issueOfDataEphem;
  L1Slip = arg_L1Slip;
  L2Slip = arg_L2Slip;
  wgs84Latitude = arg_wgs84Latitude;
  wgs84Longitude = arg_wgs84Longitude;
  wgs84Altitude = arg_wgs84Altitude;
  positionDOP = arg_positionDOP;
  latitudeRate = arg_latitudeRate;
  longitudeRate = arg_longitudeRate;
  altitudeRate = arg_altitudeRate;
  msecOfGPSWeek = arg_msecOfGPSWeek;
  positionflags = arg_positionflags;
  numSVSTracked = arg_numSVSTracked;
  svsChannelNumber = arg_svsChannelNumber;
  trackedSVS_PRN = arg_trackedSVS_PRN;
  msecs = arg_msecs;
  week = arg_week;
}

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

public void xdr_encode(XDRStream xdrs)
{
  xdrs.xdr_encode_double(receiveTime);
  xdrs.xdr_encode_double(clockOffset);
  xdrs.xdr_encode_int(numSVSVisible);
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(visibleSvsPRN[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(svFlags1[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(svFlags2[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(svsElevation[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(svsAzimuth[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(svsL1SNR[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(svsL2SNR[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_double(L1PseudoRange[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_double(L1ContPhase[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_float(L1Doppler[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_double(L2ContPhase[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_float(L2L1PseudoRange[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(issueOfDataEphem[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(L1Slip[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(L2Slip[i_v]);
  }
  xdrs.xdr_encode_double(wgs84Latitude);
  xdrs.xdr_encode_double(wgs84Longitude);
  xdrs.xdr_encode_double(wgs84Altitude);
  xdrs.xdr_encode_double(positionDOP);
  xdrs.xdr_encode_double(latitudeRate);
  xdrs.xdr_encode_double(longitudeRate);
  xdrs.xdr_encode_double(altitudeRate);
  xdrs.xdr_encode_int(msecOfGPSWeek);
  xdrs.xdr_encode_int(positionflags);
  xdrs.xdr_encode_int(numSVSTracked);
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(svsChannelNumber[i_v]);
  }
  for (int i_v = 0; i_v < 10; i_v++){
    xdrs.xdr_encode_int(trackedSVS_PRN[i_v]);
  }
  xdrs.xdr_encode_int(msecs);
  xdrs.xdr_encode_int(week);
}

/**
 * Decodes an object of class gpsRawState 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
{
  receiveTime = xdrs.xdr_decode_double();
  clockOffset = xdrs.xdr_decode_double();
  numSVSVisible = xdrs.xdr_decode_int();
  visibleSvsPRN = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    visibleSvsPRN[i_v] = xdrs.xdr_decode_int();
  }
  svFlags1 = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    svFlags1[i_v] = xdrs.xdr_decode_int();
  }
  svFlags2 = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    svFlags2[i_v] = xdrs.xdr_decode_int();
  }
  svsElevation = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    svsElevation[i_v] = xdrs.xdr_decode_int();
  }
  svsAzimuth = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    svsAzimuth[i_v] = xdrs.xdr_decode_int();
  }
  svsL1SNR = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    svsL1SNR[i_v] = xdrs.xdr_decode_int();
  }
  svsL2SNR = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    svsL2SNR[i_v] = xdrs.xdr_decode_int();
  }
  L1PseudoRange = new double[10];
  for (int i_v = 0; i_v < 10; i_v++){
    L1PseudoRange[i_v] = xdrs.xdr_decode_double();
  }
  L1ContPhase = new double[10];
  for (int i_v = 0; i_v < 10; i_v++){
    L1ContPhase[i_v] = xdrs.xdr_decode_double();
  }
  L1Doppler = new float[10];
  for (int i_v = 0; i_v < 10; i_v++){
    L1Doppler[i_v] = xdrs.xdr_decode_float();
  }
  L2ContPhase = new double[10];
  for (int i_v = 0; i_v < 10; i_v++){
    L2ContPhase[i_v] = xdrs.xdr_decode_double();
  }
  L2L1PseudoRange = new float[10];
  for (int i_v = 0; i_v < 10; i_v++){
    L2L1PseudoRange[i_v] = xdrs.xdr_decode_float();
  }
  issueOfDataEphem = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    issueOfDataEphem[i_v] = xdrs.xdr_decode_int();
  }
  L1Slip = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    L1Slip[i_v] = xdrs.xdr_decode_int();
  }
  L2Slip = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    L2Slip[i_v] = xdrs.xdr_decode_int();
  }
  wgs84Latitude = xdrs.xdr_decode_double();
  wgs84Longitude = xdrs.xdr_decode_double();
  wgs84Altitude = xdrs.xdr_decode_double();
  positionDOP = xdrs.xdr_decode_double();
  latitudeRate = xdrs.xdr_decode_double();
  longitudeRate = xdrs.xdr_decode_double();
  altitudeRate = xdrs.xdr_decode_double();
  msecOfGPSWeek = xdrs.xdr_decode_int();
  positionflags = xdrs.xdr_decode_int();
  numSVSTracked = xdrs.xdr_decode_int();
  svsChannelNumber = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    svsChannelNumber[i_v] = xdrs.xdr_decode_int();
  }
  trackedSVS_PRN = new int[10];
  for (int i_v = 0; i_v < 10; i_v++){
    trackedSVS_PRN[i_v] = xdrs.xdr_decode_int();
  }
  msecs = xdrs.xdr_decode_int();
  week = xdrs.xdr_decode_int();
}
}
