Commit 5598a5d2 authored by Pavel Vaynerman's avatar Pavel Vaynerman

Merge commit 'server/master'

Conflicts: conf/uniset.spec
parents cd2c6456 523ad82b
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
( ConsumerInfo ..). uniset-codegen, ( ConsumerInfo ..). uniset-codegen,
SensorInfo ObjectId. SensorInfo ObjectId.
----------
RTUExchange smonit: processing "precision"
============== admin: processing "precision"
... \ No newline at end of file
udev
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f /usr/bin/uniset-stop.sh stop.sh
#ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
ln -s -f ./configure.xml test.xml
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Name: uniset Name: uniset
Version: 0.96 Version: 0.96
Release: eter24 Release: eter26
Summary: UniSet Summary: UniSet
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
...@@ -181,7 +181,7 @@ Libraries needed to develop for uniset extentions ...@@ -181,7 +181,7 @@ Libraries needed to develop for uniset extentions
%_bindir/%name-smviewer %_bindir/%name-smviewer
%changelog %changelog
* Tue Jun 09 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter24 * Mon Jun 08 2009 Pavel Vainerman <pv@aeu> 0.96-eter25
- new build - new build
* Thu Jun 04 2009 Pavel Vainerman <pv@aeu> 0.96-eter23 * Thu Jun 04 2009 Pavel Vainerman <pv@aeu> 0.96-eter23
......
...@@ -492,6 +492,9 @@ void IOControl::iopoll() ...@@ -492,6 +492,9 @@ void IOControl::iopoll()
unideb[Debug::LEVEL3] << myname << "(iopoll): catch ..." << endl; unideb[Debug::LEVEL3] << myname << "(iopoll): catch ..." << endl;
} }
} }
for( IOMap::iterator it=iomap.begin(); it!=iomap.end(); ++it )
IOBase::processingThreshold(&(*it),shm,force);
} }
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
void IOControl::readConfiguration() void IOControl::readConfiguration()
......
...@@ -298,6 +298,9 @@ void MBMaster::poll() ...@@ -298,6 +298,9 @@ void MBMaster::poll()
dlog[Debug::LEVEL3] << myname << "(poll): catch ..." << endl; dlog[Debug::LEVEL3] << myname << "(poll): catch ..." << endl;
} }
} }
for( MBMap::iterator it=mbmap.begin(); it!=mbmap.end(); ++it )
IOBase::processingThreshold(&(*it),shm,force);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
long MBMaster::readReg( MBMap::iterator& p ) long MBMaster::readReg( MBMap::iterator& p )
......
...@@ -307,6 +307,9 @@ void MBSlave::execute_rtu() ...@@ -307,6 +307,9 @@ void MBSlave::execute_rtu()
<< "(execute_rtu): (hb) " << ex << std::endl; << "(execute_rtu): (hb) " << ex << std::endl;
} }
} }
for( IOMap::iterator it=iomap.begin(); it!=iomap.end(); ++it )
IOBase::processingThreshold(&it->second,shm,force);
} }
catch(...){} catch(...){}
} }
...@@ -355,6 +358,9 @@ void MBSlave::execute_tcp() ...@@ -355,6 +358,9 @@ void MBSlave::execute_tcp()
<< "(execute_tcp): (hb) " << ex << std::endl; << "(execute_tcp): (hb) " << ex << std::endl;
} }
} }
for( IOMap::iterator it=iomap.begin(); it!=iomap.end(); ++it )
IOBase::processingThreshold(&it->second,shm,force);
} }
catch(...){} catch(...){}
} }
......
...@@ -60,14 +60,15 @@ class RTUExchange: ...@@ -60,14 +60,15 @@ class RTUExchange:
public IOBase public IOBase
{ {
// only for RTU // only for RTU
short nbit; /*!< bit number (for func=[0x01,0x02]) */ short nbit; /*!< bit number) */
VTypes::VType vType; /*!< type of value */ VTypes::VType vType; /*!< type of value */
short rnum; /*!< count of registers */ short rnum; /*!< count of registers */
short nbyte; /*!< byte number (1-2) */
RSProperty(): RSProperty():
nbit(-1),vType(VTypes::vtUnknown), nbit(-1),vType(VTypes::vtUnknown),
rnum(VTypes::wsize(VTypes::vtUnknown)), rnum(VTypes::wsize(VTypes::vtUnknown)),
reg(0) nbyte(0),reg(0)
{} {}
RegInfo* reg; RegInfo* reg;
...@@ -76,7 +77,8 @@ class RTUExchange: ...@@ -76,7 +77,8 @@ class RTUExchange:
friend std::ostream& operator<<( std::ostream& os, const RSProperty& p ); friend std::ostream& operator<<( std::ostream& os, const RSProperty& p );
typedef std::list<RSProperty> PList; typedef std::list<RSProperty> PList;
typedef std::map<ModbusRTU::ModbusData,RegInfo*> RegMap;
struct RegInfo struct RegInfo
{ {
RegInfo(): RegInfo():
...@@ -106,11 +108,13 @@ class RTUExchange: ...@@ -106,11 +108,13 @@ class RTUExchange:
// optimization // optimization
int q_num; /*! number in query */ int q_num; /*! number in query */
int q_count; /*! count registers for query */ int q_count; /*! count registers for query */
RegMap::iterator rit;
}; };
friend std::ostream& operator<<( std::ostream& os, RegInfo& r ); friend std::ostream& operator<<( std::ostream& os, RegInfo& r );
typedef std::map<ModbusRTU::ModbusData,RegInfo*> RegMap;
struct RTUDevice struct RTUDevice
{ {
...@@ -177,6 +181,7 @@ class RTUExchange: ...@@ -177,6 +181,7 @@ class RTUExchange:
void updateRTU(RegMap::iterator& it); void updateRTU(RegMap::iterator& it);
void updateMTR(RegMap::iterator& it); void updateMTR(RegMap::iterator& it);
void updateRTU188(RegMap::iterator& it); void updateRTU188(RegMap::iterator& it);
void updateRSProperty( RSProperty* p, bool write_only=false );
virtual void processingMessage( UniSetTypes::VoidMessage *msg ); virtual void processingMessage( UniSetTypes::VoidMessage *msg );
void sysCommand( UniSetTypes::SystemMessage *msg ); void sysCommand( UniSetTypes::SystemMessage *msg );
...@@ -236,6 +241,9 @@ class RTUExchange: ...@@ -236,6 +241,9 @@ class RTUExchange:
bool activated; bool activated;
int activateTimeout; int activateTimeout;
bool rs_pre_clean;
bool noQueryOptimization;
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#endif // _RS_EXCHANGE_H_ #endif // _RS_EXCHANGE_H_
......
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f /usr/bin/uniset-stop.sh stop.sh
#ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
ln -s -f ./configure.xml test.xml
#!/bin/sh #!/bin/sh
uniset-start.sh -f ./uniset-rtuexchange --confile test.xml \ uniset-start.sh -f ./uniset-rtuexchange --confile test.xml \
--rs-dev /dev/cbsideA0 \ --rs-dev /dev/ttyS0 \
--rs-name RSExchange \ --rs-name RSExchange \
--rs-speed 38400 \ --rs-speed 38400 \
--rs-filter-field rs \ --rs-filter-field rs \
--rs-filter-value 1 \ --rs-filter-value 3 \
--dlog-add-levels info,crit,warn,level1 --dlog-add-levels info,crit,warn \
--rs-force 0 \
--rs-force-out 0 \
#,level3 #,level3
# --rs-force 1 \
...@@ -411,7 +411,7 @@ void SharedMemory::fastSaveValue(const IOController_i::SensorInfo& si, CORBA::Lo ...@@ -411,7 +411,7 @@ void SharedMemory::fastSaveValue(const IOController_i::SensorInfo& si, CORBA::Lo
SharedMemory* SharedMemory::init_smemory( int argc, char* argv[] ) SharedMemory* SharedMemory::init_smemory( int argc, char* argv[] )
{ {
string dfile = conf->getArgParam("--datfile",conf->getConfFileName()); string dfile = conf->getArgParam("--datfile",conf->getConfFileName());
dlog[Debug::INFO] << "(smemory): datfile = " << dfile << endl;
if( dfile[0]!='.' && dfile[0]!='/' ) if( dfile[0]!='.' && dfile[0]!='/' )
dfile = conf->getConfDir() + dfile; dfile = conf->getConfDir() + dfile;
......
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f /usr/bin/uniset-stop.sh stop.sh
#ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
ln -s -f ./configure.xml test.xml
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
ulimit -Sc 1000000000000 ulimit -Sc 1000000000000
uniset-start.sh -f ./uniset-smemory --smemory-id SharedMemory1 \ uniset-start.sh -f ./uniset-smemory --smemory-id SharedMemory1 \
--confile test.xml \ --confile test.xml --datfile /etc/AEU/configure.xml \
--unideb-add-levels info,crit,warn,level9,system --unideb-add-levels info,crit,warn,level9,system
...@@ -33,7 +33,8 @@ static const int NoSafety = -1; ...@@ -33,7 +33,8 @@ static const int NoSafety = -1;
invert(false), invert(false),
jar_state(false), jar_state(false),
ondelay_state(false), ondelay_state(false),
offdelay_state(false) offdelay_state(false),
t_ai(UniSetTypes::DefaultObjectId)
{} {}
...@@ -75,6 +76,14 @@ static const int NoSafety = -1; ...@@ -75,6 +76,14 @@ static const int NoSafety = -1;
bool ondelay_state; /*!< */ bool ondelay_state; /*!< */
bool offdelay_state; /*!< */ bool offdelay_state; /*!< */
//
UniSetTypes::ObjectId t_ai; /*!< ,
,
*/
IONotifyController_i::ThresholdInfo ti;
IOController::AIOStateList::iterator ait; IOController::AIOStateList::iterator ait;
IOController::DIOStateList::iterator dit; IOController::DIOStateList::iterator dit;
UniSetTypes::uniset_spin_mutex val_lock; /*!< */ UniSetTypes::uniset_spin_mutex val_lock; /*!< */
...@@ -87,6 +96,7 @@ static const int NoSafety = -1; ...@@ -87,6 +96,7 @@ static const int NoSafety = -1;
static long processingAsAO( IOBase* it, SMInterface* shm, bool force ); static long processingAsAO( IOBase* it, SMInterface* shm, bool force );
static float processingFasAO( IOBase* it, SMInterface* shm, bool force ); static float processingFasAO( IOBase* it, SMInterface* shm, bool force );
static bool processingAsDO( IOBase* it, SMInterface* shm, bool force ); static bool processingAsDO( IOBase* it, SMInterface* shm, bool force );
static void processingThreshold( IOBase* it, SMInterface* shm, bool force );
static bool initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm, static bool initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm,
DebugStream* dlog=0, std::string myname="", DebugStream* dlog=0, std::string myname="",
int def_filtersize=0, float def_filterT=0.0 ); int def_filtersize=0, float def_filterT=0.0 );
......
...@@ -16,7 +16,8 @@ namespace VTypes ...@@ -16,7 +16,8 @@ namespace VTypes
{ {
vtUnknown, vtUnknown,
vtF2, vtF2,
vtF4 vtF4,
vtByte
}; };
std::ostream& operator<<( std::ostream& os, const VType& vt ); std::ostream& operator<<( std::ostream& os, const VType& vt );
...@@ -97,6 +98,48 @@ namespace VTypes ...@@ -97,6 +98,48 @@ namespace VTypes
F4mem raw; F4mem raw;
}; };
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
class Byte
{
public:
static const int bsize = 2;
// ------------------------------------------
/*! */
typedef union
{
unsigned short w;
unsigned char b[bsize];
} Bytemem;
// ------------------------------------------
// ...
Byte(){ raw.w = 0; }
Byte( unsigned char b1, unsigned char b2 ){ raw.b[0]=b1; raw.b[1]=b2; }
Byte( const long val )
{
raw.w = val;
}
Byte( const ModbusRTU::ModbusData dat )
{
raw.w = dat;
}
~Byte(){}
// ------------------------------------------
/*! */
static int wsize(){ return 1; }
/*! */
static VType type(){ return vtByte; }
// ------------------------------------------
operator long(){ return lroundf(raw.w); }
unsigned char operator[]( const int i ){ return raw.b[i]; }
Bytemem raw;
};
// --------------------------------------------------------------------------
} // end of namespace VTypes } // end of namespace VTypes
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
......
...@@ -105,17 +105,18 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force ...@@ -105,17 +105,18 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force
return; return;
} }
// ...
if( !it->nofilter )
{
if( it->df.size() > 1 )
it->df.add(val);
val = it->df.filterRC(val);
}
if( it->cdiagram ) // if( it->cdiagram ) //
{ {
// ,
// ,
if( !it->nofilter && it->df.size() > 1 )
{
if( it->f_median )
val = it->df.median(val);
else
val = it->df.filterRC(val);
}
if( it->craw != val ) if( it->craw != val )
{ {
it->craw = val; it->craw = val;
...@@ -130,6 +131,16 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force ...@@ -130,6 +131,16 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force
IOController_i::CalibrateInfo* cal( &(it->cal) ); IOController_i::CalibrateInfo* cal( &(it->cal) );
if( cal->maxRaw!=0 && cal->maxRaw!=cal->minRaw ) // if( cal->maxRaw!=0 && 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);
// ,
// ,
if( !it->nofilter && it->df.size() > 1 )
{
if( it->f_median )
val = it->df.median(val);
else
val = it->df.filterRC(val);
}
} }
// "", // "",
...@@ -185,7 +196,7 @@ void IOBase::processingFasAI( IOBase* it, float fval, SMInterface* shm, bool for ...@@ -185,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!=0 && cal->maxRaw!=cal->minRaw ) //
val = UniSetTypes::fcalibrate(val,cal->minRaw,cal->maxRaw,cal->minCal,cal->maxCal,true); val = UniSetTypes::lcalibrate(val,cal->minRaw,cal->maxRaw,cal->minCal,cal->maxCal,true);
// "", // "",
// //
...@@ -246,12 +257,15 @@ void IOBase::processingAsDI( IOBase* it, bool set, SMInterface* shm, bool force ...@@ -246,12 +257,15 @@ void IOBase::processingAsDI( IOBase* it, bool set, SMInterface* shm, bool force
long IOBase::processingAsAO( IOBase* it, SMInterface* shm, bool force ) long IOBase::processingAsAO( IOBase* it, SMInterface* shm, bool force )
{ {
uniset_spin_lock lock(it->val_lock); uniset_spin_lock lock(it->val_lock);
long val = it->value; long val = it->value;
if( force ) if( force )
{ {
val = shm->localGetValue(it->ait,it->si.id); if( it->stype == UniversalIO::DigitalInput || it->stype == UniversalIO::DigitalOutput )
val = shm->localGetState(it->dit,it->si.id) ? 1 : 0;
else if( it->stype == UniversalIO::AnalogInput || it->stype == UniversalIO::AnalogOutput )
val = shm->localGetValue(it->ait,it->si.id);
it->value = val; it->value = val;
} }
...@@ -272,7 +286,7 @@ long IOBase::processingAsAO( IOBase* it, SMInterface* shm, bool force ) ...@@ -272,7 +286,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->maxRaw!=0 && cal->maxRaw!=cal->minRaw ) // if( cal && cal->maxRaw!=0 && cal->maxRaw!=cal->minRaw ) //
{ {
// !!! // !!!
val = UniSetTypes::lcalibrate(it->value, val = UniSetTypes::lcalibrate(it->value,
...@@ -291,19 +305,19 @@ long IOBase::processingAsAO( IOBase* it, SMInterface* shm, bool force ) ...@@ -291,19 +305,19 @@ long IOBase::processingAsAO( IOBase* it, SMInterface* shm, bool force )
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
bool IOBase::processingAsDO( IOBase* it, SMInterface* shm, bool force ) bool IOBase::processingAsDO( IOBase* it, SMInterface* shm, bool force )
{ {
uniset_spin_lock lock(it->val_lock); uniset_spin_lock lock(it->val_lock);
bool set = it->value; bool set = it->value;
if( it->stype == UniversalIO::DigitalOutput ||
it->stype == UniversalIO::DigitalInput )
{
if( force ) if( force )
set = shm->localGetState(it->dit,it->si.id); {
if( it->stype == UniversalIO::DigitalInput || it->stype == UniversalIO::DigitalOutput )
set = shm->localGetState(it->dit,it->si.id);
else if( it->stype == UniversalIO::AnalogInput || it->stype == UniversalIO::AnalogOutput )
set = shm->localGetValue(it->ait,it->si.id) ? true : false;
}
set = it->invert ? !set : set; set = it->invert ? !set : set;
return set; return set;
}
return false;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
float IOBase::processingFasAO( IOBase* it, SMInterface* shm, bool force ) float IOBase::processingFasAO( IOBase* it, SMInterface* shm, bool force )
...@@ -351,6 +365,26 @@ float IOBase::processingFasAO( IOBase* it, SMInterface* shm, bool force ) ...@@ -351,6 +365,26 @@ float IOBase::processingFasAO( IOBase* it, SMInterface* shm, bool force )
return val; return val;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void IOBase::processingThreshold( IOBase* it, SMInterface* shm, bool force )
{
if( it->t_ai == DefaultObjectId )
return;
long val = shm->localGetValue(it->ait,it->t_ai);
bool set = it->value ? true : false;
// cout << "val=" << val << " set=" << set << endl;
//
// lowLimit-
if( val <= (it->ti.lowlimit-it->ti.sensibility) )
set = false;
else if( val >= (it->ti.hilimit+it->ti.sensibility) )
set = true;
// cout << "thresh: set=" << set << endl;
processingAsDI(it,set,shm,force);
}
// -----------------------------------------------------------------------------
bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm, bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm,
DebugStream* dlog, std::string myname, DebugStream* dlog, std::string myname,
...@@ -456,9 +490,6 @@ bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm, ...@@ -456,9 +490,6 @@ bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm,
} }
} }
for( int i=0; i<f_size; i++ )
b->df.add( b->defval );
if( !it.getProp("filterT").empty() ) if( !it.getProp("filterT").empty() )
{ {
f_T = atof(it.getProp("filterT").c_str()); f_T = atof(it.getProp("filterT").c_str());
...@@ -469,10 +500,36 @@ bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm, ...@@ -469,10 +500,36 @@ bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm,
if( b->stype == UniversalIO::AnalogInput ) if( b->stype == UniversalIO::AnalogInput )
b->df.setSettings( f_size, f_T ); b->df.setSettings( f_size, f_T );
b->df.init(b->defval);
std::string caldiagram( it.getProp("caldiagram") ); std::string caldiagram( it.getProp("caldiagram") );
if( !caldiagram.empty() ) if( !caldiagram.empty() )
b->cdiagram = UniSetExtentions::buildCalibrationDiagram(caldiagram); b->cdiagram = UniSetExtentions::buildCalibrationDiagram(caldiagram);
} }
else if( b->stype == UniversalIO::DigitalInput || b->stype == UniversalIO::DigitalOutput )
{
string tai(it.getProp("threshold_aid"));
if( !tai.empty() )
{
b->t_ai = conf->getSensorID(tai);
if( b->t_ai == DefaultObjectId )
{
if( dlog )
dlog[Debug::CRIT] << myname << "(IOBase::readItem): unknown ID for threshold_ai "
<< tai << endl;
return false;
}
b->ti.lowlimit = uni_atoi( it.getProp("lowlimit").c_str() );
b->ti.hilimit = uni_atoi( it.getProp("hilimit").c_str() );
b->ti.sensibility = uni_atoi( it.getProp("sensibility").c_str() );
}
}
// else
// {
// dlog[Debug::CRIT] << myname << "(IOBase::readItem): iotype=: " << stype << " " << sname << endl;
// return false;
// }
return true; return true;
} }
......
...@@ -16,6 +16,9 @@ std::ostream& operator<<( std::ostream& os, const VType& vt ) ...@@ -16,6 +16,9 @@ std::ostream& operator<<( std::ostream& os, const VType& vt )
VType str2type( const std::string s ) VType str2type( const std::string s )
{ {
if( s == "Byte" )
return vtByte;
if( s == "F2" ) if( s == "F2" )
return vtF2; return vtF2;
if( s == "F4" ) if( s == "F4" )
...@@ -26,6 +29,8 @@ VType str2type( const std::string s ) ...@@ -26,6 +29,8 @@ VType str2type( const std::string s )
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
string type2str( VType t ) string type2str( VType t )
{ {
if( t == vtByte )
return "Byte";
if( t == vtF2 ) if( t == vtF2 )
return "F2"; return "F2";
if( t == vtF4 ) if( t == vtF4 )
...@@ -36,6 +41,8 @@ string type2str( VType t ) ...@@ -36,6 +41,8 @@ string type2str( VType t )
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
int wsize( VType t ) int wsize( VType t )
{ {
if( t == vtByte )
return Byte::wsize();
if( t == vtF2 ) if( t == vtF2 )
return F2::wsize(); return F2::wsize();
if( t == vtF4 ) if( t == vtF4 )
......
...@@ -207,11 +207,16 @@ DebugStream::~DebugStream() ...@@ -207,11 +207,16 @@ DebugStream::~DebugStream()
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
const DebugStream& DebugStream::operator=( const DebugStream& r ) const DebugStream& DebugStream::operator=( const DebugStream& r )
{ {
if( r == *this )
return *this;
dt = r.dt; dt = r.dt;
show_datetime = r.show_datetime; show_datetime = r.show_datetime;
fname = r.fname; fname = r.fname;
if( !r.fname.empty() ) if( !r.fname.empty() )
logFile(fname.c_str()); logFile(fname.c_str());
return *this;
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
/// Sets the debugstreams' logfile to f. /// Sets the debugstreams' logfile to f.
......
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