public DeviceDataDao(IThresholdDao thresholdDao, IFieldDao fieldDao, ICityDao cityDao)
        {
            var client   = new MongoClient(Constant.getMongoDBConnectionString());
            var database = client.GetDatabase("iotmanager");

            _deviceData        = database.GetCollection <DeviceDataModel>("monitordata");
            _alarmInfo         = database.GetCollection <AlarmInfoModel>("alarminfo");
            this._thresholdDao = thresholdDao;
            this._fieldDao     = fieldDao;
            this._cityDao      = cityDao;
        }
Esempio n. 2
0
 /*
  * 构造函数
  * 需要注入DeviceDao, FieldDao, Logger
  */
 public DeviceBus(IDeviceDao deviceDao,
                  IFieldDao fieldDao,
                  ICityDao cityDao,
                  IoTHub iotHub,
                  ILogger <DeviceBus> logger)
 {
     this._deviceDao = deviceDao;
     this._fieldDao  = fieldDao;
     this._cityDao   = cityDao;
     this._iotHub    = iotHub;
     this._logger    = logger;
 }
 public AlarmInfoJob(IDeviceDataDao deviceDataDao,
                     IAlarmInfoDao alarmInfoDao,
                     IThresholdDao thresholdDao,
                     ISeverityDao severityDao,
                     IDeviceDao deviceDao,
                     IDeviceBus deviceBus,
                     IStateTypeDao stateTypeDao,
                     IFieldBus fieldBus,
                     IFieldDao fieldDao,
                     ILogger <AlarmInfoJob> logger)
 {
     this._deviceDataDao = deviceDataDao;
     this._alarmInfoDao  = alarmInfoDao;
     this._thresholdDao  = thresholdDao;
     this._severityDao   = severityDao;
     this._deviceDao     = deviceDao;
     this._deviceBus     = deviceBus;
     this._stateTypeDao  = stateTypeDao;
     this._fieldBus      = fieldBus;
     this._fieldDao      = fieldDao;
     this._logger        = logger;
 }
Esempio n. 4
0
 /*
  * 构造函数
  * 需要注入DeviceDataDao, AlarmInfoDao, DeviceDao, WorkshopDao, StateTypeDao
  */
 public DeviceDataBus(IDeviceDataDao deviceDataDao,
                      IAlarmInfoDao alarmInfoDao,
                      ILogger <DeviceDataBus> logger,
                      IDeviceDao deviceDao,
                      IDeviceBus deviceBus,
                      IWorkshopDao workshopDao,
                      IStateTypeDao stateTypeDao,
                      IDeviceDailyOnlineTimeDao deviceDailyOnlineTimeDao,
                      IThresholdDao thresholdDao,
                      IFieldDao fieldDao
                      )
 {
     this._deviceDataDao            = deviceDataDao;
     this._alarmInfoDao             = alarmInfoDao;
     this._logger                   = logger;
     this._deviceDao                = deviceDao;
     this._deviceBus                = deviceBus;
     this._workshopDao              = workshopDao;
     this._stateTypeDao             = stateTypeDao;
     this._deviceDailyOnlineTimeDao = deviceDailyOnlineTimeDao;
     this._thresholdDao             = thresholdDao;
     this._fieldDao                 = fieldDao;
 }
Esempio n. 5
0
 public FieldBus(IFieldDao fieldDao, IDeviceDao deviceDao, ILogger <FieldBus> logger)
 {
     this._fieldDao  = fieldDao;
     this._deviceDao = deviceDao;
     this._logger    = logger;
 }