Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
21468239
Commit
21468239
authored
Oct 03, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Вернул по ошибке удалённые изменения..
parent
89f4a590
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
23 additions
and
169 deletions
+23
-169
libuniset.spec
conf/libuniset.spec
+5
-1
IOControl.cc
extensions/IOControl/IOControl.cc
+2
-19
IOControl.h
extensions/IOControl/IOControl.h
+0
-1
MBTCPMaster.cc
extensions/MBTCPMaster/MBTCPMaster.cc
+2
-19
MBTCPMaster.h
extensions/MBTCPMaster/MBTCPMaster.h
+0
-1
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+2
-19
RTUExchange.cc
extensions/RTUExchange/RTUExchange.cc
+2
-19
RTUExchange.h
extensions/RTUExchange/RTUExchange.h
+0
-1
UNetExchange.cc
extensions/UNet2/UNetExchange.cc
+2
-2
UNetSender.cc
extensions/UNet2/UNetSender.cc
+2
-18
UNetSender.h
extensions/UNet2/UNetSender.h
+0
-1
UniExchange.cc
extensions/UniNetwork/UniExchange.cc
+2
-19
UniExchange.h
extensions/UniNetwork/UniExchange.h
+0
-1
NCRestorer_XML.cc
src/Various/NCRestorer_XML.cc
+2
-24
Restorer_XML.cc
src/Various/Restorer_XML.cc
+2
-24
No files found.
conf/libuniset.spec
View file @
21468239
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 1.0
Version: 1.0
Release: alt4
3
Release: alt4
4
Summary: UniSet - library for building distributed industrial control systems
Summary: UniSet - library for building distributed industrial control systems
License: GPL
License: GPL
Group: Development/C++
Group: Development/C++
...
@@ -207,6 +207,10 @@ rm -f %buildroot%_libdir/*.la
...
@@ -207,6 +207,10 @@ rm -f %buildroot%_libdir/*.la
%changelog
%changelog
* Mon Oct 03 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt44
- add nodes filter for UNet2
- minor optimization
* Thu Jul 14 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt42
* Thu Jul 14 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt42
- fixed bug in uniset-codegen
- fixed bug in uniset-codegen
...
...
extensions/IOControl/IOControl.cc
View file @
21468239
...
@@ -687,7 +687,7 @@ void IOControl::readConfiguration()
...
@@ -687,7 +687,7 @@ void IOControl::readConfiguration()
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initIOItem
(
it
);
initIOItem
(
it
);
}
}
...
@@ -696,29 +696,12 @@ void IOControl::readConfiguration()
...
@@ -696,29 +696,12 @@ void IOControl::readConfiguration()
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
IOControl
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
bool
IOControl
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initIOItem
(
it
);
initIOItem
(
it
);
return
true
;
return
true
;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
IOControl
::
check_item
(
UniXML_iterator
&
it
)
{
if
(
s_field
.
empty
()
)
return
true
;
// просто проверка на не пустой field
if
(
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
)
!=
s_fvalue
)
return
false
;
return
true
;
}
// ------------------------------------------------------------------------------------------
bool
IOControl
::
initIOItem
(
UniXML_iterator
&
it
)
bool
IOControl
::
initIOItem
(
UniXML_iterator
&
it
)
{
{
IOInfo
inf
;
IOInfo
inf
;
...
...
extensions/IOControl/IOControl.h
View file @
21468239
...
@@ -293,7 +293,6 @@ class IOControl:
...
@@ -293,7 +293,6 @@ class IOControl:
// чтение файла конфигурации
// чтение файла конфигурации
void
readConfiguration
();
void
readConfiguration
();
bool
initIOItem
(
UniXML_iterator
&
it
);
bool
initIOItem
(
UniXML_iterator
&
it
);
bool
check_item
(
UniXML_iterator
&
it
);
bool
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
);
bool
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
);
void
buildCardsList
();
void
buildCardsList
();
...
...
extensions/MBTCPMaster/MBTCPMaster.cc
View file @
21468239
...
@@ -1284,33 +1284,16 @@ void MBTCPMaster::readConfiguration()
...
@@ -1284,33 +1284,16 @@ void MBTCPMaster::readConfiguration()
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
}
}
// readconf_ok = true;
// readconf_ok = true;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
MBTCPMaster
::
check_item
(
UniXML_iterator
&
it
)
{
if
(
s_field
.
empty
()
)
return
true
;
// просто проверка на не пустой field
if
(
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
)
!=
s_fvalue
)
return
false
;
return
true
;
}
// ------------------------------------------------------------------------------------------
bool
MBTCPMaster
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
bool
MBTCPMaster
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
return
true
;
return
true
;
}
}
...
...
extensions/MBTCPMaster/MBTCPMaster.h
View file @
21468239
...
@@ -407,7 +407,6 @@ class MBTCPMaster:
...
@@ -407,7 +407,6 @@ class MBTCPMaster:
void
rtuQueryOptimization
(
RTUDeviceMap
&
m
);
void
rtuQueryOptimization
(
RTUDeviceMap
&
m
);
void
readConfiguration
();
void
readConfiguration
();
bool
check_item
(
UniXML_iterator
&
it
);
bool
checkProcActive
();
bool
checkProcActive
();
void
setProcActive
(
bool
st
);
void
setProcActive
(
bool
st
);
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
21468239
...
@@ -687,33 +687,16 @@ void MBSlave::readConfiguration()
...
@@ -687,33 +687,16 @@ void MBSlave::readConfiguration()
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
}
}
// readconf_ok = true;
// readconf_ok = true;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
MBSlave
::
check_item
(
UniXML_iterator
&
it
)
{
if
(
s_field
.
empty
()
)
return
true
;
// просто проверка на не пустой field
if
(
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
)
!=
s_fvalue
)
return
false
;
return
true
;
}
// ------------------------------------------------------------------------------------------
bool
MBSlave
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
bool
MBSlave
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
return
true
;
return
true
;
}
}
...
...
extensions/RTUExchange/RTUExchange.cc
View file @
21468239
...
@@ -963,33 +963,16 @@ void RTUExchange::readConfiguration()
...
@@ -963,33 +963,16 @@ void RTUExchange::readConfiguration()
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
}
}
// readconf_ok = true;
// readconf_ok = true;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
RTUExchange
::
check_item
(
UniXML_iterator
&
it
)
{
if
(
s_field
.
empty
()
)
return
true
;
// просто проверка на не пустой field
if
(
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
)
!=
s_fvalue
)
return
false
;
return
true
;
}
// ------------------------------------------------------------------------------------------
bool
RTUExchange
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
bool
RTUExchange
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
return
true
;
return
true
;
}
}
...
...
extensions/RTUExchange/RTUExchange.h
View file @
21468239
...
@@ -233,7 +233,6 @@ class RTUExchange:
...
@@ -233,7 +233,6 @@ class RTUExchange:
void
rtuQueryOptimization
(
RTUDeviceMap
&
m
);
void
rtuQueryOptimization
(
RTUDeviceMap
&
m
);
void
readConfiguration
();
void
readConfiguration
();
bool
check_item
(
UniXML_iterator
&
it
);
private
:
private
:
RTUExchange
();
RTUExchange
();
...
...
extensions/UNet2/UNetExchange.cc
View file @
21468239
...
@@ -67,8 +67,8 @@ sender(0)
...
@@ -67,8 +67,8 @@ sender(0)
continue
;
continue
;
}
}
// проверяем
заданы ли
фильтры для подсетей
// проверяем фильтры для подсетей
if
(
!
n_field
.
empty
()
&&
!
check_filter
(
n_it
,
n_field
,
n_fvalue
)
)
if
(
!
UniSetTypes
::
check_filter
(
n_it
,
n_field
,
n_fvalue
)
)
continue
;
continue
;
// Если указано поле unet_broadcast_ip непосредственно у узла - берём его
// Если указано поле unet_broadcast_ip непосредственно у узла - берём его
...
...
extensions/UNet2/UNetSender.cc
View file @
21468239
...
@@ -236,30 +236,14 @@ void UNetSender::readConfiguration()
...
@@ -236,30 +236,14 @@ void UNetSender::readConfiguration()
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
{
{
if
(
check_
item
(
it
)
)
if
(
check_
filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
}
}
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
UNetSender
::
check_item
(
UniXML_iterator
&
it
)
{
if
(
s_field
.
empty
()
)
return
true
;
// просто проверка на не пустой field
if
(
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
)
!=
s_fvalue
)
return
false
;
return
true
;
}
// ------------------------------------------------------------------------------------------
bool
UNetSender
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
bool
UNetSender
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
return
true
;
return
true
;
}
}
...
...
extensions/UNet2/UNetSender.h
View file @
21468239
...
@@ -76,7 +76,6 @@ class UNetSender
...
@@ -76,7 +76,6 @@ class UNetSender
bool
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
);
bool
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
);
void
readConfiguration
();
void
readConfiguration
();
bool
check_item
(
UniXML_iterator
&
it
);
private
:
private
:
UNetSender
();
UNetSender
();
...
...
extensions/UniNetwork/UniExchange.cc
View file @
21468239
...
@@ -425,33 +425,16 @@ void UniExchange::readConfiguration()
...
@@ -425,33 +425,16 @@ void UniExchange::readConfiguration()
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
for
(
;
it
.
getCurrent
();
it
.
goNext
()
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
}
}
// readconf_ok = true;
// readconf_ok = true;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
UniExchange
::
check_item
(
UniXML_iterator
&
it
)
{
if
(
s_field
.
empty
()
)
return
true
;
// просто проверка на не пустой field
if
(
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
s_fvalue
.
empty
()
&&
it
.
getProp
(
s_field
)
!=
s_fvalue
)
return
false
;
return
true
;
}
// ------------------------------------------------------------------------------------------
bool
UniExchange
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
bool
UniExchange
::
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
)
{
{
if
(
check_item
(
it
)
)
if
(
UniSetTypes
::
check_filter
(
it
,
s_field
,
s_fvalue
)
)
initItem
(
it
);
initItem
(
it
);
return
true
;
return
true
;
}
}
...
...
extensions/UniNetwork/UniExchange.h
View file @
21468239
...
@@ -102,7 +102,6 @@ class UniExchange:
...
@@ -102,7 +102,6 @@ class UniExchange:
NetNodeList
nlst
;
NetNodeList
nlst
;
void
readConfiguration
();
void
readConfiguration
();
bool
check_item
(
UniXML_iterator
&
it
);
bool
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
);
bool
readItem
(
UniXML
&
xml
,
UniXML_iterator
&
it
,
xmlNode
*
sec
);
bool
initItem
(
UniXML_iterator
&
it
);
bool
initItem
(
UniXML_iterator
&
it
);
void
updateLocalData
();
void
updateLocalData
();
...
...
src/Various/NCRestorer_XML.cc
View file @
21468239
...
@@ -479,18 +479,7 @@ bool NCRestorer_XML::getThresholdInfo( UniXML& xml,xmlNode* node,
...
@@ -479,18 +479,7 @@ bool NCRestorer_XML::getThresholdInfo( UniXML& xml,xmlNode* node,
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
NCRestorer_XML
::
check_thresholds_item
(
UniXML_iterator
&
it
)
bool
NCRestorer_XML
::
check_thresholds_item
(
UniXML_iterator
&
it
)
{
{
if
(
t_filterField
.
empty
()
)
return
UniSetTypes
::
check_filter
(
it
,
t_filterField
,
t_filterValue
);
return
true
;
// просто проверка на не пустой field
if
(
t_filterValue
.
empty
()
&&
it
.
getProp
(
t_filterField
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
t_filterValue
.
empty
()
&&
it
.
getProp
(
t_filterField
)
!=
t_filterValue
)
return
false
;
return
true
;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
void
NCRestorer_XML
::
setReadThresholdItem
(
ReaderSlot
sl
)
void
NCRestorer_XML
::
setReadThresholdItem
(
ReaderSlot
sl
)
...
@@ -696,18 +685,7 @@ void NCRestorer_XML::build_depends( UniXML& xml, xmlNode* node, IONotifyControll
...
@@ -696,18 +685,7 @@ void NCRestorer_XML::build_depends( UniXML& xml, xmlNode* node, IONotifyControll
bool
NCRestorer_XML
::
check_depend_item
(
UniXML_iterator
&
it
)
bool
NCRestorer_XML
::
check_depend_item
(
UniXML_iterator
&
it
)
{
{
if
(
d_filterField
.
empty
()
)
return
UniSetTypes
::
check_filter
(
it
,
d_filterField
,
d_filterValue
);
return
true
;
// просто проверка на не пустой field
if
(
d_filterValue
.
empty
()
&&
it
.
getProp
(
d_filterField
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
d_filterValue
.
empty
()
&&
it
.
getProp
(
d_filterField
)
!=
d_filterValue
)
return
false
;
return
true
;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
bool
NCRestorer_XML
::
getDependsInfo
(
UniXML
&
xml
,
xmlNode
*
it
,
IOController
::
DependsInfo
&
di
)
bool
NCRestorer_XML
::
getDependsInfo
(
UniXML
&
xml
,
xmlNode
*
it
,
IOController
::
DependsInfo
&
di
)
...
...
src/Various/Restorer_XML.cc
View file @
21468239
...
@@ -171,34 +171,12 @@ bool Restorer_XML::old_getConsumerInfo( UniXML_iterator& it,
...
@@ -171,34 +171,12 @@ bool Restorer_XML::old_getConsumerInfo( UniXML_iterator& it,
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
bool
Restorer_XML
::
check_list_item
(
UniXML_iterator
&
it
)
bool
Restorer_XML
::
check_list_item
(
UniXML_iterator
&
it
)
{
{
if
(
i_filterField
.
empty
()
)
return
UniSetTypes
::
check_filter
(
it
,
i_filterField
,
i_filterValue
);
return
true
;
// просто проверка на не пустой field
if
(
i_filterValue
.
empty
()
&&
it
.
getProp
(
i_filterField
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
i_filterValue
.
empty
()
&&
it
.
getProp
(
i_filterField
)
!=
i_filterValue
)
return
false
;
return
true
;
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
bool
Restorer_XML
::
check_consumer_item
(
UniXML_iterator
&
it
)
bool
Restorer_XML
::
check_consumer_item
(
UniXML_iterator
&
it
)
{
{
if
(
c_filterField
.
empty
()
)
return
UniSetTypes
::
check_filter
(
it
,
c_filterField
,
c_filterValue
);
return
true
;
// просто проверка на не пустой field
if
(
c_filterValue
.
empty
()
&&
it
.
getProp
(
c_filterField
).
empty
()
)
return
false
;
// просто проверка что field = value
if
(
!
c_filterValue
.
empty
()
&&
it
.
getProp
(
c_filterField
)
!=
c_filterValue
)
return
false
;
return
true
;
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
xmlNode
*
Restorer_XML
::
find_node
(
UniXML
&
xml
,
xmlNode
*
root
,
xmlNode
*
Restorer_XML
::
find_node
(
UniXML
&
xml
,
xmlNode
*
root
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment