summaryrefslogtreecommitdiff
path: root/cesar/test_general/station
diff options
context:
space:
mode:
authorNélio Laranjeiro2011-09-27 15:05:50 +0200
committerNélio Laranjeiro2011-11-28 17:12:22 +0100
commita6741e1577df5a16c64b56ee8f4f469465c98651 (patch)
treec785c19554f68b251af9dbad384ff4a4508f32e5 /cesar/test_general/station
parent69f401320dfda8a8ad730c7617c9685a3472ac95 (diff)
cesar/test_general/station/cco/s1: remove old useless test.
Those tests are tested N times by others scenario scripts.
Diffstat (limited to 'cesar/test_general/station')
-rw-r--r--cesar/test_general/station/cco0/s1/Config2
-rw-r--r--cesar/test_general/station/cco0/s1/Makefile14
-rw-r--r--cesar/test_general/station/cco0/s1/doc/Makefile29
-rw-r--r--cesar/test_general/station/cco0/s1/doc/scenario_1.msc11
-rw-r--r--cesar/test_general/station/cco0/s1/doc/scenario_2.msc17
-rw-r--r--cesar/test_general/station/cco0/s1/doc/scenario_3.msc22
-rw-r--r--cesar/test_general/station/cco0/s1/doc/scenario_4.msc19
-rw-r--r--cesar/test_general/station/cco0/s1/doc/scenario_5.msc20
-rw-r--r--cesar/test_general/station/cco0/s1/doc/scenario_6.msc24
-rw-r--r--cesar/test_general/station/cco0/s1/doc/scenario_7.msc33
-rw-r--r--cesar/test_general/station/cco0/s1/doc/scenario_8.msc37
-rw-r--r--cesar/test_general/station/cco0/s1/doc/test-plan.txt106
-rw-r--r--cesar/test_general/station/cco0/s1/ecos.ecc.sh5
-rw-r--r--cesar/test_general/station/cco0/s1/py/cm_unassociated_sta.py160
-rw-r--r--cesar/test_general/station/cco0/s1/py/init.py90
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc11_three_sta_one_deactivate.py275
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc15_full_traffic_two_sta.py61
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc1_one_sta_mac_start.py111
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc1_one_sta_mac_start_cco_pref.py110
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc2_two_sta_assoc.py90
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc2_two_sta_assoc_one_cco_pref.py94
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc3_two_sta_communication.py53
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc6_three_sta_assoc.py175
-rw-r--r--cesar/test_general/station/cco0/s1/py/sc7_three_sta_communication.py369
-rw-r--r--cesar/test_general/station/cco0/s2/py/sc02_five_stations.py82
-rw-r--r--cesar/test_general/station/cco0/s2/py/sc03_ten_stations.py88
26 files changed, 0 insertions, 2097 deletions
diff --git a/cesar/test_general/station/cco0/s1/Config b/cesar/test_general/station/cco0/s1/Config
deleted file mode 100644
index ff5bdc3671..0000000000
--- a/cesar/test_general/station/cco0/s1/Config
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_TRACE = y
-CONFIG_TRACE_ON_FATAL = y
diff --git a/cesar/test_general/station/cco0/s1/Makefile b/cesar/test_general/station/cco0/s1/Makefile
deleted file mode 100644
index 5f9309c249..0000000000
--- a/cesar/test_general/station/cco0/s1/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-BASE = ../../../..
-ECOS = y
-
-TARGET_PROGRAMS= cco0s1
-
-cco0s1_SOURCES =
-cco0s1_MODULES = lib mac/common mac cl hle interface cp hal station \
- host cp/av bsu \
- test_general/station/fcall \
- test_general/station/common ce/stub
-
-include $(BASE)/common/make/top.mk
-
-$(call src2obj,src/region_stub.c,target): $(BASE)/cp/fsm/fsm.h
diff --git a/cesar/test_general/station/cco0/s1/doc/Makefile b/cesar/test_general/station/cco0/s1/doc/Makefile
deleted file mode 100644
index 4e22f6c448..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-PAGES= test-plan.txt
-MSC = scenario_1.msc scenario_2.msc scenario_3.msc scenario_4.msc \
- scenario_5.msc scenario_6.msc scenario_7.msc scenario_8.msc
-
-ODT=$(PAGES:%.txt=%.odt)
-HTML=$(PAGES:%.txt=%.html)
-PNG=$(MSC:%.msc=%.png)
-
-all: $(ODT) $(HTML) $(PNG)
-
-odt: $(ODT)
-
-html: $(HTML)
-
-png: $(PNG)
-
-%.odt: %.txt
- rst2odt.py $< $@
-
-%.html: %.txt
- rst2html $< $@
-
-%.png: %.msc
- mscgen -T png -i $< -o $@
-
-clean:
- rm -f $(ODT)
- rm -f $(HTML)
- rm -f $(PNG)
diff --git a/cesar/test_general/station/cco0/s1/doc/scenario_1.msc b/cesar/test_general/station/cco0/s1/doc/scenario_1.msc
deleted file mode 100644
index 3cb4b54bed..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/scenario_1.msc
+++ /dev/null
@@ -1,11 +0,0 @@
-# One station alone in the AVLN. It shall become UCCo and send a discover
-# beacon.
-
-msc
-{
-STA, AVLN;
-
-STA -> STA [label = "Power On Detect"];
---- [label = "Power on passed, nothing heard on the medium"];
-STA -> AVLN [label = "Send discover beacon"];
-}
diff --git a/cesar/test_general/station/cco0/s1/doc/scenario_2.msc b/cesar/test_general/station/cco0/s1/doc/scenario_2.msc
deleted file mode 100644
index 184c564069..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/scenario_2.msc
+++ /dev/null
@@ -1,17 +0,0 @@
-# Two station tries an association.
-
-msc
-{
-STA1, STA2;
-
-STA1 -> STA1 [label = "Power on detect"];
-STA2 -> STA2 [label = "Power on detect"];
---- [label = "Station 1 beacomes UCCo cause of the Seed"];
-STA1 -> STA2 [label = "Discover beacon"];
-STA2 -> STA1 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA1 -> STA1 [label = "Become CCo, Get TEI = 1"];
-STA1 -> STA2 [label = "CC_ASSOC.CNF (Granted, TEI = 2)"];
-STA2 -> STA1 [label = "CM_GET_KEY.REQ (PID = 0)"];
-STA1 -> STA2 [label = "CM_GET_KEY.CNF"];
---- [label = "Test ended"];
-}
diff --git a/cesar/test_general/station/cco0/s1/doc/scenario_3.msc b/cesar/test_general/station/cco0/s1/doc/scenario_3.msc
deleted file mode 100644
index d6e1afe940..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/scenario_3.msc
+++ /dev/null
@@ -1,22 +0,0 @@
-# Two station sending data.
-
-msc
-{
-STA1, STA2;
-
-STA1 -> STA1 [label = "Power on detect"];
-STA2 -> STA2 [label = "Power on detect"];
---- [label = "Station 1 beacomes UCCo cause of the Seed"];
-STA1 -> STA2 [label = "Discover beacon"];
-STA2 -> STA1 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA1 -> STA1 [label = "Become CCo, Get TEI = 1"];
-STA1 -> STA2 [label = "CC_ASSOC.CNF (Granted, TEI = 2)"];
-STA2 -> STA1 [label = "CM_GET_KEY.REQ (PID = 0)"];
-STA1 -> STA2 [label = "CM_GET_KEY.CNF"];
---- [label = "Communication part"];
-STA2 -> STA1 [label = "Send a Ethernet packet"];
-STA1 -> STA2 [label = "Send a Ethernet packet"];
---- [label = "In the next script"];
-STA1 -> STA2 [label = "Send a Ethernet packet"];
-STA1 -> STA2 [label = "Send a Ethernet packet"];
-}
diff --git a/cesar/test_general/station/cco0/s1/doc/scenario_4.msc b/cesar/test_general/station/cco0/s1/doc/scenario_4.msc
deleted file mode 100644
index d9e57b05df..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/scenario_4.msc
+++ /dev/null
@@ -1,19 +0,0 @@
-# Two station sending data.
-
-msc
-{
-STA1, STA2;
-
-STA1 -> STA1 [label = "Power on detect"];
-STA2 -> STA2 [label = "Power on detect"];
---- [label = "Station 2 beacomes UCCo cause of the Seed"];
-STA2 -> STA1 [label = "Discover beacon"];
-STA1 -> STA2 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA2 -> STA2 [label = "Become CCo, Get TEI = 1"];
-STA2 -> STA1 [label = "CC_ASSOC.CNF (Granted, TEI = 2)"];
-STA1 -> STA2 [label = "CM_GET_KEY.REQ (PID = 0)"];
-STA2 -> STA1 [label = "CM_GET_KEY.CNF"];
---- [label = "Communication part"];
-STA1 -> STA2 [label = "Send CC_WHO_RU.REQ"];
-STA2 -> STA1 [label = "CC_WHO_RU.CNF (AVLN1)"];
-}
diff --git a/cesar/test_general/station/cco0/s1/doc/scenario_5.msc b/cesar/test_general/station/cco0/s1/doc/scenario_5.msc
deleted file mode 100644
index 2bcdffb7f4..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/scenario_5.msc
+++ /dev/null
@@ -1,20 +0,0 @@
-# Two station sending data.
-
-msc
-{
-STA1, STA2;
-
-STA1 -> STA1 [label = "Power on detect"];
-STA2 -> STA2 [label = "Power on detect"];
---- [label = "Station 2 beacomes UCCo cause of the Seed"];
-STA1 -> STA2 [label = "Discover beacon"];
-STA2 -> STA1 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA1 -> STA1 [label = "Become CCo, Get TEI = 1"];
-STA1 -> STA2 [label = "CC_ASSOC.CNF (Granted, TEI = 2)"];
-STA2 -> STA1 [label = "CM_GET_KEY.REQ (PID = 0)"];
-STA1 -> STA2 [label = "CM_GET_KEY.CNF"];
---- [label = "Communication part"];
-STA2 -> STA1 [label = "Send CC_LEAVE.REQ"];
-STA1 -> STA2 [label = "CC_LEAVE.CNF)"];
---- [label = "The station 1 keeps the CCo status for 1 second"];
-}
diff --git a/cesar/test_general/station/cco0/s1/doc/scenario_6.msc b/cesar/test_general/station/cco0/s1/doc/scenario_6.msc
deleted file mode 100644
index 8597fd2d70..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/scenario_6.msc
+++ /dev/null
@@ -1,24 +0,0 @@
-# Three station sending data.
-
-msc
-{
-STA1, STA2, STA3, bcast;
-
-STA1 -> STA1 [label = "Power on detect"];
-STA2 -> STA2 [label = "Power on detect"];
-STA3 -> STA3 [label = "Power on detect"];
---- [label = "Station 2 beacomes UCCo cause of the Seed"];
-STA2 -> STA1 [label = "Discover beacon"];
-STA1 -> STA2 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA2 -> STA2 [label = "Become CCo, Get TEI = 1"];
-STA2 -> STA1 [label = "CC_ASSOC.CNF (Granted, TEI = 2)"];
-STA3 -> STA2 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA2 -> STA3 [label = "CC_ASSOC.CNF (Granted, TEI = 3)"];
-STA2 -> STA3 [label = "CC_SET_TEI_MAP.IND (UPDATE)"];
-STA2 -> bcast [label = "CC_SET_TEI_MAP.IND (ADD)"];
-STA3 -> STA2 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.REQ (PID = 0))"];
-STA2 -> STA3 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.CNF)"];
-STA1 -> STA2 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.REQ (PID = 0))"];
-STA2 -> STA1 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.CNF)"];
---- [label = "Test end, verify the station state"];
-}
diff --git a/cesar/test_general/station/cco0/s1/doc/scenario_7.msc b/cesar/test_general/station/cco0/s1/doc/scenario_7.msc
deleted file mode 100644
index af718d2abe..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/scenario_7.msc
+++ /dev/null
@@ -1,33 +0,0 @@
-# Three station sending data.
-
-msc
-{
-STA1, STA2, STA3, bcast;
-
-STA1 -> STA1 [label = "Power on detect"];
-STA2 -> STA2 [label = "Power on detect"];
-STA3 -> STA3 [label = "Power on detect"];
---- [label = "Station 2 beacomes UCCo cause of the Seed"];
-STA2 -> STA1 [label = "Discover beacon"];
-STA1 -> STA2 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA2 -> STA2 [label = "Become CCo, Get TEI = 1"];
-STA2 -> STA1 [label = "CC_ASSOC.CNF (Granted, TEI = 2)"];
-STA3 -> STA2 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA2 -> STA3 [label = "CC_ASSOC.CNF (Granted, TEI = 3)"];
-STA2 -> STA3 [label = "CC_SET_TEI_MAP.IND (UPDATE)"];
-STA2 -> bcast [label = "CC_SET_TEI_MAP.IND (ADD)"];
-STA3 -> STA2 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.REQ (PID = 0))"];
-STA2 -> STA3 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.CNF)"];
-STA1 -> STA2 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.REQ (PID = 0))"];
-STA2 -> STA1 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.CNF)"];
---- [label = "Starting transmitting data"];
-STA3 -> bcast [label = "Send Data packet, EKS = 0"];
-STA1 -> bcast [label = "Send Data packet, EKS = 0"];
---- [label = "Bcast packet done to indicate that the station are authenticate"];
-STA3 -> STA2 [label = "Send Data packet, EKS = 0"];
-STA3 -> STA1 [label = "Send Data packet, EKS = 0"];
-STA1 -> STA2 [label = "Send Data packet, EKS = 0"];
-STA1 -> STA3 [label = "Send Data packet, EKS = 0"];
-STA2 -> STA1 [label = "Send Data packet, EKS = 0"];
-STA2 -> STA3 [label = "Send Data packet, EKS = 0"];
-}
diff --git a/cesar/test_general/station/cco0/s1/doc/scenario_8.msc b/cesar/test_general/station/cco0/s1/doc/scenario_8.msc
deleted file mode 100644
index a4e22d36a3..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/scenario_8.msc
+++ /dev/null
@@ -1,37 +0,0 @@
-# Three station sending data.
-
-msc
-{
-STA1, STA2, STA3, bcast;
-
-STA1 -> STA1 [label = "Power on detect"];
-STA2 -> STA2 [label = "Power on detect"];
-STA3 -> STA3 [label = "Power on detect"];
---- [label = "Station 2 beacomes UCCo cause of the Seed"];
-STA2 -> STA1 [label = "Discover beacon"];
-STA1 -> STA2 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA2 -> STA2 [label = "Become CCo, Get TEI = 1"];
-STA2 -> STA1 [label = "CC_ASSOC.CNF (Granted, TEI = 2)"];
-STA3 -> STA2 [label = "CC_ASSOC.REQ (join = NEW)"];
-STA2 -> STA3 [label = "CC_ASSOC.CNF (Granted, TEI = 3)"];
-STA2 -> STA3 [label = "CC_SET_TEI_MAP.IND (UPDATE)"];
-STA2 -> bcast [label = "CC_SET_TEI_MAP.IND (ADD)"];
-STA3 -> STA2 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.REQ (PID = 0))"];
-STA2 -> STA3 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.CNF)"];
-STA1 -> STA2 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.REQ (PID = 0))"];
-STA2 -> STA1 [label = "CM_ENC_PAYLOAD.IND (CM_GET_KEY.CNF)"];
---- [label = "Starting transmitting data"];
-STA3 -> bcast [label = "Send Data packet, EKS = 0"];
-STA1 -> bcast [label = "Send Data packet, EKS = 0"];
---- [label = "Bcast packet done to indicate that the station are authenticate"];
-STA3 -> STA2 [label = "Send Data packet, EKS = 0"];
-STA3 -> STA1 [label = "Send Data packet, EKS = 0"];
-STA1 -> STA2 [label = "Send Data packet, EKS = 0"];
-STA1 -> STA3 [label = "Send Data packet, EKS = 0"];
-STA2 -> STA1 [label = "Send Data packet, EKS = 0"];
-STA2 -> STA3 [label = "Send Data packet, EKS = 0"];
---- [label = "Few time later"];
-STA3 -> STA2 [label = "CC_LEAVE.REQ"];
-STA2 -> STA3 [label = "CC_LEAVE.CNF"];
-STA2 -> bcast [label = "CC_SET_TEI_MAP.IND"];
-}
diff --git a/cesar/test_general/station/cco0/s1/doc/test-plan.txt b/cesar/test_general/station/cco0/s1/doc/test-plan.txt
deleted file mode 100644
index 5284282562..0000000000
--- a/cesar/test_general/station/cco0/s1/doc/test-plan.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-.. contents:: Table of Contents
-
-The test shall be realised with the station present in the directory
-test_general/station/cco0/s1.
-
-.. Hint:: For more details, compile the Makefile in /trunk/cesar/test_general/station/cco0/s1/doc.
-
- The scenario of the tests are described in the msc files which produce png picture once interpreted with mscgen.
-
- Or using wireshark, and displaying the flow with the analysis tool.
-
-Initialisation
-==============
-
-The objective is to verify the initialisation of a full station.
-The station will receive the following MME Driver to be configured.
-
- * DRV_STA_SET_MAC_ADDR_REQ
- * DRV_STA_SET_CCO_PREF_REQ
- * DRV_STA_SET_WAS_CCO_REQ
- * DRV_STA_SET_SL_REQ
- * DRV_STA_SET_M_STA_HFID_REQ
- * DRV_STA_SET_AVLN_HFID_REQ
- * DRV_STA_SET_U_STA_HFID_REQ
- * DRV_STA_SET_TONEMASK_REQ
- * DRV_STA_START_REQ
- * DRV_STA_STOP_REQ
-
-The station shall answer to each one in order to receive the next one.
-The python test 'init.py' verifies at the end that the data provided by the
-DRV MME have been kept and stored by the station.
-
-Mac Start
-=========
-
-Description
------------
-
-The mac start MME driver has for job to request the station to start listening
-the medium by entering in the Power On detect procedure.
-
-For that the station shall:
-
- * Create default schedules.
- * Activate the Mac layer.
-
-Create default schedules:
-
- The defaults schedules are provided to the Channel Access, this will allow
- the CA to listen the medium. The beacon module has this charge, it also
- program a timer (Leon timer) to be awaken before the defaults schedules ends
- (3 * 4095 ATU), this will post an event in the FSM which will normally
- request the beacon module to create defaults schedules again.
-
-Activate the Mac layer:
-
- The activation of the Mac layer will allow the station to listen in a first
- time what is being transmitted on the medium. During the Power On detect
- procedure it will listen the medium (2 seconds if the station was CCo at the
- last boot or 4 seconds if it was a simple station) searching for a central
- beacon of the same NID.
-
-Result
-------
-
-The result of this test shall ends with the station passing to the UCCo state
-and emitting a discover beacon over the medium. The UCCo state is only valid
-if there are no others AVLN on the medium (which is the case of this test). If
-another AVLN is present the station shall become a USTA.
-
-Two Station
-===========
-
-Description
------------
-
-.. HINT::
- The two station have the same NID.
-
-First step:
- This test shall use two stations, one of those shall become UCCo and the other
- one shall become USTA.
-
-Second step:
- The USTA shall try to associate with the UCCo, as it have the same NID the
- UCCo will associate the station and provide a TEI to it.
-
-Result
-------
-
-1. The UCCo becomes CCo.
-
-2. The USTA becomes a STA.
-
-3. The Station shall send a CC_ASSOC.REQ to the CCo.
-
-4. The CCO shall provide a TEI to the station and answer with a CC_ASSOC.CNF
- and send the CC_SET_TEI_MAP.IND to the station.
-
-5. The station shall send a CC_ENCRYPTED_PAYLOAD.IND encapsulating a
- CM_GET_KEY.REQ to the CCo.
-
-6. The CCo shall answer with a CC_ENCRYPTED_PAYLOAD.IND encapsulating a
- CM_GET_KEY.CNF to the station with the neks.
-
-The station is now able to send data to the CCo on the medium.
diff --git a/cesar/test_general/station/cco0/s1/ecos.ecc.sh b/cesar/test_general/station/cco0/s1/ecos.ecc.sh
deleted file mode 100644
index e0278271fe..0000000000
--- a/cesar/test_general/station/cco0/s1/ecos.ecc.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-config=${1:-ecos-gen.ecc}
-ecosconfig --config=$config new maximus default
-cat >> $config <<'EOF'
-EOF
-ecosconfig --config=$config check
diff --git a/cesar/test_general/station/cco0/s1/py/cm_unassociated_sta.py b/cesar/test_general/station/cco0/s1/py/cm_unassociated_sta.py
deleted file mode 100644
index 8db6f6abc0..0000000000
--- a/cesar/test_general/station/cco0/s1/py/cm_unassociated_sta.py
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Two station with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective: Two station which starts at the same time, One will become #
-# the CCo the other one shall become an unassociated station. #
-# At this point the station shall try an association with the #
-# CCo. #
-# Hint: The two station does not have the same NID. #
-##############################################################################
-
-import sys
-sys.path.append('../../../../maximus/python/obj');
-sys.path.append('../../../../maximus/python');
-sys.path.append('../../../../maximus/python/lib/cesar');
-
-from interface import *
-from string import *
-from struct import *
-from maximus import *
-from sta_cesar import STACesar
-from own_data import Station_own_data
-from sniffer import *
-from sta_mgr import *
-
-import unittest
-
-def ms_to_tck (ms):
- return (ms * 25000)
-
-def my_mpdu_filter(mpdu):
- if mpdu.get_type() is 'PHY_TYPE_MPDU_PAYLOAD':
- # The received object is an MPDU
- return True
- else:
- return False
-
-
-# Initialise Maximus with the station.
-maximus = Maximus()
-maximus.init (sys.argv + ['-e', './obj/cco0s1.elf'])
-
-# Configure the first station.
-sta1_conf = Config ()
-sta1_conf.mac_address = (0x10, 0x11, 0x12, 0x13, 0x14, 0x15)
-sta1_conf.cco_preference = False
-sta1_conf.was_cco = False
-sta1_conf.npw = "HomePlugAV0123"
-sta1_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta1_conf.m_sta_hfid = "HPAV_STATION"
-sta1_conf.u_sta_hfid = "STA1"
-sta1_conf.avln_hfid = "AVLN1"
-sta1_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta1_conf.sl = 1
-sta1_conf.snid = None
-
-# Configure the second station.
-sta2_conf = Config ()
-sta2_conf.mac_address = (0x20, 0x21, 0x22, 0x23, 0x24, 0x25)
-sta2_conf.cco_preference = False
-sta2_conf.was_cco = False
-sta2_conf.npw = "Spidcom-SPC300"
-sta2_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta2_conf.m_sta_hfid = "HPAV_STATION"
-sta2_conf.u_sta_hfid = "STA2"
-sta2_conf.avln_hfid = "AVLN1"
-sta2_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta2_conf.sl = 1
-sta2_conf.snid = None
-
-# Create the station
-print ""
-print "Starting the test ..."
-sta1 = STACesar (maximus, config=sta1_conf, mme_buffer_nb=1, debug=False, config_mode="MME", seed=1224)
-sta2 = STACesar (maximus, config=sta2_conf, mme_buffer_nb=1, debug=False, config_mode="MME", seed=2345)
-
-# Activate the Sniffer module only for the MMEs.
-sta1_sniffer = sniffer ()
-sta1_sniffer.activate_mme (maximus, sta1, sta1_conf.mac_address)
-
-
-while (maximus.get_date () < 240000000):
- wait = ms_to_tck (1000)
- maximus.wait (wait)
-
-class TestInitFunctions(unittest.TestCase):
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testAuthenticateSta1(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta1)
-
- self.failUnless (data.mac_address == sta1_conf.mac_address)
- self.failUnless (data.cco_prefered == sta1_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta1_conf.was_cco)
- self.failUnless (data.npw == sta1_conf.npw)
- self.failUnless (data.dpw == sta1_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta1_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta1_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta1_conf.sl)
- self.failUnless (data.tei == 0)
- self.failUnless (data.authenticated == 0)
- self.failUnless (data.is_cco == 0)
- nid = data.nid;
- snid = data.snid;
-
- def testAuthenticateSta2(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta2)
-
- self.failUnless (data.mac_address == sta2_conf.mac_address)
- self.failUnless (data.cco_prefered == sta2_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta2_conf.was_cco)
- self.failUnless (data.npw == sta2_conf.npw)
- self.failUnless (data.dpw == sta2_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta2_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta2_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta2_conf.sl)
- self.failUnless (data.tei == 0)
- self.failUnless (data.authenticated == 0)
- self.failUnless (data.is_cco == 0)
-
- def teststa1instamgrsta2(self):
- # verify if the station 2 is present in the station manager of the
- # station 1.
- my_sta_mgr = Sta_mgr ()
- my_sta_mgr.get_unassoc_sta (maximus, sta2, 0, 0x184e35a5cb6b02, 0x151413121110)
-
- self.failUnless (my_sta_mgr.tei == 0)
-
- def teststa2instamgrsta1(self):
- # verify if the station 2 is present in the station manager of the
- # station 1.
- my_sta_mgr = Sta_mgr ()
- my_sta_mgr.get_unassoc_sta (maximus, sta1, 0, 0x15c4110f87b14f, 0x252423222120)
-
- self.failUnless (my_sta_mgr.tei == 0)
-
-suite = unittest.TestLoader().loadTestsFromTestCase(TestInitFunctions)
-
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-# Delete the station.
-print "Removing STA 1 ..."
-sta1.remove()
-print "Removing STA 2 ..."
-sta2.remove()
-
-
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s1/py/init.py b/cesar/test_general/station/cco0/s1/py/init.py
deleted file mode 100644
index d10c0d5246..0000000000
--- a/cesar/test_general/station/cco0/s1/py/init.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Initialisation test of the station #
-# ----------------------------------------------------------------------- #
-# #
-# Objective of this test is to provide a script which verifies that the #
-# station is correctly initialised to communicate between all the layers. #
-##############################################################################
-
-import sys
-sys.path.append('../../../../maximus/python/obj');
-sys.path.append('../../../../maximus/python');
-sys.path.append('../../../../maximus/python/lib/cesar');
-
-from interface import *
-from string import *
-from struct import *
-from maximus import *
-from sta_cesar import STACesar
-from own_data import Station_own_data
-
-import unittest
-
-# Initialise Maximus with the station.
-maximus = Maximus()
-maximus.init (sys.argv + ['-e', './obj/cco0s1.elf'])
-
-class TestInitFunctions(unittest.TestCase):
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testconfig (self):
- # Configure the first station.
- conf_sta = Config ()
- conf_sta.mac_address = (0x11, 0x21, 0x31, 0x41, 0x51, 0x61)
- conf_sta.cco_preference = True
- conf_sta.was_cco = True
- conf_sta.npw = "HomePlugAV0123"
- conf_sta.dpw = "STATION_DEVICE_PASSWORD"
- conf_sta.m_sta_hfid = "HPAV_STATION"
- conf_sta.u_sta_hfid = "STA1_CCO"
- conf_sta.avln_hfid = "AVLN1"
- conf_sta.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
- conf_sta.sl = 1
- conf_sta.snid = None
-
- # Create the station
- sta = STACesar (maximus, config=conf_sta, mme_buffer_nb=1, debug=False, config_mode="MME", seed = 0x1234)
-
- # Wait for 1 000 000.
- maximus.wait (10000)
-
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta)
-
- self.failUnless (data.mac_address == conf_sta.mac_address)
- self.failUnless (data.cco_prefered == conf_sta.cco_preference)
- self.failUnless (data.was_cco == conf_sta.was_cco)
- self.failUnless (data.npw == conf_sta.npw)
- self.failUnless (data.dpw == conf_sta.dpw)
- self.failUnless (data.hfid_manufacturer == conf_sta.m_sta_hfid)
- self.failUnless (data.hfid_user == conf_sta.u_sta_hfid)
- self.failUnless (data.security_level == conf_sta.sl)
-
- sta.stop()
- # Sends a fcall to uninit the station.
- fcall = maximus.create_fcall ("fc_cesar_uninit")
- fcall.set_sta (sta.get())
- fcall.send()
-
- # Check the memory state.
- fcall = maximus.create_fcall ("fc_memory_state")
- fcall.set_sta (sta.get())
- fcall.send()
- result = fcall.bind_param_ushort ("result")
- self.failUnless (result == True);
-
- # Delete the station.
- sta.remove()
-
-suite = unittest.TestLoader().loadTestsFromTestCase(TestInitFunctions)
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s1/py/sc11_three_sta_one_deactivate.py b/cesar/test_general/station/cco0/s1/py/sc11_three_sta_one_deactivate.py
deleted file mode 100644
index c34d3c5aaa..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc11_three_sta_one_deactivate.py
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Three station with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective: Three station which starts at the same time, one will become #
-# the CCo the other one shall become an unassociated station. #
-# At this point the station shall try an association with the #
-# CCo. #
-# Hint: The two station have the same NID. #
-##############################################################################
-
-import sys
-sys.path.append('../../../../maximus/python/obj');
-sys.path.append('../../../../maximus/python');
-sys.path.append('../../../../maximus/python/lib/cesar');
-
-from interface import *
-from string import *
-from struct import *
-from maximus import *
-from sta_cesar import STACesar
-from own_data import Station_own_data
-from sniffer import *
-
-import unittest
-
-def ms_to_tck (ms):
- return int(ms * 25000)
-
-def data_msdu_filter (msdu):
- if msdu.get_type () is 'ETHERNET_TYPE_DATA':
- # The received object is an MSDU
- return True
- else:
- return False
-
-s1_deb = False
-s2_deb = False
-s3_deb = False
-
-sta1_mac_addr = '10:11:12:13:14:15'
-sta2_mac_addr = '20:21:22:23:24:25'
-sta3_mac_addr = '30:31:32:33:34:35'
-
-# Initialise Maximus with the station.
-maximus = Maximus()
-maximus.init (sys.argv + ['-e', './obj/cco0s1.elf'])
-
-# Configure the first station.
-sta1_conf = Config ()
-sta1_conf.mac_address = (0x10, 0x11, 0x12, 0x13, 0x14, 0x15)
-sta1_conf.cco_preference = False
-sta1_conf.was_cco = False
-sta1_conf.npw = "HomePlugAV0123"
-sta1_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta1_conf.m_sta_hfid = "HPAV_STATION"
-sta1_conf.u_sta_hfid = "STA1"
-sta1_conf.avln_hfid = "AVLN1"
-sta1_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta1_conf.sl = 1
-sta1_conf.snid = None
-
-# Configure the second station.
-sta2_conf = Config ()
-sta2_conf.mac_address = (0x20, 0x21, 0x22, 0x23, 0x24, 0x25)
-sta2_conf.cco_preference = False
-sta2_conf.was_cco = False
-sta2_conf.npw = "HomePlugAV0123"
-sta2_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta2_conf.m_sta_hfid = "HPAV_STATION"
-sta2_conf.u_sta_hfid = "STA2"
-sta2_conf.avln_hfid = "AVLN1"
-sta2_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta2_conf.sl = 1
-sta2_conf.snid = None
-
-# Configure the third station.
-sta3_conf = Config ()
-sta3_conf.mac_address = (0x30, 0x31, 0x32, 0x33, 0x34, 0x35)
-sta3_conf.cco_preference = False
-sta3_conf.was_cco = False
-sta3_conf.npw = "HomePlugAV0123"
-sta3_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta3_conf.m_sta_hfid = "HPAV_STATION"
-sta3_conf.u_sta_hfid = "STA3"
-sta3_conf.avln_hfid = "AVLN1"
-sta3_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta3_conf.sl = 1
-sta3_conf.snid = None
-
-# Create the station
-print ""
-print "Starting the test ..."
-sta1 = STACesar (maximus, config=sta1_conf, mme_buffer_nb=1, debug=s1_deb, config_mode="MME", seed=1224)
-sta2 = STACesar (maximus, config=sta2_conf, mme_buffer_nb=1, debug=s2_deb, config_mode="MME", seed=2345)
-sta3 = STACesar (maximus, config=sta3_conf, mme_buffer_nb=1, debug=s3_deb, config_mode="MME", seed=3456)
-
-
-#Activate Sniffer on the CCo alias sta2.
-sta2_sniffer = sniffer ()
-sta2_sniffer.activate_mme (maximus, sta2, sta2_conf.mac_address)
-
-
-wait = ms_to_tck (10000)
-print "\n Waitting ", wait, " Tcks ..."
-maximus.wait (wait)
-
-class MyTest(unittest.TestCase):
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def AuthenticateSta1(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta1)
-
- self.failUnless (data.mac_address == sta1_conf.mac_address)
- self.failUnless (data.cco_prefered == sta1_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta1_conf.was_cco)
- self.failUnless (data.npw == sta1_conf.npw)
- self.failUnless (data.dpw == sta1_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta1_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta1_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta1_conf.sl)
- # The station is CCo and automatically authenticated.
- self.failUnless (data.tei == 2)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco == 0)
-
- def AuthenticateSta2(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta2)
-
- self.failUnless (data.mac_address == sta2_conf.mac_address)
- self.failUnless (data.cco_prefered == sta2_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta2_conf.was_cco)
- self.failUnless (data.npw == sta2_conf.npw)
- self.failUnless (data.dpw == sta2_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta2_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta2_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta2_conf.sl)
- self.failUnless (data.tei == 1)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco != 0)
-
- def AuthenticateSta3(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta3)
-
- self.failUnless (data.mac_address == sta3_conf.mac_address)
- self.failUnless (data.cco_prefered == sta3_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta3_conf.was_cco)
- self.failUnless (data.npw == sta3_conf.npw)
- self.failUnless (data.dpw == sta3_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta3_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta3_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta3_conf.sl)
- self.failUnless (data.tei == 3)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco == 0)
-
- def Send_Packet_from_sta3_broadcast(self):
- alloc_data_buffer (maximus, sta1)
- alloc_data_buffer (maximus, sta2)
-
- msg = "broadcast"
- frame = Eth ()
- frame.dst = 'ff:ff:ff:ff:ff:ff'
- frame.src = sta3_mac_addr
- frame.type = 0x4f50
- frame.payload = msg
- frame.send (maximus, sta3)
-
- rsp = recv(maximus, count=2, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- my_frame_rsp = rsp[1].get() [0: len(my_frame)]
- self.failUnless (my_frame == my_frame_rsp)
-
- def Send_Packet_from_sta1_broadcast(self):
- alloc_data_buffer (maximus, sta3)
- alloc_data_buffer (maximus, sta2)
-
- msg = "broadcast"
- frame = Eth ()
- frame.dst = 'ff:ff:ff:ff:ff:ff'
- frame.src = sta1_mac_addr
- frame.type = 0x4f50
- frame.payload = msg
- frame.send (maximus, sta1)
-
- rsp = recv(maximus, count=2, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- my_frame_rsp = rsp[1].get() [0: len(my_frame)]
- self.failUnless (my_frame == my_frame_rsp)
-
- def sta3_deactivate (self):
- sta3.deactivate ()
-
- # Station 1 Sends a packet to sta 3.
- msg = "broadcast"
- frame = Eth ()
- frame.dst = sta3_mac_addr
- frame.src = sta1_mac_addr
- frame.type = 0x4f50
- frame.payload = msg
- frame.send (maximus, sta1)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp == None)
-
- # Station 1 Sends a packet to sta 2.
- msg = "broadcast"
- frame = Eth ()
- frame.dst = sta2_mac_addr
- frame.src = sta1_mac_addr
- frame.type = 0x4f50
- frame.payload = msg
- frame.send (maximus, sta1)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
-
- # Station 2 Sends a packet to sta 1.
- msg = "broadcast"
- frame = Eth ()
- frame.dst = sta1_mac_addr
- frame.src = sta2_mac_addr
- frame.type = 0x4f50
- frame.payload = msg
- frame.send (maximus, sta2)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
-
- def testRun(self):
- self.AuthenticateSta1()
- self.AuthenticateSta2()
- self.AuthenticateSta3()
- self.Send_Packet_from_sta3_broadcast()
- self.Send_Packet_from_sta1_broadcast()
-
-suite = unittest.TestLoader().loadTestsFromTestCase(MyTest)
-
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-# Delete the station.
-print "Removing STA 1 ..."
-sta1.remove()
-print "Removing STA 2 ..."
-sta2.remove()
-print "Removing STA 3 ..."
-sta3.remove()
-
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s1/py/sc15_full_traffic_two_sta.py b/cesar/test_general/station/cco0/s1/py/sc15_full_traffic_two_sta.py
deleted file mode 100644
index a3157fcbb4..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc15_full_traffic_two_sta.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Two stations on the AVLN #
-# ---------------------------------------------------------------------- #
-# #
-# Objective: Verify the charge of communication between two stations. #
-##############################################################################
-
-import unittest
-import sys
-
-sys.path.append ('../../../../maximus/python/tools/csi/')
-sys.path.append ('../../../../maximus/python/obj/')
-sys.path.append ('../../../../maximus/python/')
-sys.path.append ('../../../../maximus/python/lib/cesar')
-
-from csicore import *
-
-csi = csiCore (1234)
-
-# Creating an AVLN.
-avln = csi.avln_add ("Homeplug_AVLN1", "AVLN1")
-
-sta1_debug = True
-sta2_debug = True
-
-sta1 = avln.sta_add ("10:11:12:13:14:15", False, False, "Homeplug_Station1",
- "spidcom_spc300_sta1", "station1", 1, sta1_debug)
-sta2 = avln.sta_add ("20:22:22:23:24:25", False, False, "Homeplug_Station2",
- "spidcom_spc300_sta2", "station2", 1, sta2_debug)
-
-csi.process_init (sys.argv + ['-e', 'obj/cco0s1.elf'])
-csi.process_avlns_launch ()
-csi.process_wait_association ()
-csi.process_wait_authentication ()
-
-packet = [csiPacket (1450, avln, sta1, None, sta2)]
-
-for i in range (0, 1000000):
- print "Packet ", i
- csi.process_data_send_traffic (packet)
- csi.process_wait_sec (0.005)
-
-csi.process_wait_sec (5)
-
-sta1.stop()
-# Sends a fcall to uninit the station.
-fcall = maximus.create_fcall ("fc_cesar_uninit")
-fcall.set_sta (sta.get())
-fcall.send()
-
-sta2.stop()
-# Sends a fcall to uninit the station.
-fcall = maximus.create_fcall ("fc_cesar_uninit")
-fcall.set_sta (sta.get())
-fcall.send()
-
-result = csi.process_end_get_result ()
-# For nightly build errors
-sys.exit ((1, 0)[result])
diff --git a/cesar/test_general/station/cco0/s1/py/sc1_one_sta_mac_start.py b/cesar/test_general/station/cco0/s1/py/sc1_one_sta_mac_start.py
deleted file mode 100644
index d353b6c7a3..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc1_one_sta_mac_start.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# One station alone with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective of this test is to provide a script which verifies that the #
-# station is correctly initialised to communicate between all the layers. #
-# The PbProc will be activate on the Mac Start MME driver and enters in #
-# the Power one discover procedure. #
-##############################################################################
-
-import sys
-sys.path.append('../../../../maximus/python/obj');
-sys.path.append('../../../../maximus/python');
-sys.path.append('../../../../maximus/python/lib/cesar');
-
-from interface import *
-from string import *
-from struct import *
-from maximus import *
-from sta_cesar import STACesar
-from own_data import Station_own_data
-
-import unittest
-
-def my_mpdu_filter(mpdu):
- if mpdu.get_type() is 'PHY_TYPE_MPDU_PAYLOAD':
- # The received object is an MPDU
- return True
- else:
- return False
-
-
-# Initialise Maximus with the station.
-maximus = Maximus()
-maximus.init (sys.argv + ['-e', './obj/cco0s1.elf'])
-
-# Configure the first station.
-conf_sta = Config ()
-conf_sta.mac_address = (0x11, 0x21, 0x31, 0x41, 0x51, 0x61)
-conf_sta.cco_preference = False
-conf_sta.was_cco = False
-conf_sta.npw = "HomePlugAV0123"
-conf_sta.dpw = "STATION_DEVICE_PASSWORD"
-conf_sta.m_sta_hfid = "HPAV_STATION"
-conf_sta.u_sta_hfid = "STA1_CCO"
-conf_sta.avln_hfid = "AVLN1"
-conf_sta.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-conf_sta.sl = 1
-conf_sta.snid = None
-
-# Create the station
-sta = STACesar (maximus, config=conf_sta, mme_buffer_nb=1, debug=False, config_mode="MME", seed = 0x1234)
-
-class TestInitFunctions(unittest.TestCase):
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testReceveBeacon(self):
- beacon_count = 28
- mpdu = recv (maximus, count = beacon_count, filter=my_mpdu_filter)
- self.failUnless (mpdu != None)
-
- print ""
- for i in range (0, beacon_count):
- res = (mpdu[i].fc_av[0]) & 0x3
- self.failUnless (res == 0x0 or res == 0x1)
- print "Beacon received correct ", i
-
- def testStationState (self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta)
-
- self.failUnless (data.mac_address == conf_sta.mac_address)
- self.failUnless (data.is_cco == False)
- self.failUnless (data.cco_prefered == conf_sta.cco_preference)
- self.failUnless (data.was_cco == conf_sta.was_cco)
- self.failUnless (data.npw == conf_sta.npw)
- self.failUnless (data.dpw == conf_sta.dpw)
- self.failUnless (data.hfid_manufacturer == conf_sta.m_sta_hfid)
- self.failUnless (data.hfid_user == conf_sta.u_sta_hfid)
- self.failUnless (data.security_level == conf_sta.sl)
-
- # Delete the station.
- sta.stop()
-
- # Sends a fcall to uninit the station.
- fcall = maximus.create_fcall ("fc_cesar_uninit")
- fcall.set_sta (sta.get())
- fcall.send()
-
- # Check the memory state.
- fcall = maximus.create_fcall ("fc_memory_state")
- fcall.set_sta (sta.get())
- fcall.send()
- result = fcall.bind_param_ushort ("result")
- self.failUnless (result == True);
-
- sta.remove()
-
-suite = unittest.TestLoader().loadTestsFromTestCase(TestInitFunctions)
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s1/py/sc1_one_sta_mac_start_cco_pref.py b/cesar/test_general/station/cco0/s1/py/sc1_one_sta_mac_start_cco_pref.py
deleted file mode 100644
index e91e155b3a..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc1_one_sta_mac_start_cco_pref.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# One station alone with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective of this test is to provide a script which verifies that the #
-# station is correctly initialised to communicate between all the layers. #
-# The PbProc will be activate on the Mac Start MME driver and enters in #
-# the Power one discover procedure. #
-##############################################################################
-
-import sys
-sys.path.append('../../../../maximus/python/obj');
-sys.path.append('../../../../maximus/python');
-sys.path.append('../../../../maximus/python/lib/cesar');
-
-from interface import *
-from string import *
-from struct import *
-from maximus import *
-from sta_cesar import STACesar
-from own_data import Station_own_data
-
-import unittest
-
-def my_mpdu_filter(mpdu):
- if mpdu.get_type() is 'PHY_TYPE_MPDU_PAYLOAD':
- # The received object is an MPDU
- return True
- else:
- return False
-
-
-# Initialise Maximus with the station.
-maximus = Maximus()
-maximus.init (sys.argv + ['-e', './obj/cco0s1.elf'])
-
-# Configure the first station.
-conf_sta = Config ()
-conf_sta.mac_address = (0x11, 0x21, 0x31, 0x41, 0x51, 0x61)
-conf_sta.cco_preference = True
-conf_sta.was_cco = True
-conf_sta.npw = "HomePlugAV0123"
-conf_sta.dpw = "STATION_DEVICE_PASSWORD"
-conf_sta.m_sta_hfid = "HPAV_STATION"
-conf_sta.u_sta_hfid = "STA1_CCO"
-conf_sta.avln_hfid = "AVLN1"
-conf_sta.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-conf_sta.sl = 1
-conf_sta.snid = None
-
-# Create the station
-sta = STACesar (maximus, config=conf_sta, mme_buffer_nb=1, debug=False, config_mode="MME", seed = 0x1234)
-
-class TestInitFunctions(unittest.TestCase):
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testReceveBeacon(self):
- beacon_count = 28
- mpdu = recv (maximus, count = beacon_count, filter=my_mpdu_filter)
- self.failUnless (mpdu != None)
-
- print ""
- for i in range (0, beacon_count):
- res = (mpdu[i].fc_av[0]) & 0x3
- self.failUnless (res == 0x0 or res == 0x1)
- print "Beacon received correct ", i
-
- def testStationState (self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta)
-
- self.failUnless (data.mac_address == conf_sta.mac_address)
- self.failUnless (data.is_cco == False)
- self.failUnless (data.cco_prefered == conf_sta.cco_preference)
- self.failUnless (data.was_cco == conf_sta.was_cco)
- self.failUnless (data.npw == conf_sta.npw)
- self.failUnless (data.dpw == conf_sta.dpw)
- self.failUnless (data.hfid_manufacturer == conf_sta.m_sta_hfid)
- self.failUnless (data.hfid_user == conf_sta.u_sta_hfid)
- self.failUnless (data.security_level == conf_sta.sl)
-
- # Delete the station.
- sta.stop()
-
- # Sends a fcall to uninit the station.
- fcall = maximus.create_fcall ("fc_cesar_uninit")
- fcall.set_sta (sta.get())
- fcall.send()
-
- # Check the memory state.
- fcall = maximus.create_fcall ("fc_memory_state")
- fcall.set_sta (sta.get())
- fcall.send()
- result = fcall.bind_param_ushort ("result")
- self.failUnless (result == True);
-
- sta.remove()
-
-suite = unittest.TestLoader().loadTestsFromTestCase(TestInitFunctions)
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s1/py/sc2_two_sta_assoc.py b/cesar/test_general/station/cco0/s1/py/sc2_two_sta_assoc.py
deleted file mode 100644
index fc24e81510..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc2_two_sta_assoc.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Two station with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective: Two station which starts at the same time, one will become #
-# the CCo the other one shall become an unassociated station. #
-# At this point the station shall try an association with the #
-# CCo. #
-# Hint: The two station have the same NID. #
-##############################################################################
-
-import unittest
-import sys
-
-sys.path.append ('../../../../maximus/python/tools/csi/')
-sys.path.append ('../../../../maximus/python/obj/')
-sys.path.append ('../../../../maximus/python/')
-sys.path.append ('../../../../maximus/python/lib/cesar')
-
-from csicore import *
-MACSDEFAULT = "00:13:d7:00:0%x:%02x"
-csi = csiCore (1234)
-
-# Creating an AVLN.
-avln1 = csi.avln_add ("Homeplug_AVLN1", "AVLN1")
-avln1_sta_nb = 2
-# Adding the stations.
-avln1_stas = list ()
-for i in range (0, avln1_sta_nb):
- avln1_stas.append (avln1.sta_add (MACSDEFAULT % (1, i+1), False, False,
- "HomePlug_AVLN1_Station%d" % (i+1),
- "av1_spc300_sta%d" % (i+1),
- "avln1_station%d" % (i+1), 1, False))
-csi.process_init (sys.argv + ['-e', 'obj/cco0s1.elf'])
-csi.process_avlns_launch ()
-csi.process_wait_association ()
-csi.process_wait_authentication ()
-
-class TestInitFunctions(unittest.TestCase):
-
- def setUp(self):
- self.sta = avln1_stas[0]
- self.cco = avln1_stas[avln1_sta_nb - 1]
-
- def tearDown(self):
- pass
-
- def testAuthenticateSta1(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (csi.get_maximus(), self.sta.get_sta_cesar())
- sta_conf = self.sta.get_config ()
-
- self.failUnless (data.cco_prefered == sta_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta_conf.was_cco)
- self.failUnless (data.npw == sta_conf.npw)
- self.failUnless (data.dpw == sta_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta_conf.sl)
- # The station is CCo and automatically authenticated.
- self.failUnless (data.tei != 0)
- self.failUnless (data.authenticated == True)
- self.failUnless (data.is_cco == False)
-
- def testAuthenticateSta2(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (csi.get_maximus(), self.cco.get_sta_cesar())
- cco_conf = self.cco.get_config ()
-
- self.failUnless (data.cco_prefered == cco_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == cco_conf.was_cco)
- self.failUnless (data.npw == cco_conf.npw)
- self.failUnless (data.dpw == cco_conf.dpw)
- self.failUnless (data.hfid_manufacturer == cco_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == cco_conf.u_sta_hfid)
- self.failUnless (data.security_level == cco_conf.sl)
- self.failUnless (data.tei != 0)
- self.failUnless (data.authenticated == True)
- self.failUnless (data.is_cco == True)
-
-suite = unittest.TestLoader().loadTestsFromTestCase(TestInitFunctions)
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-csi.process_avlns_remove ()
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s1/py/sc2_two_sta_assoc_one_cco_pref.py b/cesar/test_general/station/cco0/s1/py/sc2_two_sta_assoc_one_cco_pref.py
deleted file mode 100644
index b762742a01..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc2_two_sta_assoc_one_cco_pref.py
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Two station with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective: Two station which starts at the same time, one will become #
-# the CCo the other one shall become an unassociated station. #
-# At this point the station shall try an association with the #
-# CCo. #
-# Hint: The two station have the same NID. #
-##############################################################################
-
-import unittest
-import sys
-
-sys.path.append ('../../../../maximus/python/tools/csi/')
-sys.path.append ('../../../../maximus/python/obj/')
-sys.path.append ('../../../../maximus/python/')
-sys.path.append ('../../../../maximus/python/lib/cesar')
-
-from csicore import *
-MACSDEFAULT = "00:13:d7:00:0%x:%02x"
-csi = csiCore (1234)
-
-# Creating an AVLN.
-avln1 = csi.avln_add ("Homeplug_AVLN1", "AVLN1")
-avln1_sta_nb = 2
-# Adding the stations.
-avln1_stas = list ()
-for i in range (0, avln1_sta_nb):
- avln1_stas.append (avln1.sta_add (MACSDEFAULT % (1, i+1),
- i == 0, False,
- "HomePlug_AVLN1_Station%d" % (i+1),
- "av1_spc300_sta%d" % (i+1),
- "avln1_station%d" % (i+1), 1, False))
-csi.process_init (sys.argv + ['-e', 'obj/cco0s1.elf'])
-csi.process_avlns_launch ()
-csi.process_wait_association ()
-csi.process_wait_authentication ()
-
-class TestInitFunctions(unittest.TestCase):
-
- def setUp(self):
- """ Set UP. """
- # CCo user appoint criteria is not used in network discover procedure.
- # So the station with the biggest Mac Address will become the CCo.
- self.sta = avln1_stas[0]
- self.cco = avln1_stas[avln1_sta_nb - 1]
-
- def tearDown(self):
- pass
-
- def testAuthenticateSta1(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (csi.get_maximus(), self.sta.get_sta_cesar())
- sta_conf = self.sta.get_config ()
-
- self.failUnless (data.cco_prefered == sta_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta_conf.was_cco)
- self.failUnless (data.npw == sta_conf.npw)
- self.failUnless (data.dpw == sta_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta_conf.sl)
- # The station is CCo and automatically authenticated.
- self.failUnless (data.tei != 0)
- self.failUnless (data.authenticated == True)
- self.failUnless (data.is_cco == False)
-
- def testAuthenticateSta2(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (csi.get_maximus(), self.cco.get_sta_cesar())
- cco_conf = self.cco.get_config ()
-
- self.failUnless (data.cco_prefered == cco_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == cco_conf.was_cco)
- self.failUnless (data.npw == cco_conf.npw)
- self.failUnless (data.dpw == cco_conf.dpw)
- self.failUnless (data.hfid_manufacturer == cco_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == cco_conf.u_sta_hfid)
- self.failUnless (data.security_level == cco_conf.sl)
- self.failUnless (data.tei != 0)
- self.failUnless (data.authenticated == True)
- self.failUnless (data.is_cco == True)
-
-suite = unittest.TestLoader().loadTestsFromTestCase(TestInitFunctions)
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-csi.process_avlns_remove ()
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s1/py/sc3_two_sta_communication.py b/cesar/test_general/station/cco0/s1/py/sc3_two_sta_communication.py
deleted file mode 100644
index 211233a57b..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc3_two_sta_communication.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Two station with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective: Two station which starts at the same time, one will become #
-# the CCo the other one shall become an unassociated station. #
-# At this point the station shall try an association with the #
-# CCo. #
-# Hint: The two station have the same NID. #
-##############################################################################
-
-import unittest
-import sys
-
-sys.path.append ('../../../../maximus/python/tools/csi/')
-sys.path.append ('../../../../maximus/python/obj/')
-sys.path.append ('../../../../maximus/python/')
-sys.path.append ('../../../../maximus/python/lib/cesar')
-
-from csicore import *
-
-csi = csiCore (1234)
-
-# Creating an AVLN.
-avln = csi.avln_add ("Homeplug_AVLN1", "AVLN1")
-
-sta1_debug = False
-sta2_debug = False
-
-sta1 = avln.sta_add ("10:11:12:13:14:15", False, False, "Homeplug_Station1",
- "spidcom_spc300_sta1", "station1", 1, sta1_debug)
-sta2 = avln.sta_add ("20:22:22:23:24:25", False, False, "Homeplug_Station2",
- "spidcom_spc300_sta2", "station2", 1, sta2_debug)
-
-csi.process_init (sys.argv + ['-e', 'obj/cco0s1.elf'])
-csi.process_avlns_launch ()
-csi.process_wait_association ()
-csi.process_wait_authentication ()
-csi.authentication_status (avln)
-
-packets = csi.avln_create_traffic (avln, 10)
-
-csi.process_data_send_traffic (packets)
-csi.process_wait_sec (3)
-csi.process_verify_transmission ()
-
-csi.process_avlns_remove()
-result = csi.process_end_get_result ()
-
-# For nightly build errors
-sys.exit ((1, 0)[result])
diff --git a/cesar/test_general/station/cco0/s1/py/sc6_three_sta_assoc.py b/cesar/test_general/station/cco0/s1/py/sc6_three_sta_assoc.py
deleted file mode 100644
index 166aac20e2..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc6_three_sta_assoc.py
+++ /dev/null
@@ -1,175 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Three station with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective: Three station which starts at the same time, one will become #
-# the CCo the other one shall become an unassociated station. #
-# At this point the station shall try an association with the #
-# CCo. #
-# Hint: The two station have the same NID. #
-##############################################################################
-
-import sys
-sys.path.append('../../../../maximus/python/obj');
-sys.path.append('../../../../maximus/python');
-sys.path.append('../../../../maximus/python/lib/cesar');
-
-from interface import *
-from string import *
-from struct import *
-from maximus import *
-from sta_cesar import STACesar
-from own_data import Station_own_data
-from sniffer import *
-
-import unittest
-
-def ms_to_tck (ms):
- return int(ms * 25000)
-
-
-def my_mpdu_filter(mpdu):
- if mpdu.get_type() is 'PHY_TYPE_MPDU_PAYLOAD':
- # The received object is an MPDU
- return True
- else:
- return False
-
-
-# Initialise Maximus with the station.
-maximus = Maximus()
-maximus.init (sys.argv + ['-e', './obj/cco0s1.elf'])
-
-# Configure the first station.
-sta1_conf = Config ()
-sta1_conf.mac_address = (0x10, 0x11, 0x12, 0x13, 0x14, 0x15)
-sta1_conf.cco_preference = False
-sta1_conf.was_cco = False
-sta1_conf.npw = "HomePlugAV0123"
-sta1_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta1_conf.m_sta_hfid = "HPAV_STATION"
-sta1_conf.u_sta_hfid = "STA1"
-sta1_conf.avln_hfid = "AVLN1"
-sta1_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta1_conf.sl = 1
-sta1_conf.snid = None
-
-# Configure the second station.
-sta2_conf = Config ()
-sta2_conf.mac_address = (0x20, 0x21, 0x22, 0x23, 0x24, 0x25)
-sta2_conf.cco_preference = False
-sta2_conf.was_cco = False
-sta2_conf.npw = "HomePlugAV0123"
-sta2_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta2_conf.m_sta_hfid = "HPAV_STATION"
-sta2_conf.u_sta_hfid = "STA2"
-sta2_conf.avln_hfid = "AVLN1"
-sta2_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta2_conf.sl = 1
-sta2_conf.snid = None
-
-# Configure the third station.
-sta3_conf = Config ()
-sta3_conf.mac_address = (0x30, 0x31, 0x33, 0x34, 0x35, 0x36)
-sta3_conf.cco_preference = False
-sta3_conf.was_cco = False
-sta3_conf.npw = "HomePlugAV0123"
-sta3_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta3_conf.m_sta_hfid = "HPAV_STATION"
-sta3_conf.u_sta_hfid = "STA3"
-sta3_conf.avln_hfid = "AVLN1"
-sta3_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta3_conf.sl = 1
-sta3_conf.snid = None
-
-# Create the station
-print ""
-print "Starting the test ..."
-sta1 = STACesar (maximus, config=sta1_conf, mme_buffer_nb=1, debug=False, config_mode="MME", seed=1224)
-sta2 = STACesar (maximus, config=sta2_conf, mme_buffer_nb=1, debug=False, config_mode="MME", seed=2345)
-sta3 = STACesar (maximus, config=sta3_conf, mme_buffer_nb=1, debug=False, config_mode="MME", seed=3456)
-
-# Activate the Sniffer module only for the MMEs.
-sta2_sniffer = sniffer ()
-sta2_sniffer.activate_mme (maximus, sta2, sta2_conf.mac_address)
-
-wait = ms_to_tck (10000)
-print "\n Waitting ", wait, " Tcks ..."
-maximus.wait (wait)
-
-class TestInitFunctions(unittest.TestCase):
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testAuthenticateSta1(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta1)
-
- self.failUnless (data.mac_address == sta1_conf.mac_address)
- self.failUnless (data.cco_prefered == sta1_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta1_conf.was_cco)
- self.failUnless (data.npw == sta1_conf.npw)
- self.failUnless (data.dpw == sta1_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta1_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta1_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta1_conf.sl)
- # The station is CCo and automatically authenticated.
- self.failUnless (data.tei == 2)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco == 0)
-
- def testAuthenticateSta2(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta2)
-
- self.failUnless (data.mac_address == sta2_conf.mac_address)
- self.failUnless (data.cco_prefered == sta2_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta2_conf.was_cco)
- self.failUnless (data.npw == sta2_conf.npw)
- self.failUnless (data.dpw == sta2_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta2_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta2_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta2_conf.sl)
- self.failUnless (data.tei == 1)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco != 0)
-
- def testAuthenticateSta3(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta3)
-
- self.failUnless (data.mac_address == sta3_conf.mac_address)
- self.failUnless (data.cco_prefered == sta3_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta3_conf.was_cco)
- self.failUnless (data.npw == sta3_conf.npw)
- self.failUnless (data.dpw == sta3_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta3_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta3_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta3_conf.sl)
- self.failUnless (data.tei == 3)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco == 0)
-
-suite = unittest.TestLoader().loadTestsFromTestCase(TestInitFunctions)
-
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-# Delete the station.
-print "Removing STA 1 ..."
-sta1.remove()
-print "Removing STA 2 ..."
-sta2.remove()
-print "Removing STA 3 ..."
-sta3.remove()
-
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s1/py/sc7_three_sta_communication.py b/cesar/test_general/station/cco0/s1/py/sc7_three_sta_communication.py
deleted file mode 100644
index b96728af49..0000000000
--- a/cesar/test_general/station/cco0/s1/py/sc7_three_sta_communication.py
+++ /dev/null
@@ -1,369 +0,0 @@
-#!/usr/bin/env python
-
-##############################################################################
-# Three station with the Mac start order #
-# ---------------------------------------------------------------------- #
-# #
-# Objective: Three station which starts at the same time, one will become #
-# the CCo the other one shall become an unassociated station. #
-# At this point the station shall try an association with the #
-# CCo. #
-# Hint: The two station have the same NID. #
-##############################################################################
-
-import sys
-sys.path.append('../../../../maximus/python/obj');
-sys.path.append('../../../../maximus/python');
-sys.path.append('../../../../maximus/python/lib/cesar');
-
-from interface import *
-from string import *
-from struct import *
-from maximus import *
-from sta_cesar import STACesar
-from own_data import Station_own_data
-from sniffer import *
-
-import unittest
-
-def ms_to_tck (ms):
- return int(ms * 25000)
-
-def data_msdu_filter (msdu):
- if msdu.get_type () is 'ETHERNET_TYPE_DATA':
- # The received object is an MSDU
- return True
- else:
- return False
-
-s1_deb = False
-s2_deb = False
-s3_deb = False
-
-sta1_mac_addr = '10:11:12:13:14:15'
-sta2_mac_addr = '20:21:22:23:24:25'
-sta3_mac_addr = '30:31:32:33:34:35'
-
-# Initialise Maximus with the station.
-maximus = Maximus()
-maximus.init (sys.argv + ['-e', './obj/cco0s1.elf'])
-
-# Configure the first station.
-sta1_conf = Config ()
-sta1_conf.mac_address = (0x10, 0x11, 0x12, 0x13, 0x14, 0x15)
-sta1_conf.cco_preference = False
-sta1_conf.was_cco = False
-sta1_conf.npw = "HomePlugAV0123"
-sta1_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta1_conf.m_sta_hfid = "HPAV_STATION"
-sta1_conf.u_sta_hfid = "STA1"
-sta1_conf.avln_hfid = "AVLN1"
-sta1_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta1_conf.sl = 1
-sta1_conf.snid = None
-
-# Configure the second station.
-sta2_conf = Config ()
-sta2_conf.mac_address = (0x20, 0x21, 0x22, 0x23, 0x24, 0x25)
-sta2_conf.cco_preference = False
-sta2_conf.was_cco = False
-sta2_conf.npw = "HomePlugAV0123"
-sta2_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta2_conf.m_sta_hfid = "HPAV_STATION"
-sta2_conf.u_sta_hfid = "STA2"
-sta2_conf.avln_hfid = "AVLN1"
-sta2_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta2_conf.sl = 1
-sta2_conf.snid = None
-
-# Configure the third station.
-sta3_conf = Config ()
-sta3_conf.mac_address = (0x30, 0x31, 0x32, 0x33, 0x34, 0x35)
-sta3_conf.cco_preference = False
-sta3_conf.was_cco = False
-sta3_conf.npw = "HomePlugAV0123"
-sta3_conf.dpw = "STATION_DEVICE_PASSWORD"
-sta3_conf.m_sta_hfid = "HPAV_STATION"
-sta3_conf.u_sta_hfid = "STA3"
-sta3_conf.avln_hfid = "AVLN1"
-sta3_conf.tonemask = (85,139,167,214,225,282,302,409,419,569,591,736,748,856,882,1015,1027,1143,1535)
-sta3_conf.sl = 1
-sta3_conf.snid = None
-
-# Create the station
-print ""
-print "Starting the test ..."
-sta1 = STACesar (maximus, config=sta1_conf, mme_buffer_nb=1, debug=s1_deb, config_mode="MME", seed=1224)
-sta2 = STACesar (maximus, config=sta2_conf, mme_buffer_nb=1, debug=s2_deb, config_mode="MME", seed=2345)
-sta3 = STACesar (maximus, config=sta3_conf, mme_buffer_nb=1, debug=s3_deb, config_mode="MME", seed=3456)
-
-
-#Activate Sniffer on the CCo alias sta2.
-sta2_sniffer = sniffer ()
-sta2_sniffer.activate_mme (maximus, sta2, sta2_conf.mac_address)
-
-
-wait = ms_to_tck (10000)
-print "\n Waitting ", wait, " Tcks ..."
-maximus.wait (wait)
-
-class MyTest(unittest.TestCase):
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def AuthenticateSta1(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta1)
-
- self.failUnless (data.mac_address == sta1_conf.mac_address)
- self.failUnless (data.cco_prefered == sta1_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta1_conf.was_cco)
- self.failUnless (data.npw == sta1_conf.npw)
- self.failUnless (data.dpw == sta1_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta1_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta1_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta1_conf.sl)
- # The station is CCo and automatically authenticated.
- self.failUnless (data.tei == 2)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco == 0)
-
- def AuthenticateSta2(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta2)
-
- self.failUnless (data.mac_address == sta2_conf.mac_address)
- self.failUnless (data.cco_prefered == sta2_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta2_conf.was_cco)
- self.failUnless (data.npw == sta2_conf.npw)
- self.failUnless (data.dpw == sta2_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta2_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta2_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta2_conf.sl)
- self.failUnless (data.tei == 1)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco != 0)
-
- def AuthenticateSta3(self):
- sta_data = Station_own_data ()
- data = sta_data.get_data (maximus, sta3)
-
- self.failUnless (data.mac_address == sta3_conf.mac_address)
- self.failUnless (data.cco_prefered == sta3_conf.cco_preference)
- # The station become CCo so the was_cco status have evolved.
- self.failUnless (data.was_cco == sta3_conf.was_cco)
- self.failUnless (data.npw == sta3_conf.npw)
- self.failUnless (data.dpw == sta3_conf.dpw)
- self.failUnless (data.hfid_manufacturer == sta3_conf.m_sta_hfid)
- self.failUnless (data.hfid_user == sta3_conf.u_sta_hfid)
- self.failUnless (data.security_level == sta3_conf.sl)
- self.failUnless (data.tei == 3)
- self.failUnless (data.authenticated != 0)
- self.failUnless (data.is_cco == 0)
-
- def Send_Packet_from_sta3_broadcast(self):
- alloc_data_buffer (maximus, sta1)
- alloc_data_buffer (maximus, sta2)
-
- msg = "broadcast"
- frame = Eth ()
- frame.dst = 'ff:ff:ff:ff:ff:ff'
- frame.src = sta3_mac_addr
- frame.type = 0x4f50
- frame.payload = msg
- frame.send (maximus, sta3)
-
- rsp = recv(maximus, count=2, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- my_frame_rsp = rsp[1].get() [0: len(my_frame)]
- self.failUnless (my_frame == my_frame_rsp)
-
- def Send_Packet_from_sta3_to_sta2(self):
- payload = ''
- for i in range (0, 1500):
- payload += str (i)[0]
-
- alloc_data_buffer (maximus, sta2)
- frame = Eth ()
- frame.dst = sta2_mac_addr
- frame.src = sta3_mac_addr
- frame.type = 0x4f50
- frame.payload = payload
- frame.send (maximus, sta3)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- def Send_Packet_from_sta3_to_sta1(self):
- payload = ''
- for i in range (0, 1500):
- payload += str (i)[0]
-
- alloc_data_buffer (maximus, sta1)
- frame = Eth ()
- frame.dst = sta1_mac_addr
- frame.src = sta3_mac_addr
- frame.type = 0x4f50
- frame.payload = payload
- frame.send (maximus, sta3)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- def Send_Packet_from_sta1_broadcast(self):
- alloc_data_buffer (maximus, sta3)
- alloc_data_buffer (maximus, sta2)
-
- msg = "broadcast"
- frame = Eth ()
- frame.dst = 'ff:ff:ff:ff:ff:ff'
- frame.src = sta1_mac_addr
- frame.type = 0x4f50
- frame.payload = msg
- frame.send (maximus, sta1)
-
- rsp = recv(maximus, count=2, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- my_frame_rsp = rsp[1].get() [0: len(my_frame)]
- self.failUnless (my_frame == my_frame_rsp)
-
- def Send_Packet_from_sta1_to_sta2(self):
- payload = ''
- for i in range (0, 1500):
- payload += str (i)[0]
-
- alloc_data_buffer (maximus, sta2)
- frame = Eth ()
- frame.dst = sta2_mac_addr
- frame.src = sta1_mac_addr
- frame.type = 0x4f50
- frame.payload = payload
- frame.send (maximus, sta1)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- def Send_Packet_from_sta1_to_sta3(self):
- payload = ''
- for i in range (0, 1500):
- payload += str (i)[0]
-
- alloc_data_buffer (maximus, sta3)
- frame = Eth ()
- frame.dst = sta3_mac_addr
- frame.src = sta1_mac_addr
- frame.type = 0x4f50
- frame.payload = payload
- frame.send (maximus, sta1)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- def Send_Packet_from_sta2_to_sta1(self):
- payload = ''
- for i in range (0, 1500):
- payload += str (i)[0]
-
- alloc_data_buffer (maximus, sta1)
- frame = Eth ()
- frame.dst = sta1_mac_addr
- frame.src = sta2_mac_addr
- frame.type = 0x4f50
- frame.payload = payload
- frame.send (maximus, sta2)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- def Send_Packet_from_sta2_to_sta3(self):
- payload = ''
- for i in range (0, 1500):
- payload += str (i)[0]
-
- alloc_data_buffer (maximus, sta3)
- frame = Eth ()
- frame.dst = sta3_mac_addr
- frame.src = sta2_mac_addr
- frame.type = 0x4f50
- frame.payload = payload
- frame.send (maximus, sta2)
-
- rsp = recv(maximus, count=1, filter=data_msdu_filter, timeout = 200000)
- self.failUnless (rsp != None)
- if rsp != None:
-
- my_frame = frame.get()
- my_frame_rsp = rsp[0].get() [0: len(my_frame)]
-
- self.failUnless (my_frame == my_frame_rsp)
-
- def testRun(self):
- self.AuthenticateSta1()
- self.AuthenticateSta2()
- self.AuthenticateSta3()
- self.Send_Packet_from_sta3_broadcast()
- self.Send_Packet_from_sta1_broadcast()
- self.Send_Packet_from_sta3_to_sta2()
- self.Send_Packet_from_sta3_to_sta1()
- self.Send_Packet_from_sta1_to_sta2()
- self.Send_Packet_from_sta1_to_sta3()
- self.Send_Packet_from_sta2_to_sta1()
- self.Send_Packet_from_sta2_to_sta3()
-
-suite = unittest.TestLoader().loadTestsFromTestCase(MyTest)
-
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-# Delete the station.
-print "Removing STA 1 ..."
-sta1.remove()
-print "Removing STA 2 ..."
-sta2.remove()
-print "Removing STA 3 ..."
-sta3.remove()
-
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/test_general/station/cco0/s2/py/sc02_five_stations.py b/cesar/test_general/station/cco0/s2/py/sc02_five_stations.py
deleted file mode 100644
index 5f5ff39f8e..0000000000
--- a/cesar/test_general/station/cco0/s2/py/sc02_five_stations.py
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env python
-# Script interpreted by the CSI Cesar Script Interpreter
-
-# Create 5 station within an AVLN i.e. AVLN1.
-# Wait authentication of each station.
-# Create traffic bridged and to send over the stations.
-# See the doc sc02_five_station.dia or execute the makefile in it to obtain
-# the png file.
-
-import os
-import sys
-sys.path.append ('../../../../maximus/python/tools/csi/')
-sys.path.append ('../../../../maximus/python/obj/')
-sys.path.append ('../../../../maximus/python/')
-sys.path.append ('../../../../maximus/python/lib/cesar')
-
-from csicore import *
-
-csi = csiCore (1234)
-
-# Creating an AVLN.
-avln1 = csi.avln_add ("Homeplug_AVLN1", "AVLN1")
-
-sta1_debug = False
-sta2_debug = False
-sta3_debug = False
-sta4_debug = False
-sta5_debug = False
-
-# Adding some station to the AVLN.
-stas = list ()
-stas.append(avln1.sta_add ("10:11:12:13:14:15", False, False,
- "Homeplug_Station1", "spidcom_spc300_sta1", "station1", 1, sta1_debug))
-stas.append(avln1.sta_add ("20:22:22:23:24:25", False, False,
- "Homeplug_Station2", "spidcom_spc300_sta2", "station2", 1, sta2_debug))
-stas.append(avln1.sta_add ("30:33:32:33:34:35", False, False,
- "Homeplug_Station3", "spidcom_spc300_sta3", "station3", 1, sta3_debug))
-stas.append(avln1.sta_add ("40:44:42:43:44:45", False, False,
- "Homeplug_Station4", "spidcom_spc300_sta4", "station4", 1, sta4_debug))
-stas.append(avln1.sta_add ("50:55:52:53:54:55", False, False,
- "Homeplug_Station5", "spidcom_spc300_sta5", "station5", 1, sta5_debug))
-
-# Add some bridged stations.
-stas[0].bridge_mac_addr_add ("10:10:10:10:10:01")
-stas[0].bridge_mac_addr_add ("10:10:10:10:10:02")
-
-stas[2].bridge_mac_addr_add("30:30:30:30:30:01")
-stas[2].bridge_mac_addr_add("30:30:30:30:30:02")
-stas[2].bridge_mac_addr_add("30:30:30:30:30:03")
-
-stas[3].bridge_mac_addr_add("40:40:40:40:40:01")
-stas[3].bridge_mac_addr_add("40:40:40:40:40:02")
-stas[3].bridge_mac_addr_add("40:40:40:40:40:03")
-
-packet_list = csi.avln_create_bridge_traffic (avln1, 100)
-
-csi.process_init (sys.argv + ['-e', 'obj/cco0s2.elf'])
-csi.process_avlns_launch ()
-csi.process_wait_association (15)
-csi.process_wait_authentication (15)
-csi.authentication_status (avln1)
-
-# Create broadcast frames for the bridged stations.
-for i in range (len (stas)):
- sta = stas[i]
- for j in range (sta.bridge_mac_addr_nb ()):
- packet = csiPacket (0, avln1, sta, sta.bridge_mac_addr_get (j))
- csi.process_data_send (packet)
- csi.process_wait_sec (0.1)
-
-csi.process_wait_sec (100)
-csi.process_data_send_traffic (packet_list)
-
-csi.process_wait_sec (5)
-csi.process_verify_transmission ()
-
-csi.process_wait_sec (1)
-#csi.process_avlns_stop ()
-
-result = csi.process_end_get_result ()
-# For nightly build errors
-sys.exit ((1, 0)[result])
diff --git a/cesar/test_general/station/cco0/s2/py/sc03_ten_stations.py b/cesar/test_general/station/cco0/s2/py/sc03_ten_stations.py
deleted file mode 100644
index ed2fcaffa3..0000000000
--- a/cesar/test_general/station/cco0/s2/py/sc03_ten_stations.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/python
-# Script interpreted by the CSI Cesar Script Interpreter
-
-# Create 10 stations within an AVLN i.e. AVLN1.
-# Wait authentication of each station.
-# Create traffic bridged and to send over the stations.
-# See the doc sc03_ten_station.dia or execute the makefile in it to obtain
-# the png file.
-
-import os
-import sys
-sys.path.append ('../../../../maximus/python/tools/csi/')
-sys.path.append ('../../../../maximus/python/obj/')
-sys.path.append ('../../../../maximus/python/')
-sys.path.append ('../../../../maximus/python/lib/cesar')
-
-from csicore import *
-
-csi = csiCore (1234)
-
-# Creating an AVLN.
-avln1 = csi.avln_add ("Homeplug_AVLN1", "AVLN1")
-
-sta1_debug = False
-sta2_debug = False
-sta3_debug = False
-sta4_debug = False
-sta5_debug = False
-sta6_debug = False
-sta7_debug = False
-sta8_debug = False
-sta9_debug = False
-sta10_debug = False
-
-# Adding some station to the AVLN.
-stas = list ()
-stas.append(avln1.sta_add ("00:00:00:00:00:01", False, False, "Homeplug_Station1", "spidcom_spc300_sta1", "station1", 1, sta1_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:02", False, False, "Homeplug_Station2", "spidcom_spc300_sta2", "station2", 1, sta2_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:03", False, False, "Homeplug_Station3", "spidcom_spc300_sta3", "station3", 1, sta3_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:04", False, False, "Homeplug_Station4", "spidcom_spc300_sta4", "station4", 1, sta4_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:05", False, False, "Homeplug_Station5", "spidcom_spc300_sta5", "station5", 1, sta5_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:06", False, False, "Homeplug_Station6", "spidcom_spc300_sta6", "station6", 1, sta6_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:07", False, False, "Homeplug_Station7", "spidcom_spc300_sta7", "station7", 1, sta7_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:08", False, False, "Homeplug_Station8", "spidcom_spc300_sta8", "station8", 1, sta8_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:09", False, False, "Homeplug_Station9", "spidcom_spc300_sta9", "station9", 1, sta9_debug))
-stas.append(avln1.sta_add ("00:00:00:00:00:0a", False, False, "Homeplug_Station10", "spidcom_spc300_sta10", "station10", 1, sta10_debug))
-
-
-# Add some bridged stations.
-stas[0].bridge_mac_addr_add ("00:00:00:00:01:01")
-stas[0].bridge_mac_addr_add ("00:00:00:00:01:02")
-
-stas[2].bridge_mac_addr_add("00:00:00:00:03:01")
-stas[2].bridge_mac_addr_add("00:00:00:00:03:02")
-stas[2].bridge_mac_addr_add("00:00:00:00:03:03")
-
-stas[3].bridge_mac_addr_add("00:00:00:00:04:01")
-stas[3].bridge_mac_addr_add("00:00:00:00:04:02")
-stas[3].bridge_mac_addr_add("00:00:00:00:04:03")
-
-packet_list = csi.avln_create_bridge_traffic (avln1, 100)
-
-csi.process_init (sys.argv + ['-e', 'obj/cco0s2.elf'])
-csi.process_avlns_launch ()
-csi.process_wait_association (15)
-csi.process_wait_authentication (15) # Broadcast from one station to the others
-csi.authentication_status (avln1) # Build table
-
-# Create broadcast frames for the bridged stations.
-for i in range (len (stas)):
- sta = stas[i]
- for j in range (sta.bridge_mac_addr_nb ()):
- packet = csiPacket (0, avln1, sta, sta.bridge_mac_addr_get (j))
- csi.process_data_send (packet)
- csi.process_wait_sec (0.1)
-
-csi.process_wait_sec (100)
-csi.process_data_send_traffic (packet_list) # Send Ethernet packets
-
-csi.process_wait_sec (5)
-csi.process_verify_transmission () # Check reception list
-
-csi.process_wait_sec (1)
-csi.process_avlns_remove()
-
-result = csi.process_end_get_result () # Display result
-# For nightly build errors
-sys.exit ((1, 0)[result])