Skip to content

Commit

Permalink
Add a few improvements to the log parser (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfalkvidd committed Aug 20, 2019
1 parent d399b17 commit 40d8a18
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Logparser/logparser.js
Expand Up @@ -279,16 +279,18 @@ var match = [
{ re: "TSF:SID:OK,ID=(\\d+)", d: "Node id <b>$1</b> assigned" },
{ re: "!TSF:SID:FAIL,ID=(\\d+)", d: "Assigned id <b>$1</b> is invalid" },
{ re: "TSF:PNG:SEND,TO=(\\d+)", d: "Send ping to destination <b>$1</b>" },
{ re: "!TSF:PNG:ACTIVE", d: "Ping active, cannot start new ping" },
{ re: "TSF:WUR:MS=(\\d+)", d: "Wait until transport ready, timeout <b>$1</b>" },
{ re: "TSF:MSG:ACK REQ", d: "ACK message requested" },
{ re: "TSF:MSG:ACK", d: "ACK message, do not proceed but forward to callback" },
{ re: "TSF:MSG:ECHO REQ", d: "ECHO message requested" },
{ re: "TSF:MSG:ECHO", d: "ECHO message, do not proceed but forward to callback" },
{ re: "TSF:MSG:FPAR RES,ID=(\\d+),D=(\\d+)", d: "Response to find parent request received from node <b>$1</b> with distance <b>$2</b> to GW" },
{ re: "TSF:MSG:FPAR PREF FOUND", d: "Preferred parent found, i.e. parent defined via MY_PARENT_NODE_ID" },
{ re: "TSF:MSG:FPAR OK,ID=(\\d+),D=(\\d+)", d: "Find parent response from node <b>$1</b> is valid, distance <b>$2</b> to GW" },
{ re: "TSF:MSG:FPAR INACTIVE", d: "Find parent response received, but no find parent request active, skip response" },
{ re: "!TSF:MSG:FPAR INACTIVE", d: "Find parent response received, but no find parent request active, skip response" },
{ re: "TSF:MSG:FPAR REQ,ID=(\\d+)", d: "Find parent request from node <b>$1</b>" },
{ re: "TSF:MSG:PINGED,ID=(\\d+),HP=(\\d+)", d: "Node pinged by node <b>$1</b> with <b>$2</b> hops" },
{ re: "TSF:MSG:PONG RECV,HP=(\\d+)", d: "Pinged node replied with <b>$1</b> hops" },
{ re: "!TSF:MSG:PONG RECV,INACTIVE", d: "Pong received, but !pingActive" },
{ re: "TSF:MSG:BC", d: "Broadcast message received" },
{ re: "TSF:MSG:GWL OK", d: "Link to GW ok" },
{ re: "TSF:MSG:FWD BC MSG", d: "Controlled broadcast message forwarding" },
Expand All @@ -308,12 +310,14 @@ var match = [
{ re: "TSF:SRT:OK", d: "Saving routing table successful" },
{ re: "!TSF:RTE:FPAR ACTIVE", d: "Finding parent active, message not sent" },
{ re: "!TSF:RTE:DST (\\d+) UNKNOWN", d: "Routing for destination <b>$1</b> unknown, sending message to parent" },
{ re: "!TSF:RTE:N2N FAIL", d: "Direct node-to-node communication failed - handing over to parent" },
{ re: "TSF:RRT:ROUTE N=(\\d+),R=(\\d+)", d: "Routing table, messages to node (<b>$1</b>) are routed via node (<b>$2</b>)"},
{ re: "!TSF:SND:TNR", d: "Transport not ready, message cannot be sent" },
{ re: "TSF:TDI:TSL", d: "Set transport to sleep" },
{ re: "TSF:TDI:TPD", d: "Power down transport" },
{ re: "TSF:TRI:TRI", d: "Reinitialise transport" },
{ re: "TSF:TRI:TSB", d: "Set transport to standby" },
{ re: "TSF:TRI:TPU", d: "Power up transport" },
{ re: "TSF:SIR:CMD=(\\d+),VAL=(\\d+)", d: "Get signal report <b>$1</b>, value: <b>$2</b>" },
{ re: "TSF:MSG:READ,(\\d+)-(\\d+)-(\\d+),s=(\\d+),c=(\\d+),t=(\\d+),pt=(\\d+),l=(\\d+),sg=(\\d+):(.*)", d: "<u><b>Received Message</b></u><br><b>Sender</b>: $1<br><b>Last Node</b>: $2<br><b>Destination</b>: $3<br><b>Sensor Id</b>: $4<br><b>Command</b>: {command:$5}<br><b>Message Type</b>: {type:$5:$6}<br><b>Payload Type</b>: {pt:$7}<br><b>Payload Length</b>: $8<br><b>Signing</b>: $9<br><b>Payload</b>: $10" },
{ re: "TSF:MSG:SEND,(\\d+)-(\\d+)-(\\d+)-(\\d+),s=(\\d+),c=(\\d+),t=(\\d+),pt=(\\d+),l=(\\d+),sg=(\\d+),ft=(\\d+),st=(\\w+):(.*)", d: "<u><b>Sent Message</b></u><br><b>Sender</b>: $1<br><b>Last Node</b>: $2<br><b>Next Node</b>: $3<br><b>Destination</b>: $4<br><b>Sensor Id</b>: $5<br><b>Command</b>: {command:$6}<br><b>Message Type</b>:{type:$6:$7}<br><b>Payload Type</b>: {pt:$8}<br><b>Payload Length</b>: $9<br><b>Signing</b>: $10<br><b>Failed uplink counter</b>: $11<br><b>Status</b>: $12 (OK=success, NACK=no radio ACK received)<br><b>Payload</b>: $13" },
Expand Down Expand Up @@ -359,7 +363,7 @@ var match = [
{ re: "SGN:VER:LEFT=(\\d+)", d: "<b>$1</b> number of failed verifications left in a row before node is locked" },
{ re: "!SGN:VER:STATE", d: "Security system in a invalid state (personalization data tampered)" },
{ re: "SGN:SKP:MSG CMD=(\\d+),TYPE=(\\d+)", d: "Message with command <b>$1</b> and type <b>$2</b> does not need to be signed" },
{ re: "SGN:SKP:ACK CMD=(\\d+),TYPE=(\\d+)", d: "ACK messages does not need to be signed" },
{ re: "SGN:SKP:ECHO CMD=(\\d+),TYPE=(\\d+)", d: "ECHO messages do not need to be signed" },
{ re: "SGN:NCE:LEFT=(\\d+)", d: "<b>$1</b> number of nonce requests between successful verifications left before node is locked" },
{ re: "SGN:NCE:XMT,TO=(\\d+)", d: "Nonce data transmitted to node <b>$1</b>" },
{ re: "!SGN:NCE:XMT,TO=(\\d+) FAIL", d: "Nonce data not properly transmitted to node <b>$1</b>" },
Expand Down

0 comments on commit 40d8a18

Please sign in to comment.