Added configuration to Context and fixed all the users.
This commit is contained in:
@@ -18,6 +18,8 @@ using namespace epics::pvData;
|
||||
class DummyResponseHandler : public ResponseHandler
|
||||
{
|
||||
public:
|
||||
DummyResponseHandler(Context* ctx) : ResponseHandler(ctx) {}
|
||||
|
||||
virtual void handleResponse(osiSockAddr* responseFrom,
|
||||
Transport* transport, int8 version, int8 command, int payloadSize,
|
||||
ByteBuffer* payloadBuffer)
|
||||
@@ -27,9 +29,33 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class ContextImpl : public Context {
|
||||
public:
|
||||
ContextImpl() :
|
||||
_tr(new TransportRegistry()), _timer(new Timer("server thread",
|
||||
lowPriority)), _conf(new SystemConfigurationImpl()) {
|
||||
}
|
||||
virtual ~ContextImpl() {
|
||||
delete _tr;
|
||||
delete _timer;
|
||||
}
|
||||
virtual Timer* getTimer() { return _timer; }
|
||||
virtual TransportRegistry* getTransportRegistry() { return _tr; }
|
||||
virtual Channel* getChannel(epics::pvAccess::pvAccessID) { return 0; }
|
||||
virtual Transport* getSearchTransport() { return 0; }
|
||||
virtual Configuration* getConfiguration() { return _conf; }
|
||||
|
||||
private:
|
||||
TransportRegistry* _tr;
|
||||
Timer* _timer;
|
||||
Configuration* _conf;
|
||||
};
|
||||
|
||||
|
||||
void testBeaconEmitter()
|
||||
{
|
||||
DummyResponseHandler drh;
|
||||
ContextImpl ctx;
|
||||
DummyResponseHandler drh(&ctx);
|
||||
/* SOCKET mysocket;
|
||||
if ((mysocket = socket (AF_INET, SOCK_DGRAM, 0)) == -1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user