38 lines
713 B
C++
38 lines
713 B
C++
#ifndef CDUTILS_X_H
|
|
#define CDUTILS_X_H
|
|
|
|
#include "cdutils_interface.h"
|
|
|
|
|
|
namespace CDUtils {
|
|
|
|
|
|
class XInterface: public Interface
|
|
{
|
|
PIOBJECT(CDUtils::XInterface)
|
|
public:
|
|
XInterface();
|
|
|
|
EVENT(sended)
|
|
EVENT(sendFailed)
|
|
EVENT(received)
|
|
EVENT(receiveFailed)
|
|
EVENT1(keepNamesRequest, bool*, xn)
|
|
EVENT_HANDLER(void, send);
|
|
EVENT_HANDLER(void, request);
|
|
|
|
void enable(const CDType & x) {setEnabled(x, true);}
|
|
void disable(const CDType & x) {setEnabled(x, false);}
|
|
void setEnabled(const CDType & x, bool en);
|
|
void setDisabled(const CDType & x, bool dis) {setEnabled(x, !dis);}
|
|
|
|
void start(double freq = 20.);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
extern CDUtils::XInterface X;
|
|
|
|
#endif // CDUTILS_X_H
|