[Time Conductor] Roll back changes to example telemetry

In particular, remove the timeService implementation; this is made
obsolete by a switch to a simpler format-based approach.
This commit is contained in:
Victor Woeltjen
2015-10-26 10:05:46 -07:00
parent aa23d358cc
commit ed9a5b0890
4 changed files with 0 additions and 137 deletions

View File

@ -49,11 +49,6 @@ define(
Math.max(Math.floor(request.start / 1000), firstTime),
offset = requestStart - firstTime;
if (request.domain === 'index') {
offset = Math.floor(request.start || 0);
count = Math.ceil(request.end || endTime);
}
if (request.size !== undefined) {
offset = Math.max(offset, count - request.size);
}
@ -63,9 +58,6 @@ define(
};
generatorData.getDomainValue = function (i, domain) {
if (domain === 'index') {
return i + offset;
}
return (i + offset) * 1000 + firstTime * 1000 -
(domain === 'yesterday' ? ONE_DAY : 0);
};

View File

@ -1,52 +0,0 @@
/*****************************************************************************
* 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([
'./SinewaveTimeSystem'
], function (
SinewaveTimeSystem
) {
"use strict";
/**
* Provides date-time formatting for the Sine Wave Generator's
* `index` domain; demonstrates how to support domains which should
* not necessarily be formatted as UTC dates.
* @memberof example/generator
* @constructor
* @implements {TimeService}
*/
function SinewaveTimeProvider() {
this.indexTimeSystem = new SinewaveTimeSystem();
}
SinewaveTimeProvider.prototype.systems = function () {
return [ 'generator.index' ];
};
SinewaveTimeProvider.prototype.system = function (key) {
return key === 'generator.index' ? this.indexTimeSystem : undefined;
};
return SinewaveTimeProvider;
});

View File

@ -1,55 +0,0 @@
/*****************************************************************************
* 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([
'./SinewaveTelemetrySeries'
], function (
SinewaveTelemetrySeries
) {
"use strict";
function SinewaveTimeSystem(now) {
}
SinewaveTimeSystem.prototype.format = function (value) {
return ('#' + Math.floor(value));
};
SinewaveTimeSystem.prototype.parse = function (text) {
return parseInt(text.substring(1), 10);
};
SinewaveTimeSystem.prototype.validate = function (text) {
return (/^#\d+$/).test(text);
};
SinewaveTimeSystem.prototype.now = function () {
return new SinewaveTelemetrySeries({}).getPointCount();
};
SinewaveTimeSystem.prototype.increment = function (scale) {
return Math.max(Math.pow(10, (scale || 0) + 1), 1);
};
return SinewaveTimeSystem;
});