DiscoverRequest Event

Fired when the component receives a SEARCHGW packet from another client.

Syntax

public event OnDiscoverRequestHandler OnDiscoverRequest;

public delegate void OnDiscoverRequestHandler(object sender, MqttsnDiscoverRequestEventArgs e);

public class MqttsnDiscoverRequestEventArgs : EventArgs {
  public int Radius { get; }
  public int GatewayId { get; set; }
  public string GatewayAddress { get; set; }
  public bool Respond { get; set; }
}
Public Event OnDiscoverRequest As OnDiscoverRequestHandler

Public Delegate Sub OnDiscoverRequestHandler(sender As Object, e As MqttsnDiscoverRequestEventArgs)

Public Class MqttsnDiscoverRequestEventArgs Inherits EventArgs
  Public ReadOnly Property Radius As Integer
  Public Property GatewayId As Integer
  Public Property GatewayAddress As String
  Public Property Respond As Boolean
End Class

Remarks

This event allows the client to process the received gateway info and decide whether or not to respond to the search request.

If Respond is set to True, the component will respond with a GWINFO packet.

This functionality is not yet implemented.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 .NET Edition - Version 20.0 [Build 8265]