Device¶
Device¶
-
class
Device
¶ The Device class to communicate with MYNT® EYE device.
Public Types
-
using
stream_callback_t
= device::StreamCallback¶ The device::StreamData callback.
-
using
motion_callback_t
= device::MotionCallback¶ The device::MotionData callback.
Public Functions
-
bool
Supports
(const Capabilities &capability) const¶ Supports the capability or not.
-
const std::vector<StreamRequest> &
GetStreamRequests
(const Capabilities &capability) const¶ Get all stream requests of the capability.
-
void
ConfigStreamRequest
(const Capabilities &capability, const StreamRequest &request)¶ Config the stream request to the capability.
-
const StreamRequest &
GetStreamRequest
(const Capabilities &capability) const¶ Get the config stream requests of the capability.
-
const std::vector<StreamRequest> &
GetStreamRequests
() const¶ Get all stream requests of the key stream capability.
-
void
ConfigStreamRequest
(const StreamRequest &request)¶ Config the stream request to the key stream capability.
-
const StreamRequest &
GetStreamRequest
() const¶ Get the config stream requests of the key stream capability.
-
std::shared_ptr<DeviceInfo>
GetInfo
() const¶ Get the device info.
-
std::shared_ptr<IntrinsicsBase>
GetIntrinsics
(const Stream &stream) const¶ Get the intrinsics of stream.
-
Extrinsics
GetExtrinsics
(const Stream &from, const Stream &to) const¶ Get the extrinsics from one stream to another.
-
MotionIntrinsics
GetMotionIntrinsics
() const¶ Get the intrinsics of motion.
-
Extrinsics
GetMotionExtrinsics
(const Stream &from) const¶ Get the extrinsics from one stream to motion.
-
std::shared_ptr<IntrinsicsBase>
GetIntrinsics
(const Stream &stream, bool *ok) const¶ Get the intrinsics of stream.
-
Extrinsics
GetExtrinsics
(const Stream &from, const Stream &to, bool *ok) const¶ Get the extrinsics from one stream to another.
-
MotionIntrinsics
GetMotionIntrinsics
(bool *ok) const¶ Get the intrinsics of motion.
-
Extrinsics
GetMotionExtrinsics
(const Stream &from, bool *ok) const¶ Get the extrinsics from one stream to motion.
Set the intrinsics of stream.
-
void
SetExtrinsics
(const Stream &from, const Stream &to, const Extrinsics &ex)¶ Set the extrinsics from one stream to another.
-
void
SetMotionIntrinsics
(const MotionIntrinsics &in)¶ Set the intrinsics of motion.
-
void
SetMotionExtrinsics
(const Stream &from, const Extrinsics &ex)¶ Set the extrinsics from one stream to motion.
-
void
LogOptionInfos
() const¶ Log all option infos.
-
OptionInfo
GetOptionInfo
(const Option &option) const¶ Get the option info.
-
void
SetStreamCallback
(const Stream &stream, stream_callback_t callback, bool async = false)¶ Set the callback of stream.
-
void
SetMotionCallback
(motion_callback_t callback, bool async = false)¶ Set the callback of motion.
-
bool
HasMotionCallback
() const¶ Has the callback of motion.
-
void
WaitForStreams
()¶ Wait the streams are ready.
-
device::StreamData
GetStreamData
(const Stream &stream)¶ Get the latest data of stream.
-
device::StreamData
GetLatestStreamData
(const Stream &stream)¶
-
std::vector<device::StreamData>
GetStreamDatas
(const Stream &stream)¶ Get the datas of stream.
- Note
default cache 4 datas at most.
-
void
DisableMotionDatas
()¶ Disable cache motion datas.
-
void
EnableMotionDatas
()¶ Enable cache motion datas.
-
void
EnableMotionDatas
(std::size_t max_size)¶ Enable cache motion datas.
-
std::vector<device::MotionData>
GetMotionDatas
()¶ Get the motion datas.
-
using
device::Frame¶
-
class
Frame
¶ Frame with raw data.
Public Functions
-
Frame
(const StreamRequest &request, const void *data)¶ Construct the frame with StreamRequest and raw data.
-
Frame
(std::uint16_t width, std::uint16_t height, Format format, const void *data)¶ Construct the frame with stream info and raw data.
-
std::uint16_t
width
() const¶ Get the width.
-
std::uint16_t
height
() const¶ Get the height.
-
std::uint8_t *
data
()¶ Get the data.
-
const std::uint8_t *
data
() const¶ Get the const data.
-
std::size_t
size
() const¶ Get the size of data.
-