IUANode.ChildrenRemoteRead(timeoutMilliseconds)

Returns the list of all the direct child variables of the node on which it invokes. The optional argument sets the timeout period.
IEnumerable<RemoteChildVariableValue> ChildrenRemoteRead(double
timeoutMilliseconds
);

Arguments

timeoutMilliseconds
(double)
The timeout period, expressed in milliseconds, after which the API throws an exception.
MANCIA: If not specified, the default value of the argument is
30000
(30 seconds).

Returns

IEnumerable<RemoteChildVariableValue>
The list of direct child variables of the node, expressed as a pair of the
RemoteChildVariableValue
class following properties:
RelativePath
(string)
The path relative to the variable inside the node.
Value
(UAValue)
The value of the variable.

Example

The following example shows an API that returns the
reads
list of all the variables contained in the
myNode
node. For each variable (
item
), a message is generated that shows the relative path and value.
If the API returns an error or if the set timeout time is reached, the code in the following example generates an error message composed of
ChildrenRemoteRead failed:
and an expected error code for the API.
var myNode = Project.Current.Get("CommDrivers/Driver1/Station1/Tags/TagStructure1"); try { var reads = myNode.ChildrenRemoteRead(); foreach (var item in reads) Log.Info("Tag " + item.RelativePath + " has value " + item.Value); } catch (Exception ex) { Log.Error("ChildrenRemoteRead failed: " + ex.ToString()); }
Fornire un feedback
Hai domande o feedback su questa documentazione? invia il tuo feedback qui.