package nomadgui.Realtime;

import distinct.rpc.*;

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

public class rtControlState implements XDRType {
  public char rtDrivingMode;
  public char rtHeartbeatMask;
  public char rtWatchdogMask;
  public char rtCommand;

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

public rtControlState()
{}

/**
 * Creates an object of class rtControlState.
 * @param     arg_rtDrivingMode The value of the rtDrivingMode component.
 * @param     arg_rtHeartbeatMask The value of the rtHeartbeatMask component.
 * @param     arg_rtWatchdogMask The value of the rtWatchdogMask component.
 * @param     arg_rtCommand The value of the rtCommand component.
 */

public rtControlState(char arg_rtDrivingMode, char arg_rtHeartbeatMask, char arg_rtWatchdogMask, char arg_rtCommand)
{
  rtDrivingMode = arg_rtDrivingMode;
  rtHeartbeatMask = arg_rtHeartbeatMask;
  rtWatchdogMask = arg_rtWatchdogMask;
  rtCommand = arg_rtCommand;
}

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

public void xdr_encode(XDRStream xdrs)
{
  xdrs.xdr_encode_char(rtDrivingMode);
  xdrs.xdr_encode_char(rtHeartbeatMask);
  xdrs.xdr_encode_char(rtWatchdogMask);
  xdrs.xdr_encode_char(rtCommand);
}

/**
 * Decodes an object of class rtControlState 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
{
  rtDrivingMode = xdrs.xdr_decode_char();
  rtHeartbeatMask = xdrs.xdr_decode_char();
  rtWatchdogMask = xdrs.xdr_decode_char();
  rtCommand = xdrs.xdr_decode_char();
}
}
