package nomadgui.Telemetry;

import distinct.rpc.*;

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

public class arbInternalState implements XDRType {
  public float[] moduleSteers = new float[14];
  public float[] computedSteer = new float[2];
  public int msecs;
  public int week;

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

public arbInternalState()
{}

/**
 * Creates an object of class arbInternalState.
 * @param     arg_moduleSteers The value of the moduleSteers component.
 * @param     arg_computedSteer The value of the computedSteer component.
 * @param     arg_msecs The value of the msecs component.
 * @param     arg_week The value of the week component.
 */

public arbInternalState(float[] arg_moduleSteers, float[] arg_computedSteer, int arg_msecs, int arg_week)
{
  moduleSteers = arg_moduleSteers;
  computedSteer = arg_computedSteer;
  msecs = arg_msecs;
  week = arg_week;
}

/**
 * Encodes an object of class arbInternalState 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 < 14; i_v++){
    xdrs.xdr_encode_float(moduleSteers[i_v]);
  }
  for (int i_v = 0; i_v < 2; i_v++){
    xdrs.xdr_encode_float(computedSteer[i_v]);
  }
  xdrs.xdr_encode_int(msecs);
  xdrs.xdr_encode_int(week);
}

/**
 * Decodes an object of class arbInternalState 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
{
  moduleSteers = new float[14];
  for (int i_v = 0; i_v < 14; i_v++){
    moduleSteers[i_v] = xdrs.xdr_decode_float();
  }
  computedSteer = new float[2];
  for (int i_v = 0; i_v < 2; i_v++){
    computedSteer[i_v] = xdrs.xdr_decode_float();
  }
  msecs = xdrs.xdr_decode_int();
  week = xdrs.xdr_decode_int();
}
}
