Jetson Linux API Reference

39.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_UNCORR, 2c80d8b0,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
76 
83 DEFINE_UUID(EventType, EVENT_TYPE_ERROR_CORR, ea3b0df0,20ba,11f0,b5eb,08,00,20,0c,9a,66);
84 
91 DEFINE_UUID(EventType, EVENT_TYPE_CAPTURE_STARTED, 2c80d8b1,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
92 
99 DEFINE_UUID(EventType, EVENT_TYPE_CAPTURE_COMPLETE, 2c80d8b2,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
100 
101 
109 DEFINE_UUID(InterfaceID, IID_EVENT, 98bcb49e,fd7d,11e4,a322,16,97,f9,25,ec,7b);
110 class IEvent : public Interface
111 {
112 public:
113  static const InterfaceID& id() { return IID_EVENT; }
114 
128  virtual EventType getEventType() const = 0;
129 
133  virtual uint64_t getTime() const = 0;
134 
138  virtual uint32_t getCaptureId() const = 0;
139 
140 protected:
141  ~IEvent() {}
142 };
143 
151 DEFINE_UUID(InterfaceID, IID_EVENT_ERROR, 13e0fc70,1ab6,11e5,b939,08,00,20,0c,9a,66);
152 class IEventError : public Interface
153 {
154 public:
155  static const InterfaceID& id() { return IID_EVENT_ERROR; }
156 
160  virtual Status getStatus() const = 0;
161 
162 protected:
164 };
165 
173 DEFINE_UUID(InterfaceID, IID_EVENT_CAPTURE_COMPLETE, 8b2b40b5,f1e4,4c4d,ae1c,f3,93,f6,54,06,d5);
175 {
176 public:
177  static const InterfaceID& id() { return IID_EVENT_CAPTURE_COMPLETE; }
178 
185  virtual const CaptureMetadata* getMetadata() const = 0;
186 
191  virtual Status getStatus() const = 0;
192 
193 protected:
195 };
196 
197 } // namespace Argus
198 
199 #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:113
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:152
Argus
Definition: BayerAverageMap.h:39
Argus::IEventError::~IEventError
~IEventError()
Definition: Event.h:163
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:110
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:375
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:385
Argus::InterfaceProvider
The base interface for a class that provides libargus Interfaces.
Definition: Types.h:406
Argus::IEventCaptureComplete::~IEventCaptureComplete
~IEventCaptureComplete()
Definition: Event.h:194
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:155
Argus::IEventCaptureComplete::id
static const InterfaceID & id()
Definition: Event.h:177
Argus::IEvent::getEventType
virtual EventType getEventType() const =0
Returns the event type.
Argus::IEventCaptureComplete
Definition: Event.h:174
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:141