This file contains global objects (constants and macros). They are used in classes that include this file.
More...
#include <iostream>
#include <nds3/nds.h>
#include <sstream>
#include <unistd.h>
Go to the source code of this file.
This file contains global objects (constants and macros). They are used in classes that include this file.
◆ ADQNDS_MSG_ERRLOG_PV_GOTO_FINISH
#define ADQNDS_MSG_ERRLOG_PV_GOTO_FINISH |
( |
|
status, |
|
|
|
text |
|
) |
| |
Value:do \
{ \
if (!status) \
{ \
struct timespec now = { 0, 0 }; \
clock_gettime(CLOCK_REALTIME, &now); \
m_logMsgPV.push(now, std::string(text)); \
ndsErrorStream(m_node) << std::string(text) << std::endl; \
goto finish; \
} \
} while (0)
Macro for informing the user about occurred major failures and stopping data acquisition. Used in ADQAIChannelGroup methods.
- Parameters
-
status | status of the function that calls this macro. |
text | input information message. |
◆ ADQNDS_MSG_INFOLOG_PV
#define ADQNDS_MSG_INFOLOG_PV |
( |
|
text | ) |
|
Value:do \
{ \
struct timespec now = { 0, 0 }; \
clock_gettime(CLOCK_REALTIME, &now); \
m_logMsgPV.push(now, std::string(text)); \
ndsInfoStream(m_node) << std::string(text) << std::endl; \
} while (0)
Macro for pushing log messages to PV. Used in ADQAIChannelGroup methods.
- Parameters
-
text | input information message. |
◆ ADQNDS_MSG_WARNLOG_PV
#define ADQNDS_MSG_WARNLOG_PV |
( |
|
status, |
|
|
|
text |
|
) |
| |
Value:do \
{ \
if (!status) \
{ \
struct timespec now = { 0, 0 }; \
clock_gettime(CLOCK_REALTIME, &now); \
m_logMsgPV.push(now, std::string(text)); \
ndsWarningStream(m_node) << std::string(text) << std::endl; \
} \
} while (0)
Macro for warning information in case of minor failures. Used in ADQAIChannelGroup methods.
- Parameters
-
status | status of the function that calls this macro. |
text | input information message. |
◆ SLEEP
#define SLEEP |
( |
|
interval | ) |
usleep(1000 * interval) |
Macro for sleeping for 1000*interval microseconds.
- Parameters
-
interval | value that will be multiplied by 1000 microseconds. |