Returns the NDS2 channel type corresponding to the given name
494234
def find(cls, name):
        
        try:
            return cls._member_map_[name]
        except KeyError:
            for ctype in cls._member_map_.values():
                if ctype.name == name:
                    return ctype
            raise ValueError('%s is not a valid %s' % (name, cls.__name__))
1054429
private String getDsDefStr(DsDef def) {
		return "DS:" + def.getDsName() + ":" + def.getDsType() + ":" + def.getHeartbeat() + ":" + formatDouble(def.getMinValue()) + ":"
				+ formatDouble(def.getMaxValue());
	}
324004
public RecordTypeInfo getNestedStructTypeInfo(String name) {
    StructTypeID stid = sTid.findStruct(name);
    if (null == stid) return null;
    return new RecordTypeInfo(name, stid);
  }
438449
def get_type_data(name):
    
    name = name.upper()
    try:
        return {
            'authority': 'birdland.mit.edu',
            'namespace': 'unit system',
            'identifier': name,
            'domain': 'Unit System Types',
            'display_name': JEFFS_UNIT_SYSTEM_TYPES[name] + ' Unit System Type',
            'display_label': JEFFS_UNIT_SYSTEM_TYPES[name],
            'description': ('The unit system type for the ' +
                            JEFFS_UNIT_SYSTEM_TYPES[name] + ' System')
        }
    except KeyError:
        raise NotFound('Unit System Type: ' + name)
778903
def get_nb_of_must_have_satellites(self, s_type):
        
        if hasattr(self, 'nb_' + s_type + 's'):
            return getattr(self, 'nb_' + s_type + 's')

        logger.debug("[realm %s] do not have this kind of satellites: %s", self.name, s_type)
        return 0
659825
def get_type(self, name, recurse=True):
        
        self._dlog("getting type '{}'".format(name))
        return self._search("types", name, recurse)
174283
def _canonical_type(name):  # pylint: disable=too-many-return-statements
    

    if name == 'int':
        return 'int256'

    if name == 'uint':
        return 'uint256'

    if name == 'fixed':
        return 'fixed128x128'

    if name == 'ufixed':
        return 'ufixed128x128'

    if name.startswith('int['):
        return 'int256' + name[3:]

    if name.startswith('uint['):
        return 'uint256' + name[4:]

    if name.startswith('fixed['):
        return 'fixed128x128' + name[5:]

    if name.startswith('ufixed['):
        return 'ufixed128x128' + name[6:]

    return name
404236
def _gencode_gate_class(self):
        
        channels, verts = self.coordinates
        num_channels = len(channels)
        gate_type_name = self.gate_type.__name__
        if gate_type_name == 'ThresholdGate' and num_channels == 2:
            gate_type_name = 'QuadGate'
        return gate_type_name
577416
def get_wfs_typename(cls, data_source):
        
        is_eocloud = SHConfig().is_eocloud_ogc_url()
        return {
            cls.SENTINEL2_L1C: 'S2.TILE',
            cls.SENTINEL2_L2A: 'SEN4CAP_S2L2A.TILE' if is_eocloud else 'DSS2',
            cls.SENTINEL1_IW: 'S1.TILE' if is_eocloud else 'DSS3',
            cls.SENTINEL1_EW: 'S1_EW.TILE' if is_eocloud else 'DSS3',
            cls.SENTINEL1_EW_SH: 'S1_EW_SH.TILE' if is_eocloud else 'DSS3',
            cls.DEM: 'DSS4',
            cls.MODIS: 'DSS5',
            cls.LANDSAT8: 'L8.TILE' if is_eocloud else 'DSS6',
            # eocloud sources only:
            cls.LANDSAT5: 'L5.TILE',
            cls.LANDSAT7: 'L7.TILE',
            cls.SENTINEL3: 'S3.TILE',
            cls.SENTINEL5P: 'S5p_L2.TILE',
            cls.ENVISAT_MERIS: 'ENV.TILE',
            cls.SENTINEL2_L3B: 'SEN4CAP_S2L3B.TILE',
            cls.LANDSAT8_L2A: 'SEN4CAP_L8L2A.TILE'
        }[data_source]
1330288
def get_struct_type(self, name):
        
        p = ffi.lib.LLVMPY_GetNamedStructType(self, _encode_string(name))
        if not p:
            raise NameError(name)
        return TypeRef(p)
96458
public ChannelInfo getChannel(String name) {
    final URI uri = uriWithPath("./channels/" + encodePathSegment(name));
    return this.rt.getForObject(uri, ChannelInfo.class);
  }
746960
private StorageType getStorageTypeFromName(String name) {
        for(Map.Entry<StorageType, DB> entry : storageRegistry.entrySet()) {
            DB storage = entry.getValue();
            if(isOpenStorage(storage) && storage.exists(name)) {
                return entry.getKey();
            }
        }
        
        return null; //either the Map has not created yet OR it is in memory
    }
963798
def channel_name_to_id(self, channel_name, force_lookup=False):
        
        if force_lookup or not self.channel_name_id_map:
            channels = self.channels_list()['channels']
            self.channel_name_id_map = {channel['name']: channel['id'] for channel in channels}
        channel = channel_name.startswith('#') and channel_name[1:] or channel_name
        return self.channel_name_id_map.get(channel)
1229867
private boolean reconnectToChannel(String name) {
        boolean reConnected = false;
        Enumeration callbackStructs = event_callback_map.elements();
        while (callbackStructs.hasMoreElements()) {
            EventCallBackStruct eventCallBackStruct = (EventCallBackStruct) callbackStructs.nextElement();
            if (eventCallBackStruct.channel_name.equals(name) && (eventCallBackStruct.callback != null)) {
                try {
                    EventChannelStruct channelStruct = channel_map.get(name);
                    DevVarLongStringArray   lsa =
                            ZMQutils.getEventSubscriptionInfoFromAdmDevice(
                                    channelStruct.adm_device_proxy,
                                    eventCallBackStruct.device.name(), eventCallBackStruct.attr_name, eventCallBackStruct.event_name);

                    //  Re Connect heartbeat
                    ZMQutils.connectHeartbeat(channelStruct.adm_device_proxy.get_tango_host(),
                                channelStruct.adm_device_proxy.name(), lsa, true);
                    reConnected = true;
                } catch (DevFailed e1) {
                    //Except.print_exception(e1);
                    reConnected = false;
                }
                break;
            }
        }
        return reConnected;
    }
57696
def get_d1nts(self):
        """"""
        data = []
        ntdata = cx.namedtuple("NtPrt", "D1 NS dcnt depth GO name")
        namespace = None
        for ntlet in sorted(self.goone2ntletter.values(),
                            key=lambda nt: [nt.goobj.namespace, -1 * nt.dcnt, nt.D1]):
            goobj = ntlet.goobj
            goid = goobj.id
            assert len(goobj.parents) == 1
            if namespace != goobj.namespace:
                namespace = goobj.namespace
                ntns = self.ns2nt[namespace]
                pobj = ntns.goobj
                ns2 = self.str2ns[goobj.namespace]
                data.append(ntdata._make([" ", ns2, ntns.dcnt, pobj.depth, pobj.id, pobj.name]))
            data.append(ntdata._make(
                [ntlet.D1, self.str2ns[namespace], ntlet.dcnt, goobj.depth, goid, goobj.name]))
        return data
949304
def astype(self, type_name):
        
        if type_name == 'nddata':
            return self.as_nddata()

        if type_name == 'hdu':
            return self.as_hdu()

        raise ValueError("Unrecognized conversion type '%s'" % (type_name))
1134113
def get_name_uids(self, name, channel=None):
        
        if channel is None:
            channel = self.get_network_channel()
        uid_list = []
        max_ids = self.get_channel_max_user_count(channel)
        for uid in range(1, max_ids):
            if name == self.get_user_name(uid=uid):
                uid_list.append(uid)
        return uid_list