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
a680352b
Commit
a680352b
authored
Aug 27, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Небольшие правки: auto& --> auto&&
parent
b4e99c49
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
24 deletions
+25
-24
MBExchange.cc
extensions/ModbusMaster/MBExchange.cc
+4
-4
MBTCPMultiMaster.cc
extensions/ModbusMaster/MBTCPMultiMaster.cc
+1
-1
start_fg_mbtcpmulti.sh
extensions/ModbusMaster/start_fg_mbtcpmulti.sh
+2
-1
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+6
-6
SharedMemory.cc
extensions/SharedMemory/SharedMemory.cc
+7
-7
UNetExchange.cc
extensions/UNetUDP/UNetExchange.cc
+5
-5
No files found.
extensions/ModbusMaster/MBExchange.cc
View file @
a680352b
...
...
@@ -2086,7 +2086,7 @@ MBExchange::RegInfo* MBExchange::addReg( RegMap& mp, ModbusRTU::RegID id, Modbus
// ------------------------------------------------------------------------------------------
MBExchange
::
RSProperty
*
MBExchange
::
addProp
(
PList
&
plist
,
RSProperty
&&
p
)
{
for
(
auto
&
it
:
plist
)
for
(
auto
&
&
it
:
plist
)
{
if
(
it
.
si
.
id
==
p
.
si
.
id
&&
it
.
si
.
node
==
p
.
si
.
node
)
return
&
it
;
...
...
@@ -2409,7 +2409,7 @@ bool MBExchange::initItem( UniXML::iterator& it )
ostringstream
sl
;
sl
<<
"[ "
;
for
(
auto
&
i
:
ri
->
slst
)
for
(
const
auto
&
i
:
ri
->
slst
)
sl
<<
ORepHelpers
::
getShortName
(
conf
->
oind
->
getMapName
(
i
.
si
.
id
))
<<
","
;
sl
<<
"]"
;
...
...
@@ -2960,12 +2960,12 @@ void MBExchange::sensorInfo( const UniSetTypes::SensorMessage* sm )
if
(
force_out
)
continue
;
for
(
auto
&
it
:
d
->
regmap
)
for
(
const
auto
&
it
:
d
->
regmap
)
{
if
(
!
isWriteFunction
(
it
.
second
->
mbfunc
)
)
continue
;
for
(
auto
&
i
:
it
.
second
->
slst
)
for
(
auto
&
&
i
:
it
.
second
->
slst
)
{
if
(
sm
->
id
==
i
.
si
.
id
&&
sm
->
node
==
i
.
si
.
node
)
{
...
...
extensions/ModbusMaster/MBTCPMultiMaster.cc
View file @
a680352b
...
...
@@ -412,7 +412,7 @@ void MBTCPMultiMaster::initIterators()
{
MBExchange
::
initIterators
();
for
(
auto
&
it
:
mblist
)
for
(
auto
&
&
it
:
mblist
)
shm
->
initIterator
(
it
.
respond_it
);
}
// -----------------------------------------------------------------------------
...
...
extensions/ModbusMaster/start_fg_mbtcpmulti.sh
View file @
a680352b
...
...
@@ -10,9 +10,10 @@
--mbtcp-filter-value
5
\
--mbtcp-recv-timeout
7000
\
--mbtcp-timeout
2000
\
--mbtcp-polltime
5
000
\
--mbtcp-polltime
2
000
\
--mbtcp-force-out
1
\
--mbtcp-log-add-levels
any
\
--mbtcp-persistent-connection
1
\
$*
#--mbtcp-exchange-mode-id MB1_Mode_AS \
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
a680352b
...
...
@@ -559,7 +559,7 @@ void MBSlave::execute_rtu()
}
}
for
(
auto
&
it
:
iomap
)
for
(
auto
&
&
it
:
iomap
)
IOBase
::
processingThreshold
(
&
it
.
second
,
shm
,
force
);
}
catch
(...)
{}
...
...
@@ -645,7 +645,7 @@ void MBSlave::execute_tcp()
}
}
for
(
auto
&
it
:
iomap
)
for
(
auto
&
&
it
:
iomap
)
IOBase
::
processingThreshold
(
&
it
.
second
,
shm
,
force
);
}
catch
(
const
std
::
exception
&
ex
)
...
...
@@ -759,9 +759,9 @@ void MBSlave::askSensors( UniversalIO::UIOCommand cmd )
if
(
force
)
return
;
for
(
auto
&
it
:
iomap
)
for
(
const
auto
&
it
:
iomap
)
{
IOProperty
*
p
(
&
it
.
second
);
const
IOProperty
*
p
(
&
it
.
second
);
try
{
...
...
@@ -1147,7 +1147,7 @@ int MBSlave::getOptimizeWriteFunction( const int fn )
// ------------------------------------------------------------------------------------------
bool
MBSlave
::
BitRegProperty
::
check
(
const
IOController_i
::
SensorInfo
&
si
)
{
for
(
auto
&
i
:
bvec
)
for
(
const
auto
&
i
:
bvec
)
{
if
(
i
.
si
.
id
==
si
.
id
&&
i
.
si
.
node
==
si
.
node
)
return
true
;
...
...
@@ -1267,7 +1267,7 @@ std::ostream& operator<<( std::ostream& os, MBSlave::BitRegProperty& p )
{
os
<<
" reg="
<<
ModbusRTU
::
dat2str
(
p
.
mbreg
)
<<
"("
<<
(
int
)
p
.
mbreg
<<
")[ "
;
for
(
auto
&
i
:
p
.
bvec
)
for
(
const
auto
&
i
:
p
.
bvec
)
os
<<
"'"
<<
i
.
si
.
id
<<
"' "
;
os
<<
"]"
;
...
...
extensions/SharedMemory/SharedMemory.cc
View file @
a680352b
...
...
@@ -289,7 +289,7 @@ bool SharedMemory::activateObject()
itPulsar
=
myioEnd
();
for
(
auto
&
it
:
hist
)
for
(
auto
&
&
it
:
hist
)
{
for
(
auto
&&
hit
:
it
.
hlst
)
hit
.
ioit
=
myioEnd
();
...
...
@@ -331,7 +331,7 @@ void SharedMemory::checkHeartBeat()
bool
wdtpingOK
=
true
;
for
(
auto
&
it
:
hlist
)
for
(
auto
&
&
it
:
hlist
)
{
try
{
...
...
@@ -378,7 +378,7 @@ void SharedMemory::checkHeartBeat()
// ------------------------------------------------------------------------------------------
bool
SharedMemory
::
readItem
(
const
std
::
shared_ptr
<
UniXML
>&
xml
,
UniXML
::
iterator
&
it
,
xmlNode
*
sec
)
{
for
(
auto
&
r
:
lstRSlot
)
for
(
auto
&
&
r
:
lstRSlot
)
{
try
{
...
...
@@ -666,7 +666,7 @@ void SharedMemory::buildHistoryList( xmlNode* cnode )
// -----------------------------------------------------------------------------
void
SharedMemory
::
checkHistoryFilter
(
UniXML
::
iterator
&
xit
)
{
for
(
auto
&
it
:
hist
)
for
(
auto
&
&
it
:
hist
)
{
if
(
xit
.
getProp
(
it
.
filter
).
empty
()
)
continue
;
...
...
@@ -701,9 +701,9 @@ void SharedMemory::saveHistory()
if
(
hist
.
empty
()
)
return
;
for
(
auto
&
it
:
hist
)
for
(
auto
&
&
it
:
hist
)
{
for
(
auto
&
hit
:
it
.
hlst
)
for
(
auto
&
&
hit
:
it
.
hlst
)
{
try
{
...
...
@@ -743,7 +743,7 @@ void SharedMemory::updateHistory( std::shared_ptr<USensorInfo>& s_it, IOControll
<<
" value="
<<
value
<<
endl
;
for
(
auto
&
it1
:
i
->
second
)
for
(
auto
&
&
it1
:
i
->
second
)
{
History
::
iterator
it
=
it1
;
...
...
extensions/UNetUDP/UNetExchange.cc
View file @
a680352b
...
...
@@ -430,7 +430,7 @@ bool UNetExchange::checkExistUNetHost( const std::string& addr, ost::tpport_t po
{
ost
::
IPV4Address
a1
(
addr
.
c_str
());
for
(
auto
&
it
:
recvlist
)
for
(
const
auto
&
it
:
recvlist
)
{
if
(
it
.
r1
->
getAddress
()
==
a1
.
getAddress
()
&&
it
.
r1
->
getPort
()
==
port
)
return
true
;
...
...
@@ -441,7 +441,7 @@ bool UNetExchange::checkExistUNetHost( const std::string& addr, ost::tpport_t po
// -----------------------------------------------------------------------------
void
UNetExchange
::
startReceivers
()
{
for
(
auto
&
it
:
recvlist
)
for
(
const
auto
&
it
:
recvlist
)
{
if
(
it
.
r1
)
it
.
r1
->
start
();
...
...
@@ -701,7 +701,7 @@ void UNetExchange::sigterm( int signo )
unetinfo
<<
myname
<<
": ********* SIGTERM("
<<
signo
<<
") ********"
<<
endl
;
activated
=
false
;
for
(
auto
&
it
:
recvlist
)
for
(
const
auto
&
it
:
recvlist
)
{
try
{
...
...
@@ -745,7 +745,7 @@ void UNetExchange::initIterators()
if
(
sender2
)
sender2
->
initIterators
();
for
(
auto
&
it
:
recvlist
)
for
(
auto
&
&
it
:
recvlist
)
it
.
initIterators
(
shm
);
}
// -----------------------------------------------------------------------------
...
...
@@ -814,7 +814,7 @@ std::shared_ptr<UNetExchange> UNetExchange::init_unetexchange( int argc, const c
// -----------------------------------------------------------------------------
void
UNetExchange
::
receiverEvent
(
const
shared_ptr
<
UNetReceiver
>&
r
,
UNetReceiver
::
Event
ev
)
{
for
(
auto
&
it
:
recvlist
)
for
(
auto
&
&
it
:
recvlist
)
{
if
(
it
.
r1
==
r
)
{
...
...
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