2022-08-09 19:00:47 +02:00
|
|
|
#include "RemoteConfigTableMock.h"
|
|
|
|
|
2022-08-17 17:09:39 +02:00
|
|
|
void cfdp::RemoteConfigTableMock::addRemoteConfig(const cfdp::RemoteEntityCfg& cfg) {
|
|
|
|
remoteCfgTable.emplace(cfg.remoteId, cfg);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool cfdp::RemoteConfigTableMock::getRemoteCfg(const cfdp::EntityId& remoteId,
|
|
|
|
cfdp::RemoteEntityCfg** cfg) {
|
|
|
|
auto iter = remoteCfgTable.find(remoteId);
|
|
|
|
if (iter == remoteCfgTable.end()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
*cfg = &iter->second;
|
|
|
|
return true;
|
2022-08-09 19:00:47 +02:00
|
|
|
}
|