Jetson Linux API 参考文档

32.7.4 版本
Event.h
转到此文件的文档。
1 /*
2  * 版权所有 (c) 2016-2017, NVIDIA CORPORATION。保留所有权利。
3  *
4  * 只要满足以下条件,允许以源代码和二进制形式重新分发和使用,无论是否
5  * 修改:
6  * 是满足:
7  * * 源代码的重新分发必须保留上述版权
8  * 声明、此条件列表和以下免责声明。
9  * * 二进制形式的重新分发必须在上述版权中复制
10  * 声明、此条件列表和以下免责声明在
11  * 文档和/或随分发提供的其他材料中。
12  * * 未经事先书面许可,NVIDIA CORPORATION 的名称及其
13  * 贡献者的姓名不得用于认可或推销衍生产品
14  * 来自本软件的产品。
15  *
16  * 本软件由版权所有者“按原样”提供,并且任何
17  * 明示或暗示的保证,包括但不限于
18  * 对适销性和特定用途适用性的暗示保证
19  * 均不承担责任。在任何情况下,版权所有者或
20  * 贡献者均不对任何直接、间接、偶然、特殊、
21  * 惩戒性或后果性损害(包括但不限于
22  * 替代商品或服务的采购;用途、数据或
23  * 利润损失;或业务中断)承担责任,无论其原因和任何理论
24  * 的责任,无论是合同、严格责任还是侵权行为
25  * (包括疏忽或其他原因)以任何方式因使用
26  * 本软件而引起,即使已被告知可能发生此类损害。
27  */
28 
36 #ifndef _ARGUS_EVENT_H
37 #define _ARGUS_EVENT_H
38 
39 namespace Argus
40 {
41 
51 class Event : public InterfaceProvider
52 {
53 protected
54  ~Event() {}
55 };
56 
62 class EventType : public NamedUUID
63 {
64 public
65  EventType(uint32_t time_low_
66  , uint16_t time_mid_
67  , uint16_t time_hi_and_version_
68  , uint16_t clock_seq_
69  , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
70  , const char* name)
71  : NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_,
72  c0, c1, c2, c3, c4, c5, name)
73  {}
74 
76  : NamedUUID(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "EVENT_TYPE_UNSPECIFIED")
77  {}
78 };
79 
80 
81 /*
82  * 核心事件类型
83  */
84 
91 DEFINE_UUID(EventType, EVENT_TYPE_ERROR, 2c80d8b0,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
92 
99 DEFINE_UUID(EventType, EVENT_TYPE_CAPTURE_STARTED, 2c80d8b1,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
100 
107 DEFINE_UUID(EventType, EVENT_TYPE_CAPTURE_COMPLETE, 2c80d8b2,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
108 
109 
117 DEFINE_UUID(InterfaceID, IID_EVENT, 98bcb49e,fd7d,11e4,a322,16,97,f9,25,ec,7b);
118 class IEvent : public Interface
119 {
120 public
121  static const InterfaceID& id() { return IID_EVENT; }
122 
126  virtual EventType getEventType() const = 0;
127 
131  virtual uint64_t getTime() const = 0;
132 
136  virtual uint32_t getCaptureId() const = 0;
137 
138 protected
139  ~IEvent() {}
140 };
141 
149 DEFINE_UUID(InterfaceID, IID_EVENT_ERROR, 13e0fc70,1ab6,11e5,b939,08,00,20,0c,9a,66);
150 class IEventError : public Interface
151 {
152 public
153  static const InterfaceID& id() { return IID_EVENT_ERROR; }
154 
158  virtual Status getStatus() const = 0;
159 
160 protected
162 };
163 
171 DEFINE_UUID(InterfaceID, IID_EVENT_CAPTURE_COMPLETE, 8b2b40b5,f1e4,4c4d,ae1c,f3,93,f6,54,06,d5);
173 {
174 public
175  static const InterfaceID& id() { return IID_EVENT_CAPTURE_COMPLETE; }
176 
183  virtual const CaptureMetadata* getMetadata() const = 0;
184 
189  virtual Status getStatus() const = 0;
190 
191 protected
193 };
194 
195 } // namespace Argus
196 
197 #endif // _ARGUS_EVENT_H
Argus::IEventError::getStatus
virtual Status getStatus() const =0
返回描述错误的 Status 值。
Argus::IEvent::id
static const InterfaceID & id()
定义: Event.h:121
Argus::DEFINE_UUID
DEFINE_UUID(ExtensionName, EXT_BAYER_AVERAGE_MAP, 12c3de20, 64c5, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
Argus::NamedUUID
具有名称的通用唯一标识符(用于调试目的)。
定义: UUID.h:72
Argus::IEventError
定义: Event.h:150
Argus
定义: BayerAverageMap.h:39
Argus::IEventError::~IEventError
~IEventError()
定义: Event.h:161
Argus::IEvent::getTime
virtual uint64_t getTime() const =0
返回事件的时间,以纳秒为单位。
Argus::IEvent::getCaptureId
virtual uint32_t getCaptureId() const =0
返回事件的捕获 ID。
Argus::CaptureMetadata
定义: CaptureMetadata.h:48
Argus::IEvent
定义: Event.h:118
Argus::EventType
特定事件类型的唯一标识符。
定义: Event.h:62
Argus::Interface
顶层接口类。
定义: Types.h:346
Argus::IEventCaptureComplete::getMetadata
virtual const CaptureMetadata * getMetadata() const =0
返回与此捕获关联的所有动态元数据。
Argus::InterfaceID
libargus 接口的唯一标识符。
定义: Types.h:356
Argus::InterfaceProvider
为类提供 libargus 接口的基接口。
定义: Types.h:377
Argus::IEventCaptureComplete::~IEventCaptureComplete
~IEventCaptureComplete()
定义: Event.h:192
Argus::IEventCaptureComplete::getStatus
virtual Status getStatus() const =0
返回元数据事件的错误状态。
Argus::EventType::EventType
EventType()
定义: Event.h:75
Argus::Event
定义: Event.h:51
Argus::Event::~Event
~Event()
定义: Event.h:54
Argus::IEventError::id
static const InterfaceID & id()
定义: Event.h:153
Argus::IEventCaptureComplete::id
static const InterfaceID & id()
定义: Event.h:175
Argus::IEvent::getEventType
virtual EventType getEventType() const =0
返回事件类型。
Argus::IEventCaptureComplete
定义: Event.h:172
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)
定义: Event.h:65
Argus::Status
Status
API 函数调用返回的 Status 值。
定义: Types.h:93
Argus::IEvent::~IEvent
~IEvent()
定义: Event.h:139
. All rights reserved.