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