"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createService = void 0;
var Gps_1 = require("./Gps");
var Temperature_1 = require("./Temperature");
var Flip_1 = require("./Flip");
var Device_1 = require("./Device");
var Rsrp_1 = require("./Rsrp");
var Location_1 = require("./Location");
var Alert_1 = require("./Alert");
var Log_1 = require("./Log");
var services = {
    acc: Flip_1.Flip,
    gps: Gps_1.Gps,
    temp: Temperature_1.Temp,
    device: Device_1.Device,
    rsrp: Rsrp_1.Rsrp,
    location: Location_1.Location,
    alert: Alert_1.Alert,
    log: Log_1.Log,
};
exports.createService = function (name, sensor, sendMessage) {
    var Service = services[name];
    if (Service == null) {
        throw new Error("No service for a sensor named '" + name + "' is known.");
    }
    return new Service(sensor, sendMessage);
};
