2016-01-22 18:49:40 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
|
|
|
* as represented by the Administrator of the National Aeronautics and Space
|
|
|
|
* Administration. All rights reserved.
|
|
|
|
*
|
|
|
|
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*
|
|
|
|
* Open MCT Web includes source code licensed under additional open source
|
|
|
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
|
|
* this source code distribution or the Licensing information page available
|
|
|
|
* at runtime from the About dialog for additional information.
|
|
|
|
*****************************************************************************/
|
|
|
|
/*global define*/
|
|
|
|
|
|
|
|
define([
|
|
|
|
"./src/RemsTelemetryServerAdapter",
|
|
|
|
"./src/RemsTelemetryInitializer",
|
|
|
|
"./src/RemsTelemetryModelProvider",
|
|
|
|
"./src/RemsTelemetryProvider",
|
2016-01-22 20:37:50 +00:00
|
|
|
'legacyRegistry',
|
|
|
|
"module"
|
2016-01-22 18:49:40 +00:00
|
|
|
], function (
|
|
|
|
RemsTelemetryServerAdapter,
|
|
|
|
RemsTelemetryInitializer,
|
|
|
|
RemsTelemetryModelProvider,
|
|
|
|
RemsTelemetryProvider,
|
|
|
|
legacyRegistry
|
|
|
|
) {
|
|
|
|
"use strict";
|
2016-07-25 21:38:44 +00:00
|
|
|
legacyRegistry.register("example/msl-adapter", {
|
2016-01-22 18:49:40 +00:00
|
|
|
"name" : "Mars Science Laboratory Data Adapter",
|
|
|
|
"extensions" : {
|
|
|
|
"types": [
|
|
|
|
{
|
|
|
|
"name":"Mars Science Laboratory",
|
|
|
|
"key": "msl.curiosity",
|
|
|
|
"glyph": "o"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Instrument",
|
|
|
|
"key": "msl.instrument",
|
|
|
|
"glyph": "o",
|
|
|
|
"model": {"composition": []}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Measurement",
|
|
|
|
"key": "msl.measurement",
|
2016-03-24 02:04:32 +00:00
|
|
|
"glyph": "\u0054",
|
2016-01-22 18:49:40 +00:00
|
|
|
"model": {"telemetry": {}},
|
|
|
|
"telemetry": {
|
|
|
|
"source": "rems.source",
|
|
|
|
"domains": [
|
|
|
|
{
|
|
|
|
"name": "Time",
|
2016-01-22 20:37:50 +00:00
|
|
|
"key": "timestamp",
|
|
|
|
"format": "utc"
|
2016-01-22 18:49:40 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2016-01-22 20:37:50 +00:00
|
|
|
"constants": [
|
2016-01-22 18:49:40 +00:00
|
|
|
{
|
|
|
|
"key": "REMS_WS_URL",
|
2016-01-22 20:37:50 +00:00
|
|
|
"value": "/proxyUrl?url=http://cab.inta-csic.es/rems/wp-content/plugins/marsweather-widget/api.php"
|
2016-01-22 18:49:40 +00:00
|
|
|
}
|
|
|
|
],
|
2016-01-22 20:37:50 +00:00
|
|
|
"roots": [
|
2016-01-22 18:49:40 +00:00
|
|
|
{
|
|
|
|
"id": "msl:curiosity",
|
|
|
|
"priority" : "preferred",
|
|
|
|
"model": {
|
|
|
|
"type": "msl.curiosity",
|
|
|
|
"name": "Mars Science Laboratory",
|
|
|
|
"composition": []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2016-01-22 20:37:50 +00:00
|
|
|
"services": [
|
2016-01-22 18:49:40 +00:00
|
|
|
{
|
|
|
|
"key":"rems.adapter",
|
|
|
|
"implementation": RemsTelemetryServerAdapter,
|
2016-01-22 20:37:50 +00:00
|
|
|
"depends": ["$q", "$http", "$log", "REMS_WS_URL"]
|
2016-01-22 18:49:40 +00:00
|
|
|
}
|
|
|
|
],
|
2016-01-22 20:37:50 +00:00
|
|
|
"runs": [
|
2016-01-22 18:49:40 +00:00
|
|
|
{
|
|
|
|
"implementation": RemsTelemetryInitializer,
|
|
|
|
"depends": ["rems.adapter", "objectService"]
|
|
|
|
}
|
|
|
|
],
|
2016-01-22 20:37:50 +00:00
|
|
|
"components": [
|
2016-01-22 18:49:40 +00:00
|
|
|
{
|
|
|
|
"provides": "modelService",
|
|
|
|
"type": "provider",
|
|
|
|
"implementation": RemsTelemetryModelProvider,
|
|
|
|
"depends": ["rems.adapter"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"provides": "telemetryService",
|
|
|
|
"type": "provider",
|
|
|
|
"implementation": RemsTelemetryProvider,
|
|
|
|
"depends": ["rems.adapter", "$q"]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2016-01-22 20:37:50 +00:00
|
|
|
|