/*********************************************************************
 * @fn      zclClosures_HdlInSpecificCommands
 *
 * @brief   Callback from ZCL to process incoming Commands specific
 *          to this cluster library

 * @param   pInMsg - pointer to the incoming message
 *
 * @return  ZStatus_t
 */
static ZStatus_t zclClosures_HdlInSpecificCommands( zclIncoming_t *pInMsg )
{
  ZStatus_t stat;
  zclClosures_AppCallbacks_t *pCBs;
  
  // make sure endpoint exists
  pCBs = zclClosures_FindCallbacks( pInMsg->msg->endPoint );
  if ( pCBs == NULL )
    return ( ZFailure );
  
  switch ( pInMsg->msg->clusterId )				
  {
    case ZCL_CLOSURES_LOGICAL_CLUSTER_ID_SHADE_CONFIG:
      stat = zclClosures_ProcessInClosuresCmds( pInMsg );
      break;

    case ZCL_CLUSTER_ID_CLOSURES_DOOR_LOCK:
#ifdef ZCL_DOORLOCK
      stat = zclClosures_ProcessInDoorLock( pInMsg, pCBs );
#endif //ZCL_DOORLOCK
      break;

    case ZCL_CLUSTER_ID_CLOSURES_WINDOW_COVERING:
#ifdef ZCL_WINDOWCOVERING
      stat = zclClosures_ProcessInWindowCovering( pInMsg, pCBs );
#endif //ZCL_WINDOWCOVERING
      break;

    default:
      stat = ZFailure;
      break;
  }

  return ( stat );
}
Esempio n. 2
0
/*********************************************************************
 * @fn      zclClosures_HdlInSpecificCommands
 *
 * @brief   Callback from ZCL to process incoming Commands specific
 *          to this cluster library

 * @param   pInMsg - pointer to the incoming message
 * @param   logicalClusterID
 *
 * @return  ZStatus_t
 */
static ZStatus_t zclClosures_HdlInSpecificCommands( zclIncoming_t *pInMsg, uint16 logicalClusterID )
{
  ZStatus_t stat = ZSuccess;

  switch ( logicalClusterID )				
  {
    case ZCL_CLOSURES_LOGICAL_CLUSTER_ID_SHADE_CONFIG:
      stat = zclClosures_ProcessInClosuresCmds( pInMsg );
      break;

    default:
      stat = ZFailure;
      break;
  }

  return ( stat );
}