示例#1
0
        /// <summary>
        /// Send a Reveal Message over the Mqtt connection.
        /// Use WifiLocal.ConnectedAppliances to get the list of current scanned and/or connected appliances.
        /// </summary>
        /// <param name="connectedAppliance">The connected Applicance</param>
        /// <param name="destination">Address to send the message</param>
        /// <param name="api">Reveal Api</param>
        /// <param name="opcode">Reveal Opcode</param>
        /// <param name="isFeedback">Set true if the message is a feedback</param>
        /// <param name="payload">payload bytes</param>
        public void SendRevealMessageOverMQTT(ConnectedApplianceInfo connectedAppliance, byte destination, byte api, byte opcode, bool isFeedback, byte[] payload)
        {
            RevealPacket pkt = new RevealPacket(api, opcode, 0, destination, isFeedback, payload);

            WifiLocal.SendMqttMessage(connectedAppliance, pkt.ToMqtt());
        }
示例#2
0
 /// <summary>
 /// Send a Reveal Message over the Mqtt connection.
 /// Use WifiLocal.ConnectedAppliances to get the list of current scanned and/or connected appliances.
 /// </summary>
 /// <param name="connectedAppliance">The connected Applicance</param>
 /// <param name="pkt">Reveal packet containing the command or feedback to be sent</param>
 public void SendRevealMessageOverMQTT(ConnectedApplianceInfo connectedAppliance, RevealPacket pkt)
 {
     WifiLocal.SendMqttMessage(connectedAppliance, pkt.ToMqtt());
 }