RemoveAccessRule (Method)

Overview

Type:

Method

Available as of:

V1.1.0.0

Description

The method RemoveAccessRule is used to remove a configured access rule from the function block.

The rule configuration to be removed is specified by a rule index. As the function block can store up to 30 rule configurations, the value range for the rule index is 1...30. In addition, this method can be used to remove the configured access rules from the function block.

NOTE: Before removing a single rule, use the GetAccessRule() method to retrieve the correct index as the index of subsequent rules will be modified if a rule is removed.
NOTE: If one or more access rules have been successfully removed using this method, it is verified whether existing connections comply with the remaining access rules. Connections that do not match any rule are closed.

Interface

Inputs

Data type

Description

i_uiRuleIndex

UINT

This input specifies the index of the rule to be removed.

Value range: 1...30

If the input i_xRemoveAll is set to TRUE, the value of i_uiRuleIndex has no effect.

i_xRemoveAll

BOOL

If this input is set to TRUE, the configured access rules are removed.

Return Value

Data type

Description

ET_Result

The return value indicates the result of the method.

If the value is ET_Result.Ok, the execution of the method was completed successfully.

Troubleshooting

Return value

Possible cause

Solution

ET_Result.NoRule

No rule is configured at the specified rule index.

Verify the number of configured rules using the property NumberOfConfiguredAccessRules. The number of configured rules is equal to the greatest possible rule index for this method.

ET_Result.InvalidInput

The value of i_uiRuleIndex is invalid.

Verify whether the value of i_uiRuleIndex is within the range 1...30.