First attempt of getting rid of network watchdogs...
This commit is contained in:
parent
d2cb6034ff
commit
a54170ffdf
1 changed files with 99 additions and 56 deletions
|
@ -236,7 +236,7 @@ function getLastHeard(document, event) {
|
||||||
lines.forEach(function(line, index, array) {
|
lines.forEach(function(line, index, array) {
|
||||||
logIt(line);
|
logIt(line);
|
||||||
txing = false;
|
txing = false;
|
||||||
if (line.indexOf("Talker Alias") < 0 && line.indexOf("Downlink Activate") < 0 && line.indexOf("Preamble CSBK") < 0 && line.indexOf("data header") < 0 && line.indexOf("0000:") < 0 && line.length > 0 && line.indexOf("received") > 0 ) {
|
if (line.indexOf("Talker Alias") < 0 && line.indexOf("Downlink Activate") < 0 && line.indexOf("Preamble CSBK") < 0 && line.indexOf("data header") < 0 && line.indexOf("0000:") < 0 && line.length > 0 && (line.indexOf("received") > 0 || line.indexOf("network watchdog") > 0)) {
|
||||||
if (line.indexOf("received network data") > 0 || line.indexOf("late entry") > 0 || line.indexOf("voice header") > 0 || line.indexOf("received RF header") > 0) {
|
if (line.indexOf("received network data") > 0 || line.indexOf("late entry") > 0 || line.indexOf("voice header") > 0 || line.indexOf("received RF header") > 0) {
|
||||||
txing = true;
|
txing = true;
|
||||||
if (getMode(line) == "DMR Slot 1" ) {
|
if (getMode(line) == "DMR Slot 1" ) {
|
||||||
|
@ -253,67 +253,110 @@ function getLastHeard(document, event) {
|
||||||
} else {
|
} else {
|
||||||
ts2TXing = null;
|
ts2TXing = null;
|
||||||
}
|
}
|
||||||
|
if (line.indexOf("network watchdog") > 0) {
|
||||||
|
logIt("Network Watchdog!");
|
||||||
|
var rowIndexes = [];
|
||||||
|
t_lh.rows( function ( idx, data, node ) {
|
||||||
|
if (getMode(line) == "DMR Slot 1" ) {
|
||||||
|
if(data[0] == ts1timestamp){
|
||||||
|
rowIndexes.push(idx);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
if(data[0] == ts2timestamp){
|
||||||
|
rowIndexes.push(idx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var duration = 0;
|
||||||
|
if (getMode(line) == "DMR Slot 1" ) {
|
||||||
|
duration = Math.round((Date.now() - Date.parse(ts1timestamp.replace(" ","T")+".000Z"))/1000);
|
||||||
|
} else {
|
||||||
|
duration = Math.round((Date.now() - Date.parse(ts2timestamp.replace(" ","T")+".000Z"))/1000);
|
||||||
|
}
|
||||||
|
if (rowIndexes[0]) {
|
||||||
|
if (t_lh.row(rowIndexes[0]).data[0] != null) {
|
||||||
|
newData = [
|
||||||
|
t_lh.row(rowIndexes[0]).data[0],
|
||||||
|
t_lh.row(rowIndexes[0]).data[1],
|
||||||
|
t_lh.row(rowIndexes[0]).data[2],
|
||||||
|
t_lh.row(rowIndexes[0]).data[3],
|
||||||
|
t_lh.row(rowIndexes[0]).data[4],
|
||||||
|
duration,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
getAddToQSO(line)
|
||||||
|
]
|
||||||
|
t_lh.row(rowIndexes[0]).data( newData ).draw(false);
|
||||||
|
} else {
|
||||||
|
logIt("Problem replacing watchdog! Indices: " + rowIndexes);
|
||||||
|
t_lh.row(rowIndexes[0]).remove().draw( false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logIt("TS1: " + ts1TXing + "|" + ts1timestamp);
|
logIt("TS1: " + ts1TXing + "|" + ts1timestamp);
|
||||||
logIt("TS2: " + ts2TXing + "|" + ts2timestamp);
|
logIt("TS2: " + ts2TXing + "|" + ts2timestamp);
|
||||||
getCurrentTXing();
|
getCurrentTXing();
|
||||||
|
|
||||||
var rowIndexes = [],
|
if (line.indexOf("network watchdog") < 0) {
|
||||||
timestamp = getTimestamp(line),
|
var rowIndexes = [],
|
||||||
mode = getMode(line),
|
timestamp = getTimestamp(line),
|
||||||
callsign = getCallsign(line),
|
mode = getMode(line),
|
||||||
target = getTarget(line),
|
callsign = getCallsign(line),
|
||||||
source = getSource(line),
|
target = getTarget(line),
|
||||||
duration = getDuration(line),
|
source = getSource(line),
|
||||||
loss = getLoss(line),
|
duration = getDuration(line),
|
||||||
ber = getBER(line),
|
loss = getLoss(line),
|
||||||
addToQSO = getAddToQSO(line);
|
ber = getBER(line),
|
||||||
if (txing) {
|
addToQSO = getAddToQSO(line);
|
||||||
duration = "TXing";
|
if (txing) {
|
||||||
loss = "";
|
duration = "TXing";
|
||||||
ber = "";
|
loss = "";
|
||||||
}
|
ber = "";
|
||||||
if (mode == "POCSAG") {
|
}
|
||||||
callsign = "POCSAG";
|
if (mode == "POCSAG") {
|
||||||
target = "";
|
callsign = "POCSAG";
|
||||||
source = "";
|
target = "";
|
||||||
duration = "";
|
source = "";
|
||||||
loss = "";
|
duration = "";
|
||||||
ber = "";
|
loss = "";
|
||||||
addToQSO = "";
|
ber = "";
|
||||||
}
|
addToQSO = "";
|
||||||
t_lh.rows( function ( idx, data, node ) {
|
}
|
||||||
if(data[2] == callsign){
|
t_lh.rows( function ( idx, data, node ) {
|
||||||
rowIndexes.push(idx);
|
if(data[2] == callsign){
|
||||||
|
rowIndexes.push(idx);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
if (rowIndexes[0]) {
|
||||||
|
|
||||||
|
newData = [
|
||||||
|
timestamp,
|
||||||
|
mode,
|
||||||
|
callsign,
|
||||||
|
target,
|
||||||
|
source,
|
||||||
|
duration,
|
||||||
|
loss,
|
||||||
|
ber,
|
||||||
|
addToQSO
|
||||||
|
]
|
||||||
|
t_lh.row(rowIndexes[0]).data( newData ).draw(false);
|
||||||
|
} else {
|
||||||
|
t_lh.row.add( [
|
||||||
|
timestamp,
|
||||||
|
mode,
|
||||||
|
callsign,
|
||||||
|
target,
|
||||||
|
source,
|
||||||
|
duration,
|
||||||
|
loss,
|
||||||
|
ber,
|
||||||
|
addToQSO
|
||||||
|
] ).draw();
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
});
|
|
||||||
if (rowIndexes[0]) {
|
|
||||||
|
|
||||||
newData = [
|
|
||||||
timestamp,
|
|
||||||
mode,
|
|
||||||
callsign,
|
|
||||||
target,
|
|
||||||
source,
|
|
||||||
duration,
|
|
||||||
loss,
|
|
||||||
ber,
|
|
||||||
addToQSO
|
|
||||||
]
|
|
||||||
t_lh.row(rowIndexes[0]).data( newData ).draw(false);
|
|
||||||
} else {
|
|
||||||
t_lh.row.add( [
|
|
||||||
timestamp,
|
|
||||||
mode,
|
|
||||||
callsign,
|
|
||||||
target,
|
|
||||||
source,
|
|
||||||
duration,
|
|
||||||
loss,
|
|
||||||
ber,
|
|
||||||
addToQSO
|
|
||||||
] ).draw();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue