예제 #1
0
        public async Task PostData(Sensor sensor)
        {
            SensorDb vl = new SensorDb(sensor.Type, sensor.Value, sensor.Timestamp);
            await _context.SensorData.InsertOneAsync(vl);

            _service.PublishOnTopic(sensor, "sensor/analytics");
        }
예제 #2
0
 public DataController(ILogger <DataController> logger, SensorDb db) : base(logger, db)
 {
 }
예제 #3
0
 protected ControllerBase(ILogger logger, SensorDb db)
 {
     _logger = logger;
     _db     = db;
 }
예제 #4
0
 public UserController(ILogger <UserController> logger, SensorDb db) : base(logger, db)
 {
 }
 public FloorPlanController(ILogger <FloorPlanController> logger, SensorDb db) : base(logger, db)
 {
 }