-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
40 lines (30 loc) · 1.36 KB
/
Copy pathREADME
File metadata and controls
40 lines (30 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
compile steps (on cs1, cs2, etc)
make
to run our unit tests (on a linux box)
make tests
Notes on serialization:
Every message sent has a corresponding class, all of which derive from the
base Message class. Each message class has two common function:
* serialize() - returns a string representation of the class
* constructor(vector<string>) - deserialization from the string
The socket class has two functions related to messages:
* sendMessage() - calls serialize and sends the string over the socket
* getMessage() - splits the incoming text by whitespace and call the correct
constructor; returns null if the message type of the incoming message is unknown
the first field of a serialized message is always the type of the message
Notes on unit tests:
we used the python-pexpect module to start PCE and router sessions and interact with them.
we included the pexpect-2.3.tar.gz tarball from http://pexpect.sourceforge.net/pexpect-2.3.tar.gz
so that anyone with a UNIX-like system and python could run "make tests"
the Message_test application uses a modified echoserv from:
http://www.paulgriffiths.net/program/c/srcs/echoserv.tar.gz
These files are strictly for our unit tests:
echoserv.cpp
local.cfg
Message_test.cpp
pexpect-2.3.tar.gz
message_test.py
multi_pce_test.py
single_pce_test.py
star_pce_test.py
test_common.py