Firenet

Check-in [0d49db5a1e]
Login

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

Overview
Comment:Add retry on inventory
Timelines: family | ancestors | descendants | both | NEWNET
Files: files | file ages | folders
SHA1:0d49db5a1ea98f89ae69a954bf463b0e6ea4bf25
User & Date: jim 2013-02-18 13:45:27
Context
2013-02-23
19:35
Update shows for available fireworks check-in: 8985af2dfd user: jim tags: NEWNET
2013-02-18
13:45
Add retry on inventory check-in: 0d49db5a1e user: jim tags: NEWNET
10:50
Getting ready for movie check-in: 4c4d2dad94 user: jim tags: NEWNET
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Site/Site_J/inventory.js.

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146





















147
148
149
150
151
152
153
	var path;
	var result;
	var outmsg;
	
	// Clear the area...
	$("#INV_RUN_BLOCK").replaceWith("<div id=\"INV_RUN_BLOCK\"><p><center>...Loading...</center></div>");
	
	path = "http://localhost:5010";
	FNET_IStatus = FNET_getData(path,false,"",false);
	
	// Get the status
	// Clear the map [2fbacd1fdc]
	path = lcnURI + "firenet/status/C";
	FNET_IStatus = FNET_getData(path,false,"",true);

	// Build the inventory
................................................................................
	var result;
	var n;
	var output = new Array();
	
	// (1) Get the version information
	
	path = lcnURI + "firenet/version/" + node;
	result = FNET_getData(path,false,"",true);
	
	output.VERSION = result.VERSION;
	
	// (2) Get the Firing time data
	
	path = lcnURI + "firenet/literal/" + node + "/T";
	result = FNET_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.FT = result.substring( n-4);

	// (3) Get the Backoff time data
	
	path = lcnURI + "firenet/literal/" + node + "/B";
	result = FNET_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.BACKOFF = result.substring( n-4);

	// (4) Get the Test mode data
	
	path = lcnURI + "firenet/literal/" + node + "/M";
	result = FNET_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.TEST = result.substring( n-1);
	
	
	return output;
}





















//-----------------------------------------------------------------------
//				-- DISPLAY FUNCTIONS --
//-----------------------------------------------------------------------

//-----------------------------------------------------------------------
/*
	INVENTORY_BuildHeader()







|
|







 







|






|








|








|








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







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
	var path;
	var result;
	var outmsg;
	
	// Clear the area...
	$("#INV_RUN_BLOCK").replaceWith("<div id=\"INV_RUN_BLOCK\"><p><center>...Loading...</center></div>");
	
//	path = "http://localhost:5010";
//	FNET_IStatus = FNET_getData(path,false,"",false);
	
	// Get the status
	// Clear the map [2fbacd1fdc]
	path = lcnURI + "firenet/status/C";
	FNET_IStatus = FNET_getData(path,false,"",true);

	// Build the inventory
................................................................................
	var result;
	var n;
	var output = new Array();
	
	// (1) Get the version information
	
	path = lcnURI + "firenet/version/" + node;
	result = INV_getData(path,false,"",true);
	
	output.VERSION = result.VERSION;
	
	// (2) Get the Firing time data
	
	path = lcnURI + "firenet/literal/" + node + "/T";
	result = INV_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.FT = result.substring( n-4);

	// (3) Get the Backoff time data
	
	path = lcnURI + "firenet/literal/" + node + "/B";
	result = INV_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.BACKOFF = result.substring( n-4);

	// (4) Get the Test mode data
	
	path = lcnURI + "firenet/literal/" + node + "/M";
	result = INV_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.TEST = result.substring( n-1);
	
	
	return output;
}

function INV_getData( path, postState,data,flag )
{
	var count = 3;
	var result;
	
	while( count > 0 )
	{
		result = FNET_getData( path, postState,data,flag );
		if( result.STATUS == "XMIT" )
			break;
			
		FNET_SLEEP( 100 );
		count = count - 1
		
		result.DATA = "";
	}
	
	return result;
}
		
//-----------------------------------------------------------------------
//				-- DISPLAY FUNCTIONS --
//-----------------------------------------------------------------------

//-----------------------------------------------------------------------
/*
	INVENTORY_BuildHeader()

Changes to Site/Site_j/inventory.js.

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146





















147
148
149
150
151
152
153
	var path;
	var result;
	var outmsg;
	
	// Clear the area...
	$("#INV_RUN_BLOCK").replaceWith("<div id=\"INV_RUN_BLOCK\"><p><center>...Loading...</center></div>");
	
	path = "http://localhost:5010";
	FNET_IStatus = FNET_getData(path,false,"",false);
	
	// Get the status
	// Clear the map [2fbacd1fdc]
	path = lcnURI + "firenet/status/C";
	FNET_IStatus = FNET_getData(path,false,"",true);

	// Build the inventory
................................................................................
	var result;
	var n;
	var output = new Array();
	
	// (1) Get the version information
	
	path = lcnURI + "firenet/version/" + node;
	result = FNET_getData(path,false,"",true);
	
	output.VERSION = result.VERSION;
	
	// (2) Get the Firing time data
	
	path = lcnURI + "firenet/literal/" + node + "/T";
	result = FNET_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.FT = result.substring( n-4);

	// (3) Get the Backoff time data
	
	path = lcnURI + "firenet/literal/" + node + "/B";
	result = FNET_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.BACKOFF = result.substring( n-4);

	// (4) Get the Test mode data
	
	path = lcnURI + "firenet/literal/" + node + "/M";
	result = FNET_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.TEST = result.substring( n-1);
	
	
	return output;
}





















//-----------------------------------------------------------------------
//				-- DISPLAY FUNCTIONS --
//-----------------------------------------------------------------------

//-----------------------------------------------------------------------
/*
	INVENTORY_BuildHeader()







|
|







 







|






|








|








|








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







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
	var path;
	var result;
	var outmsg;
	
	// Clear the area...
	$("#INV_RUN_BLOCK").replaceWith("<div id=\"INV_RUN_BLOCK\"><p><center>...Loading...</center></div>");
	
//	path = "http://localhost:5010";
//	FNET_IStatus = FNET_getData(path,false,"",false);
	
	// Get the status
	// Clear the map [2fbacd1fdc]
	path = lcnURI + "firenet/status/C";
	FNET_IStatus = FNET_getData(path,false,"",true);

	// Build the inventory
................................................................................
	var result;
	var n;
	var output = new Array();
	
	// (1) Get the version information
	
	path = lcnURI + "firenet/version/" + node;
	result = INV_getData(path,false,"",true);
	
	output.VERSION = result.VERSION;
	
	// (2) Get the Firing time data
	
	path = lcnURI + "firenet/literal/" + node + "/T";
	result = INV_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.FT = result.substring( n-4);

	// (3) Get the Backoff time data
	
	path = lcnURI + "firenet/literal/" + node + "/B";
	result = INV_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.BACKOFF = result.substring( n-4);

	// (4) Get the Test mode data
	
	path = lcnURI + "firenet/literal/" + node + "/M";
	result = INV_getData(path,true,"",true);
	
	result = result.DATA;
	n = result.length;
	output.TEST = result.substring( n-1);
	
	
	return output;
}

function INV_getData( path, postState,data,flag )
{
	var count = 3;
	var result;
	
	while( count > 0 )
	{
		result = FNET_getData( path, postState,data,flag );
		if( result.STATUS == "XMIT" )
			break;
			
		FNET_SLEEP( 100 );
		count = count - 1
		
		result.DATA = "";
	}
	
	return result;
}
		
//-----------------------------------------------------------------------
//				-- DISPLAY FUNCTIONS --
//-----------------------------------------------------------------------

//-----------------------------------------------------------------------
/*
	INVENTORY_BuildHeader()