// 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_SIMPLE_METERING_CLUSTER_ID: return emberAfSimpleMeteringClusterClientCommandParse(cmd); case ZCL_TUNNELING_CLUSTER_ID: return emberAfTunnelingClusterClientCommandParse(cmd); case ZCL_KEY_ESTABLISHMENT_CLUSTER_ID: return emberAfKeyEstablishmentClusterClientCommandParse(cmd); } } else if (cmd->direction == ZCL_DIRECTION_CLIENT_TO_SERVER && emberAfContainsServer(cmd->apsFrame->destinationEndpoint, cmd->apsFrame->clusterId)) { switch (cmd->apsFrame->clusterId) { case ZCL_PRICE_CLUSTER_ID: return emberAfPriceClusterServerCommandParse(cmd); case ZCL_SIMPLE_METERING_CLUSTER_ID: return emberAfSimpleMeteringClusterServerCommandParse(cmd); case ZCL_MESSAGING_CLUSTER_ID: return emberAfMessagingClusterServerCommandParse(cmd); case ZCL_TUNNELING_CLUSTER_ID: return emberAfTunnelingClusterServerCommandParse(cmd); case ZCL_KEY_ESTABLISHMENT_CLUSTER_ID: return emberAfKeyEstablishmentClusterServerCommandParse(cmd); } } 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); }