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
a5ca0a91
Commit
a5ca0a91
authored
Aug 03, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new version (add new properties for MBSlave)
parent
0630856a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
libuniset.spec
conf/libuniset.spec
+3
-0
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+17
-0
MBSlave.h
extensions/ModbusSlave/MBSlave.h
+3
-0
No files found.
conf/libuniset.spec
View file @
a5ca0a91
...
...
@@ -178,6 +178,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Mon Aug 03 2009 Pavel Vainerman <pv@altlinux.ru> 0.96-eter35
- new RS properties
* Sat Aug 01 2009 Pavel Vainerman <pv@altlinux.ru> 0.96-eter30
- new build
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
a5ca0a91
...
...
@@ -171,6 +171,9 @@ prefix(prefix)
}
}
askcount_id
=
conf
->
getSensorID
(
conf
->
getArgParam
(
"--"
+
prefix
+
"-askcount-id"
,
it
.
getProp
(
"askcount_id"
)));
dlog
[
Debug
::
INFO
]
<<
myname
<<
": init askcount_id="
<<
askcount_id
<<
endl
;
dlog
[
Debug
::
INFO
]
<<
myname
<<
": init test_id="
<<
test_id
<<
endl
;
wait_msec
=
getHeartBeatTime
()
-
100
;
...
...
@@ -307,6 +310,19 @@ void MBSlave::execute_rtu()
<<
"(execute_rtu): (hb) "
<<
ex
<<
std
::
endl
;
}
}
if
(
askcount_id
!=
DefaultObjectId
)
{
try
{
shm
->
localSaveValue
(
aitAskCount
,
askcount_id
,
askCount
,
getId
());
}
catch
(
Exception
&
ex
)
{
dlog
[
Debug
::
CRIT
]
<<
myname
<<
"(execute_rtu): (askCount) "
<<
ex
<<
std
::
endl
;
}
}
for
(
IOMap
::
iterator
it
=
iomap
.
begin
();
it
!=
iomap
.
end
();
++
it
)
IOBase
::
processingThreshold
(
&
it
->
second
,
shm
,
force
);
...
...
@@ -712,6 +728,7 @@ void MBSlave::initIterators()
}
shm
->
initAIterator
(
aitHeartBeat
);
shm
->
initAIterator
(
aitAskCount
);
}
// -----------------------------------------------------------------------------
void
MBSlave
::
help_print
(
int
argc
,
char
*
argv
[]
)
...
...
extensions/ModbusSlave/MBSlave.h
View file @
a5ca0a91
...
...
@@ -163,6 +163,9 @@ class MBSlave:
IOController
::
AIOStateList
::
iterator
aitHeartBeat
;
UniSetTypes
::
ObjectId
test_id
;
IOController
::
AIOStateList
::
iterator
aitAskCount
;
UniSetTypes
::
ObjectId
askcount_id
;
PassiveTimer
ptTimeout
;
ModbusRTU
::
mbErrCode
prev
;
long
askCount
;
...
...
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