Jetson Linux API Reference

38.2 Release
Event.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
20 #ifndef _ARGUS_EVENT_H
21 #define _ARGUS_EVENT_H
22 
23 namespace Argus
24 {
25 
35 class Event : public InterfaceProvider
36 {
37 protected:
38  ~Event() {}
39 };
40 
46 class EventType : public NamedUUID
47 {
48 public:
49  EventType(uint32_t time_low_
50  , uint16_t time_mid_
51  , uint16_t time_hi_and_version_
52  , uint16_t clock_seq_
53  , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
54  , const char* name)
55  : NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_,
56  c0, c1, c2, c3, c4, c5, name)
57  {}
58 
60  : NamedUUID(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "EVENT_TYPE_UNSPECIFIED")
61  {}
62 };
63 
64 
65 /*
66  * Core Event types
67  */
68 
75 DEFINE_UUID(EventType, EVENT_TYPE_ERROR, 2c80d8b0,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
76 
83 DEFINE_UUID(EventType, EVENT_TYPE_CAPTURE_STARTED, 2c80d8b1,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
84 
91 DEFINE_UUID(EventType, EVENT_TYPE_CAPTURE_COMPLETE, 2c80d8b2,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
92 
93 
101 DEFINE_UUID(InterfaceID, IID_EVENT, 98bcb49e,fd7d,11e4,a322,16,97,f9,25,ec,7b);
102 class IEvent : public Interface
103 {
104 public:
105  static const InterfaceID& id() { return IID_EVENT; }
106 
116  virtual EventType getEventType() const = 0;
117 
121  virtual uint64_t getTime() const = 0;
122 
126  virtual uint32_t getCaptureId() const = 0;
127 
128 protected:
129  ~IEvent() {}
130 };
131 
139 DEFINE_UUID(InterfaceID, IID_EVENT_ERROR, 13e0fc70,1ab6,11e5,b939,08,00,20,0c,9a,66);
140 class IEventError : public Interface
141 {
142 public:
143  static const InterfaceID& id() { return IID_EVENT_ERROR; }
144 
148  virtual Status getStatus() const = 0;
149 
150 protected:
152 };
153 
161 DEFINE_UUID(InterfaceID, IID_EVENT_CAPTURE_COMPLETE, 8b2b40b5,f1e4,4c4d,ae1c,f3,93,f6,54,06,d5);
163 {
164 public:
165  static const InterfaceID& id() { return IID_EVENT_CAPTURE_COMPLETE; }
166 
173  virtual const CaptureMetadata* getMetadata() const = 0;
174 
179  virtual Status getStatus() const = 0;
180 
181 protected:
183 };
184 
185 } // namespace Argus
186 
187 #endif // _ARGUS_EVENT_H
Argus::IEventError::getStatus
virtual Status getStatus() const =0
Returns the Status value describing the error.
Argus::IEvent::id
static const InterfaceID & id()
Definition: Event.h:105
Argus::DEFINE_UUID
DEFINE_UUID(ExtensionName, EXT_BAYER_AVERAGE_MAP, 12c3de20, 64c5, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
Argus::NamedUUID
A universally unique identifier with a name (used for debugging purposes).
Definition: UUID.h:73
Argus::IEventError
Definition: Event.h:140
Argus
Definition: BayerAverageMap.h:39
Argus::IEventError::~IEventError
~IEventError()
Definition: Event.h:151
Argus::IEvent::getTime
virtual uint64_t getTime() const =0
Returns the time of the event, in nanoseconds.
Argus::IEvent::getCaptureId
virtual uint32_t getCaptureId() const =0
Returns the capture id for the event.
Argus::CaptureMetadata
Definition: CaptureMetadata.h:48
Argus::IEvent
Definition: Event.h:102
Argus::EventType
A unique identifier for a particular type of Event.
Definition: Event.h:46
Argus::Interface
The top-level interface class.
Definition: Types.h:374
Argus::IEventCaptureComplete::getMetadata
virtual const CaptureMetadata * getMetadata() const =0
Returns all dynamic metadata associated with this capture.
Argus::InterfaceID
A unique identifier for a libargus Interface.
Definition: Types.h:384
Argus::InterfaceProvider
The base interface for a class that provides libargus Interfaces.
Definition: Types.h:405
Argus::IEventCaptureComplete::~IEventCaptureComplete
~IEventCaptureComplete()
Definition: Event.h:182
Argus::IEventCaptureComplete::getStatus
virtual Status getStatus() const =0
Returns the error status of the metadata event.
Argus::EventType::EventType
EventType()
Definition: Event.h:59
Argus::Event
Definition: Event.h:35
Argus::Event::~Event
~Event()
Definition: Event.h:38
Argus::IEventError::id
static const InterfaceID & id()
Definition: Event.h:143
Argus::IEventCaptureComplete::id
static const InterfaceID & id()
Definition: Event.h:165
Argus::IEvent::getEventType
virtual EventType getEventType() const =0
Returns the event type.
Argus::IEventCaptureComplete
Definition: Event.h:162
Argus::EventType::EventType
EventType(uint32_t time_low_, uint16_t time_mid_, uint16_t time_hi_and_version_, uint16_t clock_seq_, uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5, const char *name)
Definition: Event.h:49
Argus::Status
Status
Status values returned by API function calls.
Definition: Types.h:98
Argus::IEvent::~IEvent
~IEvent()
Definition: Event.h:129