Exemple #1
0
 private ZclCommandType(int clusterType, int commandId, ZclCommandDirection direction, CommandType commandType)
 {
     this.ClusterType = clusterType;
     this.CommandId   = commandId;
     this.Type        = commandType;
     this.Direction   = direction;
 }
Exemple #2
0
 /// <summary>
 /// Gets a cluster from the input or output cluster list depending on the command <see cref="ZclCommandDirection"> for a
 /// received command.
 ///
 /// If commandDirection is {@link ZclCommandDirection#CLIENT_TO_SERVER} then the cluster comes from the output
 /// cluster list.
 /// If commandDirection is {@link ZclCommandDirection#SERVER_TO_CLIENT} then the cluster comes from the input
 /// cluster list.
 ///
 /// <param name="clusterId">the cluster ID to get</param>
 /// <param name="direction">the <see cref="ZclCommandDirection"></param>
 /// <returns>the <see cref="ZclCluster"> or null if the cluster is not known</returns>
 /// </summary>
 private ZclCluster GetReceiveCluster(int clusterId, ZclCommandDirection direction)
 {
     if (direction == ZclCommandDirection.CLIENT_TO_SERVER)
     {
         return(GetOutputCluster(clusterId));
     }
     else
     {
         return(GetInputCluster(clusterId));
     }
 }
Exemple #3
0
        public static ZclCommandType GetCommandType(ushort clusterType, int commandId, ZclCommandDirection direction)
        {
            foreach (ZclCommandType value in _commands)
            {
                if (value.Direction == direction && value.ClusterType == clusterType && value.CommandId == commandId)
                {
                    return(value);
                }
            }

            return(null);
        }