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
3c3d5ae9
Commit
3c3d5ae9
authored
Sep 22, 2009
by
Pavel Vaynerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i/o debugging
parent
9128b312
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
14 deletions
+34
-14
libuniset.spec
conf/libuniset.spec
+10
-1
IOControl.cc
extensions/IOControl/IOControl.cc
+12
-4
SharedMemory.cc
extensions/SharedMemory/SharedMemory.cc
+6
-3
IOBase.cc
extensions/lib/IOBase.cc
+6
-6
No files found.
conf/libuniset.spec
View file @
3c3d5ae9
...
...
@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.97
Release: eter
3
Release: eter
6
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
...
...
@@ -178,6 +178,15 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Tue Sep 22 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter5
- minor fixes in SM
* Tue Sep 22 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter4
- minor fixes in IOBase
* Tue Sep 22 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter3
- fixed bugs in IOControl
* Sat Sep 19 2009 Vitaly Lipatov <lav@altlinux.ru> 0.97-eter2
- fix build
...
...
extensions/IOControl/IOControl.cc
View file @
3c3d5ae9
...
...
@@ -12,10 +12,18 @@ using namespace UniSetExtensions;
// -----------------------------------------------------------------------------
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
IOControl
::
IOInfo
&
inf
)
{
return
os
<<
"("
<<
inf
.
si
.
id
<<
")"
<<
conf
->
oind
->
getMapName
(
inf
.
si
.
id
)
os
<<
"("
<<
inf
.
si
.
id
<<
")"
<<
conf
->
oind
->
getMapName
(
inf
.
si
.
id
)
<<
" card="
<<
inf
.
ncard
<<
" channel="
<<
inf
.
channel
<<
" subdev="
<<
inf
.
subdev
<<
" aref="
<<
inf
.
aref
<<
" range="
<<
inf
.
range
<<
" default="
<<
inf
.
defval
<<
" safety="
<<
inf
.
safety
;
if
(
inf
.
cal
.
minRaw
!=
inf
.
cal
.
maxRaw
)
os
<<
" rmin="
<<
inf
.
cal
.
minRaw
<<
" rmax="
<<
inf
.
cal
.
maxRaw
<<
" cmin="
<<
inf
.
cal
.
minCal
<<
" cmax="
<<
inf
.
cal
.
maxCal
;
return
os
;
}
// -----------------------------------------------------------------------------
...
...
@@ -155,7 +163,7 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
ptBlink2
.
setTiming
(
blink2_msec
);
int
blink3_msec
=
conf
->
getArgPInt
(
"--io-blink3-time"
,
it
.
getProp
(
"blink3-time"
),
100
);
ptBlink3
.
setTiming
(
blink
2
_msec
);
ptBlink3
.
setTiming
(
blink
3
_msec
);
smReadyTimeout
=
conf
->
getArgInt
(
"--io-sm-ready-timeout"
,
it
.
getProp
(
"ready_timeout"
));
if
(
smReadyTimeout
==
0
)
...
...
@@ -475,8 +483,8 @@ void IOControl::ioread( IOInfo* it )
{
if
(
!
it
->
lamp
)
{
IOBase
::
processingAsAO
(
ib
,
shm
,
force_out
);
card
->
setAnalogChannel
(
it
->
subdev
,
it
->
channel
,
it
->
value
,
it
->
range
,
it
->
aref
);
long
rval
=
IOBase
::
processingAsAO
(
ib
,
shm
,
force_out
);
card
->
setAnalogChannel
(
it
->
subdev
,
it
->
channel
,
rval
,
it
->
range
,
it
->
aref
);
}
else
//
{
...
...
extensions/SharedMemory/SharedMemory.cc
View file @
3c3d5ae9
...
...
@@ -180,9 +180,12 @@ void SharedMemory::timerInfo( TimerMessage *tm )
saveHistory
();
else
if
(
tm
->
id
==
tmPulsar
)
{
bool
st
=
localGetState
(
ditPulsar
,
siPulsar
);
st
^=
true
;
localSaveState
(
ditPulsar
,
siPulsar
,
st
,
getId
());
if
(
siPulsar
.
id
!=
DefaultObjectId
)
{
bool
st
=
localGetState
(
ditPulsar
,
siPulsar
);
st
^=
true
;
localSaveState
(
ditPulsar
,
siPulsar
,
st
,
getId
());
}
}
}
...
...
extensions/lib/IOBase.cc
View file @
3c3d5ae9
...
...
@@ -107,7 +107,7 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force
if
(
it
->
cdiagram
)
//
{
// ,
// ,
// ,
if
(
!
it
->
nofilter
&&
it
->
df
.
size
()
>
1
)
{
...
...
@@ -129,7 +129,7 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force
else
{
IOController_i
::
CalibrateInfo
*
cal
(
&
(
it
->
cal
)
);
if
(
cal
->
maxRaw
!=
0
&&
cal
->
maxRaw
!=
cal
->
minRaw
)
//
if
(
cal
->
maxRaw
!=
cal
->
minRaw
)
//
val
=
UniSetTypes
::
lcalibrate
(
val
,
cal
->
minRaw
,
cal
->
maxRaw
,
cal
->
minCal
,
cal
->
maxCal
,
true
);
// ,
...
...
@@ -196,7 +196,7 @@ void IOBase::processingFasAI( IOBase* it, float fval, SMInterface* shm, bool for
}
IOController_i
::
CalibrateInfo
*
cal
(
&
(
it
->
cal
)
);
if
(
cal
->
maxRaw
!=
0
&&
cal
->
maxRaw
!=
cal
->
minRaw
)
//
if
(
cal
->
maxRaw
!=
cal
->
minRaw
)
//
val
=
UniSetTypes
::
lcalibrate
(
val
,
cal
->
minRaw
,
cal
->
maxRaw
,
cal
->
minCal
,
cal
->
maxCal
,
true
);
// "",
...
...
@@ -287,7 +287,7 @@ long IOBase::processingAsAO( IOBase* it, SMInterface* shm, bool force )
else
{
IOController_i
::
CalibrateInfo
*
cal
(
&
(
it
->
cal
)
);
if
(
cal
&&
cal
->
maxRaw
!=
0
&&
cal
->
maxRaw
!=
cal
->
minRaw
)
//
if
(
cal
&&
cal
->
maxRaw
!=
cal
->
minRaw
)
//
{
// !!!
val
=
UniSetTypes
::
lcalibrate
(
it
->
value
,
...
...
@@ -351,7 +351,7 @@ float IOBase::processingFasAO( IOBase* it, SMInterface* shm, bool force )
{
float
fval
=
val
;
IOController_i
::
CalibrateInfo
*
cal
(
&
(
it
->
cal
)
);
if
(
cal
->
maxRaw
!=
0
&&
cal
->
maxRaw
!=
cal
->
minRaw
)
//
if
(
cal
->
maxRaw
!=
cal
->
minRaw
)
//
{
// !!!
fval
=
UniSetTypes
::
fcalibrate
(
fval
,
...
...
@@ -475,7 +475,7 @@ bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm,
if
(
!
it
.
getProp
(
"filtersize"
).
empty
()
)
{
#warning " 0, f_size def_filtersize?"
f_size
=
it
.
getPIntProp
(
"filtersize"
,
0
);
f_size
=
it
.
getPIntProp
(
"filtersize"
,
def_filtersize
);
}
}
...
...
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