MYNT EYE S SDK  2.3.0
http://www.myntai.com/mynteye/standard
mynteye::API Class Reference

The API class to communicate with MYNT® EYE device. More...

Public Types

using stream_callback_t = std::function< void(const api::StreamData &data)>
 The api::StreamData callback. More...
 
using motion_callback_t = std::function< void(const api::MotionData &data)>
 The api::MotionData callback. More...
 

Public Member Functions

Model GetModel () const
 Get the model.
 
bool Supports (const Stream &stream) const
 Supports the stream or not.
 
bool Supports (const Capabilities &capability) const
 Supports the capability or not.
 
bool Supports (const Option &option) const
 Supports the option or not.
 
bool Supports (const AddOns &addon) const
 Supports the addon or not.
 
StreamRequest SelectStreamRequest (bool *ok) const
 Log all stream requests and prompt user to select one.
 
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 StreamRequestGetStreamRequest (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 StreamRequestGetStreamRequest () const
 Get the config stream requests of the key stream capability.
 
std::shared_ptr< DeviceInfoGetInfo () const
 Get the device info.
 
std::string GetInfo (const Info &info) const
 Get the device info.
 
IntrinsicsPinhole GetIntrinsics (const Stream &stream) const
 
template<typename T >
GetIntrinsics (const Stream &stream) const
 Get the intrinsics of stream.
 
std::shared_ptr< IntrinsicsBaseGetIntrinsicsBase (const Stream &stream) const
 Get the intrinsics base 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.
 
void LogOptionInfos () const
 Log all option infos.
 
OptionInfo GetOptionInfo (const Option &option) const
 Get the option info.
 
std::int32_t GetOptionValue (const Option &option) const
 Get the option value.
 
void SetOptionValue (const Option &option, std::int32_t value)
 Set the option value.
 
bool RunOptionAction (const Option &option) const
 Run the option action.
 
void SetStreamCallback (const Stream &stream, stream_callback_t callback)
 Set the callback of stream.
 
void SetMotionCallback (motion_callback_t callback)
 Set the callback of motion.
 
bool HasStreamCallback (const Stream &stream) const
 Has the callback of stream.
 
bool HasMotionCallback () const
 Has the callback of motion.
 
void Start (const Source &source)
 Start capturing the source.
 
void Stop (const Source &source)
 Stop capturing the source.
 
void WaitForStreams ()
 Wait the streams are ready.
 
void EnableStreamData (const Stream &stream)
 Enable the data of stream. More...
 
void DisableStreamData (const Stream &stream)
 Disable the data of stream.
 
api::StreamData GetStreamData (const Stream &stream)
 Get the latest data of stream.
 
std::vector< api::StreamDataGetStreamDatas (const Stream &stream)
 Get the datas of stream. More...
 
void EnableMotionDatas (std::size_t max_size=std::numeric_limits< std::size_t >::max())
 Enable cache motion datas.
 
std::vector< api::MotionDataGetMotionDatas ()
 Get the motion datas.
 
void EnablePlugin (const std::string &path)
 Enable the plugin.
 

Static Public Member Functions

static std::shared_ptr< APICreate (int argc, char *argv[])
 Create the API instance. More...
 
static std::shared_ptr< APICreate (int argc, char *argv[], const std::shared_ptr< Device > &device)
 Create the API instance. More...
 
static std::shared_ptr< APICreate (const std::shared_ptr< Device > &device)
 Create the API instance. More...
 

Detailed Description

The API class to communicate with MYNT® EYE device.

Member Typedef Documentation

◆ motion_callback_t

using mynteye::API::motion_callback_t = std::function<void(const api::MotionData &data)>

The api::MotionData callback.

◆ stream_callback_t

using mynteye::API::stream_callback_t = std::function<void(const api::StreamData &data)>

The api::StreamData callback.

Member Function Documentation

◆ Create() [1/3]

static std::shared_ptr<API> mynteye::API::Create ( int  argc,
char *  argv[] 
)
static

Create the API instance.

Parameters
argcthe arg count.
argvthe arg values.
Returns
the API instance.
Note
This will init glog with args and call device::select() to select a device.

◆ Create() [2/3]

static std::shared_ptr<API> mynteye::API::Create ( int  argc,
char *  argv[],
const std::shared_ptr< Device > &  device 
)
static

Create the API instance.

Parameters
argcthe arg count.
argvthe arg values.
devicethe selected device.
Returns
the API instance.
Note
This will init glog with args.

◆ Create() [3/3]

static std::shared_ptr<API> mynteye::API::Create ( const std::shared_ptr< Device > &  device)
static

Create the API instance.

Parameters
devicethe selected device.
Returns
the API instance.

◆ EnableStreamData()

void mynteye::API::EnableStreamData ( const Stream stream)

Enable the data of stream.

Note
must enable the stream if it's a synthetic one. This means the stream in not native, the device has the capability to provide this stream, but still support this stream.

◆ GetIntrinsics()

IntrinsicsPinhole mynteye::API::GetIntrinsics ( const Stream stream) const
Deprecated:
Get the intrinsics (pinhole) of stream.

◆ GetStreamDatas()

std::vector<api::StreamData> mynteye::API::GetStreamDatas ( const Stream stream)

Get the datas of stream.

Note
default cache 4 datas at most.