Esempio n. 1
0
        public void CurrConfigDataFrameTest068()
        {
            bool result = false;

            try
            {
                var data = Data();
                DSO.DataFrames.DSO068.CurrConfigDataFrame config = new DataFrames.DSO068.CurrConfigDataFrame(Data());
                result = true;
            }
            catch (InvalidDataFrameException)
            {
            }
            Assert.AreEqual(true, result);
        }
Esempio n. 2
0
 private DataFrame ReturnFrame(Type FrameType, byte[] buffer)
 {
     if (FrameType == typeof(DataFrames.DSO068.CurrConfigDataFrame))
     {
         DataFrames.DSO068.CurrConfigDataFrame CurrConfig = new DataFrames.DSO068.CurrConfigDataFrame(buffer);
         return(CurrConfig);
     }
     else if (FrameType == typeof(DataFrames.DSO112.CurrConfigDataFrame))
     {
         DataFrames.DSO112.CurrConfigDataFrame CurrParam = new DataFrames.DSO112.CurrConfigDataFrame(buffer);
         return(CurrParam);
     }
     else if (FrameType == typeof(CurrParamDataFrame))
     {
         CurrParamDataFrame CurrParam = new CurrParamDataFrame(buffer);
         return(CurrParam);
     }
     else if (FrameType == typeof(DataBlockDataFrame))
     {
         DataBlockDataFrame CurrData = new DataBlockDataFrame(buffer);
         return(CurrData);
     }
     else if (FrameType == typeof(DataSampleDataFrame))
     {
         DataSampleDataFrame CurrData = new DataSampleDataFrame(buffer);
         return(CurrData);
     }
     else if (FrameType == typeof(DataFrames.ScopeControlDataFrames.ScopeReady))
     {
         DataFrames.ScopeControlDataFrames.ScopeReady ready = new DataFrames.ScopeControlDataFrames.ScopeReady(buffer);
         return(ready);
     }
     else
     {
         throw new InvalidOperationException("Wrong object type");
     }
 }