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
c86bfd97a8
commit
e255372043
|
@ -15,7 +15,7 @@ void addCustomOptions(bpo::options_description& /*options*/)
|
|||
{
|
||||
}
|
||||
|
||||
FairMQDevicePtr getDevice(const FairMQProgOptions& config)
|
||||
FairMQDevicePtr getDevice(const FairMQProgOptions& /*config*/)
|
||||
{
|
||||
return new FairMQExample3Processor();
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ void FairMQExample6Sampler::InitTask()
|
|||
|
||||
void FairMQExample6Sampler::Run()
|
||||
{
|
||||
unique_ptr<FairMQPoller> poller(fTransportFactory->CreatePoller(fChannels, { "data", "broadcast" }));
|
||||
FairMQPollerPtr poller(fTransportFactory->CreatePoller(fChannels, { "data", "broadcast" }));
|
||||
|
||||
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",
|
||||
"method": "connect",
|
||||
"address": "tcp://localhost:5555,tcp://localhost:5556",
|
||||
"address": "tcp://localhost:5555",
|
||||
"sndBufSize": 1000,
|
||||
"rcvBufSize": 1000,
|
||||
"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