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
11ce2fd3
Commit
11ce2fd3
authored
Apr 10, 2012
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ComPort485F): Исправлен баг в функции reopen()
parent
89218c56
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
3 deletions
+28
-3
libuniset.spec
conf/libuniset.spec
+4
-1
ComPort.h
include/ComPort.h
+1
-2
ComPort485F.h
include/ComPort485F.h
+3
-0
ComPort485F.cc
src/Communications/ComPort485F.cc
+20
-0
No files found.
conf/libuniset.spec
View file @
11ce2fd3
...
...
@@ -3,7 +3,7 @@
Name: libuniset
Version: 1.3
Release: alt1
7
Release: alt1
8
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
...
...
@@ -213,6 +213,9 @@ rm -f %buildroot%_libdir/*.la
%changelog
* Tue Apr 10 2012 Pavel Vainerman <pv@altlinux.ru> 1.3-alt18
- fixed bug in ComPort485F (reinit function)
* Fri Mar 16 2012 Pavel Vainerman <pv@altlinux.ru> 1.3-alt17
- rebuild
...
...
include/ComPort.h
View file @
11ce2fd3
...
...
@@ -93,8 +93,7 @@ public:
void
setBlocking
(
bool
blocking
);
void
cleanupChannel
();
virtual
void
cleanupChannel
();
virtual
void
reopen
();
protected
:
...
...
include/ComPort485F.h
View file @
11ce2fd3
...
...
@@ -27,6 +27,9 @@ class ComPort485F:
virtual
void
setTimeout
(
int
timeout
);
virtual
int
sendBlock
(
unsigned
char
*
msg
,
int
len
);
virtual
void
cleanupChannel
();
virtual
void
reopen
();
protected
:
virtual
unsigned
char
m_receiveByte
(
bool
wait
);
...
...
src/Communications/ComPort485F.cc
View file @
11ce2fd3
...
...
@@ -274,3 +274,23 @@ void ComPort485F::m_read( int tmsec )
}
}
// --------------------------------------------------------------------------------
void
ComPort485F
::
cleanupChannel
()
{
while
(
!
wq
.
empty
()
)
wq
.
pop
();
while
(
!
rq
.
empty
()
)
rq
.
pop
();
ComPort
::
cleanupChannel
();
}
// --------------------------------------------------------------------------------
void
ComPort485F
::
reopen
()
{
while
(
!
wq
.
empty
()
)
wq
.
pop
();
while
(
!
rq
.
empty
()
)
rq
.
pop
();
ComPort
::
reopen
();
}
// --------------------------------------------------------------------------------
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