UniSet  2.6.0
IOController_i.idl
1 /*
2  * Copyright (c) 2015 Pavel Vainerman.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, version 2.1.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Lesser Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 // --------------------------------------------------------------------------
20 // --------------------------------------------------------------------------
21 #ifndef BaseIOController_i_IDL_
22 #define BaseIOController_i_IDL_
23 // --------------------------------------------------------------------------
24 #include "../UniSetTypes/UniSetTypes_i.idl"
25 #include "../UniSetTypes/UniSetManager_i.idl"
26 // --------------------------------------------------------------------------------------------------------------
27 
34 {
35  // исключения
36 
38  exception NameNotFound
39  {
40  string err;
41  };
42 
43  exception IOBadParam
44  {
45  string err;
46  };
47 
51  exception Undefined
52  {
53  };
54 
56  struct SensorInfo
57  {
60  };
61 
62  long getValue(in uniset::ObjectId sid) raises(NameNotFound,Undefined);
63  void setValue(in uniset::ObjectId sid, in long value,
64  in uniset::ObjectId sup_id) raises(NameNotFound,Undefined);
65 
66  // установка неопределённого состояния
67  // (пока работает только для аналоговых датчиков)
68  void setUndefinedState(in uniset::ObjectId sid, in boolean undefined, in uniset::ObjectId sup_id )
69  raises(NameNotFound);
70 
71  UniversalIO::IOType getIOType(in uniset::ObjectId sid) raises(NameNotFound);
72 
73  // --- Интерфейс для конфигурирования ---
74 
76  long getRawValue( in uniset::ObjectId sid ) raises(NameNotFound);
77 
79  {
80  long minRaw;
81  long maxRaw;
82  long minCal;
83  long maxCal;
84  short precision;
85  };
86 
87  void calibrate( in uniset::ObjectId sid, in CalibrateInfo ci, in uniset::ObjectId adminId ) raises(NameNotFound);
88  CalibrateInfo getCalibrateInfo( in uniset::ObjectId sid ) raises(NameNotFound);
89 
90  // --- Интерфес получения информации о всех датчиках ---
92  struct SensorIOInfo
93  {
94  long value;
95  boolean undefined;
96  boolean blocked;
97  long real_value;
98  UniversalIO::IOType type;
99  long priority;
101  long default_val;
103  unsigned long tv_sec;
104  unsigned long tv_nsec;
106  boolean dbignore;
107  };
108 
109  typedef sequence<SensorIOInfo> SensorInfoSeq;
110 
111  SensorInfoSeq getSensorsMap();
112  SensorIOInfo getSensorIOInfo( in uniset::ObjectId sid ) raises(NameNotFound);
113 
114  // -- Функции работы со списком датчиков --
115 
117  SensorInfoSeq getSensorSeq( in uniset::IDSeq lst );
118 
120  struct OutInfo
121  {
123  long value;
124  };
125 
126  typedef sequence<OutInfo> OutSeq;
127 
133  uniset::IDSeq setOutputSeq( in OutSeq lst, in uniset::ObjectId sup_id );
134 
135 
137  struct ShortIOInfo
138  {
139  long value;
140 
141  // могут быть проблеммы в 64bit-ных
142  unsigned long tv_sec;
143  unsigned long tv_nsec;
145  };
146 
147  ShortIOInfo getTimeChange( in uniset::ObjectId sid ) raises(NameNotFound);
148 
149 
151  struct ShortMap
152  {
153  UniversalIO::IOType type;
154  long value;
155  long id;
156  };
157 
158  typedef sequence<ShortMap> ShortMapSeq;
159 
160  ShortMapSeq getSensors();
161 };
162 
163 // --------------------------------------------------------------------------------------------------------------
174 {
176  exception BadRange
177  {
178  };
179 
183  void askSensor(in uniset::ObjectId sid, in uniset::ConsumerInfo ci, in UniversalIO::UIOCommand cmd ) raises(NameNotFound,IOBadParam);
184 
191  in uniset::ConsumerInfo ci,
192  in UniversalIO::UIOCommand cmd );
193 
194 
197  {
201  };
202 
204  {
206  long hilimit;
207  long lowlimit;
208  ThresholdState state;
209  unsigned long tv_sec;
210  unsigned long tv_nsec;
211  boolean invert;
212  };
213 
214  typedef sequence<ThresholdInfo> ThresholdInfoSeq;
215 
226  in long lowLimit, in long hiLimit, in boolean invert,
227  in UniversalIO::UIOCommand cmd ) raises(NameNotFound, IOBadParam, BadRange);
228 
229 
234 
236  {
238  UniversalIO::IOType type;
239  long value;
240  ThresholdInfoSeq tlist;
241  };
242 
243  typedef sequence<ThresholdList> ThresholdsListSeq;
244 
247 
249  ThresholdsListSeq getThresholdsList();
250 };
251 // --------------------------------------------------------------------------
252 #endif
uniset::ObjectId supplier
Definition: IOController_i.idl:105
unsigned long tv_nsec
Definition: IOController_i.idl:210
Базовый интерфейс для создания координаторов ввода/вывода
Definition: IOController_i.idl:33
ThresholdsListSeq getThresholdsList()
uniset::ObjectId supplier
Definition: IOController_i.idl:144
Definition: IOController_i.idl:92
short precision
Definition: IOController_i.idl:84
long default_val
Definition: IOController_i.idl:101
Definition: IOController_i.idl:235
void askSensor(in uniset::ObjectId sid, in uniset::ConsumerInfo ci, in UniversalIO::UIOCommand cmd)
long minCal
Definition: IOController_i.idl:82
unsigned long tv_sec
Definition: IOController_i.idl:209
Definition: IOController_i.idl:203
long ThresholdId
Definition: UniSetTypes_i.idl:31
Интерфейс менеджера объектов
Definition: UniSetManager_i.idl:40
unsigned long tv_nsec
Definition: IOController_i.idl:143
long maxRaw
Definition: IOController_i.idl:81
SensorInfoSeq getSensorSeq(in uniset::IDSeq lst)
UniversalIO::IOType type
Definition: IOController_i.idl:98
boolean undefined
Definition: IOController_i.idl:95
ThresholdState
Definition: IOController_i.idl:196
ThresholdInfo getThresholdInfo(in uniset::ObjectId sid, in uniset::ThresholdId tid)
Definition: UniSetTypes_i.idl:74
sequence< ObjectId > IDSeq
Definition: UniSetTypes_i.idl:82
long value
Definition: IOController_i.idl:123
unsigned long tv_sec
Definition: IOController_i.idl:103
Definition: IOController_i.idl:198
Definition: IOController_i.idl:151
uniset::ObjectId node
Definition: IOController_i.idl:59
boolean dbignore
Definition: IOController_i.idl:106
Definition: IOController_i.idl:43
Definition: IOController_i.idl:137
long minRaw
Definition: IOController_i.idl:80
long lowlimit
Definition: IOController_i.idl:207
Definition: IOController_i.idl:200
long priority
Definition: IOController_i.idl:99
uniset::IDSeq setOutputSeq(in OutSeq lst, in uniset::ObjectId sup_id)
boolean blocked
Definition: IOController_i.idl:96
Базовый интерфейс для создания процессов рассылающих сообщения об изменении состояния ...
Definition: IOController_i.idl:173
long maxCal
Definition: IOController_i.idl:83
SensorInfo si
Definition: IOController_i.idl:122
uniset::IDSeq askSensorsSeq(in uniset::IDSeq lst, in uniset::ConsumerInfo ci, in UniversalIO::UIOCommand cmd)
Definition: IOController_i.idl:78
long getRawValue(in uniset::ObjectId sid)
long hilimit
Definition: IOController_i.idl:206
Definition: IOController_i.idl:38
Definition: IOController_i.idl:176
long real_value
Definition: IOController_i.idl:97
Definition: IOController_i.idl:51
Definition: IOController_i.idl:120
Definition: IOController_i.idl:56
Definition: IOController_i.idl:199
ThresholdList getThresholds(in uniset::ObjectId sid)
boolean invert
Definition: IOController_i.idl:211
CalibrateInfo ci
Definition: IOController_i.idl:102
void askThreshold(in uniset::ObjectId sid, in uniset::ConsumerInfo ci, in uniset::ThresholdId tid, in long lowLimit, in long hiLimit, in boolean invert, in UniversalIO::UIOCommand cmd)
unsigned long tv_nsec
Definition: IOController_i.idl:104
long value
Definition: IOController_i.idl:94
long ObjectId
Definition: UniSetTypes_i.idl:30
unsigned long tv_sec
Definition: IOController_i.idl:142
uniset::ObjectId id
Definition: IOController_i.idl:58