Commit 4d79bd56 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Add scheduler interface - WIP

parent 186a0443
#ifndef INCLUDE_WATCHER_ITA_SIMULATION_SCHEDULER_ROOM_ACOUSTICS_SCHEDULER_INTERFACE
#define INCLUDE_WATCHER_ITA_SIMULATION_SCHEDULER_ROOM_ACOUSTICS_SCHEDULER_INTERFACE
// std includes
#include <memory>
// API includes
#include <ITA/simulation_scheduler/definitions.h>
// simulation scheduler includes
#include <ITA/simulation_scheduler/update_message.h>
#include <ITA/simulation_scheduler/types.h>
#include "../src/ITA/simulation_scheduler/utils.h"
// Vista include
#include <VistaAspects/VistaPropertyList.h>
namespace ITA
{
namespace simulation_scheduler
{
namespace room_acoustics
{
class IResultHandler;
///
/// \brief
///
class ITA_SIMULATION_SCHEDULER_API ISchedulerInterface
{
public:
///
/// \brief Returns the default Configuration for the RemoteScheduler.
/// \return the default config for the RemoteScheduler.
/// \todo move this function to the remote scheduler when it exists.
///
static VistaPropertyList getDefaultRemoteSchedulerConfig ( )
{
auto config = VistaPropertyList ( );
config.SetValue ( "IPAddress", "localhost" );
config.SetValue ( "Port", 1000 );
config.SetValue ( "FieldOfDuty", as_integer ( room_acoustics::FieldOfDuty::directSound ) );
return config;
}
///
/// \brief Post a new update to the scheduler.
///
/// \note This method takes ownership of the update.
/// \param pUpdateMessage the new update for the scheduler.
///
virtual void postUpdate ( std::unique_ptr<IUpdateMessage> pUpdateMessage ) = 0;
///
/// \brief Attach a IResultHandler to the scheduler.
/// \param pResultHandler the new IResultHandler.
/// \todo Maybe use shared_ptr ... resultHandler have to support make shared form this ... and consequently have to be shared_ptr. This would also mean ,that the scheduler own the handler.
///
virtual void attachResultHandler ( IResultHandler* pResultHandler ) = 0;
///
/// \brief Detach a IResultHandler from the scheduler.
/// \param pResultHandler the IResultHandler to detach.
///
virtual void detachResultHandler ( IResultHandler* pResultHandler ) = 0;
};
} // namespace room_acoustics
} // namespace simulation_scheduler
} // namespace ITA
#endif // INCLUDE_WATCHER_ITA_SIMULATION_SCHEDULER_ROOM_ACOUSTICS_SCHEDULER_INTERFACE
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment