[Sumover-dev] [svn commit] r4308 - vic/branches/cc/cc/test

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Mon Nov 10 18:36:00 GMT 2008


Author: soohyunc
Date: Mon Nov 10 18:36:00 2008
New Revision: 4308

Added:
   vic/branches/cc/cc/test/cc_output.cpp   (contents, props changed)

Log:
added simple packet generator


Added: vic/branches/cc/cc/test/cc_output.cpp
==============================================================================
--- (empty file)
+++ vic/branches/cc/cc/test/cc_output.cpp	Mon Nov 10 18:36:00 2008
@@ -0,0 +1,32 @@
+/*
+ * test code for cc_output() method in rtp/session.cpp
+ */
+
+/* $Id$ */
+
+#include "buffer.h"
+
+// pre-define functions
+Buffer gen_packets(int num);
+
+int main() {
+
+	Buffer pktbuf;
+	const int NUMPACK = 10;
+
+	pktbuf = gen_packets (NUMPACK);
+	pktbuf.display();
+
+	return 0;
+}
+
+// generate packets
+Buffer gen_packets (int num) {
+	Buffer buf;
+	int i;
+
+	for (i = 1; i <= num; i++)
+		buf.insert_front(i);
+
+	return buf;
+}



More information about the Sumover-dev mailing list