Exemple #1
0
def get_bp_proxy(node_nbr):
    """ Returns a BpProxy for a given node number. If it already exists, it
        gives you the already instantiated copy.

        :param:  Node number
        :return: BpProxy object
    """
    global _bp_proxies
    return utils._register_proxy(_bp_proxies, str(node_nbr), BpProxy, node_nbr)
Exemple #2
0
def get_ltp_proxy(client_id):
    """ Returns an LtpProxy for a given client application. If it already exists, it
        gives you the already instantiated copy.

        :param:  Client id (number)
        :return: LtpProxy object
    """
    global _ltp_proxies
    return utils._register_proxy(_ltp_proxies, str(client_id), LtpProxy,
                                 client_id)
Exemple #3
0
def get_cfdp_proxy(peer_entity_nbr):
    """ Returns a CfdpProxy for a given peer entity number. If it already exists, it
        gives you the already instantiated copy.

        :param:  Peer entity number
        :return: CfdpProxy object
    """
    global _cfdp_proxies
    return utils._register_proxy(_cfdp_proxies, str(peer_entity_nbr),
                                 CfdpProxy, peer_entity_nbr)
Exemple #4
0
def get_sdr_proxy(node_nbr, sdr_name='ion'):
    """ Return an SdrProxy for a given client application. If it already exists, it
        gives you th ealready instantiated copy

        :param: Node number
        :param: See ``sdrName`` in ``ionconfig``. Default is ``ion``.
        :return: SdrProxy object
    """
    global _sdr_proxies
    return utils._register_proxy(_sdr_proxies, str((node_nbr, sdr_name)),
                                 mem.SdrProxy, node_nbr, sdr_name)
Exemple #5
0
def get_psm_proxy(node_nbr, wm_key=65281, wm_size=0, partition_name=-1):
    """ Return a PsmProxy for a given client application. If it already exists, it
        gives you th ealready instantiated copy

        :param node_nbr: Node number
        :param wm_key: See ``wmKey`` in ``ionconfig``. Default is 65281
        :param wm_size: Unused
        :param partition_name: Unused
        :return: PsmProxy object
    """
    global _psm_proxies
    return utils._register_proxy(_psm_proxies,
                                 str((node_nbr, wm_key)),
                                 mem.PsmProxy,
                                 node_nbr,
                                 wm_key,
                                 wm_size=wm_size,
                                 partition_name=partition_name)