Skip to content

CommandListener

Markus edited this page Mar 4, 2019 · 1 revision

You can implement your own CommandListener class which implements the IZigBeeCommandListener interface.

With an implementation of the IZigBeeCommandListener interface you are able to handle incomming messages by your own:

public class ConsoleCommandListener : IZigBeeCommandListener
{
    public void CommandReceived(ZigBeeCommand command)
    {
        Console.WriteLine(command);
    }
}

All you need to do is to add your custom class to the ZigBeeNetworkManager object in your application:

networkManager.AddCommandListener(new ConsoleCommandListener());

Clone this wiki locally