1 | #ifndef Processors_Processor_h
|
---|
2 | #define Processors_Processor_h
|
---|
3 |
|
---|
4 | // Boost headers.
|
---|
5 | #include <boost/scoped_ptr.hpp>
|
---|
6 | #include <boost/shared_ptr.hpp>
|
---|
7 | #include <boost/thread/thread.hpp>
|
---|
8 | #include <boost/thread/tss.hpp>
|
---|
9 | // Standard headers.
|
---|
10 | #include <string>
|
---|
11 |
|
---|
12 | #include "Processors/ProcessorsImpl.h"
|
---|
13 |
|
---|
14 | namespace UpperTestAdapter {
|
---|
15 |
|
---|
16 | namespace Processors {
|
---|
17 |
|
---|
18 | /*! Class Processor
|
---|
19 | * \brief This class implements the ProcessorsImpl interface which provides support for TriggerCommands message processing in local or remote mode.
|
---|
20 | */
|
---|
21 | class Processor : public ProcessorsImpl
|
---|
22 | {
|
---|
23 | //! Implementation of trigger command processing.
|
---|
24 | boost::scoped_ptr<Processors::TriggerCommandsStrategy> m_impl;
|
---|
25 | //! Asynchronous trigger command processing.
|
---|
26 | //boost::shared_ptr<boost::thread> m_asyncProcessing;
|
---|
27 |
|
---|
28 | public:
|
---|
29 | //! Processor.
|
---|
30 | /*! Default ctor.
|
---|
31 | */
|
---|
32 | Processor();
|
---|
33 | //! ~Processor.
|
---|
34 | /*! Default dtor.
|
---|
35 | */
|
---|
36 | ~Processor();
|
---|
37 |
|
---|
38 | public: // Public interface.
|
---|
39 | //! SetImplMode.
|
---|
40 | /*! Initialize the communication mode.
|
---|
41 | * @param strategy: .
|
---|
42 | */
|
---|
43 | void SetImplMode(TriggerCommandsStrategy::Strategies strategy);
|
---|
44 | //! SetEutIpInterface.
|
---|
45 | /*! Initialize the EUT IP interface.
|
---|
46 | * @param eutIface: .EUT IP interface.
|
---|
47 | */
|
---|
48 | void SetEutIpInterface(boost::shared_ptr<EutIPInterface> eutIface);
|
---|
49 | //! Process.
|
---|
50 | /*! Process the TriggerCommands message in synchronous mode.
|
---|
51 | * @param trigger: trigger command to execute
|
---|
52 | * @param params: Trigger parameters list
|
---|
53 | * @return FncRetCode value on success, -1 otherwise.
|
---|
54 | */
|
---|
55 | int Process(const std::string &trigger, const std::vector<std::string> ¶meterList);
|
---|
56 | //! BeginProcess.
|
---|
57 | /*! Process the TriggerCommands message in asynchronous mode.
|
---|
58 | * @param trigger: trigger command to execute
|
---|
59 | * @param params: Trigger parameters list
|
---|
60 | * @return true on success, false otherwise.
|
---|
61 | */
|
---|
62 | /*
|
---|
63 | bool BeginProcess(const std::string &trigger, const std::vector<std::string> ¶meterList);
|
---|
64 | bool ProcessCompleted();
|
---|
65 | bool Wait(int timeout);*/
|
---|
66 |
|
---|
67 | private:
|
---|
68 | //static void InvokeProcess();
|
---|
69 | };
|
---|
70 |
|
---|
71 | } } // namespaces
|
---|
72 |
|
---|
73 | #endif // Processors_Processor_h
|
---|
74 |
|
---|