git-svn-id: svn://db.shs.com.ru/libs@380 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
37
cd_utils/cdutils_x.h
Normal file
37
cd_utils/cdutils_x.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user