Serveur OPCUA générique
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définitions de type Macros
cta_slc_datapoint.h
Aller à la documentation de ce fichier.
1 /******************************************************************************
2  **
3  **
4  ** Copyright (C) LAPP. CNRS
5  **
6  ** Project: C++ OPCUA generique
7  **
8  ** Description:
9  **
10  ** Author : Panazol Jean Luc
11  ******************************************************************************/
12 
13 #ifndef CTA_SLC_DATAPOINT_H
14 #define CTA_SLC_DATAPOINT_H
15 
16 #include <list>
17 #include <string>
18 #include <libxml/parser.h>
19 #include <libxml/xpath.h>
20 #include "cta_ua_nodemanager.h"
21 #include "cta_slc_objectUA.h"
22 
23 #include <vector>
24 
25 namespace CTA_Slc {
26 class XmlManager;
27 }
28 namespace CTA_Slc_Dict {
29 class SimpleDevice;
30 class Datapoint;
31 class SimpleDatapoint;
32 class CompoundDatapoint;
33 class OPCUA;
34 class Config;
35 class Device;
36 class CompoundDevice;
37 class Variable;
38 class Method;
39 class Param;
40 class Argument;
41 class Trame;
42 class FrameStructure;
43 class Plugins;
44 class Alarm;
45 }
46 
47 namespace CTA_Hardware {
48 class HardWareInterface;
49 }
50 namespace CTA_UA {
51 class NodeManagerCTA;
52 class ObjectUA;
53 class ControllerObject;
54 }
55 
56 namespace CTA_Slc_Dict {
57 struct AlarmStruct {
59  int alarmHigh;
60  std::string alarmHighMessage;
64  int alarmLow;
65  std::string alarmLowMessage;
68  std::string name;
71 };
72 
73 class Datapoint: public ElementBase {
74 
75 public:
77  ElementBase() {
78  }
79  ;
80 };
81 
83 public:
84  CompoundDatapoint(xmlNodePtr noeud, std::string parent,
85  std::string dataIdDescriptorRef, vector<int>nb);
86  //std::string dataIdDescriptorRef, int nb);
88  void parse();
89  void createNodes();
90  void createNodes(CTA_Hardware::HardWareInterface *hardwareComm);
91  void init();
92 private:
93  std::list<Trame*> m_trame;
94 
95 };
96 
97 class SimpleDatapoint: public Datapoint {
98 public:
99  SimpleDatapoint(xmlNodePtr noeud, std::string parent,
100  std::string m_dataIdDescriptorRef, vector<int> nb);
102  void createNodes();
103  void createNodes(CTA_Hardware::HardWareInterface *hardwareComm);
104  void createNodes2(std::string ch, std::string ch2, int i);
105  int find(std::string id, std::string *val_id);
106  int getIdCollector(std::string *dp, std::string *id);
107 
108  struct myStruct {
109  int pos;
110  int nb;
111  std::string name;
112  };
113  int getSizeFrameElement();
115  void modifNodesTrame2(int accesLevel);
116  void init();
117 
118 private:
119  std::string m_interface;
120  std::string m_endDelimiter;
121  std::list<Attribut*> m_attribut2;
122  std::list<Variable*> m_variable;
123  std::list<Method*> m_method;
124  std::list<std::string> m_plistHistory;
125  std::list<std::string> m_plistTrame;
126  std::list<std::string> m_plistSubTrame;
127  std::list<FrameStructure*> m_frameStructure;
128  std::vector<myStruct> tabFinal2;
129  int m_flagTrame;
130  std::string m_readIdCollector;
131  int m_event;
132  std::map<std::string, std::string> m_eventList;
133  int m_alarm;
134  Alarm *my_alarm;
135  AlarmStruct* m_alarmStruct;
136  std::string m_eventMessage;
137  std::string m_mode;
138  int flag;
139  std::string m_id;
140  CTA_UA::ControllerObject *pControler;
141  int m_arraySize;
142  std::string m_value;
143  int m_writeMask;
144  int m_AccesLevel;
145  std::string m_description;
146  std::string m_DeviceCommandOutput;
147  std::string m_DeviceCommand;
148  std::string m_type;
149  OpcUa::BaseVariableType* pVariableType;
150  OpcUa::HistoricalDataConfigurationType* pHAConfig;
151 };
152 
153 } // end namespace
154 #endif // CTA_SLC_DATAPOINT_H