资源简介

使用EM357 + HXD019D , 实现ZigBee设备的万能红外转发器,从平台调用码库或者学习红外遥控码对设备进行控制

资源截图

代码片段和文件信息

// This file is generated by Ember Desktop.  Please do not edit manually.
//
//

// This is a set of generated functions that parse the
// the incomming message and call appropriate command handler.



#include PLATFORM_HEADER
#ifdef EZSP_HOST
// Includes needed for ember related functions for the EZSP host
#include “stack/include/error.h“
#include “stack/include/ember-types.h“
#include “app/util/ezsp/ezsp-protocol.h“
#include “app/util/ezsp/ezsp.h“
#include “app/util/ezsp/ezsp-utils.h“
#include “app/util/ezsp/serial-interface.h“
#else
// Includes needed for ember related functions for the EM250
#include “stack/include/ember.h“
#endif // EZSP_HOST

#include “app/framework/util/util.h“
#include “af-structs.h“
#include “call-command-handler.h“
#include “command-id.h“
#include “callback.h“

static EmberAfStatus status(boolean wasHandled boolean mfgSpecific)
{
  if (wasHandled) {
    return EMBER_ZCL_STATUS_SUCCESS;
  } else if (mfgSpecific) {
    return EMBER_ZCL_STATUS_UNSUP_MANUF_CLUSTER_COMMAND;
  } else {
    return EMBER_ZCL_STATUS_UNSUP_CLUSTER_COMMAND;
  }
}

// Main command parsing controller.
EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand *cmd)
{
  if (cmd->direction == ZCL_DIRECTION_CLIENT_TO_SERVER
      && emberAfContainsServer(cmd->apsframe->destinationEndpoint
                               cmd->apsframe->clusterId)) {
    switch (cmd->apsframe->clusterId) {
    case ZCL_IDENTIFY_CLUSTER_ID:
      return emberAfIdentifyClusterServerCommandParse(cmd);
    }
  }
  return status(FALSE cmd->mfgSpecific);
}

// Cluster: Identify server
EmberAfStatus emberAfIdentifyClusterServerCommandParse(EmberAfClusterCommand *cmd)
{
  boolean wasHandled = FALSE;
  if (!cmd->mfgSpecific) {
    switch (cmd->commandId) {
    case ZCL_IDENTIFY_COMMAND_ID:
      {
        int16u payloadOffset = cmd->payloadStartIndex;
        int16u identifyTime;  // Ver.: always
        // Command is fixed length: 2
        if (cmd->bufLen < payloadOffset + 2) return EMBER_ZCL_STATUS_MALFORMED_COMMAND;
        identifyTime = emberAfGetInt16u(cmd->buffer payloadOffset cmd->bufLen);
        wasHandled = emberAfIdentifyClusterIdentifyCallback(identifyTime);
        break;
      }
    case ZCL_IDENTIFY_QUERY_COMMAND_ID:
      {
        // Command is fixed length: 0
        wasHandled = emberAfIdentifyClusterIdentifyQueryCallback();
        break;
      }
    }
  }
  return status(wasHandled cmd->mfgSpecific);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       8228  2017-06-28 14:27  JS_I338_V103\af-structs.h

     文件       2244  2017-06-28 14:27  JS_I338_V103\att-storage.h

     文件     256088  2017-06-28 14:27  JS_I338_V103\attribute-id.h

     文件        864  2017-06-28 14:27  JS_I338_V103\attribute-size.h

     文件       4677  2017-06-28 14:27  JS_I338_V103\attribute-type.h

     文件       2454  2017-06-28 14:27  JS_I338_V103\call-command-handler.c

     文件        508  2017-06-28 14:27  JS_I338_V103\call-command-handler.h

     文件      85651  2017-06-28 14:27  JS_I338_V103\callback-stub.c

     文件     850366  2017-06-28 14:27  JS_I338_V103\callback.h

     文件      42355  2017-07-13 16:20  JS_I338_V103\cli.c

     文件      45209  2017-06-28 14:27  JS_I338_V103\cli.h

     文件     574576  2017-06-28 14:27  JS_I338_V103\client-command-macro.h

     文件       5141  2017-06-28 14:27  JS_I338_V103\cluster-id.h

     文件      43974  2017-06-28 14:27  JS_I338_V103\command-id.h

     文件       6599  2017-06-28 14:27  JS_I338_V103\debug-printing-test.h

     文件     105443  2017-06-28 14:27  JS_I338_V103\debug-printing.h

     文件     111652  2017-06-28 14:27  JS_I338_V103\enums.h

     文件        775  2017-06-28 14:27  JS_I338_V103\JS_I338_V103.bat

     文件     158266  2018-09-10 17:14  JS_I338_V103\JS_I338_V103.dep

     文件      36954  2017-06-28 14:29  JS_I338_V103\JS_I338_V103.ewd

     文件      38958  2018-02-01 16:17  JS_I338_V103\JS_I338_V103.ewp

     文件      13125  2017-07-05 18:21  JS_I338_V103\JS_I338_V103.ewt

     文件        208  2017-06-28 14:27  JS_I338_V103\JS_I338_V103.eww

     文件       6724  2018-09-10 17:13  JS_I338_V103\JS_I338_V103.h

     文件      16620  2017-06-28 14:27  JS_I338_V103\JS_I338_V103.isc

     文件      55930  2017-06-28 15:08  JS_I338_V103\JS_I338_V103_board.h

     文件      40231  2018-09-10 17:12  JS_I338_V103\JS_I338_V103_callbacks.c

     文件      10178  2018-08-01 16:51  JS_I338_V103\JS_I338_V103_endpoint_config.h

     文件       2036  2018-05-21 16:00  JS_I338_V103\JS_I338_V103_tokens.h

     文件      22265  2017-06-28 14:27  JS_I338_V103\print-cluster.h

............此处省略68个文件信息

评论

共有 条评论