You need to sign in or sign up before continuing.
Commit 4d1ad77e authored by Pavel Vainerman's avatar Pavel Vainerman

Небольшая чистка от лишних include, добавление недостающих и т.п.

parent dd9fe9fb
......@@ -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"
......
......@@ -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;
static std::vector<std::string> qbuf;
// --------------------------------------------------------------------------
void saveToDB( SQLiteInterface* db );
void parseLine( SQLiteInterface* db, const LogInfo& loginfo, const std::string& line );
......
......@@ -18,6 +18,7 @@
#include <string>
#include <sys/wait.h>
#include "Configuration.h"
#include "Exceptions.h"
#include "Extensions.h"
// -------------------------------------------------------------------------
using namespace std;
......
......@@ -23,7 +23,6 @@
// --------------------------------------------------------------------------
#include <string>
#include "UniSetTypes.h"
#include "Exceptions.h"
// --------------------------------------------------------------------------
namespace uniset
{
......
......@@ -22,6 +22,7 @@
#define Object_LT_H_
//--------------------------------------------------------------------------
#include <deque>
#include "Debug.h"
#include "UniSetTypes.h"
#include "MessageType.h"
#include "PassiveTimer.h"
......
......@@ -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 }; /* * время прошедшее до момента квитирования */
......
......@@ -31,8 +31,8 @@ namespace uniset
class ObjectIndex
{
public:
ObjectIndex() {};
virtual ~ObjectIndex() {};
ObjectIndex() {}
virtual ~ObjectIndex() {}
// info
// \return nullptr if not found
......
......@@ -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_
// -----------------------------------------------------------------------------
......@@ -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
{
......
......@@ -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
......
......@@ -18,6 +18,7 @@
#include <fstream>
#include <unistd.h>
#include "IORFile.h"
#include "Exceptions.h"
#include "Configuration.h"
#include "ORepHelpers.h"
......
......@@ -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;
}
......
......@@ -4,6 +4,7 @@
#include <thread>
#include <atomic>
#include "Configuration.h"
#include "Exceptions.h"
#include "MQAtomic.h"
#include "MQMutex.h"
// --------------------------------------------------------------------------
......
......@@ -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");
}
......
......@@ -3,6 +3,7 @@
#include <iostream>
#include "Configuration.h"
#include "Exceptions.h"
int main( int argc, const char* argv[] )
{
......
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