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
c3440296
Commit
c3440296
authored
Dec 03, 2012
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Переименовал xxx_template.h --> xxx.tcc
parent
f4c01132
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
29 deletions
+30
-29
libuniset.spec
conf/libuniset.spec
+2
-1
CallBackTimer.h
include/CallBackTimer.h
+1
-1
CallBackTimer.tcc
include/CallBackTimer.tcc
+14
-14
Makefile.am
include/Makefile.am
+1
-1
TriggerAND.h
include/TriggerAND.h
+1
-1
TriggerAND.tcc
include/TriggerAND.tcc
+4
-4
TriggerOR.h
include/TriggerOR.h
+1
-1
TriggerOR.tcc
include/TriggerOR.tcc
+4
-4
TriggerOutput.h
include/TriggerOutput.h
+1
-1
TriggerOutput.tcc
include/TriggerOutput.tcc
+1
-1
No files found.
conf/libuniset.spec
View file @
c3440296
...
...
@@ -15,7 +15,7 @@ Source: /var/ftp/pvt/Etersoft/Ourside/unstable/sources/tarball/%name-%version.ta
# manually removed: glibc-devel-static
# Automatically added by buildreq on Fri Nov 26 2010
BuildRequires:
glibc-devel-static
libcomedi-devel libcommoncpp2-devel libomniORB-devel libsigc++2.0-devel python-modules xsltproc
BuildRequires: libcomedi-devel libcommoncpp2-devel libomniORB-devel libsigc++2.0-devel python-modules xsltproc
# Using old package name instead of libmysqlclient-devel it absent in branch 5.0 for yauza
BuildRequires: libMySQL-devel
...
...
@@ -138,6 +138,7 @@ rm -f %buildroot%_libdir/*.la
%dir %_includedir/%oname/
%_includedir/%oname/*.h
%_includedir/%oname/*.hh
%_includedir/%oname/*.tcc
%_includedir/%oname/IOs/
%_includedir/%oname/modbus/
%_includedir/%oname/mysql/
...
...
include/CallBackTimer.h
View file @
c3440296
...
...
@@ -145,5 +145,5 @@ class CallBackTimer
};
};
#include "CallBackTimer
_template.h
"
#include "CallBackTimer
.tcc
"
# endif //CallBackTimer_H_
include/CallBackTimer
_template.h
→
include/CallBackTimer
.tcc
View file @
c3440296
...
...
@@ -20,10 +20,10 @@
/*! \file
* \author Pavel Vainerman
*/
// --------------------------------------------------------------------------
# ifndef CallBackTimer_T
EMPLATE
_H_
# define CallBackTimer_T
EMPLATE
_H_
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
# ifndef CallBackTimer_T
CC
_H_
# define CallBackTimer_T
CC
_H_
// --------------------------------------------------------------------------
#include <unistd.h>
#include <sstream>
#include "CallBackTimer.h"
...
...
@@ -69,7 +69,7 @@ void CallBackTimer<Caller>::work()
terminated = false;
while( !terminated )
{
usleep
(
UniSetTimer
::
MIN_QUANTITY_TIME_MKS
);
usleep(UniSetTimer::MIN_QUANTITY_TIME_MKS);
for( typename TimersList::iterator li=lst.begin(); li!=lst.end(); ++li )
{
...
...
@@ -110,9 +110,9 @@ void CallBackTimer<Caller>::add( int id, int timeMS )throw(UniSetTypes::LimitTim
{
ostringstream err;
err << "CallBackTimers: превышено максимальное количество таймеров" << MAXCallBackTimer;
throw
UniSetTypes
::
LimitTimers
(
err
.
str
());
throw UniSetTypes::LimitTimers(err.str());
}
PassiveTimer pt(timeMS);
TimerInfo ti(id, pt);
lst.push_back(ti);
...
...
@@ -124,7 +124,7 @@ template <class Caller>
void CallBackTimer<Caller>::remove( int id )
{
// STL - способ поиска
typename
TimersList
::
iterator
li
=
find_if
(
lst
.
begin
(),
lst
.
end
(),
FindId_eq
(
id
));
typename TimersList::iterator li= find_if(lst.begin(),lst.end(),FindId_eq(id));
if( li!=lst.end() )
lst.erase(li);
}
...
...
@@ -147,7 +147,7 @@ void CallBackTimer<Caller>::clearTimers()
template <class Caller>
void CallBackTimer<Caller>::reset( int id )
{
typename
TimersList
::
iterator
li
=
find_if
(
lst
.
begin
(),
lst
.
end
(),
FindId_eq
(
id
));
typename TimersList::iterator li= find_if(lst.begin(),lst.end(),FindId_eq(id));
if( li!=lst.end() )
li->pt.reset();
}
...
...
@@ -155,7 +155,7 @@ void CallBackTimer<Caller>::reset( int id )
template <class Caller>
void CallBackTimer<Caller>::setTiming( int id, int timeMS )
{
typename
TimersList
::
iterator
li
=
find_if
(
lst
.
begin
(),
lst
.
end
(),
FindId_eq
(
id
));
typename TimersList::iterator li= find_if(lst.begin(),lst.end(),FindId_eq(id));
if( li!=lst.end() )
li->pt.setTimer(timeMS);
}
...
...
@@ -163,7 +163,7 @@ void CallBackTimer<Caller>::setTiming( int id, int timeMS )
template <class Caller>
int CallBackTimer<Caller>::getInterval( int id )
{
typename
TimersList
::
iterator
li
=
find_if
(
lst
.
begin
(),
lst
.
end
(),
FindId_eq
(
id
));
typename TimersList::iterator li= find_if(lst.begin(),lst.end(),FindId_eq(id));
if( li!=lst.end() )
return li->pt.getInterval();
return -1;
...
...
@@ -172,12 +172,12 @@ int CallBackTimer<Caller>::getInterval( int id )
template <class Caller>
int CallBackTimer<Caller>::getCurrent( int id )
{
typename
TimersList
::
iterator
li
=
find_if
(
lst
.
begin
(),
lst
.
end
(),
FindId_eq
(
id
));
typename TimersList::iterator li= find_if(lst.begin(),lst.end(),FindId_eq(id));
if( li!=lst.end() )
return li->pt.getCurrent();
return -1;
}
// ------------------------------------------------------------------------------------------
# endif //CallBackTimer_H_
# endif //CallBackTimer_
TCC_
H_
include/Makefile.am
View file @
c3440296
...
...
@@ -7,7 +7,7 @@ include $(top_builddir)/conf/common.mk
# install
devel_include_HEADERS
=
*
.h
*
.hh
devel_include_HEADERS
=
*
.h
*
.hh
*
.tcc
devel_includedir
=
$(pkgincludedir)
all-local
:
...
...
include/TriggerAND.h
View file @
c3440296
...
...
@@ -115,6 +115,6 @@ class TriggerAND
};
//---------------------------------------------------------------------------
#include "TriggerAND
_template.h
"
#include "TriggerAND
.tcc
"
//---------------------------------------------------------------------------
#endif
include/TriggerAND
_template.h
→
include/TriggerAND
.tcc
View file @
c3440296
...
...
@@ -43,10 +43,10 @@ bool TriggerAND<Caller,InputType>::commit(InputType num, bool state)
if( it!=inputs.end() )
{
inputs[num] = state;
check
();
check();
return true;
}
return false;
}
...
...
@@ -66,7 +66,7 @@ void TriggerAND<Caller,InputType>::remove(InputType num)
if( it!=inputs.end() )
inputs.erase(it);
check
();
check();
}
//---------------------------------------------------------------------------
...
...
@@ -102,7 +102,7 @@ void TriggerAND<Caller,InputType>::check()
return;
}
}
out = true;
if( old != out )
{
...
...
include/TriggerOR.h
View file @
c3440296
...
...
@@ -116,6 +116,6 @@ class TriggerOR
};
//---------------------------------------------------------------------------
#include "TriggerOR
_template.h
"
#include "TriggerOR
.tcc
"
//---------------------------------------------------------------------------
#endif
include/TriggerOR
_template.h
→
include/TriggerOR
.tcc
View file @
c3440296
...
...
@@ -43,10 +43,10 @@ bool TriggerOR<Caller,InputType>::commit(InputType num, bool state)
if( it!=inputs.end() )
{
inputs[num] = state;
check
();
check();
return true;
}
return false;
}
...
...
@@ -66,7 +66,7 @@ void TriggerOR<Caller,InputType>::remove(InputType num)
if( it!=inputs.end() )
inputs.erase(it);
check
();
check();
}
//---------------------------------------------------------------------------
...
...
@@ -102,7 +102,7 @@ void TriggerOR<Caller,InputType>::check()
return;
}
}
out = false;
if( old != out )
...
...
include/TriggerOutput.h
View file @
c3440296
...
...
@@ -122,6 +122,6 @@ class TriggerOutput
};
//---------------------------------------------------------------------------
#include "TriggerOutput
_template.h
"
#include "TriggerOutput
.tcc
"
//---------------------------------------------------------------------------
#endif
include/TriggerOutput
_template.h
→
include/TriggerOutput
.tcc
View file @
c3440296
...
...
@@ -42,7 +42,7 @@ TriggerOutput<Caller,OutIdType,ValueType>::~TriggerOutput()
template <class Caller, typename OutIdType, typename ValueType>
void TriggerOutput<Caller,OutIdType,ValueType>::add(OutIdType num, ValueType val)
{
outs
[
num
]
=
val
;
outs[num] = val;
set(num,val);
try
{
...
...
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