def __init__(self, name): try: name = name.encode('utf-8') except AttributeError: # Python2 catch pass BifrostObject.__init__(self, _bf.bfProcLogCreate, _bf.bfProcLogDestroy, name)
def __init__(self, fmt, sock, ring, nsrc, src0, max_payload_size, buffer_ntime, slot_ntime, sequence_callback, core=None): if core is None: core = -1 BifrostObject.__init__( self, _bf.bfUdpCaptureCreate, _bf.bfUdpCaptureDestroy, fmt, sock.fileno(), ring.obj, nsrc, src0, max_payload_size, buffer_ntime, slot_ntime, sequence_callback, core)
def __init__(self, address, port, family=None): try: address = address.encode() except AttributeError: # Python2 catch pass assert (isinstance(port, (int, long))) if family is None: family = AF_UNSPEC BifrostObject.__init__(self, _bf.bfAddressCreate, _bf.bfAddressDestroy, address, port, family)
def __init__(self, space='system', name=None, core=None): if name is None: name = str(uuid4()) name = _slugify(name) try: name = name.encode() except AttributeError: # Python2 catch pass space = _string2space(space) #self.obj = None #self.obj = _get(_bf.bfRingCreate(name=name, space=space), retarg=0) BifrostObject.__init__(self, _bf.bfRingCreate, _bf.bfRingDestroy, name, space) if core is not None: try: _check(_bf.bfRingSetAffinity(self.obj, core)) except RuntimeError: pass
def __init__(self, space='system', name=None, owner=None, core=None): # If this is non-None, then the object is wrapping a base Ring instance self.base = None self.space = space if name is None: name = 'ring_%i' % Ring.instance_count Ring.instance_count += 1 name = _slugify(name) try: name = name.encode() except AttributeError: # Python2 catch pass BifrostObject.__init__(self, _bf.bfRingCreate, _bf.bfRingDestroy, name, _string2space(self.space)) if core is not None: try: _check(_bf.bfRingSetAffinity(self.obj, core)) except RuntimeError: pass self.owner = owner self.header_transform = None
def __init__(self): BifrostObject.__init__(self, _bf.bfLinAlgCreate, _bf.bfLinAlgDestroy)
def __init__(self): BifrostObject.__init__(self, _bf.bfFirCreate, _bf.bfFirDestroy)
def __init__(self, sock, core=-1): BifrostObject.__init__( self, _bf.bfUdpTransmitCreate, _bf.bfUdpTransmitDestroy, sock.fileno(), core)
def __init__(self): BifrostObject.__init__(self, _bf.bfRomeinCreate, _bf.bfRomeinDestroy)
def __init__(self): BifrostObject.__init__(self, _bf.bfUdpSocketCreate, _bf.bfUdpSocketDestroy)
def __del__(self): if self.base is not None and not self.is_view: BifrostObject.__del__(self)
def __del__(self): if self.base is not None: BifrostObject.__del__(self)