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
7e7e7f4b
Commit
7e7e7f4b
authored
Jul 11, 2017
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(MBExchage): minor refactoring
parent
f468aff2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
MBExchange.cc
extensions/ModbusMaster/MBExchange.cc
+4
-4
MBExchange.h
extensions/ModbusMaster/MBExchange.h
+2
-2
No files found.
extensions/ModbusMaster/MBExchange.cc
View file @
7e7e7f4b
...
...
@@ -58,7 +58,7 @@ namespace uniset
exchangeMode
(
emNone
),
activated
(
false
),
noQueryOptimization
(
false
),
no
_ext
imer
(
false
),
no
tUseExchangeT
imer
(
false
),
prefix
(
prefix
),
poll_count
(
0
),
prop_prefix
(
""
),
...
...
@@ -411,7 +411,7 @@ namespace uniset
}
// ------------------------------------------------------------------------------------------
MBExchange
::
DeviceType
MBExchange
::
getDeviceType
(
const
std
::
string
&
dtype
)
MBExchange
::
DeviceType
MBExchange
::
getDeviceType
(
const
std
::
string
&
dtype
)
noexcept
{
if
(
dtype
.
empty
()
)
return
dtUnknown
;
...
...
@@ -3250,7 +3250,7 @@ namespace uniset
{
if
(
tm
->
id
==
tmExchange
)
{
if
(
no
_ext
imer
)
if
(
no
tUseExchangeT
imer
)
askTimer
(
tm
->
id
,
0
);
else
step
();
...
...
@@ -3448,7 +3448,7 @@ namespace uniset
// -----------------------------------------------------------------------------
void
MBExchange
::
execute
()
{
no
_ext
imer
=
true
;
no
tUseExchangeT
imer
=
true
;
try
{
...
...
extensions/ModbusMaster/MBExchange.h
View file @
7e7e7f4b
...
...
@@ -94,7 +94,7 @@ namespace uniset
dtRTU188
/*!< RTU188 (Fastwell) */
};
static
DeviceType
getDeviceType
(
const
std
::
string
&
dtype
);
static
DeviceType
getDeviceType
(
const
std
::
string
&
dtype
)
noexcept
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
DeviceType
&
dt
);
struct
RTUDevice
;
...
...
@@ -352,7 +352,7 @@ namespace uniset
std
::
atomic_bool
activated
=
{
false
};
timeout_t
activateTimeout
=
{
20000
};
// msec
bool
noQueryOptimization
=
{
false
};
bool
no
_ext
imer
=
{
false
};
bool
no
tUseExchangeT
imer
=
{
false
};
std
::
string
prefix
;
...
...
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