Skip to content

Commit bd93132

Browse files
committed
🚿 Modify FifoCheckpointCommunicator ctor:
The ctor now takes the FIFO file path from its signature.
1 parent dc2d058 commit bd93132

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/application/helper/fifo_checkpoint_communicator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ namespace application
66
{
77
namespace helper
88
{
9-
const std::string FifoCheckpointCommunicator::cFifoPath{"/tmp/checkpoint_communicator"};
109
const std::size_t FifoCheckpointCommunicator::cBufferSize{sizeof(uint32_t)};
1110

1211
FifoCheckpointCommunicator::FifoCheckpointCommunicator(
13-
AsyncBsdSocketLib::Poller *poller) : mPoller{poller},
14-
mClient(cFifoPath),
15-
mServer(cFifoPath)
12+
AsyncBsdSocketLib::Poller *poller,
13+
std::string fifoPath) : mPoller{poller},
14+
mClient(fifoPath),
15+
mServer(fifoPath)
1616
{
1717
bool _succeed = mServer.TrySetup();
1818
if (!_succeed)

src/application/helper/fifo_checkpoint_communicator.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ namespace application
1616
class FifoCheckpointCommunicator : public ara::phm::CheckpointCommunicator
1717
{
1818
private:
19-
static const std::string cFifoPath;
2019
static const std::size_t cBufferSize;
2120

2221
AsyncBsdSocketLib::Poller *mPoller;
@@ -30,9 +29,11 @@ namespace application
3029
public:
3130
/// @brief Constructor
3231
/// @param poller Master poller
32+
/// @param fifoPath FIFO file path
3333
/// @throws std::runtime_error Thrown when the FIFO communication setup failed
34-
explicit FifoCheckpointCommunicator(
35-
AsyncBsdSocketLib::Poller *poller);
34+
FifoCheckpointCommunicator(
35+
AsyncBsdSocketLib::Poller *poller,
36+
std::string fifoPath);
3637

3738
~FifoCheckpointCommunicator() override;
3839

0 commit comments

Comments
 (0)