luna-sysmgr-common
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NyxSensorConnector.cpp File Reference
#include "NyxSensorConnector.h"
#include "NyxSensorCommonTypes.h"
#include "Settings.h"
#include <QApplication>
#include <QWidget>
#include <QMap>
#include <cjson/json.h>
#include <glib.h>
Include dependency graph for NyxSensorConnector.cpp:

Macros

#define CHECK_ERROR(err, msg)
 
#define SAFE_NYX_CALL(expr)
 

Typedefs

typedef QMap
< NYXConnectorBase::Sensor,
QString > 
SensorMap
 

Macro Definition Documentation

#define CHECK_ERROR (   err,
  msg 
)
Value:
do { \
if (NYX_ERROR_NONE != err) \
{ \
g_critical("[%s : %d] : %s : Error Code -> [%d]", __PRETTY_FUNCTION__, __LINE__, msg, err); \
return; \
} \
} while(0)
#define SAFE_NYX_CALL (   expr)
Value:
do { \
if ((m_Handle) && (!m_Finished)) \
{ \
expr; \
} \
} while(0)

Macro is designed to safely call the NYX APIs due to the asynchronous nature of these NYX connectors m_Hanlde can be closed during reading the sensor data from NYX. (i.e. readSensorData())

Typedef Documentation

typedef QMap<NYXConnectorBase::Sensor, QString> SensorMap