mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Convert factory methods to return smart ptrs
- Convert factory methods to return smart ptrs. - Refactor state machine to use same thread for user states. - Remove unused includes and dependencies, use std.
This commit is contained in:
parent
92779e7392
commit
27b2243362
|
@ -15,7 +15,7 @@ void addCustomOptions(bpo::options_description& /*options*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FairMQDevicePtr getDevice(const FairMQProgOptions& config)
|
FairMQDevicePtr getDevice(const FairMQProgOptions& /*config*/)
|
||||||
{
|
{
|
||||||
return new FairMQExample3Processor();
|
return new FairMQExample3Processor();
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ void FairMQExample6Sampler::InitTask()
|
||||||
|
|
||||||
void FairMQExample6Sampler::Run()
|
void FairMQExample6Sampler::Run()
|
||||||
{
|
{
|
||||||
unique_ptr<FairMQPoller> poller(fTransportFactory->CreatePoller(fChannels, { "data", "broadcast" }));
|
FairMQPollerPtr poller(fTransportFactory->CreatePoller(fChannels, { "data", "broadcast" }));
|
||||||
|
|
||||||
while (CheckCurrentState(RUNNING))
|
while (CheckCurrentState(RUNNING))
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
{
|
||||||
|
"fairMQOptions": {
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"id": "sampler1",
|
||||||
|
"channels": [
|
||||||
|
{
|
||||||
|
"name": "data-out",
|
||||||
|
"sockets": [
|
||||||
|
{
|
||||||
|
"type": "push",
|
||||||
|
"method": "connect",
|
||||||
|
"address": "tcp://localhost:5555,tcp://localhost:5556",
|
||||||
|
"sndBufSize": 1000,
|
||||||
|
"rcvBufSize": 1000,
|
||||||
|
"rateLogging": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sink1",
|
||||||
|
"channels": [
|
||||||
|
{
|
||||||
|
"name": "data-in",
|
||||||
|
"sockets": [
|
||||||
|
{
|
||||||
|
"type": "pull",
|
||||||
|
"method": "bind",
|
||||||
|
"address": "tcp://*:5555",
|
||||||
|
"sndBufSize": 1000,
|
||||||
|
"rcvBufSize": 1000,
|
||||||
|
"rateLogging": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sink2",
|
||||||
|
"channels": [
|
||||||
|
{
|
||||||
|
"name": "data-in",
|
||||||
|
"sockets": [
|
||||||
|
{
|
||||||
|
"type": "pull",
|
||||||
|
"method": "connect",
|
||||||
|
"address": "@tcp://*:5556",
|
||||||
|
"sndBufSize": 1000,
|
||||||
|
"rcvBufSize": 1000,
|
||||||
|
"rateLogging": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
{
|
{
|
||||||
"type": "push",
|
"type": "push",
|
||||||
"method": "connect",
|
"method": "connect",
|
||||||
"address": "tcp://localhost:5555,tcp://localhost:5556",
|
"address": "tcp://localhost:5555",
|
||||||
"sndBufSize": 1000,
|
"sndBufSize": 1000,
|
||||||
"rcvBufSize": 1000,
|
"rcvBufSize": 1000,
|
||||||
"rateLogging": 0
|
"rateLogging": 0
|
||||||
|
@ -36,24 +36,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sink2",
|
|
||||||
"channels": [
|
|
||||||
{
|
|
||||||
"name": "data-in",
|
|
||||||
"sockets": [
|
|
||||||
{
|
|
||||||
"type": "pull",
|
|
||||||
"method": "connect",
|
|
||||||
"address": "@tcp://*:5556",
|
|
||||||
"sndBufSize": 1000,
|
|
||||||
"rcvBufSize": 1000,
|
|
||||||
"rateLogging": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user