summaryrefslogtreecommitdiff
path: root/cesar/cp2/beacon
diff options
context:
space:
mode:
authorlaranjeiro2008-04-22 15:16:16 +0000
committerlaranjeiro2008-04-22 15:16:16 +0000
commit5da71f58e4d237c03f2ae37947676ee5d592f02e (patch)
tree89b84af2638408570da42d83ad5d93fa8bc3ea79 /cesar/cp2/beacon
parent45737453f0d0e88d863d7ad054ff328192a192a8 (diff)
beacon: Specified the beacon module.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1872 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp2/beacon')
-rw-r--r--cesar/cp2/beacon/beacon.h116
-rw-r--r--cesar/cp2/beacon/beacons.h115
-rw-r--r--cesar/cp2/beacon/doc/Makefile19
-rw-r--r--cesar/cp2/beacon/doc/beacons.xmi500
-rw-r--r--cesar/cp2/beacon/doc/processingbeacon.sdl22
-rw-r--r--cesar/cp2/beacon/doc/receivebeacon.sdl8
-rw-r--r--cesar/cp2/beacon/doc/spec.odtbin0 -> 266577 bytes
-rw-r--r--cesar/cp2/beacon/doc/study.odtbin0 -> 452327 bytes
-rw-r--r--cesar/cp2/beacon/inc/beacon.h146
-rw-r--r--cesar/cp2/beacon/inc/beacons.h132
-rw-r--r--cesar/cp2/beacon/inc/bentry.h346
-rw-r--r--cesar/cp2/beacon/inc/common.h47
12 files changed, 1204 insertions, 247 deletions
diff --git a/cesar/cp2/beacon/beacon.h b/cesar/cp2/beacon/beacon.h
new file mode 100644
index 0000000000..ec0376d1b9
--- /dev/null
+++ b/cesar/cp2/beacon/beacon.h
@@ -0,0 +1,116 @@
+#ifndef cp2_beacon_beacon_h
+#define cp2_beacon_beacon_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/beacon/beacon.h
+ * \brief Beacon module public API.
+ * \ingroup cp2_beacon
+ *
+ * Beacon module. Use to generate and read a beacon.
+ */
+
+/** Types of possible beacons. */
+enum cp_beacon_types_e
+{
+ CP_BEACON_CENTRAL_BEACON,
+ CP_BEACON_DISCOVER_BEACON,
+ CP_BEACON_PROXY_BEACON
+};
+
+/** Forward declaration. */
+typedef struct cp_beacon_t cp_beacon_t;
+
+/**
+ * Initialise the beacon module.
+ * \param ctx the module context.
+ */
+void
+cp_beacon_init (cp_t *ctx);
+
+/**
+ * Unitialise the beacon module.
+ * \param ctx the module context.
+ */
+void
+cp_beacon_uninit (cp_t *ctx);
+
+/**
+ * Initialise the function to call each time the beacon module needs to
+ * post an event in the FSM.
+ * \param ctx the module context.
+ * \param user_data The user data to provide on function call.
+ * \param cb Function call back.
+ *
+ * Those events are :
+ * - beacon_timer, on this event the fsm shall call the following
+ * functions.
+ * - CCo : send central beacon
+ * - UCo : send discover beacon
+ * - POND : create_default_schedules
+ * - Sta, Usta : beacon not receive.
+ * - beacon_received
+ */
+void
+cp_beacon_init_event_callback (cp_t *ctx, undef user_data, undef cb);
+
+/**
+ * Generate and send a beacon when the station acts as a CCo or Unassociated
+ * CCo.
+ * \param ctx the module context.
+ * \param beacon_type The beacon type to send (central, discover or proxy).
+ *
+ */
+void
+cp_beacon_cco_send_beacon (cp_t *ctx, cp_beacon_type_t beacon_type);
+
+/**
+ * Generate and send a discover beacon.
+ * \param ctx the module context.
+ *
+ */
+extern inline void
+cp_beacon_cco_send_central_beacon (cp_t *ctx)
+{
+ cp_beacon_cco_send_beacon (ctx,
+ CP_BEACON_CENTRAL_BEACON);
+}
+
+/**
+ * Generate and send a discover beacon.
+ * \param ctx the module context.
+ *
+ */
+extern inline void
+cp_beacon_cco_send_discover_beacon (cp_t *ctx)
+{
+ cp_beacon_cco_send_beacon (ctx,
+ CP_BEACON_DISCOVER_BEACON);
+}
+
+/**
+ * Create default schedules and provide it to the Channel Access.
+ * \param ctx the module context.
+ *
+ */
+void
+cp_beacon_create_default_schedules (cp_t *ctx);
+
+/**
+ * Process the beacon received.
+ * \param ctx the module context.
+ *
+ * It will only process a beacon and the first one received. At the end
+ * of this function it shall verify the countdown values of the bentry
+ * manager, it some are equal to one, it shall post an event in the FSM
+ * for each
+ */
+void
+cp_beacon_process (cp_t *ctx);
+
+#endif /* cp2_beacon_beacon_h */
diff --git a/cesar/cp2/beacon/beacons.h b/cesar/cp2/beacon/beacons.h
deleted file mode 100644
index 49d2231248..0000000000
--- a/cesar/cp2/beacon/beacons.h
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifndef cp_beacon_beacons_h
-#define cp_beacon_beacons_h
-/* Cesar project {{{
- *
- * Copyright (C) 2008 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file cp/beacon/beacons.h
- * \brief CP Beacon module
- * \ingroup cp_beacon
- *
- */
-#include <cyg/kernel/kapi.h>
-#include <cyg/hal/hal_arch.h>
-
-#include "cp/beacon/forward.h"
-
-#include "interface/interface.h"
-#include "mac/ca/ca.h"
-#include "mac/pbproc/pbproc.h"
-#include "mac/common/store.h"
-#include "hal/phy/phy.h"
-#include "hal/timer/timer.h"
-#include "cp/station/station.h"
-#include "cp/secu/secu.h"
-#include "cp/cco/cco.h"
-
-/** Call back used when the timer calls the beacon modules.
- * This will be use to provide the data to the CP.
- * The CP shall keep the event to request the beacon to process by calling the
- * right function.
- *
- * \param user_data the data registered in the callback.
- */
-typedef void (*cp_beacon_timer_cb_t) (void *user_data);
-
-enum cp_beacon_type
-{
- CP_BEACON_CENTRAL_BEACON,
- CP_BEACON_DISCOVER_BEACON,
- CP_BEACON_PROXY_BACON
-};
-
-/** Init the beacons module.
- * \param ctx the CP context.
- *
- * The Beacon module will need the following context to work :
- * - interface the interface context.
- * - phy the phy context.
- * - sta the station context.
- * - secu the control plane security layer context.
- * - ca the Channel Access context.
- * - mac_store mac_store.
- * - pbproc pbproc.
- * - cco the cco context.
- * - cb the function to call back when the module is awake by the
- * timer.
- * \return the beacon context.
- */
-cp_beacon_t *
-cp_beacon_init(cp_t *ctx);
-
-/** Initialise the beacon timer function call back.
- * \param ctx the cp context.
- * \param user_data a data register to call back.
- * \param cb the function to call.
- */
-void
-cp_beacon_init_timer_callback (cp_t *ctx, void *user_data,
- cp_beacon_timer_cb_t cb);
-
-/** Uninit the beacon module
- * \param ctx the cp context.
- */
-void
-cp_beacon_uninit(cp_t *ctx);
-
-/** Compute the AC line frequency from the PRATIC register.
- * \param ctx cp context.
- */
-void
-cp_beacon_acl_frequency_detection (cp_t *ctx);
-
-/** Send a beacon when the STA is acting as a CCo.
- * \param ctx the cp context.
- * \param beacon_type beacon type.
- */
-void
-cp_beacon_cco_send_beacon (cp_t *ctx, uint beacon_type);
-
-
-/** Generate the central beacon when the STA acts as a CCo.
- * \param ctx the cp context.
- */
-extern inline void
-cp_beacon_cco_send_central_beacon (cp_t *ctx)
-{
- dbg_assert (ctx);
- cp_beacon_cco_send_beacon (ctx, CP_BEACON_CENTRAL_BEACON);
-}
-
-/** Generate the discover beacon when the STA acts as a UCCo.
- * \param ctx the beacon context.
- */
-extern inline void
-cp_beacon_cco_send_discover_beacon (cp_t *ctx)
-{
- dbg_assert (ctx);
- cp_beacon_cco_send_beacon (ctx, CP_BEACON_DISCOVER_BEACON);
-}
-
-#endif /* cp_beacon_beacons_h */
diff --git a/cesar/cp2/beacon/doc/Makefile b/cesar/cp2/beacon/doc/Makefile
new file mode 100644
index 0000000000..94decea66d
--- /dev/null
+++ b/cesar/cp2/beacon/doc/Makefile
@@ -0,0 +1,19 @@
+PAGES = receivebeacon processingbeacon
+
+TOOLS_DIR = ../../../common/tools
+DOTFLAGS = -Gbgcolor='\#f7f7f7' -Nstyle=filled -Nfillcolor=white
+CONVERTFLAGS = -border 1 -bordercolor '\#d7d7d7'
+
+
+png: $(PAGES:%=%.png)
+ps: $(PAGES:%=%.ps)
+
+%.png: %.ps
+ convert $(CONVERTFLAGS) $< $@
+ rm -f $<
+
+%.ps: %.sdl $(TOOLS_DIR)/sdl.ps $(TOOLS_DIR)/sdl2dot
+ $(TOOLS_DIR)/sdl2dot $< | dot $(DOTFLAGS) -Tps -l $(TOOLS_DIR)/sdl.ps -o $@
+
+clean:
+ rm -f $(PAGES:%=%.png)
diff --git a/cesar/cp2/beacon/doc/beacons.xmi b/cesar/cp2/beacon/doc/beacons.xmi
new file mode 100644
index 0000000000..cbcf0354bf
--- /dev/null
+++ b/cesar/cp2/beacon/doc/beacons.xmi
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2008-04-22T17:28:14" xmi.version="1.2" >
+ <XMI.header>
+ <XMI.documentation>
+ <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+ <XMI.exporterVersion>1.5.8</XMI.exporterVersion>
+ <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+ </XMI.documentation>
+ <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+ <UML:Model isSpecification="false" isLeaf="false" isRoot="false" xmi.id="m1" isAbstract="false" name="Modèle UML" >
+ <UML:Namespace.ownedElement>
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="folder" isRoot="false" isAbstract="false" name="folder" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="datatype" isRoot="false" isAbstract="false" name="datatype" />
+ <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="enum" isRoot="false" isAbstract="false" name="enum" />
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Logical View" isRoot="false" isAbstract="false" name="Logical View" >
+ <UML:Namespace.ownedElement>
+ <UML:Package stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Datatypes" isRoot="false" isAbstract="false" name="Datatypes" >
+ <UML:Namespace.ownedElement>
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="R9NuP1byDcOU" isRoot="false" isAbstract="false" name="int" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="eVuCjs6naR38" isRoot="false" isAbstract="false" name="char" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="cnaRv3q3OkSQ" isRoot="false" isAbstract="false" name="boolean" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="KOdwl5INaBZH" isRoot="false" isAbstract="false" name="float" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="3f3c56khsI8l" isRoot="false" isAbstract="false" name="double" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="MyoigH80dkxO" isRoot="false" isAbstract="false" name="byte" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="nFjMOIdSwg41" isRoot="false" isAbstract="false" name="short" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="lmib4oMOmB7Q" isRoot="false" isAbstract="false" name="long" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="QDR1xMOjZ75y" isRoot="false" isAbstract="false" name="String" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="QTe9foTn6zxN" isRoot="false" isAbstract="false" name="cp_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="5YxBXuZ7VHyB" isRoot="false" isAbstract="false" name="cp_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="93yNIJC7iLRJ" isRoot="false" isAbstract="false" name="cp_beacon_desc_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="sSOkyZ3vfjJC" isRoot="false" isAbstract="false" name="cp_beacon_desc_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="oDq9Iugm7iv1" isRoot="false" isAbstract="false" name="u16" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="QVpFZRIuBTNW" isRoot="false" isAbstract="false" name="u64" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="o3tgJr755xDL" isRoot="false" isAbstract="false" name="u8" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="qt7va3x0WkF5" isRoot="false" isAbstract="false" name="u32" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="9VyLxLpjMhQd" isRoot="false" isAbstract="false" name="uint" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="YXjbSuwIn4EL" isRoot="false" isAbstract="false" name="void *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="fJgTLenqU1j3" isRoot="false" isAbstract="false" name="mac_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="2pjetCZaTBxu" isRoot="false" isAbstract="false" name="u8 *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="tXVYafgIGaNQ" isRoot="false" isAbstract="false" name="undef" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="AAz7wcfxctFf" isRoot="false" isAbstract="false" name="cp_beacon_bentry_schedules_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="pU0m9erF6lKO" isRoot="false" isAbstract="false" name="cp_beacon_bentry_schedules_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="lZ62VwEYQKdt" isRoot="false" isAbstract="false" name="mac_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="BlYll2hD2fUk" isRoot="false" isAbstract="false" name="pbproc_tx_beacon_params_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="FS9GybcB0p5o" isRoot="false" isAbstract="false" name="mfs_tx_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="MAfpg7Apertx" isRoot="false" isAbstract="false" name="cp_sta_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="MTWZA8u8WYSg" isRoot="false" isAbstract="false" name="cp_net_t *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="ohGDMWCtIAFk" isRoot="false" isAbstract="false" name="pbproc_tx_beacon_params_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="I9jv9yhyWUaz" isRoot="false" isAbstract="false" name="hal_timer_instance_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="RxxAih1R7pg2" isRoot="false" isAbstract="false" name="cyg_handle_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="CtUyy6YUakdg" isRoot="false" isAbstract="false" name="cyg_alarm" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="CePeTGkuBf2t" isRoot="false" isAbstract="false" name="cyg_counter" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="CGLMN5YS6jdy" isRoot="false" isAbstract="false" name="uint *" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="f3gZVQ3FuZSY" isRoot="false" isAbstract="false" name="cp_beacon_event_cb_t" />
+ <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="ghnnHqGwuwTP" isRoot="false" isAbstract="false" name="cp_beacon_event_cb_t *" />
+ </UML:Namespace.ownedElement>
+ </UML:Package>
+ <UML:Class comment="Beacon module. Use to generate and read a beacon." isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="NiCCTMNHialM" isRoot="false" isAbstract="false" name="cp_beacon_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="The head of the received beacon chain." isSpecification="false" visibility="private" xmi.id="JCYCqFU2p3pR" type="sSOkyZ3vfjJC" name="head_beacon_recv" />
+ <UML:Attribute comment="The tail of the receive beacon chain." isSpecification="false" visibility="private" xmi.id="ztR22PRRfzxc" type="sSOkyZ3vfjJC" name="tail_beacon_recv" />
+ <UML:Attribute isSpecification="false" visibility="private" xmi.id="16U2YvTJxiuS" type="l6bOvueVxeym" name="bentry" />
+ <UML:Attribute comment="Central beacon environement." isSpecification="false" visibility="private" xmi.id="mUavKhrt5Qso" type="S9eUo7DcuX3j" name="central" />
+ <UML:Attribute comment="Discover beacon environement." isSpecification="false" visibility="private" xmi.id="ZTjeucQLNU0V" type="S9eUo7DcuX3j" name="discover" />
+ <UML:Attribute comment="Proxy beacon environement." isSpecification="false" visibility="private" xmi.id="ZMhwrhPy4npv" type="S9eUo7DcuX3j" name="proxy" />
+ <UML:Attribute comment="The leon timer to be programmed and awake each beacon periood.
+Each time the timer expires, the function register by the beacon shall post an event in the FSM." isSpecification="false" visibility="private" xmi.id="ZQsAqVucddIr" type="I9jv9yhyWUaz" name="leon_timer" />
+ <UML:Attribute comment="The ecos timer to use when the duration time is too long for the leon timer." isSpecification="false" visibility="private" xmi.id="K3KQrzS1quxo" type="CePeTGkuBf2t" name="ecos_timer" />
+ <UML:Attribute comment="The ecos timer handler." isSpecification="false" visibility="private" xmi.id="0VGYDtEPYc2z" type="RxxAih1R7pg2" name="ecos_timer_handle" />
+ <UML:Attribute comment="The ecos Alarm, It allows ecos to raise an alarm when the timer expires." isSpecification="false" visibility="private" xmi.id="smt2PvthxE7o" type="CtUyy6YUakdg" name="alarm" />
+ <UML:Attribute comment="The alarm handler." isSpecification="false" visibility="private" xmi.id="BXn1RlnPE3yS" type="RxxAih1R7pg2" name="alarm_handle" />
+ <UML:Attribute comment="The function to call on timer expiration." isSpecification="false" visibility="private" xmi.id="Hs122ihhPUUg" type="ghnnHqGwuwTP" name="event_cb" />
+ <UML:Attribute comment="The data to provide on event_cb." isSpecification="false" visibility="private" xmi.id="JiaDc3awYC9a" type="YXjbSuwIn4EL" name="event_user_data" />
+ <UML:Operation comment="Initialise the beacon module." isSpecification="false" isLeaf="false" visibility="public" xmi.id="CA57xXjh1tLI" isRoot="false" isAbstract="false" isQuery="false" name="init" />
+ <UML:Operation comment="Unitialise the beacon module." isSpecification="false" isLeaf="false" visibility="public" xmi.id="L3pJY5PiAveK" isRoot="false" isAbstract="false" isQuery="false" name="uninit" />
+ <UML:Operation comment="Initialise the function to call each time the beacon module needs to post an event in the FSM.
+Those events are :
+ - beacon_timer, on this event the fsm shall call the following functions.
+ - CCo : send central beacon
+ - UCo : send discover beacon
+ - POND : create_default_schedules
+ - Sta, Usta : beacon not receive.
+ - beacon_received." isSpecification="false" isLeaf="false" visibility="public" xmi.id="iIrX3tiOuXfR" isRoot="false" isAbstract="false" isQuery="false" name="init_event_callback" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="The user data to provide on function call." isSpecification="false" visibility="private" xmi.id="YXOQ31rc6zL2" value="" type="YXjbSuwIn4EL" name="user_data" />
+ <UML:Parameter comment="Function call back." isSpecification="false" visibility="private" xmi.id="SMIkJxZJT4fu" value="" type="f3gZVQ3FuZSY" name="cb" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Generate and send a beacon when the station acts as a CCo or Unassociated CCo." isSpecification="false" isLeaf="false" visibility="public" xmi.id="0WCJ0FyuKdd2" isRoot="false" isAbstract="false" isQuery="false" name="cco_send_beacon" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="The beacon type to send (central, discover or proxy)." isSpecification="false" visibility="private" xmi.id="OCIItttuQ6DO" value="" type="dEeErjr5mvtk" name="beacon_type" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Generate and send a discover beacon." isSpecification="false" isLeaf="false" visibility="public" xmi.id="09aBIX1GwDYC" isRoot="false" isAbstract="true" isQuery="false" name="cco_send_central_beacon" />
+ <UML:Operation comment="Generate and send a discover beacon." isSpecification="false" isLeaf="false" visibility="public" xmi.id="7Q51o9CCSKS6" isRoot="false" isAbstract="true" isQuery="false" name="cco_send_discover_beacon" />
+ <UML:Operation comment="Create default schedules and provide it to the Channel Access." isSpecification="false" isLeaf="false" visibility="public" xmi.id="7A7gOonaDENp" isRoot="false" isAbstract="false" isQuery="false" name="create_default_schedules" />
+ <UML:Operation comment="Process the beacon received. It will only process a beacon and the first one received. At the end of this function it shall verify the countdown values of the bentry manager, it some are equal to one, it shall post an event in the FSM for each." isSpecification="false" isLeaf="false" visibility="public" xmi.id="PHaWxuxGmNdX" isRoot="false" isAbstract="false" isQuery="false" name="process" />
+ <UML:Operation comment="The beacon received from the AVLN. Add the beacon to the list of received beacon, and raise the flag beacon received in STA_CORE." isSpecification="false" isLeaf="false" visibility="private" xmi.id="rOBKdX15uXBI" isRoot="false" isAbstract="false" isQuery="false" name="receive" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="The beacon received." isSpecification="false" visibility="private" xmi.id="x8gQXtHc1NIQ" value="" type="sSOkyZ3vfjJC" name="beacon" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Verify the conflict of SNID. If the snid corresponds too our SNID and the NID does not match, it shall post a message in the FSM to prevent the CCo Core." isSpecification="false" isLeaf="false" visibility="private" xmi.id="tsreDSBVehfS" isRoot="false" isAbstract="false" isQuery="false" name="detect_snid_conficts" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="The beacon's SNID beeing process." isSpecification="false" visibility="private" xmi.id="0ZcfYXFQN44Z" value="" type="oDq9Iugm7iv1" name="beacon_snid" />
+ <UML:Parameter comment="The beacon's NID." isSpecification="false" visibility="private" xmi.id="LmBUNLgNuG0S" value="" type="QVpFZRIuBTNW" name="beacons_nid" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Verify if the AVLN exists in the sta_mgr. If not it shall create the AVLN with the data provided.
+If the AVLN exists it shall update the AVLN data.
+If the Beacon is from our AVLN and the stei does not correspond to the CCo, it shall update the AVLN in the sta manager and post an event in the FSM." isSpecification="false" isLeaf="false" visibility="private" xmi.id="zv9gFq6tPba0" isRoot="false" isAbstract="false" isQuery="false" name="verify_avln" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="The beacon's SNID." isSpecification="false" visibility="private" xmi.id="4UvKFzWb2fud" value="" type="oDq9Iugm7iv1" name="beacon_snid" />
+ <UML:Parameter comment="The beacon's NID." isSpecification="false" visibility="private" xmi.id="XRHYRsuQl36z" value="" type="QVpFZRIuBTNW" name="beacon_nid" />
+ <UML:Parameter comment="The source TEI." isSpecification="false" visibility="private" xmi.id="sBsHkSFow87B" value="" type="o3tgJr755xDL" name="stei" />
+ <UML:Parameter comment="The beacon type." isSpecification="false" visibility="private" xmi.id="7dk7Jfko40MV" value="" type="o3tgJr755xDL" name="beacon_type" />
+ <UML:Parameter comment="The mac address of the station which has sent the beacon (if present in the bentry)." isSpecification="false" visibility="private" xmi.id="qEtZFxY78QMr" value="" type="fJgTLenqU1j3" name="mac_addr" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Update the hrybrid mode in the station. Update the Mac config and the station own data." isSpecification="false" isLeaf="false" visibility="private" xmi.id="M3yrFjCPpQa3" isRoot="false" isAbstract="false" isQuery="false" name="hybridmode_update" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter comment="The new value of the hybrid mode." isSpecification="false" visibility="private" xmi.id="cLesgh82oN2s" value="" type="o3tgJr755xDL" name="hm" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Enumeration stereotype="enum" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="dEeErjr5mvtk" isRoot="false" isAbstract="false" name="cp_beacon_type_t" >
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="dEeErjr5mvtk" xmi.id="R6d2pxd3ZrvJ" isRoot="false" isAbstract="false" name="CP_BEACON_CENTRAL_BEACON" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="dEeErjr5mvtk" xmi.id="dyAC3z5U5iUt" isRoot="false" isAbstract="false" name="CP_BEACON_DISCOVER_BEACON" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="dEeErjr5mvtk" xmi.id="HX9OlCAM8KYB" isRoot="false" isAbstract="false" name="CP_BEACON_PROXY_BACON" />
+ </UML:Enumeration>
+ <UML:Enumeration stereotype="enum" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Vd2VI0H78FNa" isRoot="false" isAbstract="false" name="cp_pwl_fequency_t" >
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="Vd2VI0H78FNa" xmi.id="o1VyuW0O91rP" isRoot="false" isAbstract="false" name="CP_PWL_FREQ_60" />
+ <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" namespace="Vd2VI0H78FNa" xmi.id="WsUNEfH2emyZ" isRoot="false" isAbstract="false" name="CP_PWL_FREQ_50" />
+ </UML:Enumeration>
+ <UML:Enumeration stereotype="enum" comment="Values possible for the theorical values of the beacon period in ntb ticks." isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="WynxBsM8ngv1" isRoot="false" isAbstract="false" name="cp_pwl_bp_t" >
+ <UML:EnumerationLiteral comment="1 000 000 ticks." isSpecification="false" isLeaf="false" visibility="public" namespace="WynxBsM8ngv1" xmi.id="Q2E40q7VmuSv" isRoot="false" isAbstract="false" name="CP_PWL_BP_50" />
+ <UML:EnumerationLiteral comment="833 333 ticks." isSpecification="false" isLeaf="false" visibility="public" namespace="WynxBsM8ngv1" xmi.id="aTaIt9hH9vJA" isRoot="false" isAbstract="false" name="CP_PWL_BP_60" />
+ </UML:Enumeration>
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="l6bOvueVxeym" isRoot="false" isAbstract="false" name="cp_beacon_bentry_mgr_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="Previous countdown of the Persistent Schedule Bentry." isSpecification="false" visibility="public" xmi.id="EOdPHwR1twjV" type="o3tgJr755xDL" name="persistent_schedule_pscd" />
+ <UML:Attribute comment="Current coutndown of the Persistent Schedule." isSpecification="false" visibility="public" xmi.id="PA5z4i5toSeZ" type="o3tgJr755xDL" name="persistent_schedule_cscd" />
+ <UML:Attribute comment="Encryption key change countdown." isSpecification="false" visibility="public" xmi.id="1T13LxkqNstK" type="o3tgJr755xDL" name="eks_kccd" />
+ <UML:Attribute comment="The key which is bein change. 0 for nek, 1 for nmk." isSpecification="false" visibility="public" xmi.id="xcQqOsUxcJCp" type="cnaRv3q3OkSQ" name="eks_kbc" />
+ <UML:Attribute comment="The eks index to use once the countdown has expired." isSpecification="false" visibility="public" xmi.id="53sSvmksOAhm" type="o3tgJr755xDL" name="eks_neweks" />
+ <UML:Attribute comment="Handover in progress countdown." isSpecification="false" visibility="public" xmi.id="IYlXII8Ij9J4" type="o3tgJr755xDL" name="handover_cd" />
+ <UML:Attribute comment="The new CCo tei. This will be inserted in the bentry until the countdown does not expire." isSpecification="false" visibility="public" xmi.id="19ibSsRkQAGg" type="o3tgJr755xDL" name="handover_newtei" />
+ <UML:Attribute comment="Beacon relocation bentry countdown." isSpecification="false" visibility="public" xmi.id="JZr4x1IdReaa" type="o3tgJr755xDL" name="relocation_cd" />
+ <UML:Attribute comment="The relocation type." isSpecification="false" visibility="public" xmi.id="7pqg6xcIpLK4" type="cnaRv3q3OkSQ" name="relocation_type" />
+ <UML:Attribute comment="Relocation leaving group flag." isSpecification="false" visibility="public" xmi.id="B251tkRCJIEE" type="cnaRv3q3OkSQ" name="relocation_lgf" />
+ <UML:Attribute comment="The relocation in the beacon period. A single value corresponds to 0.32 micro seconds i.e. 0x1 corresponds to 0.32 micro seconds, 2 corresponds to 0.64 micro seconds and so on." isSpecification="false" visibility="public" xmi.id="hSxyi9A0ezgm" type="9VyLxLpjMhQd" name="relocation_rlo" />
+ <UML:Attribute comment="The relocation slot id." isSpecification="false" visibility="public" xmi.id="Pz0c5ut7NSvB" type="o3tgJr755xDL" name="relocation_slotid" />
+ <UML:Attribute comment="The AC line sync countdown." isSpecification="false" visibility="public" xmi.id="JpABk8vPasLH" type="o3tgJr755xDL" name="acl_cd" />
+ <UML:Attribute comment="The AC Line sync reason code." isSpecification="false" visibility="public" xmi.id="0VFeVvQstPSy" type="o3tgJr755xDL" name="acl_reason_code" />
+ <UML:Attribute comment="Numslots change countdown." isSpecification="false" visibility="public" xmi.id="HL3elzp4mzDX" type="o3tgJr755xDL" name="numslot_cd" />
+ <UML:Attribute comment="New number of slots." isSpecification="false" visibility="public" xmi.id="89ugzGxzlAdG" type="o3tgJr755xDL" name="numslots_new" />
+ <UML:Attribute comment="Change Hybrid mode countdown." isSpecification="false" visibility="public" xmi.id="628zPavgtwLe" type="o3tgJr755xDL" name="hm_cd" />
+ <UML:Attribute comment="The new hybrid mode value." isSpecification="false" visibility="public" xmi.id="vAhi8uDG37u1" type="o3tgJr755xDL" name="hm_new" />
+ <UML:Attribute comment="Change snid countdown." isSpecification="false" visibility="public" xmi.id="Nq090cN4cU11" type="o3tgJr755xDL" name="snid_cd" />
+ <UML:Attribute comment="The new snid to change." isSpecification="false" visibility="public" xmi.id="4wfyt0am9HSH" type="oDq9Iugm7iv1" name="snid_new" />
+ <UML:Attribute comment="Last Station TEI to get the next station to request a discover beacon." isSpecification="false" visibility="public" xmi.id="QZnwvCV4Yif0" type="o3tgJr755xDL" name="station_discover" />
+ <UML:Operation comment="Initialise the bentry mgr." isSpecification="false" isLeaf="false" visibility="public" xmi.id="HWpi8PJGD7uJ" isRoot="false" isAbstract="false" isQuery="false" name="init" />
+ <UML:Operation comment="Uninitialise the bentry manager." isSpecification="false" isLeaf="false" visibility="public" xmi.id="2UZqotuztx0m" isRoot="false" isAbstract="false" isQuery="false" name="uninit" />
+ <UML:Operation comment="Decrements the countdowns. for each countdown which will expire (value equals 1) an associated event is raise in the FSM." isSpecification="false" isLeaf="false" visibility="public" xmi.id="SMyBTFGYI8yC" isRoot="false" isAbstract="false" isQuery="false" name="countdown" />
+ <UML:Operation comment="Read or write the bentry header." isSpecification="false" isLeaf="false" visibility="public" xmi.id="o7fQ9q3hFkbG" isRoot="false" isAbstract="false" isQuery="false" name="process_header" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="mX1yjBUpr8tw" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start address of the bentry." isSpecification="false" visibility="private" xmi.id="F6BnZNjR9q4Z" value="" type="2pjetCZaTBxu" name="addr" />
+ <UML:Parameter comment="The header of the bentry to set or get." isSpecification="false" visibility="private" xmi.id="0saf8LGOECBV" value="" type="2pjetCZaTBxu" name="header" />
+ <UML:Parameter comment="The type to set or get." isSpecification="false" visibility="private" xmi.id="8ig64agIep3D" value="" type="2pjetCZaTBxu" name="type" />
+ <UML:Parameter comment="Request to read the header from the address provided, or to write the data to this address.
+0 for Read, 1 to write." isSpecification="false" visibility="private" xmi.id="CmcJdftbXTGd" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Process the schedules. In the read option, this function can be called twice to complete the full beacon period. This shall be applyed at the end of the beacon period process. On the write process it shall read the schedules prepared by the bandwith manager." isSpecification="false" isLeaf="false" visibility="public" xmi.id="hI0dJNhG5k0K" isRoot="false" isAbstract="false" isQuery="false" name="schedules" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="H5yFNxhg65Ru" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The bentry start address." isSpecification="false" visibility="private" xmi.id="1RJ9QnqzvBoJ" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="The read_write status." isSpecification="false" visibility="private" xmi.id="635BHWfxmfY3" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ <UML:Parameter comment="The schedules object to fill when the schedules are received. Not use when the function shall write the schedules." isSpecification="false" visibility="private" xmi.id="jxyhXqwBfOBQ" value="" type="pU0m9erF6lKO" name="schedules" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the regions in the beacon. When reading the regions it shall directly update the data in the region manager (only in CCo mode). On the write process it shall get the regions from the region manager." isSpecification="false" isLeaf="false" visibility="public" xmi.id="YqHnu25ItGIu" isRoot="false" isAbstract="false" isQuery="false" name="regions" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="xrNq5diQYxwI" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The bentry address to process." isSpecification="false" visibility="private" xmi.id="KxFYkXrTUoA0" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write processing." isSpecification="false" visibility="private" xmi.id="c4BFTMfzAwm4" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the mac address in the beacon. If the reading boolean is set, it will store the mac address stocked in the bentry in the parameter provided." isSpecification="false" isLeaf="false" visibility="public" xmi.id="VmmxYwxAz6PS" isRoot="false" isAbstract="false" isQuery="false" name="mac_address" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="ygW6rJmz2a4s" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The address of the start of the bentry." isSpecification="false" visibility="private" xmi.id="R3PbzBeu01l5" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="The mac address to store or the variable to set when it is reading a mac address bentry." isSpecification="false" visibility="private" xmi.id="5U85Tr85JaEg" value="" type="lZ62VwEYQKdt" name="mac_address" />
+ <UML:Parameter comment="Read of write process." isSpecification="false" visibility="private" xmi.id="cRTBPORsADng" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write a discover info bentry. It will directly use the data from the sta manager." isSpecification="false" isLeaf="false" visibility="public" xmi.id="bKhu6exehnPG" isRoot="false" isAbstract="false" isQuery="false" name="discover_info_bentry" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="r1gLiit3e34O" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The bentry start address." isSpecification="false" visibility="private" xmi.id="tPkobIEwu64e" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="The station source TEI." isSpecification="false" visibility="private" xmi.id="UlVUQIBcren7" value="" type="o3tgJr755xDL" name="tei" />
+ <UML:Parameter comment="read or write process." isSpecification="false" visibility="private" xmi.id="yqLWvwONhrr8" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write a discover bentry. If write it will request to next station in the station manager to request a discover beacon. This will call the station manager to get the next station corresponding to the station discover variable." isSpecification="false" isLeaf="false" visibility="public" xmi.id="KEv0os0ZbMXQ" isRoot="false" isAbstract="false" isQuery="false" name="discover" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="8ODdSvekAZkw" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start of the bentry address." isSpecification="false" visibility="private" xmi.id="h3LbRiIJYORY" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write the bentry." isSpecification="false" visibility="private" xmi.id="RiW123Rh5kIU" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the bpsto. store the address of the bpsto in the bpsto variable of the beacon_common structure data." isSpecification="false" isLeaf="false" visibility="public" xmi.id="bnflIhKyMIae" isRoot="false" isAbstract="false" isQuery="false" name="bpsto" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="1A1MTc0UwU1x" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="Bentry start address." isSpecification="false" visibility="private" xmi.id="3KWX3mhF5vTl" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="To store the address of the beacon period start time offset." isSpecification="false" visibility="private" xmi.id="pmB0a2h9pMs5" value="" type="2pjetCZaTBxu" name="bpsto" />
+ <UML:Parameter comment="Get the value of the bpsto." isSpecification="false" visibility="private" xmi.id="r23Pphk9em8z" value="" type="CGLMN5YS6jdy" name="value" />
+ <UML:Parameter comment="Read or Write the value." isSpecification="false" visibility="private" xmi.id="dqHIcNFoda8y" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the encryption key change bentry. on write it use the data stored in the context. On read it shall update the context data." isSpecification="false" isLeaf="false" visibility="public" xmi.id="jGZnzqHsYZHh" isRoot="false" isAbstract="false" isQuery="false" name="eks_change" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start address bentry." isSpecification="false" visibility="private" xmi.id="NtzQjWufJJDh" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write boolean status." isSpecification="false" visibility="private" xmi.id="ujvZ59GpOpcL" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the CCo Handover bentry. on write it use the data stored in the context. On read it shall update the context data." isSpecification="false" isLeaf="false" visibility="public" xmi.id="jGZnzqHsYZHh" isRoot="false" isAbstract="false" isQuery="false" name="hoip_change" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start address bentry." isSpecification="false" visibility="private" xmi.id="NtzQjWufJJDh" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write boolean status." isSpecification="false" visibility="private" xmi.id="ujvZ59GpOpcL" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the beacon relocation bentry. on write it use the data stored in the context. On read it shall update the context data." isSpecification="false" isLeaf="false" visibility="public" xmi.id="jGZnzqHsYZHh" isRoot="false" isAbstract="false" isQuery="false" name="relocation" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start address bentry." isSpecification="false" visibility="private" xmi.id="NtzQjWufJJDh" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write boolean status." isSpecification="false" visibility="private" xmi.id="ujvZ59GpOpcL" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the beacon AC line bentry. on write it use the data stored in the context. On read it shall update the context data." isSpecification="false" isLeaf="false" visibility="public" xmi.id="jGZnzqHsYZHh" isRoot="false" isAbstract="false" isQuery="false" name="acl" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start address bentry." isSpecification="false" visibility="private" xmi.id="NtzQjWufJJDh" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write boolean status." isSpecification="false" visibility="private" xmi.id="ujvZ59GpOpcL" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the change numslots bentry. on write it use the data stored in the context. On read it shall update the context data." isSpecification="false" isLeaf="false" visibility="public" xmi.id="jGZnzqHsYZHh" isRoot="false" isAbstract="false" isQuery="false" name="num_slots_change" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start address bentry." isSpecification="false" visibility="private" xmi.id="NtzQjWufJJDh" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write boolean status." isSpecification="false" visibility="private" xmi.id="ujvZ59GpOpcL" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the Hm change. on write it use the data stored in the context. On read it shall update the context data." isSpecification="false" isLeaf="false" visibility="public" xmi.id="jGZnzqHsYZHh" isRoot="false" isAbstract="false" isQuery="false" name="hm_change" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start address bentry." isSpecification="false" visibility="private" xmi.id="NtzQjWufJJDh" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write boolean status." isSpecification="false" visibility="private" xmi.id="ujvZ59GpOpcL" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ <UML:Operation comment="Read or write the Change SNID. on write it use the data stored in the context. On read it shall update the context data." isSpecification="false" isLeaf="false" visibility="public" xmi.id="jGZnzqHsYZHh" isRoot="false" isAbstract="false" isQuery="false" name="snid_change" >
+ <UML:BehavioralFeature.parameter>
+ <UML:Parameter kind="return" xmi.id="" type="2pjetCZaTBxu" />
+ <UML:Parameter comment="The start address bentry." isSpecification="false" visibility="private" xmi.id="NtzQjWufJJDh" value="" type="2pjetCZaTBxu" name="bentry" />
+ <UML:Parameter comment="Read or write boolean status." isSpecification="false" visibility="private" xmi.id="ujvZ59GpOpcL" value="" type="cnaRv3q3OkSQ" name="read_write" />
+ </UML:BehavioralFeature.parameter>
+ </UML:Operation>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Association isSpecification="false" visibility="public" namespace="Logical View" xmi.id="47rF58Y2yD87" name="" >
+ <UML:Association.connection>
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="NzmXuqBeMylW" aggregation="none" type="NiCCTMNHialM" name="" />
+ <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="UR2Q5qOm6AZo" aggregation="none" type="tXVYafgIGaNQ" name="" />
+ </UML:Association.connection>
+ </UML:Association>
+ <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="S9eUo7DcuX3j" isRoot="false" isAbstract="false" name="cp_beacon_common_t" >
+ <UML:Classifier.feature>
+ <UML:Attribute comment="Last beacon receive or generated." isSpecification="false" visibility="public" xmi.id="DspJfBRVcxIA" type="sSOkyZ3vfjJC" name="beacon" />
+ <UML:Attribute comment="The beacon period start time offset address to provide it to the pbproc." isSpecification="false" visibility="public" xmi.id="ggfRnOp4Wjxb" type="BlYll2hD2fUk" name="bpsto" />
+ <UML:Attribute comment="Number of beacon received." isSpecification="false" visibility="public" xmi.id="EA7KDBs7wYPb" type="9VyLxLpjMhQd" name="nb_beacon_recv" />
+ <UML:Attribute comment="Number of beacon failled." isSpecification="false" visibility="public" xmi.id="1j3sJDPZkkA9" type="9VyLxLpjMhQd" name="nb_beacon_failed" />
+ <UML:Attribute comment="The MFS to send the beacon." isSpecification="false" visibility="public" xmi.id="13P2s4jHWviH" type="FS9GybcB0p5o" name="mfs" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ </UML:Namespace.ownedElement>
+ <XMI.extension xmi.extender="umbrello" >
+ <diagrams>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="962" snapy="10" showatts="1" xmi.id="u4iNIXCkUpAT" documentation="" type="1" showops="1" showpackage="0" name="diagramme de classes" localid="" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1074" >
+ <widgets>
+ <classwidget usesdiagramfillcolor="0" width="617" showattsigs="601" x="11" fillcolor="#ffffc0" y="686" showopsigs="601" linewidth="none" height="416" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="NiCCTMNHialM" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,50,1,0,0,0,0" linecolor="#ff0000" />
+ <enumwidget usesdiagramfillcolor="0" width="205" x="23" fillcolor="#ffffc0" y="21" linewidth="none" height="80" usefillcolor="1" isinstance="0" xmi.id="dEeErjr5mvtk" showpackage="0" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="641" showattsigs="601" x="286" fillcolor="#ffffc0" y="16" showopsigs="601" linewidth="none" height="624" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="l6bOvueVxeym" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
+ <classwidget usesdiagramfillcolor="0" width="262" showattsigs="601" x="10" fillcolor="#ffffc0" y="135" showopsigs="601" linewidth="none" height="104" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="S9eUo7DcuX3j" showoperations="1" showpackage="0" showscope="1" usesdiagramusefillcolor="0" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="#ff0000" />
+ </widgets>
+ <messages/>
+ <associations>
+ <assocwidget totalcounta="5" indexa="4" visibilityB="200" totalcountb="2" indexb="1" linewidth="none" widgetbid="l6bOvueVxeym" widgetaid="NiCCTMNHialM" xmi.id="16U2YvTJxiuS" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="504" starty="686" />
+ <endpoint endx="606" endy="640" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="52" x="556" fillcolor="none" y="642" linewidth="none" posttext="" role="710" height="20" usefillcolor="1" pretext="-" isinstance="0" xmi.id="lhl5eWZ8ycW1" text="bentry" usesdiagramusefillcolor="1" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="5" indexa="1" visibilityB="200" totalcountb="4" indexb="1" linewidth="none" widgetbid="S9eUo7DcuX3j" widgetaid="NiCCTMNHialM" xmi.id="mUavKhrt5Qso" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="134" starty="686" />
+ <endpoint endx="75" endy="239" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="56" x="329" fillcolor="none" y="267" linewidth="none" posttext="" role="710" height="20" usefillcolor="1" pretext="-" isinstance="0" xmi.id="QunW4KKjnuES" text="central" usesdiagramusefillcolor="1" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="5" indexa="2" visibilityB="200" totalcountb="4" indexb="2" linewidth="none" widgetbid="S9eUo7DcuX3j" widgetaid="NiCCTMNHialM" xmi.id="ZTjeucQLNU0V" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="257" starty="686" />
+ <endpoint endx="141" endy="239" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="64" x="290" fillcolor="none" y="258" linewidth="none" posttext="" role="710" height="20" usefillcolor="1" pretext="-" isinstance="0" xmi.id="9MROIyU1dD4H" text="discover" usesdiagramusefillcolor="1" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ <assocwidget totalcounta="5" indexa="3" visibilityB="200" totalcountb="4" indexb="3" linewidth="none" widgetbid="S9eUo7DcuX3j" widgetaid="NiCCTMNHialM" xmi.id="ZMhwrhPy4npv" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
+ <linepath>
+ <startpoint startx="381" starty="686" />
+ <endpoint endx="206" endy="239" />
+ </linepath>
+ <floatingtext usesdiagramfillcolor="1" width="45" x="208" fillcolor="none" y="241" linewidth="none" posttext="" role="710" height="20" usefillcolor="1" pretext="-" isinstance="0" xmi.id="kePgEthemV8q" text="proxy" usesdiagramusefillcolor="1" font="Sans Serif,9,-1,5,50,0,0,0,0,0" linecolor="none" />
+ </assocwidget>
+ </associations>
+ </diagram>
+ </diagrams>
+ </XMI.extension>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Use Case View" isRoot="false" isAbstract="false" name="Use Case View" >
+ <UML:Namespace.ownedElement>
+ <UML:Actor isSpecification="false" isLeaf="false" visibility="public" namespace="Use Case View" xmi.id="0mgFoIemQMcL" isRoot="false" isAbstract="false" name="PWL" />
+ <UML:Actor isSpecification="false" isLeaf="false" visibility="public" namespace="Use Case View" xmi.id="lHfwr4V0kP0u" isRoot="false" isAbstract="false" name="FSM" />
+ </UML:Namespace.ownedElement>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Component View" isRoot="false" isAbstract="false" name="Component View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Deployment View" isRoot="false" isAbstract="false" name="Deployment View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Entity Relationship Model" isRoot="false" isAbstract="false" name="Entity Relationship Model" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ </UML:Namespace.ownedElement>
+ </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+ <docsettings viewid="u4iNIXCkUpAT" documentation="" uniqueid="JiaDc3awYC9a" />
+ <listview>
+ <listitem open="1" type="800" label="Vues" >
+ <listitem open="1" type="801" id="Logical View" >
+ <listitem open="0" type="807" id="u4iNIXCkUpAT" label="diagramme de classes" />
+ <listitem open="0" type="813" id="l6bOvueVxeym" >
+ <listitem open="0" type="814" id="EOdPHwR1twjV" />
+ <listitem open="0" type="814" id="PA5z4i5toSeZ" />
+ <listitem open="0" type="814" id="1T13LxkqNstK" />
+ <listitem open="0" type="814" id="xcQqOsUxcJCp" />
+ <listitem open="0" type="814" id="53sSvmksOAhm" />
+ <listitem open="0" type="814" id="IYlXII8Ij9J4" />
+ <listitem open="0" type="814" id="19ibSsRkQAGg" />
+ <listitem open="0" type="814" id="JZr4x1IdReaa" />
+ <listitem open="0" type="814" id="7pqg6xcIpLK4" />
+ <listitem open="0" type="814" id="B251tkRCJIEE" />
+ <listitem open="0" type="814" id="hSxyi9A0ezgm" />
+ <listitem open="0" type="814" id="Pz0c5ut7NSvB" />
+ <listitem open="0" type="814" id="JpABk8vPasLH" />
+ <listitem open="0" type="814" id="0VFeVvQstPSy" />
+ <listitem open="0" type="814" id="HL3elzp4mzDX" />
+ <listitem open="0" type="814" id="89ugzGxzlAdG" />
+ <listitem open="0" type="814" id="628zPavgtwLe" />
+ <listitem open="0" type="814" id="vAhi8uDG37u1" />
+ <listitem open="0" type="814" id="Nq090cN4cU11" />
+ <listitem open="0" type="814" id="4wfyt0am9HSH" />
+ <listitem open="0" type="814" id="QZnwvCV4Yif0" />
+ <listitem open="0" type="815" id="HWpi8PJGD7uJ" />
+ <listitem open="0" type="815" id="2UZqotuztx0m" />
+ <listitem open="0" type="815" id="SMyBTFGYI8yC" />
+ <listitem open="0" type="815" id="o7fQ9q3hFkbG" />
+ <listitem open="0" type="815" id="hI0dJNhG5k0K" />
+ <listitem open="0" type="815" id="YqHnu25ItGIu" />
+ <listitem open="0" type="815" id="VmmxYwxAz6PS" />
+ <listitem open="0" type="815" id="bKhu6exehnPG" />
+ <listitem open="0" type="815" id="KEv0os0ZbMXQ" />
+ <listitem open="0" type="815" id="bnflIhKyMIae" />
+ <listitem open="0" type="815" id="jGZnzqHsYZHh" />
+ <listitem open="0" type="815" id="jGZnzqHsYZHh" />
+ <listitem open="0" type="815" id="jGZnzqHsYZHh" />
+ <listitem open="0" type="815" id="jGZnzqHsYZHh" />
+ <listitem open="0" type="815" id="jGZnzqHsYZHh" />
+ <listitem open="0" type="815" id="jGZnzqHsYZHh" />
+ <listitem open="0" type="815" id="jGZnzqHsYZHh" />
+ </listitem>
+ <listitem open="0" type="813" id="S9eUo7DcuX3j" >
+ <listitem open="0" type="814" id="DspJfBRVcxIA" />
+ <listitem open="0" type="814" id="ggfRnOp4Wjxb" />
+ <listitem open="0" type="814" id="EA7KDBs7wYPb" />
+ <listitem open="0" type="814" id="1j3sJDPZkkA9" />
+ <listitem open="0" type="814" id="13P2s4jHWviH" />
+ </listitem>
+ <listitem open="1" type="813" id="NiCCTMNHialM" >
+ <listitem open="0" type="814" id="JCYCqFU2p3pR" />
+ <listitem open="0" type="814" id="ztR22PRRfzxc" />
+ <listitem open="0" type="814" id="16U2YvTJxiuS" />
+ <listitem open="0" type="814" id="mUavKhrt5Qso" />
+ <listitem open="0" type="814" id="ZTjeucQLNU0V" />
+ <listitem open="0" type="814" id="ZMhwrhPy4npv" />
+ <listitem open="0" type="814" id="ZQsAqVucddIr" />
+ <listitem open="0" type="814" id="K3KQrzS1quxo" />
+ <listitem open="0" type="814" id="0VGYDtEPYc2z" />
+ <listitem open="0" type="814" id="smt2PvthxE7o" />
+ <listitem open="0" type="814" id="BXn1RlnPE3yS" />
+ <listitem open="0" type="814" id="Hs122ihhPUUg" />
+ <listitem open="0" type="814" id="JiaDc3awYC9a" />
+ <listitem open="0" type="815" id="CA57xXjh1tLI" />
+ <listitem open="0" type="815" id="L3pJY5PiAveK" />
+ <listitem open="0" type="815" id="iIrX3tiOuXfR" />
+ <listitem open="0" type="815" id="0WCJ0FyuKdd2" />
+ <listitem open="0" type="815" id="09aBIX1GwDYC" />
+ <listitem open="0" type="815" id="7Q51o9CCSKS6" />
+ <listitem open="0" type="815" id="7A7gOonaDENp" />
+ <listitem open="0" type="815" id="PHaWxuxGmNdX" />
+ <listitem open="0" type="815" id="rOBKdX15uXBI" />
+ <listitem open="0" type="815" id="tsreDSBVehfS" />
+ <listitem open="0" type="815" id="zv9gFq6tPba0" />
+ <listitem open="0" type="815" id="M3yrFjCPpQa3" />
+ </listitem>
+ <listitem open="1" type="830" id="Datatypes" >
+ <listitem open="1" type="829" id="QDR1xMOjZ75y" />
+ <listitem open="1" type="829" id="cnaRv3q3OkSQ" />
+ <listitem open="1" type="829" id="MyoigH80dkxO" />
+ <listitem open="1" type="829" id="eVuCjs6naR38" />
+ <listitem open="1" type="829" id="AAz7wcfxctFf" />
+ <listitem open="1" type="829" id="pU0m9erF6lKO" />
+ <listitem open="1" type="829" id="93yNIJC7iLRJ" />
+ <listitem open="1" type="829" id="sSOkyZ3vfjJC" />
+ <listitem open="1" type="829" id="f3gZVQ3FuZSY" />
+ <listitem open="1" type="829" id="ghnnHqGwuwTP" />
+ <listitem open="1" type="829" id="MTWZA8u8WYSg" />
+ <listitem open="1" type="829" id="MAfpg7Apertx" />
+ <listitem open="1" type="829" id="QTe9foTn6zxN" />
+ <listitem open="1" type="829" id="5YxBXuZ7VHyB" />
+ <listitem open="1" type="829" id="CtUyy6YUakdg" />
+ <listitem open="1" type="829" id="CePeTGkuBf2t" />
+ <listitem open="1" type="829" id="RxxAih1R7pg2" />
+ <listitem open="1" type="829" id="3f3c56khsI8l" />
+ <listitem open="1" type="829" id="KOdwl5INaBZH" />
+ <listitem open="1" type="829" id="I9jv9yhyWUaz" />
+ <listitem open="1" type="829" id="R9NuP1byDcOU" />
+ <listitem open="1" type="829" id="lmib4oMOmB7Q" />
+ <listitem open="1" type="829" id="fJgTLenqU1j3" />
+ <listitem open="1" type="829" id="lZ62VwEYQKdt" />
+ <listitem open="1" type="829" id="FS9GybcB0p5o" />
+ <listitem open="1" type="829" id="ohGDMWCtIAFk" />
+ <listitem open="1" type="829" id="BlYll2hD2fUk" />
+ <listitem open="1" type="829" id="nFjMOIdSwg41" />
+ <listitem open="1" type="829" id="oDq9Iugm7iv1" />
+ <listitem open="1" type="829" id="qt7va3x0WkF5" />
+ <listitem open="1" type="829" id="QVpFZRIuBTNW" />
+ <listitem open="1" type="829" id="o3tgJr755xDL" />
+ <listitem open="1" type="829" id="2pjetCZaTBxu" />
+ <listitem open="1" type="829" id="9VyLxLpjMhQd" />
+ <listitem open="1" type="829" id="CGLMN5YS6jdy" />
+ <listitem open="0" type="829" id="tXVYafgIGaNQ" />
+ <listitem open="1" type="829" id="YXjbSuwIn4EL" />
+ </listitem>
+ <listitem open="0" type="831" id="dEeErjr5mvtk" >
+ <listitem open="0" type="839" id="R6d2pxd3ZrvJ" />
+ <listitem open="0" type="839" id="dyAC3z5U5iUt" />
+ <listitem open="0" type="839" id="HX9OlCAM8KYB" />
+ </listitem>
+ <listitem open="0" type="831" id="WynxBsM8ngv1" >
+ <listitem open="0" type="839" id="Q2E40q7VmuSv" />
+ <listitem open="0" type="839" id="aTaIt9hH9vJA" />
+ </listitem>
+ <listitem open="0" type="831" id="Vd2VI0H78FNa" >
+ <listitem open="0" type="839" id="o1VyuW0O91rP" />
+ <listitem open="0" type="839" id="WsUNEfH2emyZ" />
+ </listitem>
+ </listitem>
+ <listitem open="0" type="802" id="Use Case View" >
+ <listitem open="1" type="811" id="lHfwr4V0kP0u" />
+ <listitem open="1" type="811" id="0mgFoIemQMcL" />
+ </listitem>
+ <listitem open="1" type="821" id="Component View" />
+ <listitem open="1" type="827" id="Deployment View" />
+ <listitem open="1" type="836" id="Entity Relationship Model" />
+ </listitem>
+ </listview>
+ <codegeneration>
+ <codegenerator language="Java" />
+ </codegeneration>
+ </XMI.extensions>
+</XMI>
diff --git a/cesar/cp2/beacon/doc/processingbeacon.sdl b/cesar/cp2/beacon/doc/processingbeacon.sdl
new file mode 100644
index 0000000000..97ed0c6cdc
--- /dev/null
+++ b/cesar/cp2/beacon/doc/processingbeacon.sdl
@@ -0,0 +1,22 @@
+(idle) -beacon received-> (|processing beacon|)
+
+(|processing beacon|) -> <tracked AVLN>
+<tracked AVLN> -yes-> ||NTB sync||
+||NTB sync|| -> <conflict snid>
+
+<tracked AVLN> -no-> <conflict snid>
+
+<conflict snid> -yes-> |post event \n snid conflict>
+|post event \n snid conflict> -> ||update sta manager||
+
+<conflict snid> -no-> ||update sta manager||
+
+||update sta manager|| -> <sta is CCo>
+<sta is CCo> -no-> (idle)
+<sta is CCo> -yes-> ||read regions||
+||read regions|| -> (idle)
+
+<conflict snid> -our avln-> <beacon type>
+<beacon type> -central beacon-> ||central beacon||
+<beacon type> -discover beacon-> ||discover beacon||
+<beacon type> -proxy beacon-> ||proxy beacon||
diff --git a/cesar/cp2/beacon/doc/receivebeacon.sdl b/cesar/cp2/beacon/doc/receivebeacon.sdl
new file mode 100644
index 0000000000..d3298d8f99
--- /dev/null
+++ b/cesar/cp2/beacon/doc/receivebeacon.sdl
@@ -0,0 +1,8 @@
+(|receive beacon|)
+
+(|receive beacon|) -> |chain|
+|chain| -> |sta manager \n get avln|
+|sta manager \n get avln| -> |avln add sta|
+
+|avln add sta| -> |post event \n beacon received \n with avln and sta|
+
diff --git a/cesar/cp2/beacon/doc/spec.odt b/cesar/cp2/beacon/doc/spec.odt
new file mode 100644
index 0000000000..ea67eb5cf0
--- /dev/null
+++ b/cesar/cp2/beacon/doc/spec.odt
Binary files differ
diff --git a/cesar/cp2/beacon/doc/study.odt b/cesar/cp2/beacon/doc/study.odt
new file mode 100644
index 0000000000..62047077cb
--- /dev/null
+++ b/cesar/cp2/beacon/doc/study.odt
Binary files differ
diff --git a/cesar/cp2/beacon/inc/beacon.h b/cesar/cp2/beacon/inc/beacon.h
new file mode 100644
index 0000000000..2973cace73
--- /dev/null
+++ b/cesar/cp2/beacon/inc/beacon.h
@@ -0,0 +1,146 @@
+#ifndef cp2_beacon_beacon_h
+#define cp2_beacon_beacon_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file inc/cp_beacon_private.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+/**
+ * Beacon module. Use to generate and read a beacon.
+ */
+struct cp_beacon_t
+{
+ /**
+ * The head of the received beacon chain.
+ */
+ cp_beacon_desc_t * head_beacon_recv;
+
+ /**
+ * The tail of the receive beacon chain.
+ */
+ cp_beacon_desc_t * tail_beacon_recv;
+
+ /**
+ \todo fill the comment.
+ */
+ cp_beacon_bentry_mgr_t bentry;
+
+ /**
+ * Central beacon environement.
+ */
+ cp_beacon_common_t central;
+
+ /**
+ * Discover beacon environement.
+ */
+ cp_beacon_common_t discover;
+
+ /**
+ * Proxy beacon environement.
+ */
+ cp_beacon_common_t proxy;
+
+ /**
+ * The leon timer to be programmed and awake each beacon periood.
+ * Each time the timer expires, the function register by the beacon
+ * shall post an event in the FSM.
+ */
+ hal_timer_instance_t leon_timer;
+
+ /**
+ * The ecos timer to use when the duration time is too long for the
+ * leon timer.
+ */
+ cyg_counter ecos_timer;
+
+ /**
+ * The ecos timer handler.
+ */
+ cyg_handle_t ecos_timer_handle;
+
+ /**
+ * The ecos Alarm, It allows ecos to raise an alarm when the timer
+ * expires.
+ */
+ cyg_alarm alarm;
+
+ /**
+ * The alarm handler.
+ */
+ cyg_handle_t alarm_handle;
+
+ /**
+ * The function to call on timer expiration.
+ */
+ cp_beacon_event_cb_t * event_cb;
+
+ /**
+ * The data to provide on event_cb.
+ */
+ void * event_user_data;
+};
+
+/**
+ * The beacon received from the AVLN.
+ * \param ctx the module context.
+ * \param beacon The beacon received.
+ *
+ * Add the beacon to the list of received beacon, and raise the flag
+ * beacon received in STA_CORE
+ */
+void
+cp_beacon_receive (cp_beacon_t *ctx, cp_beacon_desc_t * beacon);
+
+/**
+ * Verify the conflict of SNID.
+ * \param ctx the module context.
+ * \param beacon_snid The beacon's SNID beeing process.
+ * \param beacons_nid The beacon's NID.
+ *
+ * If the snid corresponds too our SNID and the NID does not match, it
+ * shall post a message in the FSM to prevent the CCo Core
+ */
+void
+cp_beacon_detect_snid_conficts (cp_beacon_t *ctx, u16 beacon_snid,
+ u64 beacons_nid);
+
+/**
+ * Verify if the AVLN exists in the sta_mgr.
+ * \param ctx the module context.
+ * \param beacon_snid The beacon's SNID.
+ * \param beacon_nid The beacon's NID.
+ * \param stei The source TEI.
+ * \param beacon_type The beacon type.
+ * \param mac_addr The mac address of the station which has sent the
+ * beacon (if present in the bentry).
+ *
+ * If not it shall create the AVLN with the data provided. If the AVLN
+ * exists it shall update the AVLN data. If the Beacon is from our AVLN
+ * and the stei does not correspond to the CCo, it shall update the AVLN
+ * in the sta manager and post an event in the FSM
+ */
+void
+cp_beacon_verify_avln (cp_beacon_t *ctx, u16 beacon_snid, u64 beacon_nid,
+ u8 stei, u8 beacon_type, mac_t mac_addr);
+
+/**
+ * Update the hrybrid mode in the station.
+ * \param ctx the module context.
+ * \param hm The new value of the hybrid mode.
+ *
+ * Update the Mac config and the station own data
+ */
+void
+cp_beacon_hybridmode_update (cp_beacon_t *ctx, u8 hm);
+
+#endif /* cp2_beacon_beacon_h */
diff --git a/cesar/cp2/beacon/inc/beacons.h b/cesar/cp2/beacon/inc/beacons.h
deleted file mode 100644
index 6df7167794..0000000000
--- a/cesar/cp2/beacon/inc/beacons.h
+++ /dev/null
@@ -1,132 +0,0 @@
-#ifndef cp_beacon_inc_beacons_h
-#define cp_beacon_inc_beacons_h
-/* Cesar project {{{
- *
- * Copyright (C) 2008 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file cp/beacon/inc/beacons.h
- * \brief central beacon private functions.
- * \ingroup cp_beacon
- *
- */
-
-/**
- * Initialize the sub module for the discover, central and proxy beacons.
- * The beacon_ctx corresponds to the each part contained in the ctx.
- *
- * \param ctx the becon module context.
- * \param beacon_ctx the central, discover or proxy context.
- */
-void
-cp_beacon_init_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx);
-
-/**
- * Uninit the sub beacon modules.
- *
- * \param ctx the beacon module context
- * \param beacon_ctx the beacon context to uninit.
- */
-void
-cp_beacon_uninit_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx);
-
-/**
- * Compute the beacon period using the beacon period thereotic calculated
- * during the pw frequency detection.
- *
- * \param ctx the beacon period context.
- */
-uint
-cp_beacon_pwl_period (cp_beacon_t *ctx);
-
-/**
- * Fill the payload of the beacon when the STA is accting as CCo or UCCo.
- * Can be use for
- * - the Central beacon when acting as a CCo
- * - the discover beacon when acting as a UCCo.
- *
- *
- * \param ctx the beacon module context
- * \param beacon the beacon to fill.
- * \param beacon_type the beacon type, central, discover or proxy.
- */
-void
-cp_beacon_xcco_fill_common_part (cp_beacon_t *ctx, cp_beacon_desc_t *beacon,
- uint beacon_type);
-
-/**
- * Generate the central beacon.
- *
- * \param ctx the beacon context.
- * \param beacon the central beacon to fill
- */
-void
-cp_beacon_cco_beacon_central_generate (cp_beacon_t *ctx,
- cp_beacon_desc_t *beacon);
-
-/**
- * Generate the discover beacon when STA is UCCo.
- *
- * \param ctx the beacon context.
- * \param beacon the central beacon to fill
- */
-void
-cp_beacon_cco_beacon_discover_generate (cp_beacon_t *ctx,
- cp_beacon_desc_t *beacon);
-
-
-/**
- * Send the beacon over the PWL.
- * TODO Implement the proxy beacon part
- *
- * \param ctx the cp beacon context
- * \param beacon the beacon to send
- * \param beacon_type the beacon type.
- */
-void
-cp_beacon_send_beacon (cp_beacon_t *ctx, cp_beacon_desc_t *beacon,
- uint beacon_type);
-
-/**
- * Process the received beacon
- *
- * \param ctx the beacon context.
- * \param beacon the beacon received.
- */
-void
-cp_beacon_process (cp_beacon_t *ctx, cp_beacon_desc_t *beacon);
-
-/**
- * Function call by the timer when the timer expires.
- *
- * \param ctx the beacon context.
- */
-void
-cp_beacon_timer_it (cp_beacon_t *ctx);
-
-/** create the default schedule for the ca.
- * \param ctx the cp context
- *
- * create the default schedule for the ca to be able to listen the pwl on the
- * pond procedure.
- * this will create four beacon periods of a duration corresponding to
- * cp_beacon_default_schedule_time / 4.
- */
-void
-cp_beacon_create_default_schedule (cp_t *ctx);
-
-/** Compute the next BTS, the four next BTOs and the BP.
- * \param ctx the cp context.
- * \param common the common part of the beacons structure.
- *
- * Compute the next BTS, the four next BTOs and the BP. in Time Allocation
- * Unit to provide the data to the generated beacon.
- */
-void
-cp_beacon_estimate_bts_bto_bp (cp_beacon_t *ctx, cp_beacon_common_t *common);
-
-
-#endif /* cp_beacon_inc_beacons_h */
diff --git a/cesar/cp2/beacon/inc/bentry.h b/cesar/cp2/beacon/inc/bentry.h
new file mode 100644
index 0000000000..79152c59e2
--- /dev/null
+++ b/cesar/cp2/beacon/inc/bentry.h
@@ -0,0 +1,346 @@
+#ifndef cp2_beacon_beacon_bentry_mgr_h
+#define cp2_beacon_beacon_bentry_mgr_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/beacon/inc/bentry.h
+ * \brief Bentry processing.
+ * \ingroup cp2_beacon
+ *
+ */
+
+struct cp_beacon_bentry_mgr_t
+{
+ /**
+ * Previous countdown of the Persistent Schedule Bentry.
+ */
+ u8 persistent_schedule_pscd;
+
+ /**
+ * Current coutndown of the Persistent Schedule.
+ */
+ u8 persistent_schedule_cscd;
+
+ /**
+ * Encryption key change countdown.
+ */
+ u8 eks_kccd;
+
+ /**
+ * The key which is bein change. 0 for nek, 1 for nmk.
+ */
+ bool eks_kbc;
+
+ /**
+ * The eks index to use once the countdown has expired.
+ */
+ u8 eks_neweks;
+
+ /**
+ * Handover in progress countdown.
+ */
+ u8 handover_cd;
+
+ /**
+ * The new CCo tei. This will be inserted in the bentry until the
+ * countdown does not expire.
+ */
+ u8 handover_newtei;
+
+ /**
+ * Beacon relocation bentry countdown.
+ */
+ u8 relocation_cd;
+
+ /**
+ * The relocation type.
+ */
+ bool relocation_type;
+
+ /**
+ * Relocation leaving group flag.
+ */
+ bool relocation_lgf;
+
+ /**
+ * The relocation in the beacon period. A single value corresponds
+ * to 0.32 micro seconds i.e. 0x1 corresponds to 0.32 micro seconds,
+ * 2 corresponds to 0.64 micro seconds and so on.
+ */
+ uint relocation_rlo;
+
+ /**
+ * The relocation slot id.
+ */
+ u8 relocation_slotid;
+
+ /**
+ * The AC line sync countdown.
+ */
+ u8 acl_cd;
+
+ /**
+ * The AC Line sync reason code.
+ */
+ u8 acl_reason_code;
+
+ /**
+ * Numslots change countdown.
+ */
+ u8 numslot_cd;
+
+ /**
+ * New number of slots.
+ */
+ u8 numslots_new;
+
+ /**
+ * Change Hybrid mode countdown.
+ */
+ u8 hm_cd;
+
+ /**
+ * The new hybrid mode value.
+ */
+ u8 hm_new;
+
+ /**
+ * Change snid countdown.
+ */
+ u8 snid_cd;
+
+ /**
+ * The new snid to change.
+ */
+ u16 snid_new;
+
+ /**
+ * Last Station TEI to get the next station to request a discover
+ * beacon.
+ */
+ u8 station_discover;
+};
+typedef struct cp_beacon_bentry_mgr_t cp_beacon_bentry_mgr_t;
+
+/**
+ * Initialise the bentry mgr.
+ * \param ctx the module context.
+ *
+ */
+void
+cp_beacon_bentry_mgr_init (cp_beacon_bentry_mgr_t *ctx);
+
+/**
+ * Uninitialise the bentry manager.
+ * \param ctx the module context.
+ *
+ */
+void
+cp_beacon_bentry_mgr_uninit (cp_beacon_bentry_mgr_t *ctx);
+
+/**
+ * Decrements the countdowns.
+ * \param ctx the module context.
+ *
+ * for each countdown which will expire (value equals 1) an associated
+ * event is raise in the FSM
+ */
+void
+cp_beacon_bentry_mgr_countdown (cp_beacon_bentry_mgr_t *ctx);
+
+/**
+ * Read or write the bentry header.
+ * \param ctx the module context.
+ * \param addr The start address of the bentry.
+ * \param header The header of the bentry to set or get.
+ * \param type The type to set or get.
+ * \param read_write Request to read the header from the address provided, or to write the data to this address. 0 for Read, 1 to write.
+ * \return \todo fill this
+ *
+ */
+u8 *
+cp_beacon_bentry_mgr_process_header (cp_beacon_bentry_mgr_t *ctx, u8 * addr, u8 * header, u8 * type, bool read_write);
+
+/**
+ * Process the schedules.
+ * \param ctx the module context.
+ * \param bentry The bentry start address.
+ * \param read_write The read_write status.
+ * \param schedules The schedules object to fill when the schedules are received. Not use when the function shall write the schedules.
+ * \return \todo fill this
+ *
+ * In the read option, this function can be called twice to complete
+ * the full beacon period. This shall be applyed at the end of the beacon
+ * period process. On the write process it shall read the schedules prepared
+ * by the bandwith manager
+ */
+u8 *
+cp_beacon_bentry_mgr_schedules (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write, cp_beacon_bentry_schedules_t * schedules);
+
+/**
+ * Read or write the regions in the beacon.
+ * \param ctx the module context.
+ * \param bentry The bentry address to process.
+ * \param read_write Read or write processing.
+ * \return \todo fill this
+ *
+ * When reading the regions it shall directly update the data in the
+ * region manager (only in CCo mode). On the write process it shall get
+ * the regions from the region manager
+ */
+u8 *
+cp_beacon_bentry_mgr_regions (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+/**
+ * Read or write the mac address in the beacon.
+ * \param ctx the module context.
+ * \param bentry The address of the start of the bentry.
+ * \param mac_address The mac address to store or the variable to set when it is reading a mac address bentry.
+ * \param read_write Read of write process.
+ * \return \todo fill this
+ *
+ * If the reading bool is set, it will store the mac address stocked
+ * in the bentry in the parameter provided
+ */
+u8 *
+cp_beacon_bentry_mgr_mac_address (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, mac_t * mac_address, bool read_write);
+
+/**
+ * Read or write a discover info bentry.
+ * \param ctx the module context.
+ * \param bentry The bentry start address.
+ * \param tei The station source TEI.
+ * \param read_write read or write process.
+ * \return \todo fill this
+ *
+ * It will directly use the data from the sta manager
+ */
+u8 *
+cp_beacon_bentry_mgr_discover_info_bentry (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, u8 tei, bool read_write);
+
+/**
+ * Read or write a discover bentry.
+ * \param ctx the module context.
+ * \param bentry The start of the bentry address.
+ * \param read_write Read or write the bentry.
+ * \return \todo fill this
+ *
+ * If write it will request to next station in the station manager to
+ * request a discover beacon. This will call the station manager to get
+ * the next station corresponding to the station discover variable
+ */
+u8 *
+cp_beacon_bentry_mgr_discover (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+/**
+ * Read or write the bpsto.
+ * \param ctx the module context.
+ * \param bentry Bentry start address.
+ * \param bpsto To store the address of the beacon period start time offset.
+ * \param value Get the value of the bpsto.
+ * \param read_write Read or Write the value.
+ * \return \todo fill this
+ *
+ * store the address of the bpsto in the bpsto variable of the beacon_common
+ * structure data
+ */
+u8 *
+cp_beacon_bentry_mgr_bpsto (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, u8 * bpsto, uint * value, bool read_write);
+
+/**
+ * Read or write the encryption key change bentry.
+ * \param ctx the module context.
+ * \param bentry The start address bentry.
+ * \param read_write Read or write bool status.
+ * \return \todo fill this
+ *
+ * on write it use the data stored in the context. On read it shall update
+ * the context data
+ */
+u8 *
+cp_beacon_bentry_mgr_eks_change (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+/**
+ * Read or write the CCo Handover bentry.
+ * \param ctx the module context.
+ * \param bentry The start address bentry.
+ * \param read_write Read or write bool status.
+ * \return \todo fill this
+ *
+ * on write it use the data stored in the context. On read it shall update
+ * the context data
+ */
+u8 *
+cp_beacon_bentry_mgr_hoip_change (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+/**
+ * Read or write the beacon relocation bentry.
+ * \param ctx the module context.
+ * \param bentry The start address bentry.
+ * \param read_write Read or write bool status.
+ * \return \todo fill this
+ *
+ * on write it use the data stored in the context. On read it shall update
+ * the context data
+ */
+u8 *
+cp_beacon_bentry_mgr_relocation (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+/**
+ * Read or write the beacon AC line bentry.
+ * \param ctx the module context.
+ * \param bentry The start address bentry.
+ * \param read_write Read or write bool status.
+ * \return \todo fill this
+ *
+ * on write it use the data stored in the context. On read it shall update
+ * the context data
+ */
+u8 *
+cp_beacon_bentry_mgr_acl (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+/**
+ * Read or write the change numslots bentry.
+ * \param ctx the module context.
+ * \param bentry The start address bentry.
+ * \param read_write Read or write bool status.
+ * \return \todo fill this
+ *
+ * on write it use the data stored in the context. On read it shall update
+ * the context data
+ */
+u8 *
+cp_beacon_bentry_mgr_num_slots_change (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+/**
+ * Read or write the Hm change.
+ * \param ctx the module context.
+ * \param bentry The start address bentry.
+ * \param read_write Read or write bool status.
+ * \return \todo fill this
+ *
+ * on write it use the data stored in the context. On read it shall update
+ * the context data
+ */
+u8 *
+cp_beacon_bentry_mgr_hm_change (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+/**
+ * Read or write the Change SNID.
+ * \param ctx the module context.
+ * \param bentry The start address bentry.
+ * \param read_write Read or write bool status.
+ * \return \todo fill this
+ *
+ * on write it use the data stored in the context. On read it shall update
+ * the context data
+ */
+u8 *
+cp_beacon_bentry_mgr_snid_change (cp_beacon_bentry_mgr_t *ctx, u8 * bentry, bool read_write);
+
+#endif /* cp2_beacon_beacon_bentry_mgr_h */
diff --git a/cesar/cp2/beacon/inc/common.h b/cesar/cp2/beacon/inc/common.h
new file mode 100644
index 0000000000..3589a8349f
--- /dev/null
+++ b/cesar/cp2/beacon/inc/common.h
@@ -0,0 +1,47 @@
+#ifndef cp_beacon_inc_common_h
+#define cp_beacon_inc_common_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/beacon/inc/common.h
+ * \brief Common structure definition.
+ * \ingroup cp2_beacon
+ *
+ */
+
+struct cp_beacon_common_t
+{
+ /**
+ * Last beacon receive or generated.
+ */
+ cp_beacon_desc_t *beacon;
+
+ /**
+ * The beacon period start time offset address to provide it to the
+ * pbproc.
+ */
+ pbproc_tx_beacon_params_t *bpsto;
+
+ /**
+ * Number of beacon received.
+ */
+ uint nb_beacon_recv;
+
+ /**
+ * Number of beacon failled.
+ */
+ uint nb_beacon_failed;
+
+ /**
+ * The MFS to send the beacon.
+ */
+ mfs_tx_t *mfs;
+};
+typedef struct cp_beacon_common_t cp_beacon_common_t;
+
+#endif /* cp_beacon_inc_common_h */