コード例 #1
0
        public LTC6804_1Interface(ICommunicateToBus connection, int chainLength)
        {
            Contract.Requires(connection, "connection").NotToBeNull();
            Contract.Requires(chainLength, "chainLength").ToBeInRange(x => 0 < x);

            this.Connection  = connection;
            this.ChainLength = chainLength;
        }
コード例 #2
0
        public BatteryAdapter(ICommunicateToBus busConnection, ILogger <BatteryAdapter> logger)
        {
            this.logger = logger;
            Contract.Requires(busConnection, "busConnection").NotToBeNull();

            this.BusConnection    = busConnection;
            this.m_monitoringTask = new RepeatableTask(this.MonitoringAction, "LTC6804 Monitor")
            {
                MinTriggerTime = TimeSpan.FromSeconds(1)
            };
        }