C# Class BACnet.Core.Network.RoutingTable

Show file Open project: LorenVS/bacstack

Public Methods

Method Description
AddLocalRoute ( ushort network, byte portId ) : Route

Adds a new local route to the routing table

AddRemoteRoute ( ushort network, byte portId, Mac nextHop ) : Route

Adds a new remote route to routing table

GetRoute ( ushort network ) : Route

Gets the route to a network

GetRouteByPortId ( byte portId ) : Route

Gets the local route to a directly attached network

RoutingTable ( ) : System

Private Methods

Method Description
_findRoute ( ushort network ) : int

Finds the route to a network

_findRouteByPortId ( byte portId ) : int

Finds a route to a directly attached network by its port id

_upsertRoute ( int index, Route route ) : Route

Replaces a route in the routing table, or inserts a new one if there is no suitable route to replace

Method Details

AddLocalRoute() public method

Adds a new local route to the routing table
public AddLocalRoute ( ushort network, byte portId ) : Route
network ushort The network number of the route
portId byte The port id of the route
return Route

AddRemoteRoute() public method

Adds a new remote route to routing table
public AddRemoteRoute ( ushort network, byte portId, Mac nextHop ) : Route
network ushort The network number of the route
portId byte The port id of the route
nextHop BACnet.Core.Datalink.Mac The next hop mac address
return Route

GetRoute() public method

Gets the route to a network
public GetRoute ( ushort network ) : Route
network ushort The network to get the route to
return Route

GetRouteByPortId() public method

Gets the local route to a directly attached network
public GetRouteByPortId ( byte portId ) : Route
portId byte The port id of the port
return Route

RoutingTable() public method

public RoutingTable ( ) : System
return System