summaryrefslogtreecommitdiff
path: root/cesar/cp/eoc/sta/mgr/test/utest/doc/net.txt
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cp/eoc/sta/mgr/test/utest/doc/net.txt')
-rw-r--r--cesar/cp/eoc/sta/mgr/test/utest/doc/net.txt190
1 files changed, 190 insertions, 0 deletions
diff --git a/cesar/cp/eoc/sta/mgr/test/utest/doc/net.txt b/cesar/cp/eoc/sta/mgr/test/utest/doc/net.txt
new file mode 100644
index 0000000000..3424c2ba52
--- /dev/null
+++ b/cesar/cp/eoc/sta/mgr/test/utest/doc/net.txt
@@ -0,0 +1,190 @@
+Network test
+============
+
+Test the APIs available in the cp_net.
+
+sta_add
+-------
+
+Test 1 : Unassociated STAs
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add some station to the net list and verify the data. The STA are added with a
+TEI null and a known mac address.
+
+The Station shall be added as unassociated stations and be added in the set of
+unassociated stations.
+
+Their status shall be equal to CP_STA_STATE_EXISTS.
+The Mac address shall be set.
+
+Test 2 : Associated STAs
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add some stations to the net list and verify the data. The STA are added with
+a TEI different of any one already present in the Net list.
+
+The mac address is not necessary if the TEI is set, the station status shall
+be equal to CP_STA_STATE_ASSOCIATED.
+
+Test 3 : Authenticated STAs
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add some authenticated stations to the net list. The STAs are added with a TEI
+different of any one already present in the Net list.
+
+The stations status shall be equal to CP_STA_STATE_AUTHENTICATED.
+
+Test 4 : Modifying the CCo in the NET
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add a station authenticated and set it as a CCo in the AVLN.
+
+The station shall be in the CP_STA_STATE_AUTHENTICATED, and the AVLN shall
+have a pointer to this station in the cco variable.
+
+Test 5 : Modifying the PCo in the NET
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add a station authenticated and set it as a PCo in the AVLN.
+
+The station shall be in the CP_STA_STATE_AUTHENTICATED, and the AVLN shall
+have a pointer to this station in the pco variable.
+
+Remove Sta
+----------
+
+Test 1 : Removing a Associated station (not CCo, not PCo)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add some station and remove it.
+At the end the list must be empty.
+
+Test 2 : Removing the CCo station of the net.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add some station in the net list as associated, one of those stations is the
+CCo (TEI = 3 for examples).
+
+At the beginning of the test, the station with the TEI = 3, shall have its
+status cco flag setted and the network has its cco pointer corresponding to
+this station.
+
+At the end, the station shall not exist in the network and the pointer to the
+CCo in the network shall be null.
+The other stations of the AVLN shall remain present.
+
+Test 3 : Removing the PCo Station of the net.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add some station in the net list as associated, one of those stations is the
+PCo (TEI = 3 for examples).
+
+At the beginning of the test, the station with the TEI = 3, shall have its
+status pco flag setted and the network has its pco pointer corresponding to
+this station.
+
+At the end, the station shall not exist in the network and the pointer to the
+PCo in the network shall be null.
+The other stations of the AVLN shall remain present.
+
+Commit to data plane
+--------------------
+
+Add some station to the list and call the commit to data plane function.
+
+The function of the CL have been overwritten in the cl_stub.c file (see in the
+src directory).
+
+It will normally allocate a block and all the station present in the network
+list will be present in it.
+
++-----+-----+-------+
+| Tag | TEI | MAC @ |
++-----+-----+-------+
+
+Garbage
+-------
+
+Verify the expiration date of all the station in the network. It the network
+is empty it shall post an event in the FSM.
+
+Environment
+~~~~~~~~~~~
+
+Add an AVLN and some station with different status.
+
+Three associated and three not associated stations.
+
++-----+-------+-----+-------+-----------+
+| sta | assoc | tei | mac @ | last seen |
++-----+-------+-----+-------+-----------+
+| 1 | false | 0 | 1 | 5 |
++-----+-------+-----+-------+-----------+
+| 2 | false | 0 | 2 | 7 |
++-----+-------+-----+-------+-----------+
+| 3 | false | 0 | 3 | 9 |
++-----+-------+-----+-------+-----------+
+| 4 | true | 1 | 1 | 6 |
++-----+-------+-----+-------+-----------+
+| 5 | true | 2 | 5 | 8 |
++-----+-------+-----+-------+-----------+
+| 6 | true | 3 | 9 | 10 |
++-----+-------+-----+-------+-----------+
+
+Result
+~~~~~~
+
+The station 1 and the station 4 shall be expired and shall not appear in the
+list after the garbage.
+
+The others shall be still present.
+
+Set slot id
+-----------
+
+Add an AVLN and set the slot id to 5.
+
+Result
+ The slot id shall be equal to 5.
+
+Network mode
+------------
+
+This test case shall test the function to set and get the network mode of an
+AVLN.
+
+Net configuration
+ After the initialization of the network the network mode is CSMA-Only.
+ At the second modification the network mode shall be setted to coordinated mode.
+
+Result
+ The network shall be in CSMA only mode at the first read of the network mode.
+ The network shall be in Coordinated mode at the second read.
+
+Set sta visible
+---------------
+
+This function has for job to set the neighbour station as visible allowing to
+increase or decrease the counter of visible stations in the network.
+
+Test 1 : Adding a STA
+~~~~~~~~~~~~~~~~~~~~~
+
+Environment
+ Add a station to the network and set it as visible.
+
+Result
+ The network shall have one station as visible.
+
+Test 2 : Adding two STAs
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Environment
+ Add two station to the AVLN configured as followed :
+
+ * STA 1 : visible
+ * STA 2 : hidden
+
+Result
+ The network shall have two station and only one visible.