"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 services = {
    acc: Flip_1.Flip,
    gps: Gps_1.Gps,
    temp: Temperature_1.Temp,
    device: Device_1.Device,
};
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);
};
