Back to Jetson Inference

Jetson Inference: Event Class Reference

docs/html/classEvent.html

latest6.7 KB
Original Source

| | Jetson Inference

DNN Vision Library |

Public Member Functions | Protected Attributes | List of all members

Event Class Reference Utilities Library (jetson-utils) » Multithreading

Event object for signalling other threads. More...

#include <Event.h>

|

Public Member Functions

| | | Event (bool auto_reset=true) | | | Event constructor. More...
| | | | | ~Event () | | | Destructor. More...
| | | | void | Wake () | | | Raise the event. More...
| | | | void | Reset () | | | Reset the event status to un-raised. More...
| | | | bool | Query () | | | Query the status of this event. More...
| | | | bool | Wait () | | | Wait until this event is raised. More...
| | | | bool | Wait (const timespec &timeout) | | | Wait for a specified amount of time until this event is raised or timeout occurs. More...
| | | | bool | Wait (uint64_t timeout) | | | Wait for a specified number of milliseconds until this event is raised or timeout occurs. More...
| | | | bool | WaitNs (uint64_t timeout) | | | Wait for a specified number of nanoseconds until this event is raised or timeout occurs. More...
| | | | bool | WaitUs (uint64_t timeout) | | | Wait for a specified number of microseconds until this event is raised or timeout occurs. More...
| | | | pthread_cond_t * | GetID () | | | Get the Event object. More...
| | |

|

Protected Attributes

| | pthread_cond_t | mID | | | | Mutex | mQueryMutex | | | | bool | mQuery | | | | bool | mAutoReset | | |

Detailed Description

Event object for signalling other threads.

Constructor & Destructor Documentation

Event()

|

| Event::Event | ( | bool | auto_reset = true | ) | |

| inline |

Event constructor.

By default, it will automatically be reset when it's raised.

Parameters

| auto_reset | Once this event has been raised, should it automatically be reset? |

~Event()

|

| Event::~Event | ( | | ) | |

| inline |

Destructor.

Member Function Documentation

GetID()

|

| pthread_cond_t* Event::GetID | ( | | ) | |

| inline |

Get the Event object.

Query()

|

| bool Event::Query | ( | | ) | |

| inline |

Query the status of this event.

ReturnsTrue if the event is raised, false if not.

Reset()

|

| void Event::Reset | ( | | ) | |

| inline |

Reset the event status to un-raised.

Wait() [1/3]

|

| bool Event::Wait | ( | | ) | |

| inline |

Wait until this event is raised.

It is likely this will block this thread (and will never timeout).

See alsoWake

Wait() [2/3]

|

| bool Event::Wait | ( | const timespec & | timeout | ) | |

| inline |

Wait for a specified amount of time until this event is raised or timeout occurs.

See alsoWake

Wait() [3/3]

|

| bool Event::Wait | ( | uint64_t | timeout | ) | |

| inline |

Wait for a specified number of milliseconds until this event is raised or timeout occurs.

See alsoWake

WaitNs()

|

| bool Event::WaitNs | ( | uint64_t | timeout | ) | |

| inline |

Wait for a specified number of nanoseconds until this event is raised or timeout occurs.

See alsoWake

WaitUs()

|

| bool Event::WaitUs | ( | uint64_t | timeout | ) | |

| inline |

Wait for a specified number of microseconds until this event is raised or timeout occurs.

See alsoWake

Wake()

|

| void Event::Wake | ( | | ) | |

| inline |

Raise the event.

Any threads waiting on this event will be woken up.

Member Data Documentation

mAutoReset

|

| bool Event::mAutoReset |

| protected |

mID

|

| pthread_cond_t Event::mID |

| protected |

mQuery

|

| bool Event::mQuery |

| protected |

mQueryMutex

|

| Mutex Event::mQueryMutex |

| protected |


The documentation for this class was generated from the following file:

  • jetson-utils/Event.h

  • Event

  • Generated on Fri Mar 17 2023 14:29:30 for Jetson Inference by 1.8.17