/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include "rpc_blinkenlight_api.h"

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"

bool_t
xdr_rpc_blinkenlight_api_nametype (XDR *xdrs, rpc_blinkenlight_api_nametype *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, objp, RPC_BLINKENLIGHT_API_MAX_NAME_LEN))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_infostringtype (XDR *xdrs, rpc_blinkenlight_api_infostringtype *objp)
{
	register int32_t *buf;

	 if (!xdr_string (xdrs, objp, RPC_BLINKENLIGHT_API_MAX_INFOSTRING_LEN))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_control_type_enum (XDR *xdrs, rpc_blinkenlight_api_control_type_enum *objp)
{
	register int32_t *buf;

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_control_type_t (XDR *xdrs, rpc_blinkenlight_api_control_type_t *objp)
{
	register int32_t *buf;

	 if (!xdr_rpc_blinkenlight_api_control_type_enum (xdrs, objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_panel_struct (XDR *xdrs, rpc_blinkenlight_api_panel_struct *objp)
{
	register int32_t *buf;


	if (xdrs->x_op == XDR_ENCODE) {
		 if (!xdr_rpc_blinkenlight_api_nametype (xdrs, &objp->name))
			 return FALSE;
		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_int (xdrs, &objp->controls_inputs_count))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->controls_outputs_count))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->controls_inputs_values_bytecount))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->controls_outputs_values_bytecount))
				 return FALSE;
		} else {
			IXDR_PUT_U_LONG(buf, objp->controls_inputs_count);
			IXDR_PUT_U_LONG(buf, objp->controls_outputs_count);
			IXDR_PUT_U_LONG(buf, objp->controls_inputs_values_bytecount);
			IXDR_PUT_U_LONG(buf, objp->controls_outputs_values_bytecount);
		}
		return TRUE;
	} else if (xdrs->x_op == XDR_DECODE) {
		 if (!xdr_rpc_blinkenlight_api_nametype (xdrs, &objp->name))
			 return FALSE;
		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_int (xdrs, &objp->controls_inputs_count))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->controls_outputs_count))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->controls_inputs_values_bytecount))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->controls_outputs_values_bytecount))
				 return FALSE;
		} else {
			objp->controls_inputs_count = IXDR_GET_U_LONG(buf);
			objp->controls_outputs_count = IXDR_GET_U_LONG(buf);
			objp->controls_inputs_values_bytecount = IXDR_GET_U_LONG(buf);
			objp->controls_outputs_values_bytecount = IXDR_GET_U_LONG(buf);
		}
	 return TRUE;
	}

	 if (!xdr_rpc_blinkenlight_api_nametype (xdrs, &objp->name))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->controls_inputs_count))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->controls_outputs_count))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->controls_inputs_values_bytecount))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->controls_outputs_values_bytecount))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_control_struct (XDR *xdrs, rpc_blinkenlight_api_control_struct *objp)
{
	register int32_t *buf;

	 if (!xdr_rpc_blinkenlight_api_nametype (xdrs, &objp->name))
		 return FALSE;
	 if (!xdr_u_char (xdrs, &objp->is_input))
		 return FALSE;
	 if (!xdr_rpc_blinkenlight_api_control_type_t (xdrs, &objp->type))
		 return FALSE;
	 if (!xdr_int (xdrs, &objp->radix))
		 return FALSE;
	 if (!xdr_int (xdrs, &objp->value_bitlen))
		 return FALSE;
	 if (!xdr_int (xdrs, &objp->value_bytelen))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_controlvalues_struct (XDR *xdrs, rpc_blinkenlight_api_controlvalues_struct *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->error_code))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->value_bytes.value_bytes_val, (u_int *) &objp->value_bytes.value_bytes_len, ~0,
		sizeof (u_char), (xdrproc_t) xdr_u_char))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_getinfo_res (XDR *xdrs, rpc_blinkenlight_api_getinfo_res *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->error_code))
		 return FALSE;
	 if (!xdr_rpc_blinkenlight_api_infostringtype (xdrs, &objp->info))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_getpanelinfo_res (XDR *xdrs, rpc_blinkenlight_api_getpanelinfo_res *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->error_code))
		 return FALSE;
	 if (!xdr_rpc_blinkenlight_api_panel_struct (xdrs, &objp->panel))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_getcontrolinfo_res (XDR *xdrs, rpc_blinkenlight_api_getcontrolinfo_res *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->error_code))
		 return FALSE;
	 if (!xdr_rpc_blinkenlight_api_control_struct (xdrs, &objp->control))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_setpanel_controlvalues_res (XDR *xdrs, rpc_blinkenlight_api_setpanel_controlvalues_res *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->error_code))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_param_cmd_get_struct (XDR *xdrs, rpc_param_cmd_get_struct *objp)
{
	register int32_t *buf;

	 if (!xdr_u_int (xdrs, &objp->object_class))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->object_handle))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->param_handle))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_param_result_struct (XDR *xdrs, rpc_param_result_struct *objp)
{
	register int32_t *buf;


	if (xdrs->x_op == XDR_ENCODE) {
		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_int (xdrs, &objp->error_code))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->object_class))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->object_handle))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->param_handle))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->param_value))
				 return FALSE;
		} else {
			IXDR_PUT_LONG(buf, objp->error_code);
			IXDR_PUT_U_LONG(buf, objp->object_class);
			IXDR_PUT_U_LONG(buf, objp->object_handle);
			IXDR_PUT_U_LONG(buf, objp->param_handle);
			IXDR_PUT_U_LONG(buf, objp->param_value);
		}
		return TRUE;
	} else if (xdrs->x_op == XDR_DECODE) {
		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_int (xdrs, &objp->error_code))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->object_class))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->object_handle))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->param_handle))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->param_value))
				 return FALSE;
		} else {
			objp->error_code = IXDR_GET_LONG(buf);
			objp->object_class = IXDR_GET_U_LONG(buf);
			objp->object_handle = IXDR_GET_U_LONG(buf);
			objp->param_handle = IXDR_GET_U_LONG(buf);
			objp->param_value = IXDR_GET_U_LONG(buf);
		}
	 return TRUE;
	}

	 if (!xdr_int (xdrs, &objp->error_code))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->object_class))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->object_handle))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->param_handle))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->param_value))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_param_cmd_set_struct (XDR *xdrs, rpc_param_cmd_set_struct *objp)
{
	register int32_t *buf;


	if (xdrs->x_op == XDR_ENCODE) {
		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_int (xdrs, &objp->object_class))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->object_handle))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->param_handle))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->param_value))
				 return FALSE;
		} else {
			IXDR_PUT_U_LONG(buf, objp->object_class);
			IXDR_PUT_U_LONG(buf, objp->object_handle);
			IXDR_PUT_U_LONG(buf, objp->param_handle);
			IXDR_PUT_U_LONG(buf, objp->param_value);
		}
		return TRUE;
	} else if (xdrs->x_op == XDR_DECODE) {
		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
		if (buf == NULL) {
			 if (!xdr_u_int (xdrs, &objp->object_class))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->object_handle))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->param_handle))
				 return FALSE;
			 if (!xdr_u_int (xdrs, &objp->param_value))
				 return FALSE;
		} else {
			objp->object_class = IXDR_GET_U_LONG(buf);
			objp->object_handle = IXDR_GET_U_LONG(buf);
			objp->param_handle = IXDR_GET_U_LONG(buf);
			objp->param_value = IXDR_GET_U_LONG(buf);
		}
	 return TRUE;
	}

	 if (!xdr_u_int (xdrs, &objp->object_class))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->object_handle))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->param_handle))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->param_value))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_test_cmdstatus_struct (XDR *xdrs, rpc_test_cmdstatus_struct *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->bytecount))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_test_data_struct (XDR *xdrs, rpc_test_data_struct *objp)
{
	register int32_t *buf;

	 if (!xdr_int (xdrs, &objp->fixdata1))
		 return FALSE;
	 if (!xdr_int (xdrs, &objp->fixdata2))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->vardata.vardata_val, (u_int *) &objp->vardata.vardata_len, ~0,
		sizeof (u_char), (xdrproc_t) xdr_u_char))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_getcontrolinfo_1_argument (XDR *xdrs, rpc_blinkenlight_api_getcontrolinfo_1_argument *objp)
{
	 if (!xdr_u_int (xdrs, &objp->arg1))
		 return FALSE;
	 if (!xdr_u_int (xdrs, &objp->arg2))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_rpc_blinkenlight_api_setpanel_controlvalues_1_argument (XDR *xdrs, rpc_blinkenlight_api_setpanel_controlvalues_1_argument *objp)
{
	 if (!xdr_u_int (xdrs, &objp->arg1))
		 return FALSE;
	 if (!xdr_rpc_blinkenlight_api_controlvalues_struct (xdrs, &objp->valuelist))
		 return FALSE;
	return TRUE;
}
