示例#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;
            }
            }
        }
示例#2
0
 public DlmsSetRequest(KaitaiStream io, KaitaiStruct parent = null, DlmsSetRequest root = null) : base(io)
 {
     m_parent = parent;
     m_root   = root ?? this;
     _parse();
 }
示例#3
0
 public SetRequestWithListAndFirstDatablock(KaitaiStream io, DlmsSetRequest parent = null, DlmsSetRequest root = null) : base(io)
 {
     m_parent = parent;
     m_root   = root;
     _parse();
 }
示例#4
0
 public SetRequestNormal(KaitaiStream io, DlmsSetRequest parent = null, DlmsSetRequest root = null) : base(io)
 {
     m_parent = parent;
     m_root   = root;
     _parse();
 }