Commit f4498d66 authored by Martin Vala's avatar Martin Vala

Init for TaskExecutor framework

parent a568cf11
Pipeline #1442 failed with stage
in 5 minutes and 23 seconds
#include "TaskExecutor.hh"
namespace Salsa
{
TaskExecutor::TaskExecutor()
: Object()
{
///
/// Constructor
///
}
TaskExecutor::~TaskExecutor()
{
///
/// Destructor
///
}
} // namespace Salsa
#pragma once
#include <Object.hh>
namespace Salsa
{
///
/// \class TaskExecutor
///
/// \brief Base TaskExecutor class
/// \author Matej Fedor <matej.fedor.mf@gmail.com>
/// \author Martin Vala <mvala@cern.ch>
/// \author Branislav Beke <beke.public@yandex.com>
///
class TaskExecutor : public Object
{
public:
TaskExecutor();
virtual ~TaskExecutor();
virtual bool init() = 0;
virtual bool assigne() = 0;
virtual bool run() = 0;
virtual bool exit() = 0;
};
} // namespace Salsa
#include "TaskExecutorFake.hh"
namespace Salsa
{
TaskExecutorFake::TaskExecutorFake()
: TaskExecutor()
{
///
/// Constructor
///
}
TaskExecutorFake::~TaskExecutorFake()
{
///
/// Destructor
///
}
} // namespace Salsa
#pragma once
#include <TaskExecutor.hh>
namespace Salsa
{
///
/// \class TaskExecutorFake
///
/// \brief TaskExecutorFake class
/// \author Matej Fedor <matej.fedor.mf@gmail.com>
/// \author Martin Vala <mvala@cern.ch>
/// \author Branislav Beke <beke.public@yandex.com>
///
class TaskExecutorFake : public TaskExecutor
{
public:
TaskExecutorFake();
virtual ~TaskExecutorFake();
};
} // namespace Salsa
......@@ -2,8 +2,9 @@
namespace Salsa
{
TaskState::TaskState()
TaskState::TaskState(TaskExecutor * te)
: Object()
, mTaskExecutor(te)
{
///
/// Constructor
......@@ -15,6 +16,7 @@ TaskState::~TaskState()
/// Destructor
///
delete mTask;
delete mTaskExecutor;
}
void TaskState::id(uint32_t id)
......
#pragma once
#include <Object.hh>
#include <TaskExecutor.hh>
#include <TaskInfo.pb.h>
namespace Salsa
......@@ -27,7 +27,7 @@ public:
all
};
TaskState();
TaskState(TaskExecutor * te = nullptr);
virtual ~TaskState();
void id(uint32_t id);
......@@ -42,10 +42,11 @@ public:
void killTask();
protected:
uint32_t mId = 0; ///< ID of task state
State mState = idle; ///< Status of actor
TaskInfo * mTask = nullptr; ///< TaskInfo held by said actor
uint32_t mPID = 0; ///< Task PID
uint32_t mId = 0; ///< ID of task state
State mState = idle; ///< Status of actor
TaskInfo * mTask = nullptr; ///< TaskInfo held by said actor
uint32_t mPID = 0; ///< Task PID
TaskExecutor * mTaskExecutor = nullptr; ///< Task Executor
};
} // namespace Salsa
#include "TaskExecutorForkZmq.hh"
namespace Salsa
{
TaskExecutorForkZmq::TaskExecutorForkZmq()
: TaskExecutor()
{
///
/// Constructor
///
}
TaskExecutorForkZmq::~TaskExecutorForkZmq()
{
///
/// Destructor
///
}
} // namespace Salsa
#pragma once
#include <TaskExecutor.hh>
namespace Salsa
{
///
/// \class TaskExecutorForkZmq
///
/// \brief TaskExecutorForkZmq class
/// \author Matej Fedor <matej.fedor.mf@gmail.com>
/// \author Martin Vala <mvala@cern.ch>
/// \author Branislav Beke <beke.public@yandex.com>
///
class TaskExecutorForkZmq : public TaskExecutor
{
public:
TaskExecutorForkZmq();
virtual ~TaskExecutorForkZmq();
};
} // namespace Salsa
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