FACT++  1.0
RemoteControl< T > Class Template Reference

Implements a remote control based on a Readline class for the dim network. More...

#include <RemoteControl.h>

+ Inheritance diagram for RemoteControl< T >:
+ Collaboration diagram for RemoteControl< T >:

Classes

struct  EventInfo
 

Public Member Functions

 RemoteControl (const char *name)
 
bool PrintGeneralHelp ()
 
bool PrintCommands ()
 
bool Process (const std::string &str)
 
void SetReceiver (StateMachineDimControl &imp)
 
- Public Member Functions inherited from InterpreterV8
 InterpreterV8 ()
 
virtual ~InterpreterV8 ()
 
std::vector< std::string > JsGetCommandList (const char *, int) const
 
int JsHandleInterrupt (const EventImp &)
 
void JsHandleEvent (const EventImp &, uint64_t, const std::string &)
 
void JsHandleState (const std::string &, const State &)
 
void AddFormatToGlobal ()
 
bool JsRun (const std::string &, const std::map< std::string, std::string > &=std::map< std::string, std::string >())
 

Protected Member Functions

void SetSection (int s)
 
int Write (const Time &time, const std::string &txt, int qos=MessageImp::kMessage)
 
void exitHandler (int code)
 
char ** Completion (const char *text, int start, int)
 
void EventHook (bool newline)
 
bool HasServer (const std::string &server)
 
vector< string > GetServerList () const
 
vector< string > GetCommandList (const string &server) const
 
vector< string > GetCommandList () const
 
int PrintStates (std::ostream &out, const std::string &serv="") const
 
int PrintDescription (std::ostream &out, bool iscmd, const std::string &serv="", const std::string &service="") const
 
bool SendDimCommand (ostream &out, const std::string &server, const std::string &str, bool do_throw=false)
 
void JsLoad (const std::string &)
 
void JsStart (const std::string &)
 
void JsEnd (const std::string &)
 
bool JsSend (const std::string &str)
 
void JsOut (const std::string &msg)
 
void JsWarn (const std::string &msg)
 
void JsResult (const std::string &msg)
 
void JsPrint (const std::string &msg)
 
void JsAlarm (const std::string &msg)
 
void JsException (const std::string &str)
 
bool JsHasState (int s) const
 
bool JsHasState (const string &n) const
 
bool JsSetState (int s)
 
int JsGetState (const string &n) const
 
vector< StateJsGetStates (const string &server)
 
set< ServiceJsGetServices ()
 
vector< DescriptionJsGetDescription (const string &server)
 
State JsGetCurrentState () const
 
State JsState (const std::string &server)
 
bool JsNewState (int s, const string &n, const string &c)
 
int JsWait (const string &server, int32_t state, uint32_t ms)
 
vector< DescriptionJsDescription (const string &service)
 
pair< uint64_t, EventImp * > JsGetEvent (const std::string &service)
 
int Handle (const EventImp &evt, const string &service)
 
void * JsSubscribe (const std::string &service)
 
bool JsUnsubscribe (const std::string &service)
 
void UnsubscribeAll ()
 
- Protected Member Functions inherited from RemoteControlImp
 RemoteControlImp (std::ostream &out, std::ostream &in)
 The server to which we currently cd'ed. More...
 
virtual ~RemoteControlImp ()
 
bool ProcessCommand (const std::string &str, bool change=true)
 

Static Protected Member Functions

static void append (std::string &str)
 
static void chop (std::string &str)
 

Protected Attributes

StateMachineDimControlfImp
 
map< string, EventInfofInfo
 
std::mutex fMutex
 
- Protected Attributes inherited from RemoteControlImp
std::ostream & lin
 
std::ostream & lout
 Output stream for local synchrounous output. More...
 
std::string fCurrentServer
 Output stream for local synchrounous output. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from InterpreterV8
static void JsStop ()
 

Detailed Description

template<class T>
class RemoteControl< T >

Implements a remote control based on a Readline class for the dim network.

This template implements all functions which overwrite any function from the Readline class. Since several derivatives of the Readline class implement different kind of Readline access, this class can be derived by any of them due to its template argument. However, the normal case will be deriving it from either Console or Shell.

Template Parameters
TThe base class for RemoteControl. Either Readlien or a class deriving from it. This is usually either Console or Shell.

Definition at line 67 of file RemoteControl.h.


The documentation for this class was generated from the following file: