Commit 93b98509 authored by Pavel Vainerman's avatar Pavel Vainerman

Правка travis.yml,

(VMonitor): убрал конфликт определения функции в 64bit среде (https://travis-ci.org/Etersoft/uniset2/jobs/155274048), Добавил недостающий файл, (codegen): вернул функции preXX в protected
parent 6bb81d47
......@@ -7,7 +7,7 @@ compiler:
cache:
apt: true
# Disallowing packages: libcomedi-dev, libcommoncpp2-dev, libomniorb4-dev, libpqxx-dev, libev-dev
# Disallowing packages: libcomedi-dev, libpoco-dev, libomniorb4-dev, libpqxx-dev, libev-dev
# If you require these packages, please review the package approval process at: https://github.com/travis-ci/apt-package-whitelist#package-approval-process
#sudo: false
......@@ -25,7 +25,7 @@ before_install:
install:
# have no catch package
- sudo apt-get install libcomedi-dev libcommoncpp2-dev libmysqlclient-dev libomniorb4-dev libev-dev omniidl xsltproc libpqxx3-dev librrd-dev libsigc++-2.0-dev libsqlite3-dev python-dev libmosquittopp0-dev
- sudo apt-get install libcomedi-dev libpoco-dev libmysqlclient-dev libomniorb4-dev libev-dev omniidl xsltproc libpqxx3-dev librrd-dev libsigc++-2.0-dev libsqlite3-dev python-dev libmosquittopp0-dev
- wget https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp -O include/catch.hpp
before_script:
......@@ -44,7 +44,7 @@ addons:
# apt:
# packages:
# - libcomedi-dev
# - libcommoncpp2-dev
# - libpoco-dev
# - libmysqlclient-dev
# - libomniorb4-dev
# - libpqxx-dev
......
......@@ -269,6 +269,9 @@
// Выполнение очередного шага программы
virtual void step(){}
void preAskSensors( UniversalIO::UIOCommand cmd );
void preSysCommand( const UniSetTypes::SystemMessage* sm );
virtual void testMode( bool state );
void updateOutputs( bool force );
......@@ -348,10 +351,8 @@
<xsl:template name="COMMON-HEAD-PRIVATE">
// ------------ private функции ---------------
void updatePreviousValues();
void preAskSensors( UniversalIO::UIOCommand cmd );
void preSensorInfo( const UniSetTypes::SensorMessage* sm );
void preTimerInfo( const UniSetTypes::TimerMessage* tm );
void preSysCommand( const UniSetTypes::SystemMessage* sm );
void initFromSM();
void checkSensors();
// --------------------------------------------
......
......@@ -26,6 +26,8 @@ TestGen::TestGen( UniSetTypes::ObjectId id, xmlNode* confnode ):
cerr << "input2_s NOT FOUND!!!" << endl;
else
cerr << "input2_s=" << (*i) << " d=" << d << " d2=" << d2 << " d3=" << d3 << " input2_s=" << input2_s << endl;
vmonit(t_val);
}
// -----------------------------------------------------------------------------
TestGen::~TestGen()
......
......@@ -23,6 +23,7 @@ class TestGen:
private:
bool bool_var = { false };
int int_var = {0};
timeout_t t_val = { 0 };
};
// -----------------------------------------------------------------------------
#endif // TestGen_H_
......
......@@ -137,8 +137,10 @@ class VMonitor
VMON_DEF_FUNC(bool);
VMON_DEF_FUNC(float);
VMON_DEF_FUNC(double);
#ifndef POCO_LONG_IS_64_BIT
VMON_DEF_FUNC(Poco::Int64); // <--- for timeout_t
// VMON_DEF_FUNC(UniSetTypes::ObjectId); // <--- long
#endif
void add( const std::string& name, const std::string& v );
......@@ -158,7 +160,9 @@ class VMonitor
VMON_DEF_MAP(bool);
VMON_DEF_MAP(float);
VMON_DEF_MAP(double);
#ifndef POCO_LONG_IS_64_BIT
std::unordered_map<const Poco::Int64*, const std::string> m_Int64;
#endif
VMON_DEF_MAP3(std::string, string);
};
// --------------------------------------------------------------------------
......
......@@ -137,8 +137,12 @@ VMON_IMPL_ADD2(char)
VMON_IMPL_ADD(bool)
VMON_IMPL_ADD(float)
VMON_IMPL_ADD(double)
VMON_IMPL_ADD_N(Poco::Int64, m_Int64)
VMON_IMPL_ADD3(std::string, string)
#ifndef POCO_LONG_IS_64_BIT
VMON_IMPL_ADD_N(Poco::Int64, m_Int64)
#endif
//VMON_IMPL_ADD3(UniSetTypes::ObjectId,ObjectId)
// --------------------------------------------------------------------------
std::ostream& operator<<( std::ostream& os, VMonitor& m )
......
#include <catch.hpp>
// -----------------------------------------------------------------------------
#include <sstream>
#include <iostream>
#include <limits>
#include <Poco/Net/NetException.h>
#include "UniSetTypes.h"
#include "UTCPSocket.h"
// -----------------------------------------------------------------------------
using namespace std;
using namespace UniSetTypes;
// -----------------------------------------------------------------------------
static const std::string host = "127.0.0.1";
static int port = 40000;
// -----------------------------------------------------------------------------
TEST_CASE("UTCPSocket: create", "[utcpsocket][create]" )
{
{
UTCPSocket u;
Poco::Net::SocketAddress sa(host, port);
REQUIRE_NOTHROW( u.bind(sa) );
}
try
{
Poco::Net::ServerSocket so(Poco::Net::SocketAddress(host, port));
}
catch( Poco::Net::NetException& ex )
{
cerr << ex.displayText() << endl;
}
REQUIRE_NOTHROW(UTCPSocket(host, port));
}
// -----------------------------------------------------------------------------
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