[Events] Event telemetry generator working

Event telemetry generator now works again, giving a timestamp
and a message string. Additionally, removed excess files which
previously were used for the EventListController. #18.
This commit is contained in:
Sarah Hale 2015-06-23 14:39:40 -07:00
parent c4006646f8
commit 581f14d117

View File

@ -32,38 +32,6 @@ define(
var
firstObservedTime = Date.now(),
messages = [];
/*
messages.push(["WARN", "dsp_seqprt_comm", "CMD: SYS- MSG: Open the pod bay doors, please, Hal...Open the pod bay doors, please, Hal...Hullo, Hal, do you read me?...Hullo, Hal, do you read me?...Do you read me, Hal?"]);
messages.push(["TRACE", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: Affirmative, Dave, I read you."]);
messages.push(["DEBUG", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: Open the pod bay doors, Hal."]);
messages.push(["ERROR", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: I'm sorry, Dave, I'm afraid I can't do that."]);
messages.push(["TRACE", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: What's the problem?"]);
messages.push(["ERROR", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: I think you know what the problem is just as well as I do."]);
messages.push(["TRACE", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: What're you talking about, Hal?"]);
messages.push(["DEBUG", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: This mission is too important for me to allow you to jeopardise it."]);
messages.push(["WARN", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: I don't know what you're talking about, Hal."]);
messages.push(["FATAL", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: I know that you and Frank were planning to disconnect me, and I'm afraid that's something I cannot allow to happen."]);
messages.push(["TRACE", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: Where the hell'd you get that idea, Hal?"]);
messages.push(["DEBUG", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: Dave, although you took very thorough precautions in the pod against my hearing you, I could see your lips move."]);
messages.push(["DEBUG", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: Alright, I'll go in through the emergency airlock."]);
messages.push(["DEBUG", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: Without your space-helmet, Dave, you're going to find that rather difficult."]);
messages.push(["DEBUG", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: Hal, I won't argue with you any more. Open the doors."]);
messages.push(["DEBUG", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: Dave, this conversation can serve no purpose any more. Goodbye."]);
messages.push(["INFO", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: I hope the two of you are not concerned about this."]);
messages.push(["DEBUG", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: No, I'm not, Hal."]);
messages.push(["INFO", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: Are you quite sure?"]);
messages.push(["INFO", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: Yeh. I'd like to ask you a question, though."]);
messages.push(["FATAL", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: Of course."]);
messages.push(["TRACE", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: How would you account for this discrepancy between you and the twin 9000?"]);
messages.push(["TRACE", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error."]);
messages.push(["WARN", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: Listen, There's never been any instance at all of a computer error occurring in the 9000 series, has there?"]);
messages.push(["WARN", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: None whatsoever, The 9000 series has a perfect operational record."]);
messages.push(["WARN", "dsp_seqprt_comm", "CMD: SYS-COMM MSG: Well, of course, I know all the wonderful achievements of the 9000 series, but - er - huh - are you certain there's never been any case of even the most insignificant computer error?"]);
messages.push(["INFO", "dsp_seqprt_hal9k", "RESP: SYS-HAL9K MSG: None whatsoever, Quite honestly, I wouldn't worry myself about that."]);
messages.push(["WARN", "dsp_seqprt_comm", "RESP: SYS-COMM MSG: (Pause) Well, I'm sure you're right, Umm - fine, thanks very much. Oh, Frank, I'm having a bit of trouble with my transmitter in C-pod, I wonder if you'd come down and take a look at it with me?"]);
messages.push(["WARN", "dsp_seqprt_hal9k", "CMD: SYS-HAL9K MSG: Sure."]);
messages.push(["TRACE", "dsp_seqprt_comm", "RESP: SYS-COMM MSG: See you later, Hal."]);
*/
messages.push(["CMD: SYS- MSG: Open the pod bay doors, please, Hal...Open the pod bay doors, please, Hal...Hullo, Hal, do you read me?...Hullo, Hal, do you read me?...Do you read me, Hal?"]);
messages.push(["RESP: SYS-HAL9K MSG: Affirmative, Dave, I read you."]);
@ -97,18 +65,12 @@ define(
messages.push(["RESP: SYS-COMM MSG: See you later, Hal."]);
/**
*
* @constructor
*/
function EventTelemetry(request, interval) {
var latestObservedTime = Date.now(),
count = Math.floor((latestObservedTime - firstObservedTime) / interval),
generatorData = {};
//console.log("EventTelemetry: LOS = " + (latestObservedTime).toString() + "; interval = " + interval.toString());
generatorData.getPointCount = function () {
return count;
};
@ -121,16 +83,9 @@ define(
generatorData.getRangeValue = function (i, range) {
var domainDelta = this.getDomainValue(i) - firstObservedTime;
var ind = i%messages.length;
return "TEMP " + i.toString() + "-" + messages[ind][2] + "[" + domainDelta.toString() + "]";
return "TEMP " + i.toString() + "-" + messages[ind][0] + "[" + domainDelta.toString() + "]";
};
/*
generatorData.getSeverityValue = function (i) {
var ind = i%messages.length;
return messages[ind][0];
};
*/
return generatorData;
}