UniTAP.dev.ports.modules.capturer.event.event_capturer
class
EventCapturer:
Class EventCapturer allows working with capturing events on Sink (RX - receiver) side.
You can start capturing in several modes, stop capturing, getting current status and result of capturing
capture_result.
EventCapturer( capturer: UniTAP.dev.modules.capturer.capture.Capturer, port_id: int, event_filter: list)
status: UniTAP.dev.modules.capturer.statuses.EventCaptureStatus
Returns current event capturer status.
Returns:
object of
VideoCaptureStatustype
def
event_filter(self, event_filter_type: Type[~EventFilterType]) -> ~EventFilterType:
Returns event filter for current EventCapturer.
Returns:
object of one of available [EventFilterDpRx, EventFilterDpTx, EventFilterHdRx, EventFilterHdTx, EventFilterUsbc] type
def
configure_capturer( self, event_filter: Union[UniTAP.dev.ports.modules.capturer.event.event_types.EventFilterDpRx, UniTAP.dev.ports.modules.capturer.event.event_types.EventFilterDpTx, UniTAP.dev.ports.modules.capturer.event.event_types.EventFilterHdRx, UniTAP.dev.ports.modules.capturer.event.event_types.EventFilterHdTx, UniTAP.dev.ports.modules.capturer.event.event_types.EventFilterUsbc]):
Configure
Arguments:
- event_filter (Union[EventFilterDpRx, EventFilterDpTx, EventFilterHdRx, EventFilterHdTx, EventFilterUsbc])
def
start(self, sec=0, n_elements=0):
Start capturing. Possible some variants of capturing:
- Capture with fixed event count (will be captured fixed event count and capturing will be stopped)
- Capture with fixed time (capturing will be continued fixed seconds and capturing will be stopped).
- Capture without parameters Live capturing (for getting events you need to use functions
pop_elementandpop_all_elements). Here you need to manually call thestopafter capture.
All results can be obtained using the function capture_result.
Arguments:
- n_elements (int)
- sec (int)
def
pop_all_elements_as_result_object( self) -> UniTAP.dev.ports.modules.capturer.event.result_event.ResultEventObject:
Return all captured event frames(objects of EventData) as ResultEventObject.
Returns:
object of
ResultEventObjecttype