Skip to content

Commit bdbc40a

Browse files
Added a method to retrieve the executor name
1 parent 984d265 commit bdbc40a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

include/la/avdecc/controller/avdeccController.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,8 @@ class Controller : public la::avdecc::utils::Subject<Controller, std::recursive_
682682
virtual std::tuple<avdecc::jsonSerializer::DeserializationError, std::string> createVirtualEntityFromEntityModelFile(std::string const& filePath, model::VirtualEntityBuilder* const builder, bool const isBinaryFormat = true) noexcept = 0;
683683

684684
/* Other helpful methods */
685+
/** Returns the name of the executor used by the controller */
686+
virtual std::string getExecutorName() const noexcept = 0;
685687
/** Re-enumerates the specified entity */
686688
virtual bool refreshEntity(UniqueIdentifier const entityID) noexcept = 0;
687689
/** Removes a Virtual Entity from the controller */

src/controller/avdeccControllerImpl.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ class ControllerImpl final : public Controller, private entity::controller::Dele
178178
virtual std::tuple<avdecc::jsonSerializer::DeserializationError, std::string> createVirtualEntityFromEntityModelFile(std::string const& filePath, model::VirtualEntityBuilder* const builder, bool const isBinaryFormat = true) noexcept override;
179179

180180
/* Other helpful methods */
181+
virtual std::string getExecutorName() const noexcept override;
181182
virtual bool refreshEntity(UniqueIdentifier const entityID) noexcept override;
182183
virtual bool unloadVirtualEntity(UniqueIdentifier const entityID) noexcept override;
183184

src/controller/avdeccControllerImplOverrides.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3532,7 +3532,7 @@ bool ControllerImpl::refreshEntity(UniqueIdentifier const entityID) noexcept
35323532

35333533
// Ready to remove using the network executor
35343534
auto& executor = ExecutorManager::getInstance();
3535-
auto const exName = _endStation->getProtocolInterface()->getExecutorName();
3535+
auto const exName = getExecutorName();
35363536
runJobOnExecutorAndWait(executor, exName,
35373537
[this, entityID, isVirtual]()
35383538
{
@@ -3559,6 +3559,11 @@ bool ControllerImpl::refreshEntity(UniqueIdentifier const entityID) noexcept
35593559
return true;
35603560
}
35613561

3562+
std::string ControllerImpl::getExecutorName() const noexcept
3563+
{
3564+
return _endStation->getProtocolInterface()->getExecutorName();
3565+
}
3566+
35623567
bool ControllerImpl::unloadVirtualEntity(UniqueIdentifier const entityID) noexcept
35633568
{
35643569
#ifndef ENABLE_AVDECC_FEATURE_JSON

0 commit comments

Comments
 (0)