示例#1
0
 internal IProducerBinding GetProducerBinding(string variableName, BuiltInType encoding)
 {
     UATypeInfo _uaTypeInfo = new UATypeInfo(encoding);
       if (variableName == "Value1")
       {
     Value1 = new ProducerBindingMonitoredValue<string>(variableName, _uaTypeInfo);
     return Value1;
       }
       else if (variableName == "Value2")
       {
     Value2 = new ProducerBindingMonitoredValue<double>(variableName, _uaTypeInfo);
     return Value2;
       }
       else
     throw new ArgumentOutOfRangeException("variableName");
 }
 public IProducerBinding GetProducerBinding(string repositoryGroup, string processValueName, UATypeInfo encoding)
 {
     string _key = String.Format("{0}.{1}", repositoryGroup, processValueName);
     ProducerBindingMonitoredValue<object> _npb = new ProducerBindingMonitoredValue<object>(_key, new UATypeInfo(encoding.BuiltInType));
     _npb.MonitoredValue = Guid.NewGuid();
     m_Repository.Add(_key, _npb);
     return _npb;
 }
 public IProducerBinding GetProducerBinding(string repositoryGroup, string variableName, BuiltInType encoding)
 {
     string _key = String.Format("{0}.{1}", repositoryGroup, variableName);
     IProducerBinding _npb = new ProducerBindingMonitoredValue<object>(_key, new UATypeInfo(encoding));
     m_Repository.Add(_key, _npb);
     return _npb;
 }