예제 #1
0
        public void sendSupportedGet(ZWaveNode node)
        {
            var message = ZWaveMessage.CreateRequest(node.Id, new byte[] {
                (byte)CommandClass.Security,
                (byte)SecurityCommand.SupportedGet
            });

            encryptAndSend(node, message);
        }
예제 #2
0
        public void SendRequest(byte[] request)
        {
            byte cmdClass = request[0];

            byte[] message = ZWaveMessage.CreateRequest(this.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);
            }
            else
            {
                SendMessage(message);
            }
        }
예제 #3
0
        public void SendRequest(byte[] request)
        {
            // lookup request[0] in supportedClasses to see if we need to encrypt the message or NOT
            // we don't encrypt the message if it's sent by the Security Class
            byte cmd = request[0];
            SupportedCommandClasses scc = supportedClasses.Find(x => x.cclass == cmd);

            byte[] msg = ZWaveMessage.CreateRequest(this.Id, request);

            if (scc != null && scc.secure && cmd != (byte)CommandClass.Security)
            {
                security.encryptAndSend(this, msg);
            }
            else
            {
                SendMessage(msg);
            }
        }
예제 #4
0
 public void SendRequest(byte[] request)
 {
     SendMessage(ZWaveMessage.CreateRequest(this.Id, request));
 }