/******************************************************************************
 * Toolkit for building distributed control systems or any other distributed system.
 *
 * Copyright (c) 1990-2005 by European Synchrotron Radiation Facility,
 *                            Grenoble, France
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * File:        maxe_xdr.c
 *
 * Project:     Device Servers with sun-rpc
 *
 * Description: xdr_routines for maxe types.
 *
 * Author(s):   Timo Mettala
 *		$Author: jkrueger1 $
 *
 * Original:    June 1992
 *
 * Version:	$Revision: 1.5 $
 *
 * Date:	$Date: 2008/04/06 09:07:22 $
 *
 *******************************************************************-*/

#ifdef HAVE_CONFIG_H
#	include "config.h"
#endif
#include <dev_xdr.h>
#include <maxe_xdr.h>

bool_t
xdr_DevMulMove(xdrs, objp)
	XDR *xdrs;
	DevMulMove *objp;
{
	if (!xdr_vector(xdrs, (char *)objp->action, 8,
		        sizeof(long), (xdrproc_t)xdr_DevLong)) {
		return (FALSE);
     	}
     	if (!xdr_vector(xdrs, (char *)objp->delay, 8,
		        sizeof(long), (xdrproc_t)xdr_DevLong)) {
	  	return (FALSE);
  	}
 	if (!xdr_vector(xdrs, (char *)objp->position, 8,
       			sizeof(float), (xdrproc_t)xdr_float)) {
       		return (FALSE);
       }
       return (TRUE);
}

bool_t
xdr_DevMotorLong(xdrs, objp)
	XDR *xdrs;
	DevMotorLong *objp;
{
	if (!xdr_DevLong(xdrs, &objp->axisnum))
		return (FALSE);
	if (!xdr_DevLong(xdrs, &objp->value))
		return (FALSE);

       return (TRUE);
}



bool_t
xdr_DevMotorFloat(xdrs, objp)
	XDR *xdrs;
	DevMotorFloat *objp;
{
	if (!xdr_DevLong(xdrs, &objp->axisnum))
		return (FALSE);
	if (!xdr_float(xdrs, &objp->value))
		return (FALSE);

       return (TRUE);
}
