def _wrap_callback_parse_alarm_data(subscription, on_data, message):
    """
    Wraps an (optional) user callback to parse Alarm data
    from a WebSocket data message
    """
    if (message.type == message.DATA and
            message.data.type == yamcs_pb2.ALARM_DATA):
        proto = getattr(message.data, 'alarmData')
        alarm_event = AlarmEvent(proto)
        #pylint: disable=protected-access
        subscription._process(alarm_event)
        if on_data:
            on_data(alarm_event)
def _wrap_callback_parse_alarm_data ( subscription , on_data , message ) : if ( message . type == message . DATA and message . data . type == yamcs_pb2 . ALARM_DATA ) : proto = getattr ( message . data , 'alarmData' ) alarm_event = AlarmEvent ( proto ) subscription . _process ( alarm_event ) if on_data : on_data ( alarm_event )
Wraps an (optional) user callback to parse Alarm data
    from a WebSocket data message