Serveur OPCUA générique
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définitions de type Macros
cta_ua_clientmanager.h
Aller à la documentation de ce fichier.
1 #ifndef __CTAUACLIENTMANAGER_H__
2 #define __CTAUACLIENTMANAGER_H__
3 
4 #include "uabasenodes.h"
5 #include "uathread.h"
6 #include "servermanager.h"
7 #include "string"
8 #include <vector>
9 #include <list>
10 
11 #include "../uaclient/uasession.h"
12 #include "cta_ua_nodemanager.h"
13 #include "cta_ua_controlunit.h"
14 
15 namespace CTA_UA {
16 class NodeManagerCTA;
17 class ControllerObject;
18 struct myStruct;
19 }
20 
21 namespace CTA_Slc {
22 class XmlManager;
23 }
24 
25 namespace CTA_UA {
26 
28  UA_DISABLE_COPY(ClientManager);
29 
30 public:
32  static ClientManager *getInstance();
33  ClientManager();
34  virtual ~ClientManager();
35  void setElement(std::string element);
36  UaStatus connect(UaString& sUrl,
37  UaClientSdk::SessionSecurityInfo& sessionSecurityInfo);
38 
39  // Start up trame manager for internal monitoring
40  void startUp(ServerManager* pServerManager);
41 
42  // Shut down trame manager to stop internal monitoring
43  void shutDown();
44 
45  // Add a variable for traming- must be called before startUp
46  int addClient(std::string name);
47  int addClientNode(std::string name);
48  UaStatus callMethod(std::string command, int clientId);
49  UaStatus callMethod(std::string command, UaClientSdk::CallIn &callRequest,
50  int clientId);
51  UaStatus read(std::string command, int clientId);
52  void subscribe(int indexClient);
53 
54 private:
55  CallbackControlUnit* g_pCallback;
56 
57  // List of variable of trame
58  std::list<std::string> listClient;
59  std::list<std::string> listClientNode;
60 
61  // Internal session used for monitoring
62  Session* m_pSession;
63 
64  // Internal session used for monitoring
65  std::vector<UaClientSdk::UaSession*> m_pSessionTab;
66  std::string m_dataIdDescriptorRef;
67 
68  CTA_Slc::XmlManager *m_pAnalyserManager;
69 
70  // Server manager used for internal monitoring
71  ServerManager* m_pServerManager;
72  ControllerObject *m_pControler;
73 };
74 
75 } // end namespace
76 #endif
77