fsfw/unittests/mock/cfdp/RemoteConfigTableMock.cpp

16 lines
473 B
C++
Raw Permalink Normal View History

#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;
}