Esempio n. 1
0
        SerializeArrayOfMIV(MonitoredItemValue[] mivs)
        {
            int ItemCnt = mivs.Length;
            MemoryStream ms = new MemoryStream();
            BinaryWriter bw = new BinaryWriter(ms);

        }
Esempio n. 2
0
 public Service1()
 {
     for (int currval = 0; currval < CHUNK_SIZE; currval++)
     {
         MonitoredItemValue miv = new MonitoredItemValue();
         miv.RuntimeValue_Variant_Payload = new byte[4];
         miv.RuntimeValue_Timestamp = DateTime.Now;
         miv.Variant_Payload = new byte[4];
         m_values[currval] = miv;
     }
 }
Esempio n. 3
0
        public Service1()
        {
            for (int currval = 0; currval < CHUNK_SIZE; currval++)
            {
                MonitoredItemValue miv = new MonitoredItemValue();
                miv.Item = new ItemIdentity();
                miv.UserData = new Variant();
                miv.UserData.Payload = new byte[4];
                miv.Value = new RuntimeValue();
                miv.Value.Timestamp = DateTime.Now;
                miv.Value.Value = new Variant();
                miv.Value.Value.Payload = new byte[4];
                m_values[currval] = miv;

            }
            BinaryFormatter bf = new BinaryFormatter();
            using (MemoryStream ms = new MemoryStream())
            {
                bf.Serialize(ms, m_values);
                m_buffer = ms.GetBuffer();
            }

        }
Esempio n. 4
0
        public Service1()
        {
            for (int currval = 0; currval < CHUNK_SIZE; currval++)
            {
#if ALL_BLITTABLE
                MonitoredItemValue miv = new MonitoredItemValue();
                miv.RuntimeValue_Variant_Payload = new byte[4];
                miv.RuntimeValue_Timestamp = DateTime.Now;
                miv.Variant_Payload = new byte[4];
                m_values[currval] = miv;
#else
                MonitoredItemValue miv = new MonitoredItemValue();
                miv.Item = new ItemIdentity();
                miv.UserData = new Variant();
                miv.UserData.Payload = new byte[4];
                miv.Value = new RuntimeValue();
                miv.Value.Timestamp = DateTime.Now;
                miv.Value.Value = new Variant();
                miv.Value.Value.Payload = new byte[4];
                m_values[currval] = miv;
#endif
            }
        }