⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nucleusattrwrapperc.nc

📁 无线通信的主要编程软件,是无线通信工作人员的必备工具,关天相关教程我会在后续传上.
💻 NC
字号:
includes Attrs;generic module NucleusAttrWrapperC(typedef attr_type){  provides interface Attr<attr_type>;  provides interface AttrSet<attr_type>;  uses interface Attribute<attr_type>;}implementation{  command result_t Attr.get( attr_type* buf )  {    if( call Attribute.valid() )    {      attr_type stackHolder = call Attribute.get();      memcpy(buf, &stackHolder, sizeof(attr_type));      signal Attr.getDone(buf);      return SUCCESS;    }    else{      return FAIL;    }  }  event void Attribute.updated( attr_type val )  {    signal Attr.changed(&val);  }  default event result_t Attr.getDone( attr_type* buf )  {    return SUCCESS;  }  default event result_t Attr.changed( attr_type* buf )  {    return SUCCESS;  }  command result_t AttrSet.set( attr_type* buf )  {    result_t result;    attr_type stackHolder;    memcpy(&stackHolder, buf, sizeof(attr_type));    result = call Attribute.set(stackHolder);    signal AttrSet.setDone(buf);    return result;  }  default event result_t AttrSet.setDone( attr_type* buf )  {    return SUCCESS;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -