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
29d02fbb
Commit
29d02fbb
authored
Oct 27, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes in SM
fixed minor bug in uniset-stop.sh
parent
ee02c596
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
19 deletions
+69
-19
uniset-functions.sh
Utilities/scripts/uniset-functions.sh
+1
-0
uniset-start.sh
Utilities/scripts/uniset-start.sh
+1
-0
uniset-stop.sh
Utilities/scripts/uniset-stop.sh
+2
-1
libuniset.spec
conf/libuniset.spec
+8
-1
SharedMemory.cc
extensions/SharedMemory/SharedMemory.cc
+46
-7
SharedMemory.h
extensions/SharedMemory/SharedMemory.h
+11
-10
No files found.
Utilities/scripts/uniset-functions.sh
View file @
29d02fbb
#!/bin/sh
#!/bin/sh
USERID
=
0
USERID
=
0
BASEOMNIPORT
=
2809
BASEOMNIPORT
=
2809
...
...
Utilities/scripts/uniset-start.sh
View file @
29d02fbb
#!/bin/sh
#!/bin/sh
#
#
.
uniset-functions.sh
.
uniset-functions.sh
...
...
Utilities/scripts/uniset-stop.sh
View file @
29d02fbb
#!/bin/sh
#!/bin/sh
SIG
=
-TERM
SIG
=
-TERM
ARGS
=
$1
ARGS
=
$1
...
@@ -35,7 +36,7 @@ for i in $(tac $RANSERVICES | cut -d " " -f 2)
...
@@ -35,7 +36,7 @@ for i in $(tac $RANSERVICES | cut -d " " -f 2)
do
do
TOKILL
=
$(
basename
$i
)
TOKILL
=
$(
basename
$i
)
echo
-n
$TOKILL
...
echo
-n
$TOKILL
...
if
[
$(
ps
-
x
|
grep
$TOKILL
|
wc
-l
)
=
0
]
if
[
$(
ps
a
x |
grep
$TOKILL
|
wc
-l
)
=
0
]
then
then
echo
" already stoppped [ OK ]"
echo
" already stoppped [ OK ]"
else
else
...
...
conf/libuniset.spec
View file @
29d02fbb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 0.97
Version: 0.97
Release: eter3
2
Release: eter3
4
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,13 @@ rm -f %buildroot%_libdir/*.la
...
@@ -178,6 +178,13 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
%changelog
* Tue Oct 27 2009 Pavel Vainerman <pv@altlinux.ru> 0.97-eter33
- fixed bug (int previous build) in SM
- fixed bug in uniset-stop.sh
* Tue Oct 27 2009 Pavel Vainerman <pv@altlinux.ru> 0.97-eter32
- new build
* Sat Oct 24 2009 Pavel Vainerman <pv@altlinux.ru> 0.97-eter31
* Sat Oct 24 2009 Pavel Vainerman <pv@altlinux.ru> 0.97-eter31
- new build
- new build
...
...
extensions/SharedMemory/SharedMemory.cc
View file @
29d02fbb
...
@@ -476,20 +476,59 @@ bool SharedMemory::readItem( UniXML& xml, UniXML_iterator& it, xmlNode* sec )
...
@@ -476,20 +476,59 @@ bool SharedMemory::readItem( UniXML& xml, UniXML_iterator& it, xmlNode* sec )
return
true
;
return
true
;
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
void
SharedMemory
::
saveValue
(
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Long
value
,
void
SharedMemory
::
localSaveValue
(
AIOStateList
::
iterator
&
it
,
const
IOController_i
::
SensorInfo
&
si
,
UniversalIO
::
IOTypes
typ
e
,
UniSetTypes
::
ObjectId
sup_id
)
CORBA
::
Long
newvalu
e
,
UniSetTypes
::
ObjectId
sup_id
)
{
{
if
(
hist
.
empty
()
)
{
IONotifyController_LT
::
localSaveValue
(
it
,
si
,
newvalue
,
sup_id
);
return
;
}
uniset_mutex_lock
l
(
hbmutex
);
IONotifyController_LT
::
localSaveValue
(
it
,
si
,
newvalue
,
sup_id
);
}
// ------------------------------------------------------------------------------------------
void
SharedMemory
::
localSaveState
(
DIOStateList
::
iterator
&
it
,
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Boolean
newstate
,
UniSetTypes
::
ObjectId
sup_id
)
{
if
(
hist
.
empty
()
)
{
IONotifyController_LT
::
localSaveState
(
it
,
si
,
newstate
,
sup_id
);
return
;
}
uniset_mutex_lock
l
(
hbmutex
);
IONotifyController_LT
::
localSaveState
(
it
,
si
,
newstate
,
sup_id
);
}
// ------------------------------------------------------------------------------------------
void
SharedMemory
::
localSetState
(
DIOStateList
::
iterator
&
it
,
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Boolean
newstate
,
UniSetTypes
::
ObjectId
sup_id
)
{
if
(
hist
.
empty
()
)
{
IONotifyController_LT
::
localSetState
(
it
,
si
,
newstate
,
sup_id
);
return
;
}
uniset_mutex_lock
l
(
hbmutex
);
uniset_mutex_lock
l
(
hbmutex
);
IONotifyController_LT
::
saveValue
(
si
,
value
,
type
,
sup_id
);
IONotifyController_LT
::
localSetState
(
it
,
si
,
newstate
,
sup_id
);
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
void
SharedMemory
::
fastSaveValue
(
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Long
value
,
void
SharedMemory
::
localSetValue
(
AIOStateList
::
iterator
&
it
,
const
IOController_i
::
SensorInfo
&
si
,
UniversalIO
::
IOTypes
typ
e
,
UniSetTypes
::
ObjectId
sup_id
)
CORBA
::
Long
valu
e
,
UniSetTypes
::
ObjectId
sup_id
)
{
{
if
(
hist
.
empty
()
)
{
IONotifyController_LT
::
localSetValue
(
it
,
si
,
value
,
sup_id
);
return
;
}
uniset_mutex_lock
l
(
hbmutex
);
uniset_mutex_lock
l
(
hbmutex
);
IONotifyController_LT
::
fastSaveValue
(
si
,
value
,
type
,
sup_id
);
IONotifyController_LT
::
localSetValue
(
it
,
si
,
value
,
sup_id
);
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
SharedMemory
*
SharedMemory
::
init_smemory
(
int
argc
,
const
char
*
const
*
argv
)
SharedMemory
*
SharedMemory
::
init_smemory
(
int
argc
,
const
char
*
const
*
argv
)
{
{
string
dfile
=
conf
->
getArgParam
(
"--datfile"
,
conf
->
getConfFileName
());
string
dfile
=
conf
->
getArgParam
(
"--datfile"
,
conf
->
getConfFileName
());
...
...
extensions/SharedMemory/SharedMemory.h
View file @
29d02fbb
...
@@ -31,16 +31,6 @@ class SharedMemory:
...
@@ -31,16 +31,6 @@ class SharedMemory:
/*! help- */
/*! help- */
static
void
help_print
(
int
argc
,
const
char
*
const
*
argv
);
static
void
help_print
(
int
argc
,
const
char
*
const
*
argv
);
virtual
void
saveValue
(
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Long
value
,
UniversalIO
::
IOTypes
type
=
UniversalIO
::
AnalogInput
,
UniSetTypes
::
ObjectId
sup_id
=
UniSetTypes
::
DefaultObjectId
);
virtual
void
fastSaveValue
(
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Long
value
,
UniversalIO
::
IOTypes
type
=
UniversalIO
::
AnalogInput
,
UniSetTypes
::
ObjectId
sup_id
=
UniSetTypes
::
DefaultObjectId
);
// "" SM .
// "" SM .
// , ,
// , ,
// , SM .
// , SM .
...
@@ -108,6 +98,17 @@ class SharedMemory:
...
@@ -108,6 +98,17 @@ class SharedMemory:
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
void
askSensors
(
UniversalIO
::
UIOCommand
cmd
);
void
sendEvent
(
UniSetTypes
::
SystemMessage
&
sm
);
void
sendEvent
(
UniSetTypes
::
SystemMessage
&
sm
);
virtual
void
localSaveValue
(
AIOStateList
::
iterator
&
it
,
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Long
newvalue
,
UniSetTypes
::
ObjectId
sup_id
);
virtual
void
localSaveState
(
DIOStateList
::
iterator
&
it
,
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Boolean
newstate
,
UniSetTypes
::
ObjectId
sup_id
);
virtual
void
localSetState
(
DIOStateList
::
iterator
&
it
,
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Boolean
newstate
,
UniSetTypes
::
ObjectId
sup_id
);
virtual
void
localSetValue
(
AIOStateList
::
iterator
&
it
,
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Long
value
,
UniSetTypes
::
ObjectId
sup_id
);
//
//
virtual
void
sigterm
(
int
signo
);
virtual
void
sigterm
(
int
signo
);
bool
activateObject
();
bool
activateObject
();
...
...
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