Get the number of supported alert destinations

        :param channel: Channel for alerts to be examined, defaults to current
777591
def get_alert_destination_count(self, channel=None):
        
        if channel is None:
            channel = self.get_network_channel()
        rqdata = (channel, 0x11, 0, 0)
        rsp = self.xraw_command(netfn=0xc, command=2, data=rqdata)
        return ord(rsp['data'][1])
787366
def _detect_available_configs():
        
        with channels_lock:
            available_channels = list(channels.keys())

        # find a currently unused channel
        get_extra = lambda: "channel-{}".format(randint(0, 9999))
        extra = get_extra()
        while extra in available_channels:
            extra = get_extra()

        available_channels += [extra]

        return [
            {'interface': 'virtual', 'channel': channel}
            for channel in available_channels
        ]
1227050
def get_alert(self, alert_id):
        
        for alert in self.alerts:
            if alert.id == alert_id:
                return alert
        return None
1035828
def get_detector_incidents(self, id, **kwargs):
        
        resp = self._get(
            self._u(self._DETECTOR_ENDPOINT_SUFFIX, id, 'incidents'),
            None,
            **kwargs
        )
        resp.raise_for_status()
        return resp.json()
829977
def get_channel(self, name):
        
        return self._api_get('/api/channels/{0}'.format(
            urllib.parse.quote_plus(name)
        ))
227097
def get_channel_listing(self):
        
        return {'name': self.name,
                'key': self.channel.key,
                'type': self.channel.typ,
                'read_only': self.read_only,
                'is_online': self.is_online(),
                'actions': self.get_actions(),
                'unread': self.unread_count()}
1220471
def get_alert_log(self,
                      current=0,
                      minimum=0,
                      maximum=100,
                      header="",
                      action_key=None):
        """"""
        return self.get_alert(current=current,
                              minimum=minimum,
                              maximum=maximum,
                              header=header,
                              action_key=action_key,
                              log=True)
936009
def _retrieve_channel_id(email, profile='telemetry'):
    '''
    
    '''
    key = "telemetry.channels"
    auth = _auth(profile=profile)

    if key not in __context__:
        get_url = _get_telemetry_base(profile) + "/notification-channels?_type=EmailNotificationChannel"
        response = requests.get(get_url, headers=auth)

        if response.status_code == 200:
            cache_result = {}
            for index, alert in enumerate(response.json()):
                cache_result[alert.get('email')] = alert.get('_id', 'false')

            __context__[key] = cache_result

    return __context__[key].get(email, False)
1068965
def getAnalogUnit(self,num):
        
        listidx = self.An.index(num) # Get the position of the channel number.
        return self.uu[listidx]
913638
def _refresh_channel(self):
        '''
        
        '''
        self.channel = salt.transport.client.ReqChannel.factory(self.opts)
        return self.channel
407543
def get_current_channel(self):
        """"""
        self.request(EP_GET_CURRENT_CHANNEL)
        return {} if self.last_response is None else self.last_response.get('payload')
79078
def alertingNetToMs(Facility_presence=0, ProgressIndicator_presence=0,
                    UserUser_presence=0):
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x1)  # 00000001
    packet = a / b
    if Facility_presence is 1:
        c = FacilityHdr(ieiF=0x1C)
        packet = packet / c
    if ProgressIndicator_presence is 1:
        d = ProgressIndicatorHdr(ieiPI=0x1E)
        packet = packet / d
    if UserUser_presence is 1:
        e = UserUserHdr(ieiUU=0x7E)
        packet = packet / e
    return packet
1019882
def GetNeighboringChannels(channel):
    '''
    

    '''

    x = divmod(channel - 1, 4)[1]
    return channel + np.array(range(-x, -x + 4), dtype=int)
510333
def webhooks(self):
        
        if self._webhooks is None:
            self._webhooks = WebhookList(
                self._version,
                service_sid=self._solution['service_sid'],
                channel_sid=self._solution['sid'],
            )
        return self._webhooks
1373537
def get_channels_by_sln(self, channel_type, sln):
        
        return self.search_channels(type=channel_type, tag_sln=sln)
811776
def get_current(self, channel):
        
        ret = self.ask("I%dO?" % channel)
        if ret[-1] != "A":
            print("ttiQl355tp.get_current() format error", ret)
            return None
        return float(ret[:-1])
618773
public Collection<AlertChannel> list(long policyId)
    {
        Map<Long,AlertChannel> map = new HashMap<Long,AlertChannel>();
        Collection<AlertChannel> channels = list();
        for(AlertChannel channel : channels)
        {
            List<Long> channelPolicyIds = channel.getLinks().getPolicyIds();
            for(long channelPolicyId : channelPolicyIds)
            {
                if(channelPolicyId == policyId)
                    map.put(channel.getId(), channel);
            }
        }
        return map.values();
    }