Firenet

Check-in [df2dc6b656]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[f8e92c9c4f] & [f200647fb5] Fix auto display
Timelines: family | ancestors | descendants | both | NEWNET
Files: files | file ages | folders
SHA1:df2dc6b6561bbfdedb04351a88e8da1c2083153b
User & Date: jim 2011-12-17 20:09:59
References
2011-12-17
20:12 Tested ticket [984b8c2e46]: AUTO Button sizes not consistent plus 2 other changes artifact: 8bd55052ff user: jim
20:11 Fixed ticket [f200647fb5]: AUTO Display too large plus 4 other changes artifact: 38e77bf09b user: jim
20:10 Tested ticket [f8e92c9c4f]: AUTO Move graph to LEFT and make vertical plus 3 other changes artifact: 04ed2f6bc2 user: jim
Context
2011-12-19
02:05
Add show generator and update shows check-in: 0b0629477b user: jim tags: NEWNET
2011-12-17
20:09
[f8e92c9c4f] & [f200647fb5] Fix auto display check-in: df2dc6b656 user: jim tags: NEWNET
2011-12-10
13:25
[b654411cbe] Update App for Audino 1.0 check-in: 88a41ccf24 user: jim tags: NEWNET
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Shows/mariseillaise.json.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
	"show"		:	"La Mariseillaise",
	"music" 	:	"marseillaise.mp3",
	"time"		:	"1:03",
	"nodes"		:	"6",
	"program" : [
			{ "node"  :  " 1",  "ch"  :  "1",  "delay"  :  "2000"},
			{ "node"  :  " 1",  "ch"  :  "2",  "delay"  :  "4000"},
			{ "node"  :  " 1",  "ch"  :  "3",  "delay"  :  "6000"},
			{ "node"  :  " 1",  "ch"  :  "4",  "delay"  :  "8000"},
			{ "node"  :  " 1",  "ch"  :  "5",  "delay"  :  "10000"},
			{ "node"  :  " 1",  "ch"  :  "6",  "delay"  :  "12000"},
			
			{ "node"  :  " 2",  "ch"  :  "1",  "delay"  :  "2000"},
			{ "node"  :  " 2",  "ch"  :  "2",  "delay"  :  "4000"},
			{ "node"  :  " 2",  "ch"  :  "3",  "delay"  :  "6000"},
			{ "node"  :  " 2",  "ch"  :  "4",  "delay"  :  "8000"},
			{ "node"  :  " 2",  "ch"  :  "5",  "delay"  :  "10000"},
			{ "node"  :  " 2",  "ch"  :  "6",  "delay"  :  "12000"},
			
			{ "node"  :  " 3",  "ch"  :  "1",  "delay"  :  "2000"},
			{ "node"  :  " 3",  "ch"  :  "2",  "delay"  :  "4000"},
			{ "node"  :  " 3",  "ch"  :  "3",  "delay"  :  "6000"},
			{ "node"  :  " 3",  "ch"  :  "4",  "delay"  :  "8000"},
			{ "node"  :  " 3",  "ch"  :  "5",  "delay"  :  "10000"},
			{ "node"  :  " 3",  "ch"  :  "6",  "delay"  :  "12000"},
			
			{ "node"  :  " 4",  "ch"  :  "1",  "delay"  :  "2000"},
			{ "node"  :  " 4",  "ch"  :  "2",  "delay"  :  "4000"},
			{ "node"  :  " 4",  "ch"  :  "3",  "delay"  :  "6000"},
			{ "node"  :  " 4",  "ch"  :  "4",  "delay"  :  "8000"},
			{ "node"  :  " 4",  "ch"  :  "5",  "delay"  :  "10000"},
			{ "node"  :  " 4",  "ch"  :  "6",  "delay"  :  "12000"},
			
			{ "node"  :  " 5",  "ch"  :  "1",  "delay"  :  "2000"},
			{ "node"  :  " 5",  "ch"  :  "2",  "delay"  :  "4000"},
			{ "node"  :  " 5",  "ch"  :  "3",  "delay"  :  "6000"},
			{ "node"  :  " 5",  "ch"  :  "4",  "delay"  :  "8000"},
			{ "node"  :  " 5",  "ch"  :  "5",  "delay"  :  "10000"},
			{ "node"  :  " 5",  "ch"  :  "6",  "delay"  :  "12000"},






|
|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
	"show"		:	"La Mariseillaise",
	"music" 	:	"marseillaise.mp3",
	"time"		:	"1:03",
	"nodes"		:	"6",
	"program" : [
			{ "node"  :  " 1",  "ch"  :  "1",  "delay"  :  "1500"},
			{ "node"  :  " 1",  "ch"  :  "2",  "delay"  :  "4500"},
			{ "node"  :  " 1",  "ch"  :  "3",  "delay"  :  "6500"},
			{ "node"  :  " 1",  "ch"  :  "4",  "delay"  :  "8500"},
			{ "node"  :  " 1",  "ch"  :  "5",  "delay"  :  "10500"},
			{ "node"  :  " 1",  "ch"  :  "6",  "delay"  :  "12500"},
			
			{ "node"  :  " 2",  "ch"  :  "1",  "delay"  :  "2200"},
			{ "node"  :  " 2",  "ch"  :  "2",  "delay"  :  "4200"},
			{ "node"  :  " 2",  "ch"  :  "3",  "delay"  :  "6200"},
			{ "node"  :  " 2",  "ch"  :  "4",  "delay"  :  "8200"},
			{ "node"  :  " 2",  "ch"  :  "5",  "delay"  :  "10200"},
			{ "node"  :  " 2",  "ch"  :  "6",  "delay"  :  "12200"},
			
			{ "node"  :  " 3",  "ch"  :  "1",  "delay"  :  "2700"},
			{ "node"  :  " 3",  "ch"  :  "2",  "delay"  :  "4700"},
			{ "node"  :  " 3",  "ch"  :  "3",  "delay"  :  "6700"},
			{ "node"  :  " 3",  "ch"  :  "4",  "delay"  :  "8700"},
			{ "node"  :  " 3",  "ch"  :  "5",  "delay"  :  "10700"},
			{ "node"  :  " 3",  "ch"  :  "6",  "delay"  :  "12700"},
			
			{ "node"  :  " 4",  "ch"  :  "1",  "delay"  :  "2300"},
			{ "node"  :  " 4",  "ch"  :  "2",  "delay"  :  "4300"},
			{ "node"  :  " 4",  "ch"  :  "3",  "delay"  :  "6300"},
			{ "node"  :  " 4",  "ch"  :  "4",  "delay"  :  "8300"},
			{ "node"  :  " 4",  "ch"  :  "5",  "delay"  :  "10300"},
			{ "node"  :  " 4",  "ch"  :  "6",  "delay"  :  "12300"},
			
			{ "node"  :  " 5",  "ch"  :  "1",  "delay"  :  "2000"},
			{ "node"  :  " 5",  "ch"  :  "2",  "delay"  :  "4000"},
			{ "node"  :  " 5",  "ch"  :  "3",  "delay"  :  "6000"},
			{ "node"  :  " 5",  "ch"  :  "4",  "delay"  :  "8000"},
			{ "node"  :  " 5",  "ch"  :  "5",  "delay"  :  "10000"},
			{ "node"  :  " 5",  "ch"  :  "6",  "delay"  :  "12000"},

Changes to Site/Site_J/autorun.js.

22
23
24
25
26
27
28

29
30
31
32
33
34
35
36
37
38

39



40
41
42
43
44
45
46
...
115
116
117
118
119
120
121






122
123
124
125
126
127
128
...
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
...
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
...
348
349
350
351
352
353
354



























355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385

386
387
388
389
390
391
392
393
394
395
396
397
...
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
...
625
626
627
628
629
630
631

632

633
634
635
636
637
638
639
...
658
659
660
661
662
663
664

665
666
667
668
669
670
671
672
...
690
691
692
693
694
695
696
697





























function AUTO_RunOperation()
{
var path;
	var result;
	var outmsg;
	
	// Clear the area...

	$("#AUTO_RUN_BLOCK").replaceWith("<div id=\"AUTO_RUN_BLOCK\"><p><center>...Loading...</center></div>");
	
	// Get the status
	// Clear the map
	path = lcnURI + "firenet/status/C";
	result = FNET_getData(path,false,"" ,true);
	
	// Display the status
	result = AUTO_BuildTblFullStatus( result );
	outmsg = "<div id=\"AUTO_RUN_BLOCK\"><center>" + result + AUTO_AddButtons();

	outmsg = outmsg + "</center></div>";



	$("#AUTO_RUN_BLOCK").replaceWith(outmsg);
	
	// Set up event handler
	
	$('input').click(AUTOEVENT_Handler);
}

................................................................................
		
		result = FNET_getData(path,true,"" );
		
		setTimeout(AUTO_RunOperation,500);
	}
}







function AUTORUN_Handler()
{
	
	var path;
	var result;
	
	if( AUTO_ARM == true )
................................................................................
			// Send an ABORT command
			
			path = lcnURI + "firenet/program/abort";
			result = FNET_getData(path,true,"" );
			
			// Output a message to show what we are doing
			
			outmsg = "<div id=\"AUTO_RUN_BLOCK\"><center><h1>Processing...</h1></center></div>";
			$("#AUTO_RUN_BLOCK").replaceWith(outmsg);
			outmsg = "<div id=\"AUTO_PLOT_BLOCK\" style=\"height:50px;width:500px; \" />";
            $("#AUTO_PLOT_BLOCK").replaceWith(outmsg)	
            
			// Send the command then update the status
			// Allow network to settle before doing status
			
			AUTO_RUN = false;
			AUTO_ARM = false;
			SHOW_SELECT = 0;
................................................................................
		
		elapsed = FNET_NOWMS() - AUTO_RUN_START;
		elapsed = elapsed/1000.0;
		
		AUTO_RUN_TIME = elapsed;
		
		plotval = 100.0 * AUTO_RUN_TIME/SHOW_TIME
		plotline = [[plotval,1]];
		
		$.plot( $('#AUTO_PLOT_BLOCK'), [
				{ label: "SHOW", data:plotline, bars:{show:true, horizontal:true}}
										],
			{ 	xaxis:{max:100.0, min:0 }, 
				yaxis:{ max:2,min:1, ticks:[[1.5, "SHOWTIME-->"]] },
				legend: {show: false}
			}
		);
		
		// Send and receive STATUS message
		
		path = lcnURI + "firenet/program/status";
................................................................................
			
		if( AUTO_RUN_TIME >= SHOW_TIME )
		{
			// End the show, update the screen and reset the boxes
			AUTO_RUN = false;
			outmsg = "<div id=\"AUTO_RUN_BLOCK\"><center><h1>DONE...</h1></center></div>";
            $("#AUTO_RUN_BLOCK").replaceWith(outmsg);
            outmsg = "<div id=\"AUTO_PLOT_BLOCK\" style=\"height:50px;width:500px; \" />";
            $("#AUTO_PLOT_BLOCK").replaceWith(outmsg)
            
            path = lcnURI + "firenet/program/abort";
			result = FNET_getData(path,true,"" );

			AUTO_RUN = false;
			AUTO_ARM = false;       
            SHOW_SELECT = 0;
................................................................................
	{
		fire_list = status.FIRED;
		
		// (2) Loop through list and marked fired
		
		for( i=0; i<fire_list.length; i++ )
		{
			n = fire_list[i].FROM;
			ch = fire_list[i].CH;
			
			// Mark as fired
			
			node = FNET_Status[n];
			node.UNFIRED[ch] = "0";
			node.FIRED[ch] = "1";
		}
................................................................................
//-----------------------------------------------------------------------
/*
	-- SUPPORT FUNCTIONS ---
*/
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
/*



























	AUTO_UpdateTable()
	
	INPUT:	FNET_Status	- Updated
	
	OUTPUT:	NONE
			Table update with new status values
*/
//-----------------------------------------------------------------------

function AUTO_UpdateTable()
{
	var result;
	
	// Build the new DIV header
	
	result = "<div id=\"AUTO_RUN_BLOCK\"><center>";
	
	// Add on the table
	
	result = result +  "<table id=\"AUTO_TABLE\" border=1 align=center>";
	result = result + AUTO_BuildHeader();
	result = result + AUTO_BuildFullBody(FNET_Status);
	result = result + "</table>";
	
	// Put on the buttons
	
	result = result + AUTO_AddButtons();
	
	// Close the DIV
	
	result = result + "</center></div>";

	
	// & update
	
	$("#AUTO_RUN_BLOCK").replaceWith(result);
	$('input').click(AUTOEVENT_Handler);
}

//-----------------------------------------------------------------------
//				-- DISPLAY FUNCTIONS --
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
/*
................................................................................
		
		for( i=FNET_NET_MIN; i<= FNET_NET_MAX; i++ )
		{
			indx = i + "";
			FNET_Status[i] = fnetstatus[indx]
		}
		
		rtnval =  "<table id=\"AUTO_TABLE\" border=1 align=center>";
		rtnval = rtnval + AUTO_BuildHeader();
		rtnval = rtnval + AUTO_BuildFullBody(FNET_Status);
		rtnval = rtnval + "</table>";
	}
	
	return rtnval;
}
		
//-----------------------------------------------------------------------
/*
................................................................................

function AUTO_AddButtons()
{
	var rtnval;
	
	// Add STATUS, ARM, RUN-ABORT buttons on display
	

	rtnval = "<b><p>";

	
	// Status button
	
	if( AUTO_RUN )
		rtnval = rtnval +  "<input id=\"AUTOSTATUS\"  type=\"image\" src=\"Buttons/no_status.png\" />";
	else
		rtnval = rtnval +  "<input id=\"AUTOSTATUS\"  type=\"image\" src=\"Buttons/status.png\" />";
................................................................................
			rtnval = rtnval +  "<input id=\"AUTORUN\"  type=\"image\" src=\"Buttons/abort.png\" />";
		else
			rtnval = rtnval +  "<input id=\"AUTORUN\"  type=\"image\" src=\"Buttons/run.png\" />";
	}
	else
		rtnval = rtnval +  "<input id=\"AUTORUN\"  type=\"image\" src=\"Buttons/no_run.png\" />";


	rtnval = rtnval + "</p>";
	
	return rtnval;
}

//-----------------------------------------------------------------------
/*
	AUTO_RemoveReady( n,ch )	- Remove channel from ready list
................................................................................
		{
			FNET_Ready.splice(i,1);	// Remove element
			FNET_ReadyCount = FNET_ReadyCount - 1;
			break;
		}
	}
}





































>
|






|

<
>
|
>
>
>







 







>
>
>
>
>
>







 







|
|
<
<







 







|


|

|
|







 







<
<







 







|
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












|
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
>



|
<







 







|
<
<
<







 







>
|
>







 







>
|







 








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

39
40
41
42
43
44
45
46
47
48
49
50
...
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
...
183
184
185
186
187
188
189
190
191


192
193
194
195
196
197
198
...
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
...
256
257
258
259
260
261
262


263
264
265
266
267
268
269
...
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
...
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400




401
402












403
404
405
406
407

408
409
410
411
412
413
414
...
434
435
436
437
438
439
440
441



442
443
444
445
446
447
448
...
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
...
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
...
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
function AUTO_RunOperation()
{
var path;
	var result;
	var outmsg;
	
	// Clear the area...
	if( AUTO_RUN != true )
		$("#AUTO_RUN_BLOCK").replaceWith("<div id=\"AUTO_RUN_BLOCK\"><p><center>...Loading...</center></div>");
	
	// Get the status
	// Clear the map
	path = lcnURI + "firenet/status/C";
	result = FNET_getData(path,false,"" ,true);
	
	// Build the RUN display
	result = AUTO_BuildTblFullStatus( result );

	
	outmsg = AUTO_NewRunBlock( result );
	
	// Replace block
	
	$("#AUTO_RUN_BLOCK").replaceWith(outmsg);
	
	// Set up event handler
	
	$('input').click(AUTOEVENT_Handler);
}

................................................................................
		
		result = FNET_getData(path,true,"" );
		
		setTimeout(AUTO_RunOperation,500);
	}
}

//-----------------------------------------------------------------------
/*
		EVENT RUN Button - Do RUN or ABORT
*/
//-----------------------------------------------------------------------

function AUTORUN_Handler()
{
	
	var path;
	var result;
	
	if( AUTO_ARM == true )
................................................................................
			// Send an ABORT command
			
			path = lcnURI + "firenet/program/abort";
			result = FNET_getData(path,true,"" );
			
			// Output a message to show what we are doing
			
			outmsg = "<div id=\"AUTO_RUN_BLOCK\"><center><h1>DONE...</h1></center></div>";
            $("#AUTO_RUN_BLOCK").replaceWith(outmsg);	


            
			// Send the command then update the status
			// Allow network to settle before doing status
			
			AUTO_RUN = false;
			AUTO_ARM = false;
			SHOW_SELECT = 0;
................................................................................
		
		elapsed = FNET_NOWMS() - AUTO_RUN_START;
		elapsed = elapsed/1000.0;
		
		AUTO_RUN_TIME = elapsed;
		
		plotval = 100.0 * AUTO_RUN_TIME/SHOW_TIME
		plotline = [[1,plotval]];
		
		$.plot( $('#AUTO_PLOT_BLOCK'), [
				{ label: "SHOW", data:plotline, bars:{show:true }}
										],
			{ 	yaxis:{max:100.0, min:0 }, 
				xaxis:{ max:2,min:1, ticks:[[1.5, "SHOW"]] },
				legend: {show: false}
			}
		);
		
		// Send and receive STATUS message
		
		path = lcnURI + "firenet/program/status";
................................................................................
			
		if( AUTO_RUN_TIME >= SHOW_TIME )
		{
			// End the show, update the screen and reset the boxes
			AUTO_RUN = false;
			outmsg = "<div id=\"AUTO_RUN_BLOCK\"><center><h1>DONE...</h1></center></div>";
            $("#AUTO_RUN_BLOCK").replaceWith(outmsg);


            
            path = lcnURI + "firenet/program/abort";
			result = FNET_getData(path,true,"" );

			AUTO_RUN = false;
			AUTO_ARM = false;       
            SHOW_SELECT = 0;
................................................................................
	{
		fire_list = status.FIRED;
		
		// (2) Loop through list and marked fired
		
		for( i=0; i<fire_list.length; i++ )
		{
			n = parseInt(fire_list[i].FROM);
			ch = parseInt(fire_list[i].CH) + 1;
			
			// Mark as fired
			
			node = FNET_Status[n];
			node.UNFIRED[ch] = "0";
			node.FIRED[ch] = "1";
		}
................................................................................
//-----------------------------------------------------------------------
/*
	-- SUPPORT FUNCTIONS ---
*/
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
/*
	AUTO_BuildStatusTable()
	
	INPUT:	NONE
	
	OUTPUT:	Build table with current FNET value
*/
//-----------------------------------------------------------------------

function AUTO_BuildStatusTable()
{
	var result;
		
	// Add on the table
	
	result = "<div id=\"AUTO_TABLE\" >";
	result = result +  "<table id=\"AUTO_TABLE_TBL\" border=1 >";
	result = result + AUTO_BuildHeader();
	result = result + AUTO_BuildFullBody(FNET_Status);
	result = result + "</table>";
	result = result + "</div>";
	
	
	return result;
}

//-----------------------------------------------------------------------
/*
	AUTO_UpdateTable()
	
	INPUT:	FNET_Status	- Updated
	
	OUTPUT:	NONE
			Table update with new status values
*/
//-----------------------------------------------------------------------

function AUTO_UpdateTable()
{
	var result;
		




	// Add on the table
	












	result = AUTO_BuildStatusTable();	
	
	// & update
	
	$("#AUTO_TABLE").replaceWith(result);

}

//-----------------------------------------------------------------------
//				-- DISPLAY FUNCTIONS --
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
/*
................................................................................
		
		for( i=FNET_NET_MIN; i<= FNET_NET_MAX; i++ )
		{
			indx = i + "";
			FNET_Status[i] = fnetstatus[indx]
		}
		
		rtnval = AUTO_BuildStatusTable();



	}
	
	return rtnval;
}
		
//-----------------------------------------------------------------------
/*
................................................................................

function AUTO_AddButtons()
{
	var rtnval;
	
	// Add STATUS, ARM, RUN-ABORT buttons on display
	
	rtnval = "<center>";
	//rtnval = "";
	rtnval = "<div id=\"AUTO_BUTTON_BLOCK\">";
	
	// Status button
	
	if( AUTO_RUN )
		rtnval = rtnval +  "<input id=\"AUTOSTATUS\"  type=\"image\" src=\"Buttons/no_status.png\" />";
	else
		rtnval = rtnval +  "<input id=\"AUTOSTATUS\"  type=\"image\" src=\"Buttons/status.png\" />";
................................................................................
			rtnval = rtnval +  "<input id=\"AUTORUN\"  type=\"image\" src=\"Buttons/abort.png\" />";
		else
			rtnval = rtnval +  "<input id=\"AUTORUN\"  type=\"image\" src=\"Buttons/run.png\" />";
	}
	else
		rtnval = rtnval +  "<input id=\"AUTORUN\"  type=\"image\" src=\"Buttons/no_run.png\" />";

	rtnval = rtnval + "</center>";
	rtnval = rtnval + "</div>";
	
	return rtnval;
}

//-----------------------------------------------------------------------
/*
	AUTO_RemoveReady( n,ch )	- Remove channel from ready list
................................................................................
		{
			FNET_Ready.splice(i,1);	// Remove element
			FNET_ReadyCount = FNET_ReadyCount - 1;
			break;
		}
	}
}

function AUTO_NewRunBlock( table )
{
	var outmsg;
	
	// Build the RUN display

	// Outer auto run block with status & buttons
	
	outmsg = "<div id=\"AUTO_RUN_BLOCK\">"
	
	// Add Table
	
	outmsg = outmsg + table;
	
	// Add Graph
	
	outmsg = outmsg + "<div id=\"AUTO_PLOT_BLOCK\" ></div>";
	
	// Buttons

	outmsg = outmsg + AUTO_AddButtons();
	
	// Close AUTO_RUN_BLOCK
	
	outmsg = outmsg + "</div>";
	
	return outmsg;
}

Changes to Site/Site_J/index.html.

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
	</head>                                                                 
 	<body>
 		<!-- HTML AREA ----------------------------- -->
 		
 		<!-- Header area -->
 		
 		<div id="header" class="outline">
 			<center><h1>FIRENET</h1></center>
 			<center><h2>Pandora Products</h2></center>
 		</div>
 		
 		<!-- Navigation area -->
 		
 		<div id="mainnav" class="outline">
 			<center><h3>Controls<h3></center>
 				<a id="LOGIN_LINK" class="nudged">Login</a>
................................................................................
				<center><input type="text" name="LOGIN_RESP" id="LOGIN_RESP" /></center>
				<p>
				<center><input type="submit" name="LOGIN_SUB" id="LOGIN_SUB" /></center>
			</div>	
			
			<!-- AUTO Text -->
			<div id="AUTO_RUN">
				<div id="AUTO_PLOT_BLOCK" style="height:50px;width:500px; ">
				</div>
				<div id="AUTO_RUN_BLOCK">
					<center><h2>-- AUTO --</h2></center>
				</div>
			</div>	
 		</div>
 	</body>                                                                 
 </html>







|
|







 







<
<







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
...
116
117
118
119
120
121
122


123
124
125
126
127
128
129
	</head>                                                                 
 	<body>
 		<!-- HTML AREA ----------------------------- -->
 		
 		<!-- Header area -->
 		
 		<div id="header" class="outline">
 			<center><h2>FIRENET</h2></center>
 			<center><h3>Pandora Products</h3></center>
 		</div>
 		
 		<!-- Navigation area -->
 		
 		<div id="mainnav" class="outline">
 			<center><h3>Controls<h3></center>
 				<a id="LOGIN_LINK" class="nudged">Login</a>
................................................................................
				<center><input type="text" name="LOGIN_RESP" id="LOGIN_RESP" /></center>
				<p>
				<center><input type="submit" name="LOGIN_SUB" id="LOGIN_SUB" /></center>
			</div>	
			
			<!-- AUTO Text -->
			<div id="AUTO_RUN">


				<div id="AUTO_RUN_BLOCK">
					<center><h2>-- AUTO --</h2></center>
				</div>
			</div>	
 		</div>
 	</body>                                                                 
 </html>

Changes to Site/Site_J/jquery.flot.js.

34
35
36
37
38
39
40

41
42
43
44
45
46
47
48
        //   [ series1, series2 ... ]
        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
        
        var series = [],
            options = {
                // the color theme used for graphs

                colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
                legend: {
                    show: true,
                    noColumns: 1, // number of colums in legend table
                    labelFormatter: null, // fn: string -> string
                    labelBoxBorderColor: "#ccc", // border color for the little label boxes
                    container: null, // container (as jQuery object) to put legend in, null means default on top of graph
                    position: "ne", // position of default legend container within plot







>
|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
        //   [ series1, series2 ... ]
        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
        
        var series = [],
            options = {
                // the color theme used for graphs
                // Make our graph RED
                colors: ["#ff0000", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
                legend: {
                    show: true,
                    noColumns: 1, // number of colums in legend table
                    labelFormatter: null, // fn: string -> string
                    labelBoxBorderColor: "#ccc", // border color for the little label boxes
                    container: null, // container (as jQuery object) to put legend in, null means default on top of graph
                    position: "ne", // position of default legend container within plot

Changes to Site/Site_J/style.css.

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45


























/* ************ CSS Objects ********** */

#header {
			background-color: #FF0000;
			color: black;
			float:top
			width: 99%;
			height: 10%;
			border: outline;
		}

#mainnav {
			background-color: #FFFFFF;
			color: black;
			font-weight: bold;
			float: left;
			width: 19%;
			height: 400px;
		}


#maincntl {
			background-color: #F0F0F0;
			color: black;
			float: right;
			width: 80%;
			height: 400px;
		}

































|








|








|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* ************ CSS Objects ********** */

#header {
			background-color: #FF0000;
			color: black;
			float:top
			width: 99%;
			height: 5%;
			border: outline;
		}

#mainnav {
			background-color: #FFFFFF;
			color: black;
			font-weight: bold;
			float: left;
			width: 10%;
			height: 400px;
		}


#maincntl {
			background-color: #F0F0F0;
			color: black;
			float: right;
			width: 89%;
			height: 400px;
		}

/*  AUTO RUN BLOCK CONTROLS */

div#AUTO_PLOT_BLOCK {
			background-color: #FFFFFF;
			color: black;
			float: left;
			width: 80px;
			height: 250px;
		}

div#AUTO_TABLE {
			background-color: #F0F0F0;
			color: black;
			float: right;
			width: 680px;
			height: 250px;
		}

div#AUTO_BUTTON_BLOCK {
			background-color: #F0F0F0;
			color: black;
			float: right;
			width: 680px;
			height: 80px;
		}

Changes to Site/Site_J/support.js.

250
251
252
253
254
255
256




257
258
259
260
261



262
263

264
265



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
	FNET_SLEEP( delay )	- Sleep function
	
	INPUT:	delay	- Sleep time in ms
	
	OUTPUT:	NONE
	
	Wait delay ms and return




*/
// *********************************************

function FNET_SLEEP( st )
{



	SLEEP_HOLD = false;
	setTimeout(FNET_Sleep_Hold(),st );

	while( SLEEP_HOLD == false )
	{



	}
}

function FNET_Sleep_Hold()
{
	SLEEP_HOLD = true;
}

// *********************************************
/*
	FNET_NOWMS()	- Current time in ms
	
	INPUT:	NONE
	
	OUTPUT:	Reutun time since Jan 1 1970 in ms







>
>
>
>





>
>
>

<
>


>
>
>



<
<
<
<
<







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269

270
271
272
273
274
275
276
277
278





279
280
281
282
283
284
285
	FNET_SLEEP( delay )	- Sleep function
	
	INPUT:	delay	- Sleep time in ms
	
	OUTPUT:	NONE
	
	Wait delay ms and return
	
	17-De-2011 Fix to actually work !
			   Make local loop not use
			   selTimeout()
*/
// *********************************************

function FNET_SLEEP( st )
{
	var target;
	var now;
	
	SLEEP_HOLD = false;

	target = FNET_NOWMS() + st;
	while( SLEEP_HOLD == false )
	{
		now = FNET_NOWMS();
		if( now >= target )
			SLEEP_HOLD = true;
	}
}






// *********************************************
/*
	FNET_NOWMS()	- Current time in ms
	
	INPUT:	NONE
	
	OUTPUT:	Reutun time since Jan 1 1970 in ms

Changes to Site/Site_W/gtest.html.

1
2


3
4
5
6
7
8
9
..
16
17
18
19
20
21
22





23


24
25
26
27
<html>
	<head>


		
		<script language="javascript" type="text/javascript" src="jquery.js"></script>
		<script language="javascript" type="text/javascript" src="json2.js"></script>		
		<!--[if IE]>
			<script language="javascript" type="text/javascript" src="excanvas.min.js"></script>
		<![endif]-->		
		<script language="javascript" type="text/javascript" src="jquery.flot.js"></script>
................................................................................
				<input type="button" value="Start count!" onClick="doTimer()">
				<input type="text" id="txt">
			</form>
			<p>Click on the button above. The input field will count forever, starting at 0.</p>
		</div>
		<center><h2>Active Graph</h2></center>
		<center>





			<div id="PLOT" style="height:200px;width:800px; ">


			</div>
		</center>
	</body>
</html>


>
>







 







>
>
>
>
>
|
>
>




1
2
3
4
5
6
7
8
9
10
11
..
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html>
	<head>
		<!-- CSS Sheets for the page -->
		<link href="style.css" rel="stylesheet" type="text/css"/>
		
		<script language="javascript" type="text/javascript" src="jquery.js"></script>
		<script language="javascript" type="text/javascript" src="json2.js"></script>		
		<!--[if IE]>
			<script language="javascript" type="text/javascript" src="excanvas.min.js"></script>
		<![endif]-->		
		<script language="javascript" type="text/javascript" src="jquery.flot.js"></script>
................................................................................
				<input type="button" value="Start count!" onClick="doTimer()">
				<input type="text" id="txt">
			</form>
			<p>Click on the button above. The input field will count forever, starting at 0.</p>
		</div>
		<center><h2>Active Graph</h2></center>
		<center>
			<div id="maincntl" class="outline">
				<center><h1> MAIN STUFF </h1></center>
				This is main text stuff and will just be a fill here of
				things and stuff....
				<div id="plotleft" class="nudged">
					<div id="PLOT" style="height:200px;width:50px; ">
					</div>
				</div>
			</div>
		</center>
	</body>
</html>

Changes to Site/Site_W/jquery.flot.js.

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
        //   [ series1, series2 ... ]
        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
        
        var series = [],
            options = {
                // the color theme used for graphs
                colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
                legend: {
                    show: true,
                    noColumns: 1, // number of colums in legend table
                    labelFormatter: null, // fn: string -> string
                    labelBoxBorderColor: "#ccc", // border color for the little label boxes
                    container: null, // container (as jQuery object) to put legend in, null means default on top of graph
                    position: "ne", // position of default legend container within plot







|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
        //   [ series1, series2 ... ]
        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
        
        var series = [],
            options = {
                // the color theme used for graphs
                colors: ["#FF0000", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
                legend: {
                    show: true,
                    noColumns: 1, // number of colums in legend table
                    labelFormatter: null, // fn: string -> string
                    labelBoxBorderColor: "#ccc", // border color for the little label boxes
                    container: null, // container (as jQuery object) to put legend in, null means default on top of graph
                    position: "ne", // position of default legend container within plot

Changes to Site/Site_W/scriptgraph.js.

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
..
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

// Response function to handle the GET request
// result = { LINE1: "###", LINE2: "###", LINE3:"###",LINE4:"###" }
//
function rest_response(result,status,x )
{
		val = result.LINE1 + 0;
		line1 = [[val,1]];
		
		val = result.LINE2 + 0;
		line2 = [[val,2]];
		
		val = result.LINE3 + 0;
		line3 = [[val,3]];
		
................................................................................
				{ label: "P4", data:line4, bars:{show:true, horizontal:true}   }],
			{ 	xaxis:{max:50.0, min:0 }, 
				yaxis:{ max:5,min:1, ticks:[[1.5, "P-1"], [2.5, "P-2"], [3.5, "P-3"],[4.5,"P-4"]] },
				legend: {show: false}
			}	
*/
		$.plot( $('#PLOT'), [
				{ label: "P1", data:line1, bars:{show:true, horizontal:true}   }
							],
			{ 	xaxis:{max:50.0, min:0 }, 
				yaxis:{ max:2,min:1 },
				legend: {show: false}
			}	

		);
}

// Called at timer intervals sends off a GET request







|







 







|

|
|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
..
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

// Response function to handle the GET request
// result = { LINE1: "###", LINE2: "###", LINE3:"###",LINE4:"###" }
//
function rest_response(result,status,x )
{
		val = result.LINE1 + 0;
		line1 = [[1,val]];
		
		val = result.LINE2 + 0;
		line2 = [[val,2]];
		
		val = result.LINE3 + 0;
		line3 = [[val,3]];
		
................................................................................
				{ label: "P4", data:line4, bars:{show:true, horizontal:true}   }],
			{ 	xaxis:{max:50.0, min:0 }, 
				yaxis:{ max:5,min:1, ticks:[[1.5, "P-1"], [2.5, "P-2"], [3.5, "P-3"],[4.5,"P-4"]] },
				legend: {show: false}
			}	
*/
		$.plot( $('#PLOT'), [
				{ label: "P1", data:line1, bars:{show:true}   }
							],
			{ 	yaxis:{max:50.0, min:0 }, 
				xaxis:{ max:2,min:1,ticks:[[1.5, "SHOW"]] },
				legend: {show: false}
			}	

		);
}

// Called at timer intervals sends off a GET request