// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild

package org.josast.amicalsat;

import io.kaitai.struct.ByteBufferKaitaiStream;
import io.kaitai.struct.KaitaiStruct;
import io.kaitai.struct.KaitaiStream;
import java.io.IOException;
import java.nio.charset.Charset;

public class FrameTlmAmicalsat extends KaitaiStruct {
    public static FrameTlmAmicalsat fromFile(String fileName) throws IOException {
        return new FrameTlmAmicalsat(new ByteBufferKaitaiStream(fileName));
    }

    public FrameTlmAmicalsat(KaitaiStream _io) {
        this(_io, null, null);
    }

    public FrameTlmAmicalsat(KaitaiStream _io, KaitaiStruct _parent) {
        this(_io, _parent, null);
    }

    public FrameTlmAmicalsat(KaitaiStream _io, KaitaiStruct _parent, FrameTlmAmicalsat _root) {
        super(_io);
        this._parent = _parent;
        this._root = _root == null ? this : _root;
        _read();
    }
    private void _read() {
        this.frameTlmEntrySat = new Ax25Frame(this._io, this, _root);
    }
    public static class EmmnType extends KaitaiStruct {
        public static EmmnType fromFile(String fileName) throws IOException {
            return new EmmnType(new ByteBufferKaitaiStream(fileName));
        }

        public EmmnType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public EmmnType(KaitaiStream _io, FrameTlmAmicalsat.EmerType _parent) {
            this(_io, _parent, null);
        }

        public EmmnType(KaitaiStream _io, FrameTlmAmicalsat.EmerType _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.vIn = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.vSolar = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.iIn = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.pIn = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.pPeak = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.tCpu = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.vCpu = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String vIn;
        private String vSolar;
        private String iIn;
        private String pIn;
        private String pPeak;
        private String tCpu;
        private String vCpu;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.EmerType _parent;
        public String vIn() { return vIn; }
        public String vSolar() { return vSolar; }
        public String iIn() { return iIn; }
        public String pIn() { return pIn; }
        public String pPeak() { return pPeak; }
        public String tCpu() { return tCpu; }
        public String vCpu() { return vCpu; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.EmerType _parent() { return _parent; }
    }
    public static class Ax25Frame extends KaitaiStruct {
        public static Ax25Frame fromFile(String fileName) throws IOException {
            return new Ax25Frame(new ByteBufferKaitaiStream(fileName));
        }

        public Ax25Frame(KaitaiStream _io) {
            this(_io, null, null);
        }

        public Ax25Frame(KaitaiStream _io, FrameTlmAmicalsat _parent) {
            this(_io, _parent, null);
        }

        public Ax25Frame(KaitaiStream _io, FrameTlmAmicalsat _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.ax25Header = new Ax25Header(this._io, this, _root);
            this.payload = new IFrame(this._io, this, _root);
        }
        private Ax25Header ax25Header;
        private IFrame payload;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat _parent;
        public Ax25Header ax25Header() { return ax25Header; }
        public IFrame payload() { return payload; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat _parent() { return _parent; }
    }
    public static class DestCallsign extends KaitaiStruct {
        public static DestCallsign fromFile(String fileName) throws IOException {
            return new DestCallsign(new ByteBufferKaitaiStream(fileName));
        }

        public DestCallsign(KaitaiStream _io) {
            this(_io, null, null);
        }

        public DestCallsign(KaitaiStream _io, FrameTlmAmicalsat.DestCallsignRaw _parent) {
            this(_io, _parent, null);
        }

        public DestCallsign(KaitaiStream _io, FrameTlmAmicalsat.DestCallsignRaw _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.destCallsign = new String(this._io.readBytes(6), Charset.forName("ASCII"));
        }
        private String destCallsign;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.DestCallsignRaw _parent;
        public String destCallsign() { return destCallsign; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.DestCallsignRaw _parent() { return _parent; }
    }
    public static class Ax25Header extends KaitaiStruct {
        public static Ax25Header fromFile(String fileName) throws IOException {
            return new Ax25Header(new ByteBufferKaitaiStream(fileName));
        }

        public Ax25Header(KaitaiStream _io) {
            this(_io, null, null);
        }

        public Ax25Header(KaitaiStream _io, FrameTlmAmicalsat.Ax25Frame _parent) {
            this(_io, _parent, null);
        }

        public Ax25Header(KaitaiStream _io, FrameTlmAmicalsat.Ax25Frame _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.destCallsignRaw = new DestCallsignRaw(this._io, this, _root);
            this.destSsidRaw = this._io.readU1();
            this.srcCallsignRaw = new SrcCallsignRaw(this._io, this, _root);
            this.srcSsidRaw = this._io.readU1();
            this.ctl = this._io.readU1();
        }
        private Integer srcSsid;
        public Integer srcSsid() {
            if (this.srcSsid != null)
                return this.srcSsid;
            int _tmp = (int) (((srcSsidRaw() & 15) >> 1));
            this.srcSsid = _tmp;
            return this.srcSsid;
        }
        private Integer destSsid;
        public Integer destSsid() {
            if (this.destSsid != null)
                return this.destSsid;
            int _tmp = (int) (((destSsidRaw() & 15) >> 1));
            this.destSsid = _tmp;
            return this.destSsid;
        }
        private DestCallsignRaw destCallsignRaw;
        private int destSsidRaw;
        private SrcCallsignRaw srcCallsignRaw;
        private int srcSsidRaw;
        private int ctl;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.Ax25Frame _parent;
        public DestCallsignRaw destCallsignRaw() { return destCallsignRaw; }
        public int destSsidRaw() { return destSsidRaw; }
        public SrcCallsignRaw srcCallsignRaw() { return srcCallsignRaw; }
        public int srcSsidRaw() { return srcSsidRaw; }
        public int ctl() { return ctl; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.Ax25Frame _parent() { return _parent; }
    }
    public static class A1PositionType extends KaitaiStruct {
        public static A1PositionType fromFile(String fileName) throws IOException {
            return new A1PositionType(new ByteBufferKaitaiStream(fileName));
        }

        public A1PositionType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public A1PositionType(KaitaiStream _io, FrameTlmAmicalsat.A1Type _parent) {
            this(_io, _parent, null);
        }

        public A1PositionType(KaitaiStream _io, FrameTlmAmicalsat.A1Type _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamps = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.latitude = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.longitude = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String timeStamps;
        private String latitude;
        private String longitude;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.A1Type _parent;
        public String timeStamps() { return timeStamps; }
        public String latitude() { return latitude; }
        public String longitude() { return longitude; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.A1Type _parent() { return _parent; }
    }
    public static class M1Type extends KaitaiStruct {
        public static M1Type fromFile(String fileName) throws IOException {
            return new M1Type(new ByteBufferKaitaiStream(fileName));
        }

        public M1Type(KaitaiStream _io) {
            this(_io, null, null);
        }

        public M1Type(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent) {
            this(_io, _parent, null);
        }

        public M1Type(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamps = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            switch (_parent().tlmType()) {
            case "LOG": {
                this.tlmSw = new LogType(this._io, this, _root);
                break;
            }
            case "FLAGS": {
                this.tlmSw = new FlagsType(this._io, this, _root);
                break;
            }
            }
            this.ax25Info = this._io.readBytesFull();
        }
        private String timeStamps;
        private KaitaiStruct tlmSw;
        private byte[] ax25Info;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.IFrame _parent;
        public String timeStamps() { return timeStamps; }
        public KaitaiStruct tlmSw() { return tlmSw; }
        public byte[] ax25Info() { return ax25Info; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.IFrame _parent() { return _parent; }
    }
    public static class EmLogType extends KaitaiStruct {
        public static EmLogType fromFile(String fileName) throws IOException {
            return new EmLogType(new ByteBufferKaitaiStream(fileName));
        }

        public EmLogType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public EmLogType(KaitaiStream _io, FrameTlmAmicalsat.EmerType _parent) {
            this(_io, _parent, null);
        }

        public EmLogType(KaitaiStream _io, FrameTlmAmicalsat.EmerType _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.bootNumber = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.inputVoltage = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.inputCurrent = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.inputPower = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.peakPower = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.solarPanelVoltage = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String bootNumber;
        private String inputVoltage;
        private String inputCurrent;
        private String inputPower;
        private String peakPower;
        private String solarPanelVoltage;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.EmerType _parent;
        public String bootNumber() { return bootNumber; }
        public String inputVoltage() { return inputVoltage; }
        public String inputCurrent() { return inputCurrent; }
        public String inputPower() { return inputPower; }
        public String peakPower() { return peakPower; }
        public String solarPanelVoltage() { return solarPanelVoltage; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.EmerType _parent() { return _parent; }
    }
    public static class A1FlagType extends KaitaiStruct {
        public static A1FlagType fromFile(String fileName) throws IOException {
            return new A1FlagType(new ByteBufferKaitaiStream(fileName));
        }

        public A1FlagType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public A1FlagType(KaitaiStream _io, FrameTlmAmicalsat.A1Type _parent) {
            this(_io, _parent, null);
        }

        public A1FlagType(KaitaiStream _io, FrameTlmAmicalsat.A1Type _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.mode = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.a1Flags = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.faults = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String mode;
        private String a1Flags;
        private String faults;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.A1Type _parent;
        public String mode() { return mode; }
        public String a1Flags() { return a1Flags; }
        public String faults() { return faults; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.A1Type _parent() { return _parent; }
    }
    public static class SrcCallsignRaw extends KaitaiStruct {
        public static SrcCallsignRaw fromFile(String fileName) throws IOException {
            return new SrcCallsignRaw(new ByteBufferKaitaiStream(fileName));
        }

        public SrcCallsignRaw(KaitaiStream _io) {
            this(_io, null, null);
        }

        public SrcCallsignRaw(KaitaiStream _io, FrameTlmAmicalsat.Ax25Header _parent) {
            this(_io, _parent, null);
        }

        public SrcCallsignRaw(KaitaiStream _io, FrameTlmAmicalsat.Ax25Header _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this._raw__raw_srcCallsignRor = this._io.readBytes(6);
            this._raw_srcCallsignRor = KaitaiStream.processRotateLeft(this._raw__raw_srcCallsignRor, 8 - (1), 1);
            KaitaiStream _io__raw_srcCallsignRor = new ByteBufferKaitaiStream(_raw_srcCallsignRor);
            this.srcCallsignRor = new SrcCallsign(_io__raw_srcCallsignRor, this, _root);
        }
        private SrcCallsign srcCallsignRor;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.Ax25Header _parent;
        private byte[] _raw__raw_srcCallsignRor;
        private byte[] _raw_srcCallsignRor;
        public SrcCallsign srcCallsignRor() { return srcCallsignRor; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.Ax25Header _parent() { return _parent; }
        public byte[] _raw__raw_srcCallsignRor() { return _raw__raw_srcCallsignRor; }
        public byte[] _raw_srcCallsignRor() { return _raw_srcCallsignRor; }
    }
    public static class FlagsType extends KaitaiStruct {
        public static FlagsType fromFile(String fileName) throws IOException {
            return new FlagsType(new ByteBufferKaitaiStream(fileName));
        }

        public FlagsType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public FlagsType(KaitaiStream _io, FrameTlmAmicalsat.M1Type _parent) {
            this(_io, _parent, null);
        }

        public FlagsType(KaitaiStream _io, FrameTlmAmicalsat.M1Type _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.hexFlags = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
        }
        private String hexFlags;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.M1Type _parent;
        public String hexFlags() { return hexFlags; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.M1Type _parent() { return _parent; }
    }
    public static class IFrame extends KaitaiStruct {
        public static IFrame fromFile(String fileName) throws IOException {
            return new IFrame(new ByteBufferKaitaiStream(fileName));
        }

        public IFrame(KaitaiStream _io) {
            this(_io, null, null);
        }

        public IFrame(KaitaiStream _io, FrameTlmAmicalsat.Ax25Frame _parent) {
            this(_io, _parent, null);
        }

        public IFrame(KaitaiStream _io, FrameTlmAmicalsat.Ax25Frame _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.pid = this._io.readU1();
            this.field = new String(this._io.readBytesTerm(61, false, true, true), Charset.forName("ASCII"));
            this.tlmArea = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.tlmType = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            switch (tlmArea()) {
            case "EM": {
                this.tlmAreaSwitch = new EmerType(this._io, this, _root);
                break;
            }
            case "M1": {
                this.tlmAreaSwitch = new M1Type(this._io, this, _root);
                break;
            }
            case "V1": {
                this.tlmAreaSwitch = new V1Type(this._io, this, _root);
                break;
            }
            case "U2": {
                this.tlmAreaSwitch = new U2Type(this._io, this, _root);
                break;
            }
            case "A1": {
                this.tlmAreaSwitch = new A1Type(this._io, this, _root);
                break;
            }
            case "CU_L": {
                this.tlmAreaSwitch = new CuType(this._io, this, _root);
                break;
            }
            case "CU_R": {
                this.tlmAreaSwitch = new CuType(this._io, this, _root);
                break;
            }
            case "ER": {
                this.tlmAreaSwitch = new EmerType(this._io, this, _root);
                break;
            }
            }
        }
        private int pid;
        private String field;
        private String tlmArea;
        private String tlmType;
        private KaitaiStruct tlmAreaSwitch;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.Ax25Frame _parent;
        public int pid() { return pid; }
        public String field() { return field; }
        public String tlmArea() { return tlmArea; }
        public String tlmType() { return tlmType; }
        public KaitaiStruct tlmAreaSwitch() { return tlmAreaSwitch; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.Ax25Frame _parent() { return _parent; }
    }
    public static class U2RlType extends KaitaiStruct {
        public static U2RlType fromFile(String fileName) throws IOException {
            return new U2RlType(new ByteBufferKaitaiStream(fileName));
        }

        public U2RlType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public U2RlType(KaitaiStream _io, FrameTlmAmicalsat.U2Type _parent) {
            this(_io, _parent, null);
        }

        public U2RlType(KaitaiStream _io, FrameTlmAmicalsat.U2Type _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamp = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.cpuVoltage = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.batteryVoltage = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.cpuTemperature = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.amplifierTemperature = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.flags = this._io.readU1();
        }
        private String timeStamp;
        private String cpuVoltage;
        private String batteryVoltage;
        private String cpuTemperature;
        private String amplifierTemperature;
        private int flags;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.U2Type _parent;
        public String timeStamp() { return timeStamp; }
        public String cpuVoltage() { return cpuVoltage; }
        public String batteryVoltage() { return batteryVoltage; }
        public String cpuTemperature() { return cpuTemperature; }
        public String amplifierTemperature() { return amplifierTemperature; }
        public int flags() { return flags; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.U2Type _parent() { return _parent; }
    }
    public static class CuLogType extends KaitaiStruct {
        public static CuLogType fromFile(String fileName) throws IOException {
            return new CuLogType(new ByteBufferKaitaiStream(fileName));
        }

        public CuLogType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public CuLogType(KaitaiStream _io, FrameTlmAmicalsat.CuType _parent) {
            this(_io, _parent, null);
        }

        public CuLogType(KaitaiStream _io, FrameTlmAmicalsat.CuType _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.cpuVoltage = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.cpuTemperature = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.cuFlags = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String cpuVoltage;
        private String cpuTemperature;
        private String cuFlags;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.CuType _parent;
        public String cpuVoltage() { return cpuVoltage; }
        public String cpuTemperature() { return cpuTemperature; }
        public String cuFlags() { return cuFlags; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.CuType _parent() { return _parent; }
    }
    public static class V1RlType extends KaitaiStruct {
        public static V1RlType fromFile(String fileName) throws IOException {
            return new V1RlType(new ByteBufferKaitaiStream(fileName));
        }

        public V1RlType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public V1RlType(KaitaiStream _io, FrameTlmAmicalsat.V1Type _parent) {
            this(_io, _parent, null);
        }

        public V1RlType(KaitaiStream _io, FrameTlmAmicalsat.V1Type _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamp = new String(this._io.readBytesTerm(44, false, true, true), Charset.forName("ASCII"));
            this.cpuVoltage = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.batteryVoltage = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.cpuTemperature = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.amplifierTemperature = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.flags = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String timeStamp;
        private String cpuVoltage;
        private String batteryVoltage;
        private String cpuTemperature;
        private String amplifierTemperature;
        private String flags;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.V1Type _parent;
        public String timeStamp() { return timeStamp; }
        public String cpuVoltage() { return cpuVoltage; }
        public String batteryVoltage() { return batteryVoltage; }
        public String cpuTemperature() { return cpuTemperature; }
        public String amplifierTemperature() { return amplifierTemperature; }
        public String flags() { return flags; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.V1Type _parent() { return _parent; }
    }
    public static class OnyxType extends KaitaiStruct {
        public static OnyxType fromFile(String fileName) throws IOException {
            return new OnyxType(new ByteBufferKaitaiStream(fileName));
        }

        public OnyxType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public OnyxType(KaitaiStream _io, FrameTlmAmicalsat.CuType _parent) {
            this(_io, _parent, null);
        }

        public OnyxType(KaitaiStream _io, FrameTlmAmicalsat.CuType _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamp = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.returnValue = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String timeStamp;
        private String returnValue;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.CuType _parent;
        public String timeStamp() { return timeStamp; }
        public String returnValue() { return returnValue; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.CuType _parent() { return _parent; }
    }
    public static class EmerType extends KaitaiStruct {
        public static EmerType fromFile(String fileName) throws IOException {
            return new EmerType(new ByteBufferKaitaiStream(fileName));
        }

        public EmerType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public EmerType(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent) {
            this(_io, _parent, null);
        }

        public EmerType(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamp = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            switch (_parent().tlmType()) {
            case "LOG": {
                this.tlmsw = new EmLogType(this._io, this, _root);
                break;
            }
            case "MN": {
                this.tlmsw = new EmmnType(this._io, this, _root);
                break;
            }
            }
        }
        private String timeStamp;
        private KaitaiStruct tlmsw;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.IFrame _parent;
        public String timeStamp() { return timeStamp; }
        public KaitaiStruct tlmsw() { return tlmsw; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.IFrame _parent() { return _parent; }
    }
    public static class CuType extends KaitaiStruct {
        public static CuType fromFile(String fileName) throws IOException {
            return new CuType(new ByteBufferKaitaiStream(fileName));
        }

        public CuType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public CuType(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent) {
            this(_io, _parent, null);
        }

        public CuType(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timesTamps = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            switch (_parent().tlmType()) {
            case "ONYX SENSOR T": {
                this.tlmsw = new OnyxType(this._io, this, _root);
                break;
            }
            case "LOG": {
                this.tlmsw = new CuLogType(this._io, this, _root);
                break;
            }
            }
        }
        private String timesTamps;
        private KaitaiStruct tlmsw;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.IFrame _parent;
        public String timesTamps() { return timesTamps; }
        public KaitaiStruct tlmsw() { return tlmsw; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.IFrame _parent() { return _parent; }
    }
    public static class A1GyroType extends KaitaiStruct {
        public static A1GyroType fromFile(String fileName) throws IOException {
            return new A1GyroType(new ByteBufferKaitaiStream(fileName));
        }

        public A1GyroType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public A1GyroType(KaitaiStream _io, FrameTlmAmicalsat.A1Type _parent) {
            this(_io, _parent, null);
        }

        public A1GyroType(KaitaiStream _io, FrameTlmAmicalsat.A1Type _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamps = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.giroX = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.giroY = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.giroZ = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String timeStamps;
        private String giroX;
        private String giroY;
        private String giroZ;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.A1Type _parent;
        public String timeStamps() { return timeStamps; }
        public String giroX() { return giroX; }
        public String giroY() { return giroY; }
        public String giroZ() { return giroZ; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.A1Type _parent() { return _parent; }
    }
    public static class A1MagType extends KaitaiStruct {
        public static A1MagType fromFile(String fileName) throws IOException {
            return new A1MagType(new ByteBufferKaitaiStream(fileName));
        }

        public A1MagType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public A1MagType(KaitaiStream _io, FrameTlmAmicalsat.A1Type _parent) {
            this(_io, _parent, null);
        }

        public A1MagType(KaitaiStream _io, FrameTlmAmicalsat.A1Type _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamps = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.magX = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.magY = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.magZ = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String timeStamps;
        private String magX;
        private String magY;
        private String magZ;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.A1Type _parent;
        public String timeStamps() { return timeStamps; }
        public String magX() { return magX; }
        public String magY() { return magY; }
        public String magZ() { return magZ; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.A1Type _parent() { return _parent; }
    }
    public static class A1Type extends KaitaiStruct {
        public static A1Type fromFile(String fileName) throws IOException {
            return new A1Type(new ByteBufferKaitaiStream(fileName));
        }

        public A1Type(KaitaiStream _io) {
            this(_io, null, null);
        }

        public A1Type(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent) {
            this(_io, _parent, null);
        }

        public A1Type(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            switch (_parent().tlmType()) {
            case "FLAGS": {
                this.tlmSw = new A1FlagType(this._io, this, _root);
                break;
            }
            case "MAG": {
                this.tlmSw = new A1MagType(this._io, this, _root);
                break;
            }
            case "GYRO": {
                this.tlmSw = new A1GyroType(this._io, this, _root);
                break;
            }
            case "POSITION": {
                this.tlmSw = new A1PositionType(this._io, this, _root);
                break;
            }
            }
        }
        private KaitaiStruct tlmSw;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.IFrame _parent;
        public KaitaiStruct tlmSw() { return tlmSw; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.IFrame _parent() { return _parent; }
    }
    public static class MsType extends KaitaiStruct {
        public static MsType fromFile(String fileName) throws IOException {
            return new MsType(new ByteBufferKaitaiStream(fileName));
        }

        public MsType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public MsType(KaitaiStream _io, KaitaiStruct _parent) {
            this(_io, _parent, null);
        }

        public MsType(KaitaiStream _io, KaitaiStruct _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.timeStamps = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.currentRssi = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.latchRssi = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.aFCOffset = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private String timeStamps;
        private String currentRssi;
        private String latchRssi;
        private String aFCOffset;
        private FrameTlmAmicalsat _root;
        private KaitaiStruct _parent;
        public String timeStamps() { return timeStamps; }
        public String currentRssi() { return currentRssi; }
        public String latchRssi() { return latchRssi; }
        public String aFCOffset() { return aFCOffset; }
        public FrameTlmAmicalsat _root() { return _root; }
        public KaitaiStruct _parent() { return _parent; }
    }
    public static class LogType extends KaitaiStruct {
        public static LogType fromFile(String fileName) throws IOException {
            return new LogType(new ByteBufferKaitaiStream(fileName));
        }

        public LogType(KaitaiStream _io) {
            this(_io, null, null);
        }

        public LogType(KaitaiStream _io, FrameTlmAmicalsat.M1Type _parent) {
            this(_io, _parent, null);
        }

        public LogType(KaitaiStream _io, FrameTlmAmicalsat.M1Type _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.bootNumber = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.upTime = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.cpuVoltage = new String(this._io.readBytesTerm(59, false, true, true), Charset.forName("ASCII"));
            this.cpuTemperature = new String(this._io.readBytesFull(), Charset.forName("ASCII"));
        }
        private Double cpuVoltageVolt;
        public Double cpuVoltageVolt() {
            if (this.cpuVoltageVolt != null)
                return this.cpuVoltageVolt;
            double _tmp = (double) ((Long.parseLong(cpuVoltage(), 10) / 1000.0));
            this.cpuVoltageVolt = _tmp;
            return this.cpuVoltageVolt;
        }
        private String bootNumber;
        private String upTime;
        private String cpuVoltage;
        private String cpuTemperature;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.M1Type _parent;
        public String bootNumber() { return bootNumber; }
        public String upTime() { return upTime; }
        public String cpuVoltage() { return cpuVoltage; }
        public String cpuTemperature() { return cpuTemperature; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.M1Type _parent() { return _parent; }
    }
    public static class DestCallsignRaw extends KaitaiStruct {
        public static DestCallsignRaw fromFile(String fileName) throws IOException {
            return new DestCallsignRaw(new ByteBufferKaitaiStream(fileName));
        }

        public DestCallsignRaw(KaitaiStream _io) {
            this(_io, null, null);
        }

        public DestCallsignRaw(KaitaiStream _io, FrameTlmAmicalsat.Ax25Header _parent) {
            this(_io, _parent, null);
        }

        public DestCallsignRaw(KaitaiStream _io, FrameTlmAmicalsat.Ax25Header _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this._raw__raw_destCallsignRor = this._io.readBytes(6);
            this._raw_destCallsignRor = KaitaiStream.processRotateLeft(this._raw__raw_destCallsignRor, 8 - (1), 1);
            KaitaiStream _io__raw_destCallsignRor = new ByteBufferKaitaiStream(_raw_destCallsignRor);
            this.destCallsignRor = new DestCallsign(_io__raw_destCallsignRor, this, _root);
        }
        private DestCallsign destCallsignRor;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.Ax25Header _parent;
        private byte[] _raw__raw_destCallsignRor;
        private byte[] _raw_destCallsignRor;
        public DestCallsign destCallsignRor() { return destCallsignRor; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.Ax25Header _parent() { return _parent; }
        public byte[] _raw__raw_destCallsignRor() { return _raw__raw_destCallsignRor; }
        public byte[] _raw_destCallsignRor() { return _raw_destCallsignRor; }
    }
    public static class V1Type extends KaitaiStruct {
        public static V1Type fromFile(String fileName) throws IOException {
            return new V1Type(new ByteBufferKaitaiStream(fileName));
        }

        public V1Type(KaitaiStream _io) {
            this(_io, null, null);
        }

        public V1Type(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent) {
            this(_io, _parent, null);
        }

        public V1Type(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            switch (_parent().tlmType()) {
            case "RL": {
                this.tlmsw = new V1RlType(this._io, this, _root);
                break;
            }
            case "MS": {
                this.tlmsw = new MsType(this._io, this, _root);
                break;
            }
            }
        }
        private KaitaiStruct tlmsw;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.IFrame _parent;
        public KaitaiStruct tlmsw() { return tlmsw; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.IFrame _parent() { return _parent; }
    }
    public static class SrcCallsign extends KaitaiStruct {
        public static SrcCallsign fromFile(String fileName) throws IOException {
            return new SrcCallsign(new ByteBufferKaitaiStream(fileName));
        }

        public SrcCallsign(KaitaiStream _io) {
            this(_io, null, null);
        }

        public SrcCallsign(KaitaiStream _io, FrameTlmAmicalsat.SrcCallsignRaw _parent) {
            this(_io, _parent, null);
        }

        public SrcCallsign(KaitaiStream _io, FrameTlmAmicalsat.SrcCallsignRaw _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            this.srcCallsign = new String(this._io.readBytes(6), Charset.forName("ASCII"));
        }
        private String srcCallsign;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.SrcCallsignRaw _parent;
        public String srcCallsign() { return srcCallsign; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.SrcCallsignRaw _parent() { return _parent; }
    }
    public static class U2Type extends KaitaiStruct {
        public static U2Type fromFile(String fileName) throws IOException {
            return new U2Type(new ByteBufferKaitaiStream(fileName));
        }

        public U2Type(KaitaiStream _io) {
            this(_io, null, null);
        }

        public U2Type(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent) {
            this(_io, _parent, null);
        }

        public U2Type(KaitaiStream _io, FrameTlmAmicalsat.IFrame _parent, FrameTlmAmicalsat _root) {
            super(_io);
            this._parent = _parent;
            this._root = _root;
            _read();
        }
        private void _read() {
            switch (_parent().tlmType()) {
            case "RL": {
                this.tlmsw = new U2RlType(this._io, this, _root);
                break;
            }
            case "MS": {
                this.tlmsw = new MsType(this._io, this, _root);
                break;
            }
            }
        }
        private KaitaiStruct tlmsw;
        private FrameTlmAmicalsat _root;
        private FrameTlmAmicalsat.IFrame _parent;
        public KaitaiStruct tlmsw() { return tlmsw; }
        public FrameTlmAmicalsat _root() { return _root; }
        public FrameTlmAmicalsat.IFrame _parent() { return _parent; }
    }
    private Ax25Frame frameTlmEntrySat;
    private FrameTlmAmicalsat _root;
    private KaitaiStruct _parent;

    /**
     * @see <a href="https://www.tapr.org/pub_ax25.html">Source</a>
     */
    public Ax25Frame frameTlmEntrySat() { return frameTlmEntrySat; }
    public FrameTlmAmicalsat _root() { return _root; }
    public KaitaiStruct _parent() { return _parent; }
}
