package auvlcm;
 
import java.io.*;
import java.util.*;
 
public final class os_conduit_t implements lcm.lcm.LCMEncodable
{
    public long utime;
    public auvlcm.os_conduit_raw_t dvl;
    public auvlcm.os_conduit_raw_t altimeter;
    public auvlcm.os_conduit_raw_t gps;
    public auvlcm.os_conduit_raw_t compass;
 
    public os_conduit_t()
    {
    }
 
    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x4178f69b99aa1d40L;
 
    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class>());
    }
 
    public static long _hashRecursive(ArrayList<Class> classes)
    {
        if (classes.contains(auvlcm.os_conduit_t.class))
            return 0L;
 
        classes.add(auvlcm.os_conduit_t.class);
        long hash = LCM_FINGERPRINT_BASE
             + auvlcm.os_conduit_raw_t._hashRecursive(classes)
             + auvlcm.os_conduit_raw_t._hashRecursive(classes)
             + auvlcm.os_conduit_raw_t._hashRecursive(classes)
             + auvlcm.os_conduit_raw_t._hashRecursive(classes)
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }
 
    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }
 
    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        byte[] __strbuf = null;
        outs.writeLong(this.utime); 
 
        this.dvl._encodeRecursive(outs); 
 
        this.altimeter._encodeRecursive(outs); 
 
        this.gps._encodeRecursive(outs); 
 
        this.compass._encodeRecursive(outs); 
 
    }
 
    public os_conduit_t(byte[] data) throws IOException
    {
        this(new DataInputStream(new ByteArrayInputStream(data)));
    }
 
    public os_conduit_t(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");
 
        _decodeRecursive(ins);
    }
 
    public static auvlcm.os_conduit_t _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        auvlcm.os_conduit_t o = new auvlcm.os_conduit_t();
        o._decodeRecursive(ins);
        return o;
    }
 
    public void _decodeRecursive(DataInput ins) throws IOException
    {
        byte[] __strbuf = null;
        this.utime = ins.readLong();
 
        this.dvl = auvlcm.os_conduit_raw_t._decodeRecursiveFactory(ins);
 
        this.altimeter = auvlcm.os_conduit_raw_t._decodeRecursiveFactory(ins);
 
        this.gps = auvlcm.os_conduit_raw_t._decodeRecursiveFactory(ins);
 
        this.compass = auvlcm.os_conduit_raw_t._decodeRecursiveFactory(ins);
 
    }
 
    public auvlcm.os_conduit_t copy()
    {
        auvlcm.os_conduit_t outobj = new auvlcm.os_conduit_t();
        outobj.utime = this.utime;
 
outobj.dvl = this.dvl.copy(); 
outobj.altimeter = this.altimeter.copy(); 
outobj.gps = this.gps.copy(); 
outobj.compass = this.compass.copy(); 
        return outobj;
    }
 
}

