WsfCommRouter

WsfCommRouter inherits WsfPlatformPart

Static Methods

static bool IsA_TypeOf(string aDerivedType, string aBaseType)

Returns true if the router type specified by aDerivedType inherits from the router type specified by aBaseType (compare to WsfObject.IsA_TypeOf(aBaseType) which determines if a specific object inherits from aBaseType).

Methods

bool TurnOff()

Turns the router device off and returns true if successful.

bool TurnOn()

Turns the router device on and returns true if successful.

bool HasGateway()

Returns true if a valid gateway interface has been set for this router.

WsfAddress GetGateway()

Returns the address of the comm interface acting as the gateway for this router. If a gateway has not been set for the router, the address returned will be null.

void SetGateway(WsfAddress aAddress)

Sets the gateway interface for this router to be the comm interface designated by the provided address. If the specified address does not belong to a comm interface assigned to this router, the gateway will not be set.

int GetHopLimit()

Returns the number of hops (time to live, TTL) currently being used for messages transmitted from an interface assigned to this router.

void SetHopLimit(int aNumHops)

Sets the number of hops (time to live, TTL) that will be used for all subsequent messages transmitted from an interface assigned to this router.

bool HasInterface(WsfAddress aAddress)

Returns true if the router has a comm interface assigned to it with the provided address.

void AddInterface(WsfAddress aAddress)

Attempts to assign the comm interface specified by the provided address to this router.

A comm being assigned to a router must belong to the same platform instance. In addition, any attempt to add an interface to a router, when the comm is already assigned as an interface to another router, will cause the immediate removal of the interface from the other router (an interface may only be assigned to a single router at any given time).

void RemoveInterface(WsfAddress aAddress)

Removes the comm interface with the provided address from the current router.

Array<WsfAddress> GetInterfaces()

Returns an array of addresses corresponding to all the comm interfaces currently assigned to this router.

WsfCommMedium GetMedium()

Gets the medium object associated with this router.