Пример #1
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public CustomServer(ICommContext commContext, OpcUaServerDSO options, ILog log)
        {
            this.commContext = commContext ?? throw new ArgumentNullException(nameof(commContext));
            this.options     = options ?? throw new ArgumentNullException(nameof(options));
            this.log         = log ?? throw new ArgumentNullException(nameof(log));

            certificateValidator = null;
            NodeManager          = null;
        }
Пример #2
0
        private Dictionary <string, VarItem> varByPath;   // variables accessed by path


        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public NodeManager(IServerInternal server, ApplicationConfiguration configuration,
                           ICommContext commContext, OpcUaServerDSO options, ILog log)
            : base(server, configuration, NamespaceUri)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            this.commContext = commContext ?? throw new ArgumentNullException(nameof(commContext));
            deviceFilter     = options.DeviceFilter.Count > 0 ? new HashSet <int>(options.DeviceFilter) : null;
            this.log         = log ?? throw new ArgumentNullException(nameof(log));
            dataLock         = new object();

            varByDevice = null;
            varByPath   = null;
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public OpcUaServerDSL(ICommContext commContext, DataSourceConfig dataSourceConfig)
     : base(commContext, dataSourceConfig)
 {
     options = new OpcUaServerDSO(dataSourceConfig.CustomOptions);
     dsLog   = CreateLog(DriverUtils.DriverCode);
 }