Esempio n. 1
0
 public CPacketItem(CPacketStruct parent = null)
 {
     Init("Undefined", "uchar", 1, "", parent);
     _parent     = parent;
     _bitItems   = new BitItemCollection(this);
     this.Length = 1;
     InitValues  = new String[] { "0" };
 }
Esempio n. 2
0
        void Init(String name, String type, int length, string comment, CPacketStruct parent)
        {
            this._parent  = parent;
            this._nameStr = name;
            if (length == 0)
            {
                throw new Exception("CPacketItem:: it's length cannot be 0!!");
            }
            //_size = length;

            _bitItems = new BitItemCollection(this);

            SetType(type, true);
            Length = length;
            //this.TypeString = type;
            _comment = comment;
        }