Commit 29d02fbb authored by Pavel Vainerman's avatar Pavel Vainerman

minor fixes in SM

fixed minor bug in uniset-stop.sh
parent ee02c596
#!/bin/sh
USERID=0
BASEOMNIPORT=2809
......
#!/bin/sh
#
. uniset-functions.sh
......
#!/bin/sh
SIG=-TERM
ARGS=$1
......@@ -35,7 +36,7 @@ for i in $(tac $RANSERVICES | cut -d " " -f 2)
do
TOKILL=$(basename $i)
echo -n $TOKILL...
if [ $(ps -x | grep $TOKILL | wc -l) = 0 ]
if [ $(ps ax | grep $TOKILL | wc -l) = 0 ]
then
echo " already stoppped [ OK ]"
else
......
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.97
Release: eter32
Release: eter34
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
......@@ -178,6 +178,13 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%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
- new build
......
......@@ -476,20 +476,59 @@ bool SharedMemory::readItem( UniXML& xml, UniXML_iterator& it, xmlNode* sec )
return true;
}
// ------------------------------------------------------------------------------------------
void SharedMemory::saveValue( const IOController_i::SensorInfo& si, CORBA::Long value,
UniversalIO::IOTypes type, UniSetTypes::ObjectId sup_id )
void SharedMemory::localSaveValue( AIOStateList::iterator& it, const IOController_i::SensorInfo& si,
CORBA::Long newvalue, UniSetTypes::ObjectId sup_id )
{
if( hist.empty() )
{
IONotifyController_LT::localSaveValue( it, si, newvalue, sup_id );
return;
}
uniset_mutex_lock l(hbmutex);
IONotifyController_LT::saveValue(si,value,type,sup_id);
IONotifyController_LT::localSaveValue( it, si, newvalue, sup_id );
}
// ------------------------------------------------------------------------------------------
void SharedMemory::fastSaveValue(const IOController_i::SensorInfo& si, CORBA::Long value,
UniversalIO::IOTypes type, UniSetTypes::ObjectId 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::fastSaveValue(si,value,type,sup_id);
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);
IONotifyController_LT::localSetState( it, si, newstate, sup_id );
}
// ------------------------------------------------------------------------------------------
void SharedMemory::localSetValue( AIOStateList::iterator& it, const IOController_i::SensorInfo& si,
CORBA::Long value, UniSetTypes::ObjectId sup_id )
{
if( hist.empty() )
{
IONotifyController_LT::localSetValue( it, si, value, sup_id );
return;
}
uniset_mutex_lock l(hbmutex);
IONotifyController_LT::localSetValue( it, si, value, sup_id );
}
// ------------------------------------------------------------------------------------------
SharedMemory* SharedMemory::init_smemory( int argc, const char* const* argv )
{
string dfile = conf->getArgParam("--datfile", conf->getConfFileName());
......
......@@ -31,16 +31,6 @@ class SharedMemory:
/*! help- */
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 .
......@@ -108,6 +98,17 @@ class SharedMemory:
void askSensors( UniversalIO::UIOCommand cmd );
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 );
bool activateObject();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment