TEP122 中文试译——IEEE EUI-64 唯一标识符

IEEE EUI-64 唯一标识符

翻译:wangjild@gmail.com

:TEP: 122
:Group: Core Working Group
:Type: Documentary
:Status: Draft
:TinyOS-Version: 2.x
:Author: Gilman Tolle, Jonathan Hui

:Draft-Created: 26-Apr-2006
:Draft-Version:
:Draft-Modified:
:Draft-Discuss: TinyOS Developer List <tinyos-devel at mail.millennium.berkeley.edu>

.. Note::

   This memo documents a part of TinyOS for the TinyOS Community, and
   requests discussion and suggestions for improvements.  Distribution
   of this memo is unlimited. This memo is in full compliance with
   TEP 1.

摘要

TinyOS的应用开发者可能需要一个全球唯一的IEEE EUI-64节点标识符。本文描述访问这种标识符的TinyOS组件。

接口

提供可用的IEEE EUI-64全球唯一节点标识符的平台应该要提供有如下签名的组件,该组件能平台无关地访问标识符:

 configuration LocalIeeeEui64C {
    provides interface LocalIeeeEui64;
  } 

通过如下接口来访问标识符:

interface LocalIeeeEui64 {
    command ieee_eui64_t getId();
  } 

ieee_eui64_t类型定义在tos/types/IeeeEui64.h中:

  enum { IEEE_EUI64_LENGTH = 8; } 

  typedef struct ieee_eui64 {
    uint8_t data[IEEE_EUI64_LENGTH];
  } ieee_eui64_t; 

如果平台能提供可用的IEEE EUI-64,那么返回的值必须遵循IEEE EUI-64标准。

如果平台能提供唯一的标识符,但是该标识符又非有效的IEEE EUI-64标识符,它应该由一个不同的组件和不同的接口提供该标识符。这样的标识符接口定义超出了本TEP的范围。

IEEE EUI-64

IEEE EUI-64结构如下:

1

  If provided in byte-addressable media, the original byte-address order
  of the manufacturer is specified: the most through least significant
  bytes of the EUI-64 value are contained within the lowest through
  highest byte addresses, as illustrated above.

See: http://standards.ieee.org/regauth/oui/tutorials/EUI64.html

LocalIeeeEui64C组件的编写者必须保证getId命令会返回一个有效的EUI-64标识符,并且字节顺序是如上描述的那样。

实现中的注意事项

某些TinyOS节点平台包含了一个唯一的硬件标识符,这能用来构建EUI-64节点标识符。该硬件标识符可能从这些地方获得:专属芯片的序列ID,闪存设备等。接口的使用者一定不能需要知道唯一标识符是如何产生的。

EUI-64节点标识符必须在Boot.booted()事件通知之前就可用,如果EUI-64是从硬件设备衍生的,那么该硬件设备应该要在启动过程中的Init部分可以访问。

作者联系方式

| Gilman Tolle
| Arch Rock Corporation
| 657 Mission St. Suite 600
| San Francisco, CA 94105
|
| phone - +1 415 692 0828
| email - gtolle@archrock.com

| Jonathan Hui
| Arch Rock Corporation
| 657 Mission St. Suite 600
| San Francisco, CA 94105
|
| phone - +1 415 692 0828
| email - jhui@archrock.com

posted on 2011-04-23 00:31  李洛克  阅读(1566)  评论(0编辑  收藏  举报

导航