예제 #1
0
 /// <summary>
 /// Reads the current value of a variable directly from the containing module.
 /// Throws an exception if the variable does not exist or the timeout expires.
 /// </summary>
 /// <param name="objectID">The object containing the variable</param>
 /// <param name="variableName">The name of the variable to read</param>
 /// <param name="timeout">Optional timeout</param>
 public virtual Task <VTQ> ReadVariableSync(ObjectRef objectID, string variableName, Duration?timeout = null)
 {
     return(ReadVariableSync(VariableRef.Make(objectID, variableName), timeout));
 }
예제 #2
0
 public static VariableValue Make(string moduleID, string localObjectID, string variable, VTQ value)
 {
     return(new VariableValue(VariableRef.Make(ObjectRef.Make(moduleID, localObjectID), variable), value));
 }
예제 #3
0
        /// <summary>
        /// Reads the current value of a variable from the Mediator cache.
        /// Throws an exception if the variable does not exist.
        /// </summary>
        /// <param name="objectID">The object containing the variable</param>
        /// <param name="variableName">The name of the variable to read</param>
        /// <returns></returns>
        public virtual async Task <VTQ> ReadVariable(ObjectRef objectID, string variableName)
        {
            VTQs tmp = await ReadVariables(new VariableRefs { VariableRef.Make(objectID, variableName) });

            return(tmp[0]);
        }
예제 #4
0
 public static VariableValue Make(ObjectRef obj, string variable, VTQ value)
 {
     return(new VariableValue(VariableRef.Make(obj, variable), value));
 }