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
06c7c27c
Commit
06c7c27c
authored
Jul 17, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new version
parent
5955d512
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
IOBase.h
extensions/include/IOBase.h
+4
-0
IOBase.cc
extensions/lib/IOBase.cc
+5
-3
ModbusTypes.h
include/modbus/ModbusTypes.h
+2
-2
No files found.
extensions/include/IOBase.h
View file @
06c7c27c
...
...
@@ -31,6 +31,7 @@ static const int NoSafety = -1;
f_median
(
false
),
ignore
(
false
),
invert
(
false
),
noprecision
(
false
),
jar_state
(
false
),
ondelay_state
(
false
),
offdelay_state
(
false
),
...
...
@@ -62,6 +63,7 @@ static const int NoSafety = -1;
bool
ignore
;
/*!< */
bool
invert
;
/*!< */
bool
noprecision
;
PassiveTimer
ptJar
;
/*!< */
PassiveTimer
ptOnDelay
;
/*!< */
...
...
@@ -76,6 +78,8 @@ static const int NoSafety = -1;
bool
ondelay_state
;
/*!< */
bool
offdelay_state
;
/*!< */
//
UniSetTypes
::
ObjectId
t_ai
;
/*!< ,
,
...
...
extensions/lib/IOBase.cc
View file @
06c7c27c
...
...
@@ -143,6 +143,10 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force
}
}
if
(
!
it
->
noprecision
&&
it
->
cal
.
precision
>
0
)
val
*=
lround
(
pow10
(
it
->
cal
.
precision
));
// "",
//
{
...
...
@@ -150,9 +154,6 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force
if
(
it
->
value
==
ChannelBreakValue
)
shm
->
localSetUndefinedState
(
it
->
ait
,
false
,
it
->
si
.
id
);
if
(
it
->
cal
.
precision
>
0
)
val
*=
lround
(
pow10
(
it
->
cal
.
precision
));
if
(
force
||
it
->
value
!=
val
)
{
if
(
it
->
stype
==
UniversalIO
::
AnalogInput
)
...
...
@@ -417,6 +418,7 @@ bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm,
b
->
ignore
=
atoi
(
it
.
getProp
(
"ioignore"
).
c_str
()
);
b
->
invert
=
atoi
(
it
.
getProp
(
"ioinvert"
).
c_str
()
);
b
->
defval
=
atoi
(
it
.
getProp
(
"default"
).
c_str
()
);
b
->
noprecision
=
atoi
(
it
.
getProp
(
"noprecision"
).
c_str
()
);
b
->
value
=
b
->
defval
;
b
->
breaklim
=
atoi
(
it
.
getProp
(
"breaklim"
).
c_str
()
);
...
...
include/modbus/ModbusTypes.h
View file @
06c7c27c
...
...
@@ -616,13 +616,13 @@ namespace ModbusRTU
{
ModbusData
start
;
/*!< */
ModbusData
quant
;
/*!< */
ModbusCRC
crc
;
// ------- from slave -------
ForceCoilsRetMessage
(
ModbusMessage
&
m
);
ForceCoilsRetMessage
&
operator
=
(
ModbusMessage
&
m
);
void
init
(
ModbusMessage
&
m
);
ModbusCRC
crc
;
// ------- to master -------
/*!
* \param _from -
...
...
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