Commit 4d046278 authored by Pavel Vainerman's avatar Pavel Vainerman

[python]: fixed build with c++17

parent ac40f2e3
......@@ -20,7 +20,7 @@
// --------------------------------------------------------------------------
using namespace std;
// --------------------------------------------------------------------------
UConnector::UConnector( UTypes::Params* p, const std::string& xfile )throw(UException):
UConnector::UConnector( UTypes::Params* p, const std::string& xfile ):
xmlfile(xfile)
{
try
......@@ -38,7 +38,7 @@ UConnector::UConnector( UTypes::Params* p, const std::string& xfile )throw(UExce
}
}
//---------------------------------------------------------------------------
UConnector::UConnector(int argc, char** argv, const string& xfile )throw(UException):
UConnector::UConnector(int argc, char** argv, const string& xfile ):
xmlfile(xfile)
{
try
......@@ -70,7 +70,7 @@ string UConnector::getConfFileName()
}
// --------------------------------------------------------------------------
long UConnector::getValue( long id, long node )throw(UException)
long UConnector::getValue( long id, long node )
{
if( !conf || !ui )
throw USysError();
......@@ -92,7 +92,7 @@ long UConnector::getValue( long id, long node )throw(UException)
}
}
//---------------------------------------------------------------------------
void UConnector::setValue( long id, long val, long node, long supplier )throw(UException)
void UConnector::setValue( long id, long val, long node, long supplier )
{
if( !conf || !ui )
throw USysError();
......@@ -187,7 +187,6 @@ string UConnector::getTextName( long id )
}
//---------------------------------------------------------------------------
string UConnector::getObjectInfo( long id, const std::string& params, long node )
throw(UException)
{
if( !conf || !ui )
throw USysError();
......@@ -208,7 +207,7 @@ throw(UException)
}
}
//---------------------------------------------------------------------------
string UConnector::apiRequest( long id, const string& query, long node ) throw(UException)
string UConnector::apiRequest( long id, const string& query, long node )
{
if( !conf || !ui )
throw USysError();
......@@ -229,7 +228,7 @@ string UConnector::apiRequest( long id, const string& query, long node ) throw(U
}
}
//---------------------------------------------------------------------------
void UConnector::activate_objects() throw(UException)
void UConnector::activate_objects()
{
try
{
......
......@@ -32,8 +32,8 @@
class UConnector
{
public:
UConnector( int argc, char** argv, const std::string& xmlfile ) throw(UException);
UConnector( UTypes::Params* p, const std::string& xmlfile ) throw(UException);
UConnector( int argc, char** argv, const std::string& xmlfile ); // throw(UException);
UConnector( UTypes::Params* p, const std::string& xmlfile ); // throw(UException);
~UConnector();
inline std::string getUIType()
......@@ -42,8 +42,8 @@ class UConnector
}
std::string getConfFileName();
long getValue( long id, long node )throw(UException);
void setValue( long id, long val, long node, long supplier = UTypes::DefaultSupplerID ) throw(UException);
long getValue( long id, long node ); // throw(UException);
void setValue( long id, long val, long node, long supplier = UTypes::DefaultSupplerID ); // throw(UException);
UTypes::ShortIOInfo getTimeChange( long id, long node = UTypes::DefaultID );
long getSensorID( const std::string& name );
......@@ -54,10 +54,10 @@ class UConnector
std::string getName( long id );
std::string getTextName( long id );
std::string getObjectInfo( long id, const std::string& params, long node = UTypes::DefaultID ) throw(UException);
std::string apiRequest( long id, const std::string& query, long node = UTypes::DefaultID ) throw(UException);
std::string getObjectInfo( long id, const std::string& params, long node = UTypes::DefaultID ); // throw(UException);
std::string apiRequest( long id, const std::string& query, long node = UTypes::DefaultID ); // throw(UException);
void activate_objects() throw(UException);
void activate_objects(); // throw(UException);
private:
std::shared_ptr<uniset::Configuration> conf;
......
......@@ -21,7 +21,7 @@
using namespace std;
// --------------------------------------------------------------------------
#if 0
UModbus::UModbus( UTypes::Params* p )throw(UException):
UModbus::UModbus( UTypes::Params* p ):
mb(0),
port(502),
ip(""),
......@@ -37,7 +37,7 @@ UModbus::UModbus( UTypes::Params* p )throw(UException):
}
}
//---------------------------------------------------------------------------
UModbus::UModbus( int argc, char** argv )throw(UException):
UModbus::UModbus( int argc, char** argv ):
mb(0),
port(502),
ip(""),
......@@ -68,7 +68,7 @@ UModbus::~UModbus()
delete mb;
}
// --------------------------------------------------------------------------
void UModbus::prepare( const std::string& _ip, int _port )throw(UException)
void UModbus::prepare( const std::string& _ip, int _port )
{
if( !mb )
throw UException("(connect): mb=NULL?!");
......@@ -87,7 +87,7 @@ void UModbus::prepare( const std::string& _ip, int _port )throw(UException)
port = _port;
}
// --------------------------------------------------------------------------
void UModbus::connect( const std::string& _ip, int _port )throw(UException)
void UModbus::connect( const std::string& _ip, int _port )
{
if( !mb )
throw UException("(connect): mb=NULL?!");
......@@ -111,23 +111,23 @@ void UModbus::connect( const std::string& _ip, int _port )throw(UException)
}
}
// --------------------------------------------------------------------------
long UModbus::getWord( int addr, int mbreg, int mbfunc )throw(UException)
long UModbus::getWord( int addr, int mbreg, int mbfunc )
{
return mbread(addr, mbreg, mbfunc, "signed");
}
// --------------------------------------------------------------------------
long UModbus::getByte( int addr, int mbreg, int mbfunc )throw(UException)
long UModbus::getByte( int addr, int mbreg, int mbfunc )
{
return mbread(addr, mbreg, mbfunc, "byte");
}
// --------------------------------------------------------------------------
bool UModbus::getBit( int addr, int mbreg, int mbfunc )throw(UException)
bool UModbus::getBit( int addr, int mbreg, int mbfunc )
{
return mbread(addr, mbreg, mbfunc, "unsigned");
}
// --------------------------------------------------------------------------
long UModbus::mbread(int mbaddr, int mbreg, int mbfunc, const string& s_vtype, int nbit,
const string& new_ip, int new_port )throw(UException)
const string& new_ip, int new_port )
{
using namespace uniset;
using namespace uniset::VTypes;
......@@ -291,7 +291,7 @@ long UModbus::data2value( uniset::VTypes::VType vtype, uniset::ModbusRTU::Modbus
return 0;
}
//---------------------------------------------------------------------------
void UModbus::mbwrite( int mbaddr, int mbreg, int val, int mbfunc, const std::string& new_ip, int new_port )throw(UException)
void UModbus::mbwrite( int mbaddr, int mbreg, int val, int mbfunc, const std::string& new_ip, int new_port )
{
const std::string n_ip( ( new_ip.empty() ? ip : new_ip ) );
int n_port = ( new_port > 0 ) ? new_port : port;
......
......@@ -49,9 +49,9 @@ class UModbus
}
// выставление параметров связи, без установления соединения (!)
void prepare( const std::string& ip, int port )throw(UException);
void prepare( const std::string& ip, int port ); // throw(UException);
void connect( const std::string& ip, int port )throw(UException);
void connect( const std::string& ip, int port ); // throw(UException);
inline int conn_port()
{
return port;
......@@ -77,18 +77,18 @@ class UModbus
*/
long mbread( int addr, int mbreg, int mbfunc,
const std::string& vtype, int nbit = -1,
const std::string& ip = "", int port = -1 )throw(UException);
const std::string& ip = "", int port = -1 ); // throw(UException);
long getWord( int addr, int mbreg, int mbfunc = 0x4 )throw(UException);
long getByte( int addr, int mbreg, int mbfunc = 0x4 )throw(UException);
bool getBit( int addr, int mbreg, int mbfunc = 0x2 )throw(UException);
long getWord( int addr, int mbreg, int mbfunc = 0x4 ); // throw(UException);
long getByte( int addr, int mbreg, int mbfunc = 0x4 ); // throw(UException);
bool getBit( int addr, int mbreg, int mbfunc = 0x2 ); // throw(UException);
/*! Функция записи регистров 0x06 или 0x10 задаётся параметром \a mbfunc.
* Если не указывать ip и порт, будут использованы, те
* чтобы были заданы в UModbus::connect(). Если заданы другие ip и port,
* будет сделана переподключение..
*/
void mbwrite( int addr, int mbreg, int val, int mbfunc, const std::string& ip = "", int port = -1 )throw(UException);
void mbwrite( int addr, int mbreg, int val, int mbfunc, const std::string& ip = "", int port = -1 ); // throw(UException);
protected:
long data2value( uniset::VTypes::VType vt, uniset::ModbusRTU::ModbusData* data );
......
......@@ -35,12 +35,12 @@ class UProxyObject_impl:
UProxyObject_impl( uniset::ObjectId id );
virtual ~UProxyObject_impl();
void impl_addToAsk( uniset::ObjectId id ) throw(UException);
void impl_askSensor( uniset::ObjectId id ) throw(UException);
void impl_addToAsk( uniset::ObjectId id ) ;
void impl_askSensor( uniset::ObjectId id ) ;
long impl_getValue( long id ) throw(UException);
void impl_setValue( long id, long val ) throw(UException);
float impl_getFloatValue( long id ) throw(UException);
long impl_getValue( long id ) ;
void impl_setValue( long id, long val ) ;
float impl_getFloatValue( long id ) ;
bool impl_askIsOK();
bool impl_reaskSensors();
......@@ -72,12 +72,12 @@ class UProxyObject_impl:
bool askOK = { false };
};
// --------------------------------------------------------------------------
UProxyObject::UProxyObject() throw(UException)
UProxyObject::UProxyObject()
{
throw UException("(UProxyObject): Unknown 'name'' or 'ID'");
}
// --------------------------------------------------------------------------
UProxyObject::UProxyObject( const std::string& name ) throw( UException )
UProxyObject::UProxyObject( const std::string& name )
{
auto conf = uniset_conf();
......@@ -93,12 +93,12 @@ UProxyObject::UProxyObject( const std::string& name ) throw( UException )
init(id);
}
// --------------------------------------------------------------------------
UProxyObject::UProxyObject( long id ) throw( UException )
UProxyObject::UProxyObject( long id )
{
init(id);
}
// --------------------------------------------------------------------------
void UProxyObject::init( long id ) throw( UException )
void UProxyObject::init( long id )
{
try
{
......@@ -119,12 +119,12 @@ UProxyObject::~UProxyObject()
{
}
// --------------------------------------------------------------------------
long UProxyObject::getValue( long id ) throw(UException)
long UProxyObject::getValue( long id )
{
return uobj->impl_getValue(id);
}
// --------------------------------------------------------------------------
void UProxyObject::setValue( long id, long val ) throw(UException)
void UProxyObject::setValue( long id, long val )
{
uobj->impl_setValue(id, val);
}
......@@ -149,12 +149,12 @@ bool UProxyObject::smIsOK()
return uobj->impl_smIsOK();
}
// --------------------------------------------------------------------------
float UProxyObject::getFloatValue( long id ) throw(UException)
float UProxyObject::getFloatValue( long id )
{
return uobj->impl_getFloatValue(id);
}
// --------------------------------------------------------------------------
void UProxyObject::addToAsk( long id ) throw(UException)
void UProxyObject::addToAsk( long id )
{
try
{
......@@ -168,7 +168,7 @@ void UProxyObject::addToAsk( long id ) throw(UException)
}
}
// --------------------------------------------------------------------------
void UProxyObject::askSensor( long id ) throw(UException)
void UProxyObject::askSensor( long id )
{
try
{
......@@ -193,7 +193,7 @@ UProxyObject_impl::~UProxyObject_impl()
}
// --------------------------------------------------------------------------
void UProxyObject_impl::impl_addToAsk( ObjectId id ) throw( UException )
void UProxyObject_impl::impl_addToAsk( ObjectId id )
{
auto conf = uniset_conf();
......@@ -213,7 +213,7 @@ void UProxyObject_impl::impl_addToAsk( ObjectId id ) throw( UException )
smap[id] = i;
}
// --------------------------------------------------------------------------
long UProxyObject_impl::impl_getValue( long id ) throw(UException)
long UProxyObject_impl::impl_getValue( long id )
{
std::unique_lock<std::mutex> lk(mutexSMap);
auto i = smap.find(id);
......@@ -228,7 +228,7 @@ long UProxyObject_impl::impl_getValue( long id ) throw(UException)
return i->second.value;
}
// --------------------------------------------------------------------------
float UProxyObject_impl::impl_getFloatValue( long id ) throw(UException)
float UProxyObject_impl::impl_getFloatValue( long id )
{
std::unique_lock<std::mutex> lk(mutexSMap);
auto i = smap.find(id);
......@@ -249,7 +249,7 @@ bool UProxyObject_impl::impl_askIsOK()
return askOK;
}
// --------------------------------------------------------------------------
void UProxyObject_impl::impl_setValue( long id, long val ) throw(UException)
void UProxyObject_impl::impl_setValue( long id, long val )
{
try
{
......@@ -300,7 +300,7 @@ bool UProxyObject_impl::impl_smIsOK()
return ui->isExist(s->second.si.id, s->second.si.node);
}
// --------------------------------------------------------------------------
void UProxyObject_impl::impl_askSensor( uniset::ObjectId id ) throw(UException)
void UProxyObject_impl::impl_askSensor( uniset::ObjectId id )
{
ui->askRemoteSensor(id, UniversalIO::UIONotify, uniset_conf()->getLocalNode(), getId());
impl_addToAsk(id);
......
......@@ -44,21 +44,21 @@ class UProxyObject_impl; // PIMPL
class UProxyObject
{
public:
UProxyObject( const std::string& name ) throw(UException);
UProxyObject( long id ) throw(UException);
UProxyObject( const std::string& name ); // throw(UException);
UProxyObject( long id ); // throw(UException);
~UProxyObject();
//! \note Вызывать надо до активации объекта
void addToAsk( long id ) throw(UException);
void addToAsk( long id ); // throw(UException);
//! можно вызывать в процессе работы
void askSensor( long id ) throw(UException);
void askSensor( long id ); // throw(UException);
long getValue( long id ) throw(UException);
float getFloatValue( long id ) throw(UException);
long getValue( long id ); // throw(UException);
float getFloatValue( long id ); // throw(UException);
/*! Сохраняемые датчики не требуют добавления при помощи addToAsk ! */
void setValue( long id, long val ) throw(UException);
void setValue( long id, long val ); // throw(UException);
/*! \return true если заказ датчиков прошёл успешно */
bool askIsOK();
......@@ -75,10 +75,10 @@ class UProxyObject
bool smIsOK();
protected:
void init( long id ) throw( UException );
void init( long id ); // throw( UException );
private:
UProxyObject()throw(UException);
UProxyObject(); // throw(UException);
std::shared_ptr<UProxyObject_impl> uobj;
};
......
......@@ -27,13 +27,13 @@ using namespace std;
//---------------------------------------------------------------------------
static std::shared_ptr<uniset::UInterface> uInterface;
//---------------------------------------------------------------------------
void pyUInterface::uniset_init_params( UTypes::Params* p, const std::string& xmlfile )throw(UException)
void pyUInterface::uniset_init_params( UTypes::Params* p, const std::string& xmlfile )
{
pyUInterface::uniset_init(p->argc, p->argv, xmlfile);
}
//---------------------------------------------------------------------------
void pyUInterface::uniset_init( int argc, char* argv[], const std::string& xmlfile )throw(UException)
void pyUInterface::uniset_init( int argc, char* argv[], const std::string& xmlfile )
{
if( uInterface )
return;
......@@ -54,7 +54,7 @@ void pyUInterface::uniset_init( int argc, char* argv[], const std::string& xmlfi
}
}
//---------------------------------------------------------------------------
long pyUInterface::getValue( long id )throw(UException)
long pyUInterface::getValue( long id )
{
auto conf = uniset::uniset_conf();
......@@ -90,7 +90,7 @@ long pyUInterface::getValue( long id )throw(UException)
}
}
//---------------------------------------------------------------------------
void pyUInterface::setValue( long id, long val, long supplier )throw(UException)
void pyUInterface::setValue( long id, long val, long supplier )
{
auto conf = uniset::uniset_conf();
......@@ -187,7 +187,7 @@ string pyUInterface::getConfFileName()
}
//---------------------------------------------------------------------------
void pyUInterface::uniset_activate_objects()throw(UException)
void pyUInterface::uniset_activate_objects()
{
try
{
......
......@@ -26,13 +26,13 @@
// --------------------------------------------------------------------------
namespace pyUInterface
{
void uniset_init_params( UTypes::Params* p, const std::string& xmlfile )throw(UException);
void uniset_init( int argc, char** argv, const std::string& xmlfile )throw(UException);
void uniset_activate_objects() throw(UException);
void uniset_init_params( UTypes::Params* p, const std::string& xmlfile ); // throw(UException);
void uniset_init( int argc, char** argv, const std::string& xmlfile ); // throw(UException);
void uniset_activate_objects(); // throw(UException);
//---------------------------------------------------------------------------
long getValue( long id )throw(UException);
void setValue( long id, long val, long supplier = UTypes::DefaultSupplerID )throw(UException);
long getValue( long id ); // throw(UException);
void setValue( long id, long val, long supplier = UTypes::DefaultSupplerID ); // throw(UException);
long getSensorID( const std::string& name );
long getObjectID( const std::string& name );
......
......@@ -2741,13 +2741,12 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
/* -------- TYPES TABLE (BEGIN) -------- */
#define SWIGTYPE_p_UConnector swig_types[0]
#define SWIGTYPE_p_UException swig_types[1]
#define SWIGTYPE_p_UTypes__Params swig_types[2]
#define SWIGTYPE_p_UTypes__ShortIOInfo swig_types[3]
#define SWIGTYPE_p_char swig_types[4]
#define SWIGTYPE_p_p_char swig_types[5]
static swig_type_info *swig_types[7];
static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
#define SWIGTYPE_p_UTypes__Params swig_types[1]
#define SWIGTYPE_p_UTypes__ShortIOInfo swig_types[2]
#define SWIGTYPE_p_char swig_types[3]
#define SWIGTYPE_p_p_char swig_types[4]
static swig_type_info *swig_types[6];
static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
......@@ -3873,13 +3872,7 @@ SWIGINTERN PyObject *_wrap_new_UConnector__SWIG_0(PyObject *SWIGUNUSEDPARM(self)
}
arg3 = ptr;
}
try {
result = (UConnector *)new UConnector(arg1,arg2,(std::string const &)*arg3);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UConnector, SWIG_POINTER_NEW | 0 );
if (SWIG_IsNewObj(res3)) delete arg3;
return resultobj;
......@@ -3917,13 +3910,7 @@ SWIGINTERN PyObject *_wrap_new_UConnector__SWIG_1(PyObject *SWIGUNUSEDPARM(self)
}
arg2 = ptr;
}
try {
result = (UConnector *)new UConnector(arg1,(std::string const &)*arg2);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UConnector, SWIG_POINTER_NEW | 0 );
if (SWIG_IsNewObj(res2)) delete arg2;
return resultobj;
......@@ -4084,13 +4071,7 @@ SWIGINTERN PyObject *_wrap_UConnector_getValue(PyObject *SWIGUNUSEDPARM(self), P
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "UConnector_getValue" "', argument " "3"" of type '" "long""'");
}
arg3 = static_cast< long >(val3);
try {
result = (long)(arg1)->getValue(arg2,arg3);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_From_long(static_cast< long >(result));
return resultobj;
fail:
......@@ -4147,13 +4128,7 @@ SWIGINTERN PyObject *_wrap_UConnector_setValue__SWIG_0(PyObject *SWIGUNUSEDPARM(
SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "UConnector_setValue" "', argument " "5"" of type '" "long""'");
}
arg5 = static_cast< long >(val5);
try {
(arg1)->setValue(arg2,arg3,arg4,arg5);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -4201,13 +4176,7 @@ SWIGINTERN PyObject *_wrap_UConnector_setValue__SWIG_1(PyObject *SWIGUNUSEDPARM(
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "UConnector_setValue" "', argument " "4"" of type '" "long""'");
}
arg4 = static_cast< long >(val4);
try {
(arg1)->setValue(arg2,arg3,arg4);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -4679,13 +4648,7 @@ SWIGINTERN PyObject *_wrap_UConnector_getObjectInfo__SWIG_0(PyObject *SWIGUNUSED
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "UConnector_getObjectInfo" "', argument " "4"" of type '" "long""'");
}
arg4 = static_cast< long >(val4);
try {
result = (arg1)->getObjectInfo(arg2,(std::string const &)*arg3,arg4);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
if (SWIG_IsNewObj(res3)) delete arg3;
return resultobj;
......@@ -4732,13 +4695,7 @@ SWIGINTERN PyObject *_wrap_UConnector_getObjectInfo__SWIG_1(PyObject *SWIGUNUSED
}
arg3 = ptr;
}
try {
result = (arg1)->getObjectInfo(arg2,(std::string const &)*arg3);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
if (SWIG_IsNewObj(res3)) delete arg3;
return resultobj;
......@@ -4860,13 +4817,7 @@ SWIGINTERN PyObject *_wrap_UConnector_apiRequest__SWIG_0(PyObject *SWIGUNUSEDPAR
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "UConnector_apiRequest" "', argument " "4"" of type '" "long""'");
}
arg4 = static_cast< long >(val4);
try {
result = (arg1)->apiRequest(arg2,(std::string const &)*arg3,arg4);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
if (SWIG_IsNewObj(res3)) delete arg3;
return resultobj;
......@@ -4913,13 +4864,7 @@ SWIGINTERN PyObject *_wrap_UConnector_apiRequest__SWIG_1(PyObject *SWIGUNUSEDPAR
}
arg3 = ptr;
}
try {
result = (arg1)->apiRequest(arg2,(std::string const &)*arg3);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
if (SWIG_IsNewObj(res3)) delete arg3;
return resultobj;
......@@ -5008,13 +4953,7 @@ SWIGINTERN PyObject *_wrap_UConnector_activate_objects(PyObject *SWIGUNUSEDPARM(
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UConnector_activate_objects" "', argument " "1"" of type '" "UConnector *""'");
}
arg1 = reinterpret_cast< UConnector * >(argp1);
try {
(arg1)->activate_objects();
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -5078,7 +5017,6 @@ static PyMethodDef SwigMethods[] = {
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
static swig_type_info _swigt__p_UConnector = {"_p_UConnector", "UConnector *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_UException = {"_p_UException", "UException *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_UTypes__Params = {"_p_UTypes__Params", "UTypes::Params *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_UTypes__ShortIOInfo = {"_p_UTypes__ShortIOInfo", "UTypes::ShortIOInfo *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
......@@ -5086,7 +5024,6 @@ static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0
static swig_type_info *swig_type_initial[] = {
&_swigt__p_UConnector,
&_swigt__p_UException,
&_swigt__p_UTypes__Params,
&_swigt__p_UTypes__ShortIOInfo,
&_swigt__p_char,
......@@ -5094,7 +5031,6 @@ static swig_type_info *swig_type_initial[] = {
};
static swig_cast_info _swigc__p_UConnector[] = { {&_swigt__p_UConnector, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UException[] = { {&_swigt__p_UException, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UTypes__Params[] = { {&_swigt__p_UTypes__Params, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UTypes__ShortIOInfo[] = { {&_swigt__p_UTypes__ShortIOInfo, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
......@@ -5102,7 +5038,6 @@ static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0
static swig_cast_info *swig_cast_initial[] = {
_swigc__p_UConnector,
_swigc__p_UException,
_swigc__p_UTypes__Params,
_swigc__p_UTypes__ShortIOInfo,
_swigc__p_char,
......
......@@ -3316,13 +3316,7 @@ SWIGINTERN PyObject *_wrap_uniset_init_params(PyObject *SWIGUNUSEDPARM(self), Py
}
arg2 = ptr;
}
try {
pyUInterface::uniset_init_params(arg1,(std::string const &)*arg2);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
if (SWIG_IsNewObj(res2)) delete arg2;
return resultobj;
......@@ -3368,13 +3362,7 @@ SWIGINTERN PyObject *_wrap_uniset_init(PyObject *SWIGUNUSEDPARM(self), PyObject
}
arg3 = ptr;
}
try {
pyUInterface::uniset_init(arg1,arg2,(std::string const &)*arg3);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
if (SWIG_IsNewObj(res3)) delete arg3;
return resultobj;
......@@ -3388,13 +3376,7 @@ SWIGINTERN PyObject *_wrap_uniset_activate_objects(PyObject *SWIGUNUSEDPARM(self
PyObject *resultobj = 0;
if (!PyArg_ParseTuple(args,(char *)":uniset_activate_objects")) SWIG_fail;
try {
pyUInterface::uniset_activate_objects();
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -3416,13 +3398,7 @@ SWIGINTERN PyObject *_wrap_getValue(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getValue" "', argument " "1"" of type '" "long""'");
}
arg1 = static_cast< long >(val1);
try {
result = (long)pyUInterface::getValue(arg1);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_From_long(static_cast< long >(result));
return resultobj;
fail:
......@@ -3461,13 +3437,7 @@ SWIGINTERN PyObject *_wrap_setValue__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyOb
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "setValue" "', argument " "3"" of type '" "long""'");
}
arg3 = static_cast< long >(val3);
try {
pyUInterface::setValue(arg1,arg2,arg3);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -3497,13 +3467,7 @@ SWIGINTERN PyObject *_wrap_setValue__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyOb
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "setValue" "', argument " "2"" of type '" "long""'");
}
arg2 = static_cast< long >(val2);
try {
pyUInterface::setValue(arg1,arg2);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -4815,13 +4779,7 @@ SWIGINTERN PyObject *_wrap_new_UProxyObject__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
}
arg1 = ptr;
}
try {
result = (UProxyObject *)new UProxyObject((std::string const &)*arg1);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UProxyObject, SWIG_POINTER_NEW | 0 );
if (SWIG_IsNewObj(res1)) delete arg1;
return resultobj;
......@@ -4845,13 +4803,7 @@ SWIGINTERN PyObject *_wrap_new_UProxyObject__SWIG_1(PyObject *SWIGUNUSEDPARM(sel
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UProxyObject" "', argument " "1"" of type '" "long""'");
}
arg1 = static_cast< long >(val1);
try {
result = (UProxyObject *)new UProxyObject(arg1);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UProxyObject, SWIG_POINTER_NEW | 0 );
return resultobj;
fail:
......@@ -4942,13 +4894,7 @@ SWIGINTERN PyObject *_wrap_UProxyObject_addToAsk(PyObject *SWIGUNUSEDPARM(self),
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UProxyObject_addToAsk" "', argument " "2"" of type '" "long""'");
}
arg2 = static_cast< long >(val2);
try {
(arg1)->addToAsk(arg2);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -4978,13 +4924,7 @@ SWIGINTERN PyObject *_wrap_UProxyObject_askSensor(PyObject *SWIGUNUSEDPARM(self)
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UProxyObject_askSensor" "', argument " "2"" of type '" "long""'");
}
arg2 = static_cast< long >(val2);
try {
(arg1)->askSensor(arg2);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -5015,13 +4955,7 @@ SWIGINTERN PyObject *_wrap_UProxyObject_getValue(PyObject *SWIGUNUSEDPARM(self),
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UProxyObject_getValue" "', argument " "2"" of type '" "long""'");
}
arg2 = static_cast< long >(val2);
try {
result = (long)(arg1)->getValue(arg2);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_From_long(static_cast< long >(result));
return resultobj;
fail:
......@@ -5052,13 +4986,7 @@ SWIGINTERN PyObject *_wrap_UProxyObject_getFloatValue(PyObject *SWIGUNUSEDPARM(s
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UProxyObject_getFloatValue" "', argument " "2"" of type '" "long""'");
}
arg2 = static_cast< long >(val2);
try {
result = (float)(arg1)->getFloatValue(arg2);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_From_float(static_cast< float >(result));
return resultobj;
fail:
......@@ -5097,13 +5025,7 @@ SWIGINTERN PyObject *_wrap_UProxyObject_setValue(PyObject *SWIGUNUSEDPARM(self),
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "UProxyObject_setValue" "', argument " "3"" of type '" "long""'");
}
arg3 = static_cast< long >(val3);
try {
(arg1)->setValue(arg2,arg3);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......
......@@ -217,7 +217,7 @@ class ShortIOInfo(_object):
ShortIOInfo_swigregister = _pyUniSet.ShortIOInfo_swigregister
ShortIOInfo_swigregister(ShortIOInfo)
class UException(Exception):
class UException(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, UException, name, value)
__swig_getmethods__ = {}
......@@ -237,6 +237,8 @@ class UException(Exception):
return _pyUniSet.UException_getError(self)
__swig_setmethods__["err"] = _pyUniSet.UException_err_set
__swig_getmethods__["err"] = _pyUniSet.UException_err_get
if _newclass:
err = property(_pyUniSet.UException_err_get, _pyUniSet.UException_err_set)
UException_swigregister = _pyUniSet.UException_swigregister
UException_swigregister(UException)
......
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