9 #ifndef lgrInterface_H_
10 #define lgrInterface_H_
28 class DtLgrCommandHandler;
47 virtual bool update();
51 void disconnectFromDispatcher();
54 void reconnectToDispatcher();
59 virtual void sendCommand(
const DtCommand&)
const;
73 typedef std::map<DtCommand,DtResponseFunctorSP,std::less<DtCommand> >
DtResponseMap;
85 template <
typename CommandHandlerType>
88 std::shared_ptr<DtLgrCommandHandler> commandHandler = \
89 logger.getCommandHandler(CommandHandlerType::Factory::theCommandType);
93 commandHandler->lock();
94 std::shared_ptr<CommandHandlerType> subCommandHandler = \
95 std::dynamic_pointer_cast<CommandHandlerType>(commandHandler);
98 typename CommandHandlerType::Interface* commandInterface = \
99 CommandHandlerType::Interface::createNonThreadsafe(logger,
102 commandHandler->unlock();
103 return commandInterface;
105 commandHandler->unlock();
The logger command which contains the command type and its parameters.
Definition: lgrCommand.h:110
The base class for command interface which allows an interface to send and receive commands...
Definition: lgrInterface.h:33
#define DT_VIRTUAL_CTR(CLASS_NAME, ARG_TYPES_LIST)
Declare a Virtual Constructor Create using DT_VIRTUAL_CTR(CLASS_NAME,ARG_TYPES_LIST) Where CLASS_NAME...
Definition: virtualConstructor.h:34
static CommandHandlerType::Interface * createInterface(DtLogger &logger)
Create interface templated function.
Definition: lgrInterface.h:86
Contains DT_VIRTUAL_CTR DT_VIRTUAL_CTR_DEFAULTS DT_VIRTUAL_COPY_ASSIGN DT_VIRTUAL_BASE_CTR DT_PURE_VI...
Contains MAKLogger::DtLgrCommandQueue and MAKLogger::DtResponseQueue and MAKLogger::DtResponseQueueSP...
std::map< DtCommand, DtResponseFunctorSP, std::less< DtCommand > > DtResponseMap
Callback types.
Definition: lgrInterface.h:73
DtCommandDispatcherSP myDispatcher
A shared pointer to the interface's dispatcher.
Definition: lgrInterface.h:80
std::shared_ptr< DtResponseFunctor > DtResponseFunctorSP
Definition: lgrCommandFunctor.h:50
std::shared_ptr< DtCommandDispatcher > DtCommandDispatcherSP
Definition: lgrCommandDispatcher.h:101
Contains MAKLogger::DtLgrCommandType and MAKLogger::DtCommand classes.
#define DT_DLL_LGRCORE
Definition: lgrCore.h:19
Contains MAKLogger::DtCommandFunctor, MAKLogger::DtResponseFunctor, MAKLogger::DtLgrCommandHandlerFun...
std::shared_ptr< DtSharedQueue< DtResponse > > DtResponseQueueSP
Definition: lgrCommandQueue.h:27
DtResponseMap myResponseMap
Definition: lgrInterface.h:74
Contains MAKLogger::DtLogger class.
std::shared_ptr< const DtCommand > DtResponse
Definition: lgrCommand.h:175
DtLogger provides the core system structure and controls the execution model for the underlying objec...
Definition: logger.h:35
DtResponseQueueSP myResponseQueue
The queue which stores commands sent to the interface from the dispatcher.
Definition: lgrInterface.h:77
Contains MAKLogger::DtCommandDispatcher class.
Contains MAKLogger::DtLgrCommandHandler class.
Contains lgrCore library definitions.