Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }