Example #1
0
 private void AddUnpackElement(ProtocolFrameElement prfe)
 {
     if (unpack_elements_ == null)
     {
         unpack_elements_ = new List <ProtocolFrameElement>();
     }
     unpack_elements_.Add(prfe);
 }
Example #2
0
        public ProtocolFrameElement_Integer(ProtocolFrameElement parent, string name, uint bitlen, UInt64 value_min, UInt64 value_max, UInt64 value_step, UInt64 value)
            : base(parent, name, bitlen)
        {
            value_min_  = value_min;
            value_max_  = value_max;
            value_step_ = value_step;

            SetUnpackValue(value);
        }
Example #3
0
        public ProtocolFrameElement(ProtocolFrameElement parent, string name, uint pack_bitlen)
        {
            Parent            = parent;
            Name              = name;
            PackDataBitLength = pack_bitlen;

            pack_data_       = new BitData(PackDataBitLength);
            unpack_data_     = pack_data_;
            unpack_elements_ = null;

            if (Parent != null)
            {
                Parent.AddUnpackElement(this);
            }
        }
 public void CreateFrameEvent(DateTime dt_block, DateTime dt_event, ProtocolFrameElement frame)
 {
     AddEvent(new ProtocolDecodeEvent_Frame(this, dt_block, dt_event, frame));
 }
Example #5
0
 public ProtocolFrameElement_Integer(ProtocolFrameElement parent, string name, uint bitlen, UInt64 value)
     : this(parent, name, bitlen, 0, (UInt64)(UInt64.MaxValue >> (int)(64 - bitlen)), 1, value)
 {
 }
 public ProtocolDecodeEvent_Frame(ProtocolDecodeChannel channel, DateTime dt_block, DateTime dt_event, ProtocolFrameElement frame)
     : base(channel, dt_block, dt_event, DecodeEventType.Frame)
 {
     Frame = frame;
 }
 public ProtocolFrameElement_Enum(ProtocolFrameElement parent, string name, uint bitlen, UInt64 value)
     : base(parent, name, bitlen)
 {
     SetUnpackValue(value);
 }
 public ProtocolFrameElement_Enum(ProtocolFrameElement parent, string name, uint bitlen)
     : base(parent, name, bitlen)
 {
     /* Enum型の先頭値を取る */
     SetUnpackValue(Enum.GetValues(typeof(EnumT)).GetValue(0));
 }
Example #9
0
 public ProtocolFrameElement_BitData(ProtocolFrameElement parent, string name, uint bitlen)
     : base(parent, name, bitlen)
 {
     SetUnpackValue(new BitData(bitlen));
 }
Example #10
0
 public ProtocolFrameElement_BitData(ProtocolFrameElement parent, string name, BitData value)
     : this(parent, name, value.Length, value)
 {
     SetUnpackValue(value);
 }
Example #11
0
 public ProtocolFrameElement_BitData(ProtocolFrameElement parent, string name, uint bitlen, BitData value)
     : this(parent, name, bitlen)
 {
     SetUnpackValue(value);
 }