// Main command parsing controller. EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand *cmd) { if (cmd->direction == ZCL_DIRECTION_SERVER_TO_CLIENT && emberAfContainsClient(cmd->apsFrame->destinationEndpoint, cmd->apsFrame->clusterId)) { switch (cmd->apsFrame->clusterId) { case ZCL_IDENTIFY_CLUSTER_ID: return emberAfIdentifyClusterClientCommandParse(cmd); } } else if (cmd->direction == ZCL_DIRECTION_CLIENT_TO_SERVER && emberAfContainsServer(cmd->apsFrame->destinationEndpoint, cmd->apsFrame->clusterId)) { switch (cmd->apsFrame->clusterId) { case ZCL_BASIC_CLUSTER_ID: return emberAfBasicClusterServerCommandParse(cmd); case ZCL_IDENTIFY_CLUSTER_ID: return emberAfIdentifyClusterServerCommandParse(cmd); case ZCL_GROUPS_CLUSTER_ID: return emberAfGroupsClusterServerCommandParse(cmd); case ZCL_SCENES_CLUSTER_ID: return emberAfScenesClusterServerCommandParse(cmd); case ZCL_ON_OFF_CLUSTER_ID: return emberAfOnOffClusterServerCommandParse(cmd); #ifdef DIMMER case ZCL_LEVEL_CONTROL_CLUSTER_ID: return emberAfLevelControlClusterServerCommandParse(cmd); #endif } } return status(FALSE, cmd->mfgSpecific); }
// Main command parsing controller. EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand *cmd) { if (cmd->direction == ZCL_DIRECTION_SERVER_TO_CLIENT && emberAfContainsClient(cmd->apsFrame->destinationEndpoint, cmd->apsFrame->clusterId)) { switch (cmd->apsFrame->clusterId) { case ZCL_IDENTIFY_CLUSTER_ID: return emberAfIdentifyClusterClientCommandParse(cmd); } } else 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); }