Difference between revisions of "NXSL:SetInterfaceExpectedState"

From NetXMS Wiki
Jump to navigation Jump to search
Line 11: Line 11:
== Parameters ==
== Parameters ==


:{| class="wikitable"
{| class="wikitable"
|-
|-
| ''interface'' || [[NXSL:Interface|Interface]] object. Can be obtained using [[NXSL:GetNodeInterfaces|GetNodeInterfaces]] or [[NXSL:GetInterfaceObject|GetInterfaceObject]].
| ''interface'' || [[NXSL:Interface|Interface]] object. Can be obtained using [[NXSL:GetNodeInterfaces|GetNodeInterfaces]] or [[NXSL:GetInterfaceObject|GetInterfaceObject]].

Revision as of 20:33, 20 February 2013

Set expected state for given interface.

Since: 1.2.6

Syntax

SetInterfaceExpectedState(interface, state);


Parameters

interface Interface object. Can be obtained using GetNodeInterfaces or GetInterfaceObject.
state New expected state for interface. Can be specified as integer code or state name. Possible values are:
Code Name
0 UP
1 DOWN
2 IGNORE

Return Value

None.


Examples

// Set expected state to "ignore" for all interfaces of given node
interfaces = GetNodeInterfaces($node);
foreach(i : interfaces)
{
	SetInterfaceExpectedState(i, "IGNORE");
}