Wake vortex.

    Args:
        msg (String): 28 bytes hexadecimal message string

    Returns:
        int: Wake vortex level. 0=NIL, 1=Light, 2=Moderate, 3=Severe
494602
def wv45(msg):
    
    d = hex2bin(data(msg))
    if d[12] == '0':
        return None

    ws = bin2int(d[13:15])
    return ws
1041178
def nic_b(msg):
    
    tc = typecode(msg)

    if tc < 9 or tc > 18:
        raise RuntimeError("%s: Not a airborne position message, expecting 8<TC<19" % msg)

    msgbin = common.hex2bin(msg)
    nic_b = int(msgbin[39])

    return nic_b
1101336
def p40baro(msg):
    
    d = hex2bin(data(msg))

    if d[26] == '0':
        return None

    p = bin2int(d[27:39]) * 0.1 + 800    # millibar
    return p
1365634
def received_message(self, msg):
        
        logger.debug("Received message: %s", msg)
        if msg.is_binary:
            raise ValueError("Binary messages not supported")
        resps = json.loads(msg.data)

        cmd_group = _get_cmds_id(*resps)
        if cmd_group:
            (cmds, promise) = self._cmd_groups[cmd_group]
            promise.fulfill((cmds, resps))
        else:
            try:
                self.received_unsolicited(resps)
            except:
                logger.exception("Error in unsolicited msg handler")
                raise
475204
public static String encodeHighLevel(String msg) {
    return encodeHighLevel(msg, SymbolShapeHint.FORCE_NONE, null, null);
  }
335137
def send(self, msg):
        
        with self._pub_lock:
            self.publish.send_string(msg)
        return self
802307
def trk50(msg):
    
    d = hex2bin(data(msg))

    if d[11] == '0':
        return None

    sign = int(d[12])   # 1 -> west
    value = bin2int(d[13:23])

    if sign:
        value = value - 1024

    trk = value * 90.0 / 512.0

    # convert from [-180, 180] to [0, 360]
    if trk < 0:
        trk = 360 + trk

    return round(trk, 3)
73820
def alt40mcp(msg):
    
    d = hex2bin(data(msg))

    if d[0] == '0':
        return None

    alt = bin2int(d[1:13]) * 16    # ft
    return alt
255366
def roll50(msg):
    
    d = hex2bin(data(msg))

    if d[0] == '0':
        return None

    sign = int(d[1])    # 1 -> left wing down
    value = bin2int(d[2:11])

    if sign:
        value = value - 512

    angle = value * 45.0 / 256.0    # degree
    return round(angle, 1)
1292729
def recv_msg(self, connection):
        
        # Read message length and unpack it into an integer
        raw_msglen = self.__recvall(connection, 4, decode_json=False)
        if not raw_msglen:
            return None
        msglen = struct.unpack('>I', raw_msglen)[0]
        # Read the message data
        return self.__recvall(connection, msglen)
527999
def msg(self, message, title=None, title_color=None, color='BLUE', ident=0):
        '''
        
        '''
        if title and not title_color:
            title_color = color
        if title_color and not title:
            title_color = None

        self.__colored_output(title, message, title_color, color, ident=ident)
591207
def rh45(msg):
    
    d = hex2bin(data(msg))
    if d[38] == '0':
        return None
    rh = bin2int(d[39:51]) * 16
    return rh
736108
def Message(msg, id=260, ok=None):
    
    return psidialogs.message(message=msg, ok=ok)
1310227
public static int d(String msg) {
        // This is a quick check to avoid the expensive stack trace reflection.
        if (!activated) {
            return 0;
        }

        String caller = LogHelper.getCaller();
        if (caller != null) {
            return d(caller, msg);
        }
        return 0;
    }
703745
def is45(msg):
    
    if allzeros(msg):
        return False

    d = hex2bin(data(msg))

    # status bit 1, 4, 7, 10, 13, 16, 27, 39
    if wrongstatus(d, 1, 2, 3):
        return False

    if wrongstatus(d, 4, 5, 6):
        return False

    if wrongstatus(d, 7, 8, 9):
        return False

    if wrongstatus(d, 10, 11, 12):
        return False

    if wrongstatus(d, 13, 14, 15):
        return False

    if wrongstatus(d, 16, 17, 26):
        return False

    if wrongstatus(d, 27, 28, 38):
        return False

    if wrongstatus(d, 39, 40, 51):
        return False

    # reserved
    if bin2int(d[51:56]) != 0:
        return False

    temp = temp45(msg)
    if temp:
        if temp > 60 or temp < -80:
            return False

    return True
191352
def receive(self):
        '''
        
        '''
        while self.buffer.empty() and self.__up:
            # This sequence is skipped when the buffer is not empty.
            sleep_ms = random.randint(0, 1000)
            # log.debug('The message queue is empty, waiting %d miliseconds', sleep_ms)
            # disabled ^ as it was too noisy
            time.sleep(sleep_ms / 1000.0)
        if not self.buffer.empty():
            return self.buffer.get(block=False)
        return '', ''
373663
def ws45(msg):
    
    d = hex2bin(data(msg))
    if d[3] == '0':
        return None

    ws = bin2int(d[4:6])
    return ws