1#ifndef _DRAMA2_GITPATH_INC
2#define _DRAMA2_GITPATH_INC
69 static const char *
table[] = {
"SOFT",
"FULL",
"HARD",
186 const std::string &
simArg);
262 const std::string &name,
263 const std::string &
host =
"",
264 const std::string &
file =
"");
307 std::string *
simArg=
nullptr)
const;
418 virtual void Exit(thread::TMessHandler *
action);
465 std::string *
devType=
nullptr)
const ;
Path()
Construct a null object.
Definition path.hh:996
A Class which provides access to DRAMA's message sending facilities.
Definition path.hh:689
virtual void SendInitialise(thread::TMessHandler *action)
Send the INTIIALISE action to the task.
virtual void DoGetPath(thread::TMessHandler *action)
Get the path to the task, loading if needed.
bool _havePath
Set true when we have the path.
Definition gitpath.hh:164
bool _pollDont
If true, don't poll
Definition gitpath.hh:156
ResetType _resetMode
The mode for the next reset.
Definition gitpath.hh:155
virtual void SendSimLevel(thread::TMessHandler *action, const std::string &simLevel, float timeBase, const std::string &simArg)
Send the SIMULATE_LEVEL action to the task.
Path(std::weak_ptr< drama::Task > theTask, const std::string &name, const std::string &host="", const std::string &file="")
Construct a drama::git::Path object.
virtual void SetFailed()
Set the task to failed state.
Definition gitpath.hh:466
virtual void SendExit(thread::TMessHandler *action)
Send the EXIT action to the task.
std::string _simLevel
Simulate level
Definition gitpath.hh:159
virtual void Initialise(thread::TMessHandler *action, bool ignoreInitParam=false)
Perform the complete initialisation sequence for a GIT task.
bool _initialised
If task is found running, will have the value of the INITIALISED parameter.
Definition gitpath.hh:172
bool _simSent
Has simulation value been sent?
Definition gitpath.hh:162
bool _amExiting
Set true when the EXIT message is sent.
Definition gitpath.hh:167
virtual void SendReset(thread::TMessHandler *action, ResetType &mode)
Send the RESET action to the task.
float _simTimeBase
Timebase for simulation
Definition gitpath.hh:161
void SetPollMaxAttempts(unsigned int n)
Set the maximum number of poll restarts.
Definition gitpath.hh:419
std::string _taskDescr
From ENQ_DEV_DESCR parameter.
Definition gitpath.hh:184
virtual void GetVerInfo(thread::TMessHandler *action, bool ignoreInitParam)
Get the tasks version information.
virtual ~Path()
Destructor.
Definition gitpath.hh:458
bool _firstTime
Set true for first init attempt.
Definition gitpath.hh:170
bool _resetting
Set true if we are resetting.
Definition gitpath.hh:169
bool _failed
Task has failed in some way and should be reset on Initiailse()
Definition gitpath.hh:165
void SetResetMode(ResetEnum mode)
Set the reset mode.
Definition gitpath.hh:345
ResetEnum GetResetMode() const
Return the reset mode.
Definition gitpath.hh:352
bool _pollCanceling
Polling is being canceled.
Definition gitpath.hh:157
unsigned _pollMaxAttempts
Maximum attempts at polling.
Definition gitpath.hh:158
virtual void Report(thread::TMessHandler *action)
Dump details using MsgOut.
std::string _simArg
Extra simulation level argument.
Definition gitpath.hh:160
virtual void GetVerInfo(std::string *verNum, std::string *verDate=nullptr, std::string *taskDescr=nullptr, std::string *devType=nullptr) const
Return the task version and device info values.
std::string _verDate
From ENQ_VER_DATE parameter.
Definition gitpath.hh:182
virtual void Exit(thread::TMessHandler *action)
Cause a GIT task to exit.
virtual void GetSimulation(bool *beenSet, std::string *value, float *timeBase=nullptr, std::string *simArg=nullptr) const
Get simulation details.
bool _isControlTask
True if this task is itself a control task, which will result in a RESET RECOVER being sent in cases ...
Definition gitpath.hh:176
virtual void PollCancel(thread::TMessHandler *action)
Cancel POLLing in the GIT task
virtual void Poll(thread::TMessHandler *action)
Send POLL to the GIT task
std::string _devType
From ENQ_DEV_TYPE parameter.
Definition gitpath.hh:185
virtual void SetSimulation(const std::string &value, const float timeBase=1.0, const std::string &simArg="")
Set simulation and timebase
virtual bool RemoteNetStart(const std::string &node, thread::TMessHandler *action)
Start the DRAMA networking on a remote machine.
std::string _verNum
From ENQ_VER_NUM parameter.
Definition gitpath.hh:183
void SetIsAControlTask()
Tell git::Path that this task is a control task.
Definition gitpath.hh:532
A path object for communicating with DRAMA GIT tasks.
Definition gitpath.hh:147
A type used to represent the current reset mode.
Definition gitpath.hh:112
An interface for the lookup class template arguments to drama::gitarg::Enum.
Definition gitarg.hh:186
Enum()
Default contructor for the object.
Definition gitarg.hh:274
A class which reads Enumerated values from a SDS argument structures.
Definition gitarg.hh:245
This interface class must be implemented by classes which have threads waiting for messages.
Definition thread.hh:308
DRAMA 2 main include file.
ResetEnum
This enum contains the possible reset types.
Definition gitpath.hh:82
@ Full
A full reset, but don't necessarily power cycle H/W.
Definition gitpath.hh:84
@ Recover
Only reset if last operation failed.
Definition gitpath.hh:86
@ Invalid
Used by gitarg::Enum to indicate an invalid mode.
Definition gitpath.hh:87
@ Hard
A full reset with power cycling of hardware.
Definition gitpath.hh:85
@ Soft
A soft reset - tidy up software rather then hardware.
Definition gitpath.hh:83
void CreateRunDramaTask()
Create and run a DRAMA task, with standard exception handling.
Definition task.hh:1322
@ Exit
Loaded task exited message received.
The drama namespace contains all the classes, types etc of the DRAMA 2 implementation.
Definition drama.hh:93