C# Class Contrequarte.SmartPlugFinder.DeviceFinder

Show file Open project: contrequarte/SmartPlugSP2101W Class Usage Examples

Public Methods

Method Description
DeviceFinder ( long sendingPort, long listeningPort ) : System
DeviceFinder ( long sendingPort, long listeningPort, int timeoutPeriod ) : System
FindDevices ( IPAddress ipAddressOfSender ) : void
ShowIt ( ) : void

Private Methods

Method Description
GetSmartPlugDetails ( byte smartplugUdpDataGram ) : SmartPlugDetails

Evaluating the UDP datagram received to get model, sw version and name of a smart plug

ReceiveSmartPlugCallBack ( IAsyncResult ar ) : void
ReturnStringValue ( byte smartplugUdpDataGram, int startAddress ) : string
SendHelloToPlugs ( IPAddress broadcastAddress, UdpClient udpClient ) : void
TimeCallBack ( object o ) : void

Method Details

DeviceFinder() public method

public DeviceFinder ( long sendingPort, long listeningPort ) : System
sendingPort long
listeningPort long
return System

DeviceFinder() public method

public DeviceFinder ( long sendingPort, long listeningPort, int timeoutPeriod ) : System
sendingPort long
listeningPort long
timeoutPeriod int
return System

FindDevices() public method

public FindDevices ( IPAddress ipAddressOfSender ) : void
ipAddressOfSender System.Net.IPAddress
return void

ShowIt() public static method

public static ShowIt ( ) : void
return void