summaryrefslogtreecommitdiff
path: root/cesar/cp2
diff options
context:
space:
mode:
authorschodet2008-06-17 17:58:36 +0000
committerschodet2008-06-17 17:58:36 +0000
commit4ead05fa8f05a3ea6791c851536783dc5f55dcf5 (patch)
treed96838beadac310dee541bdb6987fd0d9e886936 /cesar/cp2
parent1fa52a240bc06e8998d378cbf86ecba44cf12c6d (diff)
* cp2/sta/mgr:
- moved hfid to hfid_avln. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2367 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp2')
-rw-r--r--cesar/cp2/sta/mgr/sta_own_data.h21
-rw-r--r--cesar/cp2/sta/mgr/test/src/sta-test.c1
-rw-r--r--cesar/cp2/sta/mgr/test/src/sta_mgr_test.c1
3 files changed, 22 insertions, 1 deletions
diff --git a/cesar/cp2/sta/mgr/sta_own_data.h b/cesar/cp2/sta/mgr/sta_own_data.h
index 7c81e8328e..3eeb65d66d 100644
--- a/cesar/cp2/sta/mgr/sta_own_data.h
+++ b/cesar/cp2/sta/mgr/sta_own_data.h
@@ -13,13 +13,14 @@
* \ingroup cp2_sta_data
*
*/
-#include "string.h"
#include "cp2/defs.h"
#include "cp2/cp.h"
#include "cp2/sta/mgr/sta.h"
+#include <string.h>
+
/** Forward declaration. */
typedef struct cp_sta_own_data_private_t cp_sta_own_data_private_t;
@@ -39,6 +40,11 @@ struct cp_sta_own_data_t
bool cco_prefered;
/**
+ * The AVLN HFID.
+ */
+ const char hfid_avln [CP_HFID_SIZE + 1];
+
+ /**
* The user HFID.
*/
const char hfid_user [CP_HFID_SIZE + 1];
@@ -250,6 +256,19 @@ void
cp_sta_own_data_set_hfid (const char *hfid, const char *data);
/**
+ * Set the AVLN HFID.
+ *
+ * \param ctx the module context.
+ * \param data the human identifier.
+ */
+extern inline void
+cp_sta_own_data_set_hfid_avln (cp_sta_own_data_t *ctx, const char* data)
+{
+ dbg_assert (ctx);
+ cp_sta_own_data_set_hfid (ctx->hfid_avln, data);
+}
+
+/**
* Set the User HFID.
*
* \param ctx the module context.
diff --git a/cesar/cp2/sta/mgr/test/src/sta-test.c b/cesar/cp2/sta/mgr/test/src/sta-test.c
index d9227dd270..d282ebe547 100644
--- a/cesar/cp2/sta/mgr/test/src/sta-test.c
+++ b/cesar/cp2/sta/mgr/test/src/sta-test.c
@@ -40,6 +40,7 @@ test_case_sta_own_data_init (test_t test)
/* Public data. */
test_fail_if (data.public.nek_change_rtc != 0, "Wrong nek rtc");
test_fail_if (data.public.cco_prefered != 0, "Wrong cco preferred");
+ test_fail_if (data.public.hfid_avln[0] != 0, "Wrong hfid AVLN");
test_fail_if (data.public.hfid_user[0] != 0, "Wrong hfid user");
test_fail_if (data.public.hfid_manufacturer [0] != 0,
"Wrong hfid manufacturer");
diff --git a/cesar/cp2/sta/mgr/test/src/sta_mgr_test.c b/cesar/cp2/sta/mgr/test/src/sta_mgr_test.c
index 0c13054f04..257d0a6c23 100644
--- a/cesar/cp2/sta/mgr/test/src/sta_mgr_test.c
+++ b/cesar/cp2/sta/mgr/test/src/sta_mgr_test.c
@@ -72,6 +72,7 @@ test_sta_mgr_init (test_t test)
/* Public data. */
test_fail_if (data->public.nek_change_rtc != 0, "Wrong nek rtc");
test_fail_if (data->public.cco_prefered != 0, "Wrong cco preferred");
+ test_fail_if (data->public.hfid_avln[0] != 0, "Wrong hfid AVLN");
test_fail_if (data->public.hfid_user[0] != 0, "Wrong hfid user");
test_fail_if (data->public.hfid_manufacturer [0] != 0,
"Wrong hfid manufacturer");