From 6923761a2df474fdb67c53c5e00efb17daaaf435 Mon Sep 17 00:00:00 2001 From: sallai Date: Fri, 31 Oct 2008 17:09:57 +0000 Subject: [PATCH] ieee eui64 support (see TEP122) --- tos/interfaces/LocalIeeeEui64.nc | 38 ++++++++++++++++++++++++++++++++ tos/types/IeeeEui64.h | 36 ++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 tos/interfaces/LocalIeeeEui64.nc create mode 100644 tos/types/IeeeEui64.h diff --git a/tos/interfaces/LocalIeeeEui64.nc b/tos/interfaces/LocalIeeeEui64.nc new file mode 100644 index 00000000..c92ec67f --- /dev/null +++ b/tos/interfaces/LocalIeeeEui64.nc @@ -0,0 +1,38 @@ +// $Id$ +/* + * Copyright (c) 2007, Vanderbilt University + * All rights reserved. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose, without fee, and without written agreement is + * hereby granted, provided that the above copyright notice, the following + * two paragraphs and the author appear in all copies of this software. + * + * IN NO EVENT SHALL THE VANDERBILT UNIVERSITY BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT + * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE VANDERBILT + * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE VANDERBILT UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE VANDERBILT UNIVERSITY HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Author: Janos Sallai + * Author: Gilman Tolle, Jonathan Hui (TEP 122) + */ + +#include "IeeeEui64.h" + +/** + * Interface to read the 64-bit IEEE EUI. + * + */ +interface LocalIeeeEui64 { + /** + * Get the 64-bit IEEE EUI. + * @returns the 64-bit IEEE EUI type, defined in tos/types/IeeeEui64.h + */ + command ieee_eui64_t getId(); +} diff --git a/tos/types/IeeeEui64.h b/tos/types/IeeeEui64.h new file mode 100644 index 00000000..9062fa73 --- /dev/null +++ b/tos/types/IeeeEui64.h @@ -0,0 +1,36 @@ +// $Id$ +/* + * Copyright (c) 2007, Vanderbilt University + * All rights reserved. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose, without fee, and without written agreement is + * hereby granted, provided that the above copyright notice, the following + * two paragraphs and the author appear in all copies of this software. + * + * IN NO EVENT SHALL THE VANDERBILT UNIVERSITY BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT + * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE VANDERBILT + * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE VANDERBILT UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE VANDERBILT UNIVERSITY HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Author: Janos Sallai + * Author: Gilman Tolle, Jonathan Hui (TEP 122) + */ + +#ifndef IEEEEUI64_H +#define IEEEEUI64_H + +enum { IEEE_EUI64_LENGTH = 8 }; + +typedef struct ieee_eui64 { + uint8_t data[IEEE_EUI64_LENGTH]; +} ieee_eui64_t; + +#endif // IEEEEUI64_H + \ No newline at end of file -- 2.39.2