Esempio n. 1
0
        /// <summary>
        /// The Get Zone Status Command
        ///
        /// This command is used by ACE clients to request an update of the status of the IAS Zone
        /// devices managed by the ACE server (i.e., the IAS CIE). In particular, this command
        /// is useful for battery-powered ACE clients with polling rates longer than the
        /// ZigBee standard check-in rate. The command is similar to the Get Attributes
        /// Supported command in that it specifies a starting Zone ID and a number of Zone IDs for
        /// which information is requested. Depending on the number of IAS Zone devices
        /// managed by the IAS ACE server, sending the Zone Status of all zones may not fit into a
        /// single Get ZoneStatus Response command. IAS ACE clients may need to send multiple
        /// Get Zone Status commands in order to get the information they seek.
        ///
        /// <param name="startingZoneId" <see cref="byte"> Starting Zone ID</ param >
        /// <param name="maxZoneIDs" <see cref="byte"> Max Zone I Ds</ param >
        /// <param name="zoneStatusMaskFlag" <see cref="bool"> Zone Status Mask Flag</ param >
        /// <param name="zoneStatusMask" <see cref="ushort"> Zone Status Mask</ param >
        /// <returns> the command result Task </returns>
        /// </summary>
        public Task <CommandResult> GetZoneStatusCommand(byte startingZoneId, byte maxZoneIDs, bool zoneStatusMaskFlag, ushort zoneStatusMask)
        {
            GetZoneStatusCommand command = new GetZoneStatusCommand();

            // Set the fields
            command.StartingZoneId     = startingZoneId;
            command.MaxZoneIDs         = maxZoneIDs;
            command.ZoneStatusMaskFlag = zoneStatusMaskFlag;
            command.ZoneStatusMask     = zoneStatusMask;

            return(Send(command));
        }
        public static void SendGetZoneStatus(this IWriteProcessor processor, IZoneInfo zone)
        {
            var command = new GetZoneStatusCommand(zone.Id);

            processor.ExecuteCommand(command);
        }