MarsSDK
Public Member Functions | Private Attributes | List of all members
Mars Class Reference

Sunny Mars device. More...

#include <MarsSDK.h>

Public Member Functions

 Mars ()
 Constructor to create a new instance of Mars.
 
 ~Mars ()
 Destructor to delete memory allocation for instance of Mars.
 
int connect ()
 Connects the connected camera. More...
 
int disconnect ()
 Disconnects the connected camera. More...
 
DepthStreamgetDepthStream ()
 Creates a new instance of DepthStream, if one doesn't already exist. More...
 
ColorStreamgetColorStream ()
 Creates a new instance of ColorStream, if one doesn't already exist. More...
 
int closeDepthStream ()
 Deletes the instance of DepthStream, if one already exists. More...
 
int closeColorStream ()
 Deletes the instance of ColorStream, if one already exists. More...
 
unsigned int getDeviceVersion ()
 Returns the device's version. More...
 
unsigned int getDeviceType ()
 Returns the device type. More...
 
char * getDeviceId ()
 Returns the device ID. More...
 
char * getDriverVersion ()
 Returns the driver version. More...
 
int getTemp (float *_cpu, float *_sensor)
 Gets the camera's temperature. More...
 
int setCameraMode (int _mode)
 Sets the working mode for the camera's time of flight (TOF) sensor. 0 = mono frequency, 1 = multi frequency, 2 = IR data. More...
 
int setFps (int _fps)
 Sets the camera's framerate. Options available are 5, 15, 30, and 45 fps. More...
 
int setExposure (int _exposure)
 Sets the camera's exposure. Options available are 0 (automatic), 250, 380, 650, 850, and 1200. More...
 
int setImageRegistration (bool _status)
 Sets the status of the camera's image registration between the depth stream and color stream. More...
 

Private Attributes

CLibTof * camera
 Instance of camera in external Sunny Mars API.
 
DeviceInfo_t * deviceInfo
 Structure containing all the device-specific information, retrieved from the Sunny Mars API.
 
DepthStreamdepthStream
 Instance of DepthStream within MarsSDK.
 
ColorStreamcolorStream
 Instance of ColorStream within MarsSDK.
 

Detailed Description

Sunny Mars device.

Member Function Documentation

◆ closeColorStream()

int Mars::closeColorStream ( )

Deletes the instance of ColorStream, if one already exists.

Returns
Error code

◆ closeDepthStream()

int Mars::closeDepthStream ( )

Deletes the instance of DepthStream, if one already exists.

Returns
Error code

◆ connect()

int Mars::connect ( )

Connects the connected camera.

Returns
Error code

◆ disconnect()

int Mars::disconnect ( )

Disconnects the connected camera.

Returns
Error code

◆ getColorStream()

ColorStream * Mars::getColorStream ( )

Creates a new instance of ColorStream, if one doesn't already exist.

Returns
colorStream

◆ getDepthStream()

DepthStream * Mars::getDepthStream ( )

Creates a new instance of DepthStream, if one doesn't already exist.

Returns
depthStream

◆ getDeviceId()

char * Mars::getDeviceId ( )

Returns the device ID.

Returns
Device ID

◆ getDeviceType()

unsigned int Mars::getDeviceType ( )

Returns the device type.

Returns
Device type

◆ getDeviceVersion()

unsigned int Mars::getDeviceVersion ( )

Returns the device's version.

Returns
Device version

◆ getDriverVersion()

char * Mars::getDriverVersion ( )

Returns the driver version.

Returns
Driver version

◆ getTemp()

int Mars::getTemp ( float *  _cpu,
float *  _sensor 
)

Gets the camera's temperature.

Parameters
[out]_cpuCamera's CPU temperature.
[out]_sensorCamera's sensor temperature.
Returns
Error code

◆ setCameraMode()

int Mars::setCameraMode ( int  _mode)

Sets the working mode for the camera's time of flight (TOF) sensor. 0 = mono frequency, 1 = multi frequency, 2 = IR data.

Parameters
[in]_modeDesired TOF mode.
Returns
Error code

◆ setExposure()

int Mars::setExposure ( int  _exposure)

Sets the camera's exposure. Options available are 0 (automatic), 250, 380, 650, 850, and 1200.

Parameters
[in]_exposureDesired exposure.
Returns
Error code

◆ setFps()

int Mars::setFps ( int  _fps)

Sets the camera's framerate. Options available are 5, 15, 30, and 45 fps.

Parameters
[in]_fpsDesired framerate.
Returns
Error code

◆ setImageRegistration()

int Mars::setImageRegistration ( bool  _status)

Sets the status of the camera's image registration between the depth stream and color stream.

Parameters
[in]_statusEnable/ disable image registration.
Returns
Error code

The documentation for this class was generated from the following file: