예제 #1
0
        /// <summary>
        /// Sends the data request.
        /// </summary>
        /// <param name="request">Request.</param>
        public void SendDataRequest2(byte[] request)
        {
            byte cmdClass = request[0];

            byte[] message = ZWaveMessage.BuildSendDataRequest(Id, request);
            for (int i = 0; i < 100; i++)
            {
                SendMessage(message);
            }
        }
예제 #2
0
        /// <summary>
        /// Sends the data request.
        /// </summary>
        /// <param name="request">Request.</param>
        public ZWaveMessage SendDataRequest(byte[] request)
        {
            byte cmdClass = request[0];

            byte[] message = ZWaveMessage.BuildSendDataRequest(Id, request);
            // when cmdClass belongs to SecuredNodeInformationFrame we need to encrypt the message
            if (cmdClass != (byte)CommandClass.Security && IsSecuredCommandClass((CommandClass)cmdClass))
            {
                Security.SendMessage(this, message);
                // TODO: not yet supported for Security Command Classs,
                // TODO: update Security.cs class
                return(null);
            }
            else
            {
                return(SendMessage(message));
            }
        }