コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="memory"></param>
        /// <param name="stream"></param>
        public static MarshalFixedMemoryBlock RecordDataToLog(this HisDataMemoryBlockCollection3 memory, Stream stream)
        {
            MarshalFixedMemoryBlock mfb = new MarshalFixedMemoryBlock(memory.TagAddress.Count * 12 + 4);

            mfb.WriteInt(0, (int)mfb.Length);
            foreach (var vv in memory.TagAddress)
            {
                mfb.Write(vv.Key);
                mfb.Write(stream.Position);
                RecordToLog2(new IntPtr(memory.ReadDataBaseAddressByIndex(vv.Value)), memory.ReadDataSizeByIndex(vv.Value), stream);
            }
            return(mfb);
        }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="memory"></param>
 public static void MakeMemoryNoBusy(this HisDataMemoryBlockCollection3 memory)
 {
     memory.DecRef();
     LoggerService.Service.Info("MemoryBlock", "make " + memory.Name + " is ready !");
 }