Start capture on the link

        :returns: Capture object
549362
def start_capture(self, data_link_type="DLT_EN10MB", capture_file_name=None):
        

        self._capturing = True
        self._capture_file_name = capture_file_name
        self._streaming_pcap = asyncio.async(self._start_streaming_pcap())
        self._project.controller.notification.emit("link.updated", self.__json__())
454990
def check_link(self, link):
        
        r = requests.get(CHECK_LINK_ENDPOINT + link)
        if r.status_code != 200:
            raise GfycatClientError('Unable to check the link',
                                    r.status_code)

        return r.json()
1058093
def start_capture(self, adapter_number, output_file):
        

        try:
            adapter = self._ethernet_adapters[adapter_number]
        except KeyError:
            raise VirtualBoxError("Adapter {adapter_number} doesn't exist on VirtualBox VM '{name}'".format(name=self.name,
                                                                                                            adapter_number=adapter_number))

        nio = adapter.get_nio(0)

        if not nio:
            raise VirtualBoxError("Adapter {} is not connected".format(adapter_number))

        if nio.capturing:
            raise VirtualBoxError("Packet capture is already activated on adapter {adapter_number}".format(adapter_number=adapter_number))

        nio.startPacketCapture(output_file)

        if self.ubridge:
            yield from self._ubridge_send('bridge start_capture {name} "{output_file}"'.format(name="VBOX-{}-{}".format(self._id, adapter_number),
                                                                                               output_file=output_file))

        log.info("VirtualBox VM '{name}' [{id}]: starting packet capture on adapter {adapter_number}".format(name=self.name,
                                                                                                             id=self.id,
                                                                                                             adapter_number=adapter_number))
27110
def start_connect(self):
        
        if self._start_connect is not None:
            raise TimeoutStateError("Timeout timer has already been started.")
        self._start_connect = current_time()
        return self._start_connect
1227072
def live_capture(self, new_timeout=10):
        
        was_enabled = self.is_enabled
        users = self.get_users()
        self.cancel_capture()
        self.verify_user()
        if not self.is_enabled:
            self.enable_device()
        if self.verbose: print ("start live_capture")
        self.reg_event(const.EF_ATTLOG)
        self.__sock.settimeout(new_timeout)
        self.end_live_capture = False
        while not self.end_live_capture:
            try:
                if self.verbose: print ("esperando event")
                data_recv = self.__sock.recv(1032)
                self.__ack_ok()
                if self.tcp:
                    size = unpack('<HHI', data_recv[:8])[2]
                    header = unpack('HHHH', data_recv[8:16])
                    data = data_recv[16:]
                else:
                    size = len(data_recv)
                    header = unpack('<4H', data_recv[:8])
                    data = data_recv[8:]
                if not header[0] == const.CMD_REG_EVENT:
                    if self.verbose: print("not event! %x" % header[0])
                    continue
                if not len(data):
                    if self.verbose: print ("empty")
                    continue
                while len(data) >= 12:
                    if len(data) == 12:
                        user_id, status, punch, timehex = unpack('<IBB6s', data)
                        data = data[12:]
                    elif len(data) == 32:
                        user_id,  status, punch, timehex = unpack('<24sBB6s', data[:32])
                        data = data[32:]
                    elif len(data) == 36:
                        user_id,  status, punch, timehex, _other = unpack('<24sBB6s4s', data[:36])
                        data = data[36:]
                    elif len(data) >= 52:
                        user_id,  status, punch, timehex, _other = unpack('<24sBB6s20s', data[:52])
                        data = data[52:]
                    if isinstance(user_id, int):
                        user_id = str(user_id)
                    else:
                        user_id = (user_id.split(b'\x00')[0]).decode(errors='ignore')
                    timestamp = self.__decode_timehex(timehex)
                    tuser = list(filter(lambda x: x.user_id == user_id, users))
                    if not tuser:
                        uid = int(user_id)
                    else:
                        uid = tuser[0].uid
                    yield Attendance(user_id, timestamp, status, punch, uid)
            except timeout:
                if self.verbose: print ("time out")
                yield None # return to keep watching
            except (KeyboardInterrupt, SystemExit):
                if self.verbose: print ("break")
                break
        if self.verbose: print ("exit gracefully")
        self.__sock.settimeout(self.__timeout)
        self.reg_event(0)
        if not was_enabled:
            self.disable_device()
1079480
function _capture(type, successCallback, errorCallback, options) {
    var win = function(pluginResult) {
        successCallback(helpers.wrapMediaFiles(pluginResult));
    };
    exec(win, errorCallback, "Capture", type, [options]);
}
394835
def replay(self, start_block=1, end_block=None, filter_by=list(), **kwargs):
        
        return self.stream(
            filter_by=filter_by,
            start=start_block,
            stop=end_block,
            mode=self.mode,
            **kwargs
        )
978444
def start_capture(self, port_number, output_file, data_link_type="DLT_EN10MB"):
        

        if port_number not in self._mappings:
            raise DynamipsError("Port {} is not allocated".format(port_number))

        nio = self._mappings[port_number]

        data_link_type = data_link_type.lower()
        if data_link_type.startswith("dlt_"):
            data_link_type = data_link_type[4:]

        if nio.input_filter[0] is not None and nio.output_filter[0] is not None:
            raise DynamipsError("Port {} has already a filter applied".format(port_number))

        yield from nio.bind_filter("both", "capture")
        yield from nio.setup_filter("both", '{} "{}"'.format(data_link_type, output_file))

        log.info('Ethernet hub "{name}" [{id}]: starting packet capture on port {port}'.format(name=self._name,
                                                                                               id=self._id,
                                                                                               port=port_number))
1235214
def start_capture(self, *ports):
        

        IxeCapture.current_object = None
        IxeCaptureBuffer.current_object = None
        if not ports:
            ports = self.ports.values()
        for port in ports:
            port.captureBuffer = None
        port_list = self.set_ports_list(*ports)
        self.api.call_rc('ixStartCapture {}'.format(port_list))
309135
def start(self):
        
        if not (self.__recv_thread or self.__send_thread):
            self.__end.clear()
            self.__send_ready.clear()
            self.__recv_ready.clear()
            timeout = self.__socket_timeout + 1
            ignore_exc = self.__startup_ignore_exc
            self.__send_exc_clear()
            self.__recv_exc_clear()

            # start & await send thread success (unless timeout reached or an exception has occured)
            self.__send_thread = Thread(target=self.__send_run, name='amqplink_send')
            self.__send_thread.start()
            start_time = monotonic()
            success = False
            while not (success or (not ignore_exc and self.__send_exc) or monotonic() - start_time > timeout):
                success = self.__send_ready.wait(.25)

            if success:
                # start & await receiver thread success
                self.__recv_thread = Thread(target=self.__recv_run, name='amqplink_recv')
                self.__recv_thread.start()
                start_time = monotonic()
                success = False
                while not (success or (not ignore_exc and self.__recv_exc) or monotonic() - start_time >= timeout):
                    success = self.__recv_ready.wait(.25)

            # handler either thread's failure
            if not success:
                logger.warning("AmqpLink Failed to start.  Giving up.")
                self.stop()
                if self.__recv_exc:
                    # prioritise receive thread since this can get access-denied whereas send does not (until sending)
                    raise_from(LinkException('Receive thread failure'), self.__recv_exc)
                elif self.__send_exc:
                    raise_from(LinkException('Send thread failure'), self.__send_exc)
                else:
                    raise LinkException('Unknown link failure (timeout reached)')

        else:
            raise LinkException('amqplink already started')
513421
def start(self):
        
        self._started = True
        self._camera = _Camera(self._actual_camera, self._cmd_q, self._res, self._codec, self._fps, self._rate)
        self._camera.start()
149584
def capture_on(pattern, callback):
        
        device_name, desc = WinPcapDevices.get_matching_device(pattern)
        if device_name is not None:
            with WinPcap(device_name) as capture:
                capture.run(callback=callback)
35609
def _capture(self, args, kwargs):
        ''''''
        self.called = self.called + 1
        self.method_args.append(args)
        self.named_method_args.append(kwargs)
        self.never_called = False
98137
def captureQuery(self, query, params=(), engine=None, **kwargs):
        
        return self.capture(
            'raven.events.Query', query=query, params=params, engine=engine,
            **kwargs)
372935
def capture(context, callable_, *args, **kwargs):
    

    if not compat.callable(callable_):
        raise exceptions.RuntimeException(
                        "capture() function expects a callable as "
                        "its argument (i.e. capture(func, *args, **kwargs))"
                        )
    context._push_buffer()
    try:
        callable_(*args, **kwargs)
    finally:
        buf = context._pop_buffer()
    return buf.getvalue()
596046
def stop_capture(self):
        

        self._capturing = False
        self._project.controller.notification.emit("link.updated", self.__json__())
578401
def start_capture(self):
        """"""
        if not self._connect():
            log.warning('Treal is not connected')
            self._error()
            return
        super(Treal, self).start_capture()