コード例 #1
0
ファイル: BasicCAL.cs プロジェクト: RapidScada/scada-v6
        private int[] cnlIndexes;                   // the channel mapping indexes


        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public BasicCAL(IArchiveContext archiveContext, ArchiveConfig archiveConfig, int[] cnlNums,
                        ModuleConfig moduleConfig) : base(archiveContext, archiveConfig, cnlNums)
        {
            this.moduleConfig = moduleConfig ?? throw new ArgumentNullException(nameof(moduleConfig));
            options           = new BasicCAO(archiveConfig.CustomOptions);
            arcLog            = options.LogEnabled ? CreateLog(ModuleUtils.ModuleCode) : null;
            stopwatch         = new Stopwatch();
            adapter           = new SliceTableAdapter();
            slice             = new Slice(DateTime.MinValue, cnlNums);

            nextWriteTime = DateTime.MinValue;
            cnlIndexes    = null;
        }
コード例 #2
0
ファイル: BasicCAL.cs プロジェクト: wuchang/scada-v6
        private int[] cnlIndexes;                   // the indexes that map the input channels


        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public BasicCAL(IArchiveContext archiveContext, ArchiveConfig archiveConfig, int[] cnlNums)
            : base(archiveContext, archiveConfig, cnlNums)
        {
            options   = new BasicCAO(archiveConfig.CustomOptions);
            arcLog    = options.LogEnabled ? CreateLog(ModuleUtils.ModuleCode) : null;
            stopwatch = new Stopwatch();
            adapter   = new SliceTableAdapter {
                FileName = GetCurDataPath(archiveContext.AppConfig.PathOptions)
            };
            slice = new Slice(DateTime.MinValue, cnlNums);

            nextWriteTime = DateTime.MinValue;
            cnlIndexes    = null;
        }