コード例 #1
0
        public override void Write(BinArgs data)
        {
            int labelAddress = data.Labels.GetLabel(this.labelName);

            int refAddress = labelAddress;

            if (relative)
            {
                refAddress -= (this.VirtAddress + 4);
            }

            BitConverter.GetBytes(refAddress).CopyTo(data, this.RawAddress);
        }
コード例 #2
0
        public override void Activate(ChangeArgs args)
        {
            double  value   = Parent is ValueHeader vHeader ? vHeader.Value : 0;
            BinArgs binArgs = new BinArgs(args.Data, this.Parent.Labels, value);

            foreach (BinElement e in elements)
            {
                if (e is IBinCollection group)
                {
                    foreach (BinElement ge in group.Collection)
                    {
                        ge.Write(binArgs);
                    }
                }
                else
                {
                    e.Write(binArgs);
                }
            }
        }
コード例 #3
0
 public override void Write(BinArgs data)
 {
     byte[] buf = this.GetBytes(factor * data.Value + offset);
     buf.CopyTo(data, this.RawAddress);
 }
コード例 #4
0
 public override void Write(BinArgs data)
 {
     byteBuf.CopyTo(data, this.RawAddress);
 }