Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
b
c
d
e
h
i
l
m
n
p
r
s
u
x
Typedefs
b
c
d
e
f
g
i
m
p
r
u
v
Enumerations
Enumerator
a
b
f
g
i
m
n
r
s
u
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
m
n
p
q
r
s
t
u
v
x
Enumerations
a
c
d
e
f
k
l
m
p
r
s
t
v
w
Enumerator
a
b
d
f
g
h
i
l
m
n
o
p
r
s
u
v
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
b
c
d
e
f
g
m
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
w
Typedefs
Enumerations
Enumerator
Macros
_
d
f
i
m
n
p
s
t
u
examples
host_side
device_information.cpp
Go to the documentation of this file.
1
#include <iostream>
2
3
// Includes common necessary includes for development using depthai library
4
#include "
depthai/depthai.hpp
"
5
6
int
main
() {
7
std::cout <<
"Searching for all available devices...\n\n"
;
8
auto
infos =
dai::Device::getAllAvailableDevices
();
9
10
if
(infos.size() <= 0) {
11
std::cout <<
"Couldn't find any available devices.\n"
;
12
return
-1;
13
}
14
15
for
(
auto
&
info
: infos) {
16
std::cout <<
"Found device: "
<<
info
.name <<
" mxid: "
<<
info
.mxid <<
" state: "
<<
info
.state << std::endl;
17
}
18
19
// Connect to device and start pipeline
20
std::cout <<
"\nBooting the first available camera ("
<< infos[0].name <<
")...\n"
;
21
dai::Device
device(
dai::Pipeline
(), infos[0]);
22
std::cout <<
"Available camera sensors: "
;
23
for
(
auto
& sensor : device.
getCameraSensorNames
()) {
24
std::cout <<
"Socket: "
<< sensor.first <<
" - "
<< sensor.second <<
", "
;
25
}
26
std::cout << std::endl;
27
28
auto
eeprom = device.
readCalibration2
().
getEepromData
();
29
std::cout <<
"Product name: "
<< eeprom.
productName
<<
", board name: "
<< eeprom.boardName << std::endl;
30
31
return
0;
32
}
dai::Pipeline
Represents the pipeline, set of nodes and connections between them.
Definition:
Pipeline.hpp:100
dai::logger::info
void info(const FormatString &fmt, Args &&...args)
Definition:
Logging.hpp:78
depthai.hpp
dai::EepromData::productName
std::string productName
Definition:
EepromData.hpp:21
dai::DeviceBase::getCameraSensorNames
std::unordered_map< CameraBoardSocket, std::string > getCameraSensorNames()
Definition:
DeviceBase.cpp:1117
dai::DeviceBase::readCalibration2
CalibrationHandler readCalibration2()
Definition:
DeviceBase.cpp:1385
dai::Device
Definition:
Device.hpp:21
dai::DeviceBase::getAllAvailableDevices
static std::vector< DeviceInfo > getAllAvailableDevices()
Definition:
DeviceBase.cpp:228
main
int main()
Definition:
device_information.cpp:6
dai::CalibrationHandler::getEepromData
dai::EepromData getEepromData() const
Definition:
CalibrationHandler.cpp:200
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19