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
4d1ad77e
You need to sign in or sign up before continuing.
Commit
4d1ad77e
authored
Oct 06, 2017
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Небольшая чистка от лишних include, добавление недостающих и т.п.
parent
dd9fe9fb
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
32 additions
and
24 deletions
+32
-24
LogDB.cc
extensions/LogDB/LogDB.cc
+1
-0
logdb-conv.cc
extensions/LogDB/logdb-conv.cc
+1
-1
Extensions.cc
extensions/lib/Extensions.cc
+1
-0
IORFile.h
include/IORFile.h
+0
-1
LT_Object.h
include/LT_Object.h
+1
-0
MessageType.h
include/MessageType.h
+2
-2
ObjectIndex.h
include/ObjectIndex.h
+2
-2
TCPCheck.h
include/TCPCheck.h
+3
-3
UniSetTypes.h
include/UniSetTypes.h
+1
-1
WDTInterface.h
include/WDTInterface.h
+6
-4
IORFile.cc
src/ObjectRepository/IORFile.cc
+1
-0
ObjectRepository.cc
src/ObjectRepository/ObjectRepository.cc
+10
-9
mq-test.cc
tests/MQPerfTest/mq-test.cc
+1
-0
test_unixml.cc
tests/test_unixml.cc
+1
-1
tests_with_conf.cc
tests/tests_with_conf.cc
+1
-0
No files found.
extensions/LogDB/LogDB.cc
View file @
4d1ad77e
...
...
@@ -28,6 +28,7 @@
#include "ujson.h"
#include "LogDB.h"
#include "Configuration.h"
#include "Exceptions.h"
#include "Debug.h"
#include "UniXML.h"
#include "LogDBSugar.h"
...
...
extensions/LogDB/logdb-conv.cc
View file @
4d1ad77e
...
...
@@ -9,7 +9,7 @@ using namespace std;
// --------------------------------------------------------------------------
typedef
std
::
pair
<
std
::
string
,
std
::
string
>
LogInfo
;
const
size_t
maxRead
=
5000
;
// сколько читать прежде чем записать в БД
std
::
vector
<
std
::
string
>
qbuf
;
st
atic
st
d
::
vector
<
std
::
string
>
qbuf
;
// --------------------------------------------------------------------------
void
saveToDB
(
SQLiteInterface
*
db
);
void
parseLine
(
SQLiteInterface
*
db
,
const
LogInfo
&
loginfo
,
const
std
::
string
&
line
);
...
...
extensions/lib/Extensions.cc
View file @
4d1ad77e
...
...
@@ -18,6 +18,7 @@
#include <string>
#include <sys/wait.h>
#include "Configuration.h"
#include "Exceptions.h"
#include "Extensions.h"
// -------------------------------------------------------------------------
using
namespace
std
;
...
...
include/IORFile.h
View file @
4d1ad77e
...
...
@@ -23,7 +23,6 @@
// --------------------------------------------------------------------------
#include <string>
#include "UniSetTypes.h"
#include "Exceptions.h"
// --------------------------------------------------------------------------
namespace
uniset
{
...
...
include/LT_Object.h
View file @
4d1ad77e
...
...
@@ -22,6 +22,7 @@
#define Object_LT_H_
//--------------------------------------------------------------------------
#include <deque>
#include "Debug.h"
#include "UniSetTypes.h"
#include "MessageType.h"
#include "PassiveTimer.h"
...
...
include/MessageType.h
View file @
4d1ad77e
...
...
@@ -253,8 +253,8 @@ namespace uniset
ConfirmMessage
(
const
ConfirmMessage
&
)
noexcept
=
default
;
ConfirmMessage
&
operator
=
(
const
ConfirmMessage
&
)
noexcept
=
default
;
ObjectId
sensor_id
;
/* ID датчика (события) */
double
sensor_value
;
/* значение датчика (события) */
ObjectId
sensor_id
=
{
uniset
::
DefaultObjectId
}
;
/* ID датчика (события) */
double
sensor_value
=
{
0
.
0
}
;
/* значение датчика (события) */
struct
timespec
sensor_time
=
{
0
,
0
};
/* время срабатывания датчика(события), который квитируем */
struct
timespec
confirm_time
=
{
0
,
0
};
/* * время прошедшее до момента квитирования */
...
...
include/ObjectIndex.h
View file @
4d1ad77e
...
...
@@ -31,8 +31,8 @@ namespace uniset
class
ObjectIndex
{
public
:
ObjectIndex
()
{}
;
virtual
~
ObjectIndex
()
{}
;
ObjectIndex
()
{}
virtual
~
ObjectIndex
()
{}
// info
// \return nullptr if not found
...
...
include/TCPCheck.h
View file @
4d1ad77e
...
...
@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// -----------------------------------------------------------------------------
#ifndef
_
TCPCheck_H_
#define
_
TCPCheck_H_
#ifndef TCPCheck_H_
#define TCPCheck_H_
// -----------------------------------------------------------------------------
#include <atomic>
#include "ThreadCreator.h"
...
...
@@ -55,5 +55,5 @@ namespace uniset
// -------------------------------------------------------------------------
}
// end of uniset namespace
// -----------------------------------------------------------------------------
#endif //
_
TCPCheck_H_
#endif // TCPCheck_H_
// -----------------------------------------------------------------------------
include/UniSetTypes.h
View file @
4d1ad77e
...
...
@@ -113,7 +113,7 @@ namespace uniset
lmpBLINK3
=
4
/*!< мигать */
};
static
const
long
ChannelBreakValue
=
std
::
numeric_limits
<
long
>::
max
();
const
long
ChannelBreakValue
=
std
::
numeric_limits
<
long
>::
max
();
class
IDList
{
...
...
include/WDTInterface.h
View file @
4d1ad77e
...
...
@@ -16,10 +16,12 @@
//--------------------------------------------------------------------------
#ifndef WDTInterface_H_
#define WDTInterface_H_
/*
Для всех станций кроме GUI используется драйвер wdt686.o и девайс /dev/wdt с мажером 208 и минором 0
для GUI используется i810-tco, а девайс /dev/watchdog создаваемый через мискдевайс(?)
*/
/* DEPRECATED!!!
* \todo нужно либо выкинуть, либо сделать нормальный расширяемый интерфейс
*
* Для всех станций кроме GUI используется драйвер wdt686.o и девайс /dev/wdt с мажером 208 и минором 0
* для GUI используется i810-tco, а девайс /dev/watchdog создаваемый через мискдевайс(?)
*/
//--------------------------------------------------------------------------
#include <string>
namespace
uniset
...
...
src/ObjectRepository/IORFile.cc
View file @
4d1ad77e
...
...
@@ -18,6 +18,7 @@
#include <fstream>
#include <unistd.h>
#include "IORFile.h"
#include "Exceptions.h"
#include "Configuration.h"
#include "ORepHelpers.h"
...
...
src/ObjectRepository/ObjectRepository.cc
View file @
4d1ad77e
...
...
@@ -20,6 +20,7 @@
// --------------------------------------------------------------------------
#include <omniORB4/CORBA.h>
#include <omniORB4/omniURI.h>
#include <omniORB4/Naming.hh>
#include <string.h>
#include <sstream>
#include "ObjectRepository.h"
...
...
@@ -125,7 +126,7 @@ void ObjectRepository::registration(const string& name, const ObjectPtr oRef, co
ctx
->
bind
(
oName
,
oRef
);
return
;
}
catch
(
const
CosNaming
::
NamingContext
::
AlreadyBound
&
nf
)
catch
(
const
CosNaming
::
NamingContext
::
AlreadyBound
&
)
{
uwarn
<<
"(registration): "
<<
name
<<
" уже зарегестрирован в "
<<
section
<<
"!!!"
<<
endl
;
...
...
@@ -147,7 +148,7 @@ void ObjectRepository::registration(const string& name, const ObjectPtr oRef, co
{
throw
NameNotFound
();
}
catch
(
const
CosNaming
::
NamingContext
::
InvalidName
&
nf
)
catch
(
const
CosNaming
::
NamingContext
::
InvalidName
&
)
{
err
<<
"ObjectRepository(registration): (InvalidName) не смог зарегистрировать ссылку "
<<
name
;;
}
...
...
@@ -212,11 +213,11 @@ void ObjectRepository::unregistration( const string& name, const string& section
ctx
->
unbind
(
oName
);
return
;
}
catch
(
const
CosNaming
::
NamingContext
::
NotFound
&
nf
)
catch
(
const
CosNaming
::
NamingContext
::
NotFound
&
)
{
err
<<
"ObjectRepository(unregistrartion): не найден объект ->"
<<
name
;
}
catch
(
const
CosNaming
::
NamingContext
::
InvalidName
&
in
)
catch
(
const
CosNaming
::
NamingContext
::
InvalidName
&
)
{
err
<<
"ObjectRepository(unregistrartion): не корректное имя объекта -> "
<<
name
;
}
...
...
@@ -264,11 +265,11 @@ ObjectPtr ObjectRepository::resolve( const string& name, const string& NSName )
err
<<
"ObjectRepository(resolve): не смог получить ссылку на объект "
<<
name
.
c_str
();
}
catch
(
const
CosNaming
::
NamingContext
::
NotFound
&
nf
)
catch
(
const
CosNaming
::
NamingContext
::
NotFound
&
)
{
err
<<
"ObjectRepository(resolve): NameNotFound name= "
<<
name
;
}
catch
(
const
CosNaming
::
NamingContext
::
InvalidName
&
nf
)
catch
(
const
CosNaming
::
NamingContext
::
InvalidName
&
)
{
err
<<
"ObjectRepository(resolve): не смог получить ссылку на контекст(InvalidName) "
;
}
...
...
@@ -511,10 +512,10 @@ bool ObjectRepository::createContext( const string& cname, CosNaming::NamingCont
ulogrep
<<
"ORepFactory(createContext): создал. "
<<
endl
;
return
true
;
}
catch
(
const
CosNaming
::
NamingContext
::
AlreadyBound
&
ab
)
catch
(
const
CosNaming
::
NamingContext
::
AlreadyBound
ab
)
{
// ctx->resolve(nc);
ulogrep
<<
"ORepFactory(createContext): context "
<<
cname
<<
"
уже есть
"
<<
endl
;
ulogrep
<<
"ORepFactory(createContext): context "
<<
cname
<<
"
already exist
"
<<
endl
;
return
true
;
}
catch
(
const
CosNaming
::
NamingContext
::
NotFound
)
...
...
@@ -522,7 +523,7 @@ bool ObjectRepository::createContext( const string& cname, CosNaming::NamingCont
ulogrep
<<
"ORepFactory(createContext): NotFound "
<<
cname
<<
endl
;
throw
NameNotFound
();
}
catch
(
const
CosNaming
::
NamingContext
::
InvalidName
&
nf
)
catch
(
const
CosNaming
::
NamingContext
::
InvalidName
&
)
{
uwarn
<<
"ORepFactory(createContext): (InvalidName) "
<<
cname
;
}
...
...
tests/MQPerfTest/mq-test.cc
View file @
4d1ad77e
...
...
@@ -4,6 +4,7 @@
#include <thread>
#include <atomic>
#include "Configuration.h"
#include "Exceptions.h"
#include "MQAtomic.h"
#include "MQMutex.h"
// --------------------------------------------------------------------------
...
...
tests/test_unixml.cc
View file @
4d1ad77e
...
...
@@ -172,7 +172,7 @@ TEST_CASE("UniXML::iterator::find1Level", "[unixml][find1levels]" )
xmlNode
*
onode
=
uxml
.
findNode
(
uxml
.
getFirstNode
(),
"onelevelfind"
);
REQUIRE
(
onode
!=
NULL
);
UniXML
::
iterator
oit
(
onode
);
UniXML
::
iterator
oit2
=
uxml
.
findNodeLevel1
(
oit
,
"item"
,
"l2"
);
UniXML
::
iterator
oit2
=
uxml
.
findNodeLevel1
(
oit
,
"item"
,
"l2"
);
REQUIRE
(
oit2
);
REQUIRE
(
oit2
.
getProp
(
"prop"
)
==
"yes"
);
}
...
...
tests/tests_with_conf.cc
View file @
4d1ad77e
...
...
@@ -3,6 +3,7 @@
#include <iostream>
#include "Configuration.h"
#include "Exceptions.h"
int
main
(
int
argc
,
const
char
*
argv
[]
)
{
...
...
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