Apollo 10.0
自动驾驶开放平台
apollo::drivers::smartereye::SmartereyeDevice类 参考

#include <smartereye_device.h>

apollo::drivers::smartereye::SmartereyeDevice 的协作图:

Public 成员函数

 SmartereyeDevice ()
 
virtual ~SmartereyeDevice ()
 
virtual bool init (const std::shared_ptr< Config > &camera_config)
 
bool is_capturing ()
 
bool wait_for_device ()
 
int uninit ()
 
bool SetCallback (CallbackFunc ptr)
 
int poll ()
 

详细描述

在文件 smartereye_device.h47 行定义.

构造及析构函数说明

◆ SmartereyeDevice()

apollo::drivers::smartereye::SmartereyeDevice::SmartereyeDevice ( )

在文件 smartereye_device.cc30 行定义.

30{}

◆ ~SmartereyeDevice()

apollo::drivers::smartereye::SmartereyeDevice::~SmartereyeDevice ( )
virtual

成员函数说明

◆ init()

bool apollo::drivers::smartereye::SmartereyeDevice::init ( const std::shared_ptr< Config > &  camera_config)
virtual

在文件 smartereye_device.cc34 行定义.

34 {
35 pcamera_ = StereoCamera::connect("192.168.1.251");
36 pcameraHandler_ = new SmartereyeHandler("camera A");
37 pcamera_->enableTasks(TaskId::ObstacleTask | TaskId::DisplayTask);
38 inited_ = true;
39
40 return true;
41}

◆ is_capturing()

bool apollo::drivers::smartereye::SmartereyeDevice::is_capturing ( )

在文件 smartereye_device.cc68 行定义.

68{ return is_capturing_; }

◆ poll()

int apollo::drivers::smartereye::SmartereyeDevice::poll ( )

在文件 smartereye_device.cc49 行定义.

49 {
50 pcamera_->requestFrame(pcameraHandler_, FrameId::Compound);
51 is_capturing_ = true;
52
53 return 1;
54}

◆ SetCallback()

bool apollo::drivers::smartereye::SmartereyeDevice::SetCallback ( CallbackFunc  ptr)

在文件 smartereye_device.cc43 行定义.

43 {
44 pcameraHandler_->SetCallback(ptr);
45
46 return true;
47}

◆ uninit()

int apollo::drivers::smartereye::SmartereyeDevice::uninit ( )

在文件 smartereye_device.cc56 行定义.

56 {
57 if (!inited_) {
58 return 1;
59 }
60
61 pcamera_->disconnectFromServer();
62 is_capturing_ = false;
63 inited_ = false;
64
65 return 1;
66}

◆ wait_for_device()

bool apollo::drivers::smartereye::SmartereyeDevice::wait_for_device ( )

在文件 smartereye_device.cc70 行定义.

70 {
71 if (is_capturing_) {
72 ADEBUG << "is capturing";
73 return true;
74 }
75
76 return true;
77}
#define ADEBUG
Definition log.h:41

该类的文档由以下文件生成: