PyDetectionPattern.GKDetectionPattern¶
- class GKDetectionPattern¶
-
Inherited by:
OCITDetectionPattern,GKDetectionPatternTemplate,OCITDetectionPatternTemplateSynopsis¶
Methods¶
def
__init__()def
addEvent()def
deleteEvent()def
deleteEvents()def
getEvent()def
getEvents()def
setEvent()
Virtual methods¶
def
sortEvents()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
An ordered (by start time) list of detection events (
GKDetectionPatternEvent) that can be reproduce by the simulator to test control strategies.It can be used in scenarios with no traffic.
- __init__()¶
- addEvent(event)¶
- Parameters:
event –
GKDetectionPatternEvent
Adds an event to the list of events. The event is copied and the list of events is sorted.
- addEventWithoutSorting(event)¶
- Parameters:
event –
GKDetectionPatternEvent
Adds an event to the list of events. The event is copied but the list of events is not sorted. Use this function for bulk editing and remember to call the
sortEventsfunction once all events have been added- deleteEvent(event)¶
- Parameters:
event –
GKDetectionPatternEvent
Deletes the event.
- deleteEvent(pos)
- Parameters:
pos – int
Deletes the event at position “pos”
- deleteEvents()¶
Clears the event list
- getEvent(pos)¶
- Parameters:
pos – int
- Return type:
Returns the event at position “pos”
- getEvents()¶
- Return type:
.list of GKDetectionPatternEvent
Returns all the events
- setEvent(pos, event)¶
- Parameters:
pos – int
event –
GKDetectionPatternEvent
Modifies the event at position “pos”
- sortEvents()¶
Function to sort events after a massive insert using the addEventNotSorting function as many times as desired.