nl_tokens: Parses the status for a single wireless network interface .
pl_tokens: function parse_status_block ( block ) { var match ; // Skip out of the block is invalid if ( ! block ) return ; var parsed = { interface : block . match ( / ^([^\s]+) / ) [ 1 ] } ; if ( ( match = block . match ( / Access Point:\s*([A-Fa-f0-9:]{17}) / ) ) ) { parsed . access_point = match [ 1 ] . toLowerCase ( ) ; } if ( ( match = <mask> . match ( / Frequency[:|=]\s*([0-9\.]+) / ) ) ) { parsed . frequency = parseFloat ( match [ 1 ] ) ; } if ( ( match = block . match ( / IEEE\s*([^\s]+) / ) ) ) { parsed . ieee = match [ 1 ] . toLowerCase ( ) ; } if ( ( match = block . match ( / Mode[:|=]\s*([^\s]+) / ) ) ) { parsed . mode = match [ 1 ] . toLowerCase ( ) ; } if ( ( match = block . match ( / Noise level[:|=]\s*(-?[0-9]+) / ) ) ) { parsed . noise = parseInt ( match [ 1 ] , 10 ) ; } if ( ( match = block . match ( / Link Quality[:|=]\s*([0-9]+) / ) ) ) { parsed . quality = parseInt ( match [ 1 ] , 10 ) ; } if ( ( match = block . match ( / Sensitivity[:|=]\s*([0-9]+) / ) ) ) { parsed . sensitivity = parseInt ( match [ 1 ] , 10 ) ; } if ( ( match = block . match ( / Signal level[:|=]\s*(-?[0-9]+) / ) ) ) { parsed . signal = parseInt ( match [ 1 ] , 10 ) ; } if ( ( match = block . match ( / ESSID[:|=]\s*"([^"]+)" / ) ) ) { parsed . ssid = match [ 1 ] ; } if ( ( match = block . match ( / unassociated / ) ) ) { parsed . unassociated = true ; } return parsed ; }