public void AssignStatesAndObservations(RTPSession session, List <Sample> Samples)
 {
     foreach (RTPFrame frame in session.Frames)
     {
         AddFrame(frame, Samples);
     }
 }
Beispiel #2
0
        public static RTPSession Load(string file)
        {
            RTPSession    s         = new RTPSession();
            XmlSerializer formatter = new XmlSerializer(s.GetType());
            FileStream    aFile     = new FileStream(file, FileMode.Open);

            byte[] buffer = new byte[aFile.Length];
            aFile.Read(buffer, 0, (int)aFile.Length);
            MemoryStream stream = new MemoryStream(buffer);

            aFile.Close();
            return((RTPSession)formatter.Deserialize(stream));
        }
Beispiel #3
0
        public static RTPSession LoadPackets(string file)
        {
            RTPSession s      = new RTPSession();
            var        reader = new StreamReader(file);

            while (!reader.EndOfStream)
            {
                string   line   = reader.ReadLine();
                string[] values = line.Split(' ');

                s.Add(new RTPPacket(values));
            }
            reader.Close();
            return(s);
        }