Serveur OPCUA générique
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définitions de type Macros
hardware_none.h
Aller à la documentation de ce fichier.
1 /******************************************************************************
2 
3  ******************************************************************************/
4 #ifndef __HARDWARE_NONE_H__
5 #define __HARDWARE_NONE_H__
6 
7 #include "nodemanagerroot.h"
8 
9 #include "uabase.h"
10 #include "uastring.h"
11 #include "statuscode.h"
12 #include "uaarraytemplates.h"
13 #include "uathread.h"
14 #include "nodemanagerbase.h"
15 #include "string"
16 
17 namespace CTA_UA {
18 class NodeManagerCTA;
19 class ControllerObject;
20 class HardWareInterface;
21 }
22 
23 namespace CTA_Hardware {
24 class HardWareInterface;
25 }
26 
27 class PluginsLoader;
28 class DataSenderReceiver;
29 namespace CTA_Slc {
30 class NodeManagerSlc;
31 class XmlManager;
32 }
33 namespace CTA_Slc_Dict {
34 class SimpleDevice;
35 }
36 
37 namespace CTA_Hardware {
38 
40 public:
43  int open();
44  int close();
45  int init(std::string name);
46  void traite(std::string value);
47  void getId(std::string *id1, std::string *id2);
48 
49  void write(std::string cmd);
50  int cmd(std::string value, std::string *retValue);
51  int set(std::string value);
52  int set(std::string value, std::vector<Byte> res);
53  int set(std::string value, std::vector<short int> res);
54  int set(std::string value, std::vector<int> res);
55  int set(std::string value, std::vector<long> res);
56  int set(std::string value, std::vector<float> res);
57 
58  int get(std::string command, std::vector<Byte> *res);
59  int get(std::string command, std::vector<short int> *res);
60  int get(std::string command, std::vector<int> *res);
61  int get(std::string command, std::vector<long> *res);
62  int get(std::string command, std::vector<float> *res);
63 
64  int get(std::string command, std::string *result);
65 
66  int read();
67 
68 private:
69  int setTrame(std::string value, std::string *retValue);
70  int getTrame(std::string value, std::string *retValue);
71  //int traiteTrame(std::string *bloc, UaVariant *value2, int *type);
72  int write(std::string ip, int port, char *sendBuffer);
73 
74 public:
75  OpcUa_Int value;
76  //int socketIdCtrl;
77  //referenceIP_FrontEnd m_referenceIP_FrontEnd;
78  //referenceFE_Trame m_referenceFE_Trame;
79  //referenceFE_Trame m_referenceFE_Trame2;
83 
84 private:
85  int m_timeOut_sec;
86  int m_timeOut_usec;
87  std::string m_pullPush;
88  std::string m_name;
89  int m_header_Size;
90  std::string m_data_Type;
91  std::string m_headerId;
92  int m_footer_Size;
93  int m_id1_Size;
94  int m_id2_Size;
95  std::string m_id1;
96  std::string m_id2;
97  UaVariant value2;
98  char recvBuffer[8192];
99  int sizeReceived;
100  std::string m_full;
101  int m_isTrame;
102  int m_manageInterface;
103  CTA_Slc::XmlManager *m_pAnalyserManager;
104 };
105 }
106 #endif