Example #1
0
        private void _parse()
        {
            _pduType = ((DlmsPduType)m_io.ReadU1());
            switch (PduType)
            {
            case DlmsPduType.GetResponse: {
                __raw_pdu = m_io.ReadBytesFull();
                var io___raw_pdu = new KaitaiStream(__raw_pdu);
                _pdu = new DlmsGetResponse(io___raw_pdu);
                break;
            }

            case DlmsPduType.EvenNotificationRequest: {
                __raw_pdu = m_io.ReadBytesFull();
                var io___raw_pdu = new KaitaiStream(__raw_pdu);
                _pdu = new DlmsEventNotificationRequest(io___raw_pdu);
                break;
            }

            case DlmsPduType.GetRequest: {
                __raw_pdu = m_io.ReadBytesFull();
                var io___raw_pdu = new KaitaiStream(__raw_pdu);
                _pdu = new DlmsGetRequest(io___raw_pdu);
                break;
            }

            case DlmsPduType.SetResponse: {
                __raw_pdu = m_io.ReadBytesFull();
                var io___raw_pdu = new KaitaiStream(__raw_pdu);
                _pdu = new DlmsSetResponse(io___raw_pdu);
                break;
            }

            case DlmsPduType.ActionResponse: {
                __raw_pdu = m_io.ReadBytesFull();
                var io___raw_pdu = new KaitaiStream(__raw_pdu);
                _pdu = new DlmsActionResponse(io___raw_pdu);
                break;
            }

            case DlmsPduType.SetRequest: {
                __raw_pdu = m_io.ReadBytesFull();
                var io___raw_pdu = new KaitaiStream(__raw_pdu);
                _pdu = new DlmsSetRequest(io___raw_pdu);
                break;
            }

            case DlmsPduType.ActionRequest: {
                __raw_pdu = m_io.ReadBytesFull();
                var io___raw_pdu = new KaitaiStream(__raw_pdu);
                _pdu = new DlmsActionRequest(io___raw_pdu);
                break;
            }

            default: {
                _pdu = m_io.ReadBytesFull();
                break;
            }
            }
        }
 public DlmsEventNotificationRequest(KaitaiStream io, KaitaiStruct parent = null, DlmsEventNotificationRequest root = null) : base(io)
 {
     m_parent = parent;
     m_root   = root ?? this;
     _parse();
 }