[pytango] 01/98: Minimum changes to compile under Tango C++ 9
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:17:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to tag v9.2.0
in repository pytango.
commit 0f1e488b51ef19c4942a8cd72bdcd2d77ccb9221
Author: Jose Tiago Coutinho Macara <coutinho at esrf.fr>
Date: Fri Nov 20 11:36:44 2015 +0100
Minimum changes to compile under Tango C++ 9
---
src/boost/cpp/constants.cpp | 416 ++++++++++++++-----------
src/boost/cpp/server/attribute.cpp | 70 ++---
src/boost/cpp/server/device_impl.h | 8 +-
src/boost/cpp/server/multi_class_attribute.cpp | 6 +-
src/boost/cpp/server/tango_util.cpp | 1 -
src/boost/cpp/tgutils.h | 7 +-
src/boost/cpp/version.cpp | 2 +-
src/boost/python/__init__.py | 11 +
src/boost/python/release.py | 4 +-
9 files changed, 279 insertions(+), 246 deletions(-)
diff --git a/src/boost/cpp/constants.cpp b/src/boost/cpp/constants.cpp
index d45c9d5..91b94c7 100644
--- a/src/boost/cpp/constants.cpp
+++ b/src/boost/cpp/constants.cpp
@@ -22,7 +22,7 @@ void export_constants()
object consts_module(handle<>(borrowed(PyImport_AddModule("PyTango.constants"))));
scope().attr("constants") = consts_module;
scope consts_scope = consts_module;
-
+
consts_scope.attr("__doc__") = "module containing several Tango constants.\n"
"\nNew in PyTango 7.0.0";
@@ -53,238 +53,288 @@ void export_constants()
//
// From tango_const.h
//
-
+
//
// Some general interest define
//
consts_scope.attr("TANGO_VERSION_MAJOR") = TANGO_VERSION_MAJOR;
consts_scope.attr("TANGO_VERSION_MINOR") = TANGO_VERSION_MINOR;
consts_scope.attr("TANGO_VERSION_PATCH") = TANGO_VERSION_PATCH;
- consts_scope.attr("TANGO_VERSION") = TgLibVers;
-
- consts_scope.attr("TgLibVers") = TgLibVers;
- consts_scope.attr("TgLibVersNb") = TgLibVersNb;
- consts_scope.attr("DevVersion") = DevVersion;
- consts_scope.attr("DefaultMaxSeq") = DefaultMaxSeq;
- consts_scope.attr("DefaultBlackBoxDepth") = DefaultBlackBoxDepth;
- consts_scope.attr("DefaultPollRingDepth") = DefaultPollRingDepth;
-
- consts_scope.attr("InitialOutput") = InitialOutput;
- consts_scope.attr("DSDeviceDomain") = DSDeviceDomain;
- consts_scope.attr("DefaultDocUrl") = DefaultDocUrl;
- consts_scope.attr("EnvVariable") = EnvVariable;
- consts_scope.attr("DbObjName") = DbObjName;
-
+ consts_scope.attr("TANGO_VERSION_NB") = TANGO_VERSION_NB;
+ consts_scope.attr("TANGO_VERSION") = Tango::TgLibVers;
+
+ consts_scope.attr("TgLibVers") = Tango::TgLibVers;
+ consts_scope.attr("TgLibMajorVers") = Tango::TgLibMajorVers;
+ consts_scope.attr("TgLibVersNb") = Tango::TgLibVersNb;
+ consts_scope.attr("DevVersion") = Tango::DevVersion;
+ consts_scope.attr("DefaultMaxSeq") = Tango::DefaultMaxSeq;
+ consts_scope.attr("DefaultBlackBoxDepth") = Tango::DefaultBlackBoxDepth;
+ consts_scope.attr("DefaultPollRingDepth") = Tango::DefaultPollRingDepth;
+
+ consts_scope.attr("InitialOutput") =Tango:: InitialOutput;
+ consts_scope.attr("DSDeviceDomain") = Tango::DSDeviceDomain;
+ consts_scope.attr("DefaultDocUrl") = Tango::DefaultDocUrl;
+ consts_scope.attr("EnvVariable") = Tango::EnvVariable;
+ consts_scope.attr("WindowsEnvVariable") = Tango::WindowsEnvVariable;
+ consts_scope.attr("DbObjName") = Tango::DbObjName;
+
// Changed in tango 8 from DescNotSet to NotSet. We keep the old constant
// to try to maintain backward compatibility
- consts_scope.attr("DescNotSet") = NotSet;
- consts_scope.attr("NotSet") = NotSet;
-
- consts_scope.attr("ResNotDefined") = ResNotDefined;
- consts_scope.attr("MessBoxTitle") = MessBoxTitle;
- consts_scope.attr("StatusNotSet") = StatusNotSet;
-
- consts_scope.attr("DefaultWritAttrProp") = DefaultWritAttrProp;
- consts_scope.attr("AllAttr") = AllAttr;
- consts_scope.attr("AllAttr_3") = AllAttr_3;
-
- consts_scope.attr("PollCommand") = PollCommand;
- consts_scope.attr("PollAttribute") = PollAttribute;
-
- consts_scope.attr("MIN_POLL_PERIOD") = MIN_POLL_PERIOD;
- consts_scope.attr("DELTA_T") = DELTA_T;
- consts_scope.attr("MIN_DELTA_WORK") = MIN_DELTA_WORK;
- consts_scope.attr("TIME_HEARTBEAT") = TIME_HEARTBEAT;
- consts_scope.attr("POLL_LOOP_NB") = POLL_LOOP_NB;
- consts_scope.attr("ONE_SECOND") = ONE_SECOND;
- consts_scope.attr("DISCARD_THRESHOLD") = DISCARD_THRESHOLD;
-
- consts_scope.attr("DEFAULT_TIMEOUT") = DEFAULT_TIMEOUT;
- consts_scope.attr("DEFAULT_POLL_OLD_FACTOR") = DEFAULT_POLL_OLD_FACTOR;
-
- consts_scope.attr("TG_IMP_MINOR_TO") = TG_IMP_MINOR_TO;
- consts_scope.attr("TG_IMP_MINOR_DEVFAILED") = TG_IMP_MINOR_DEVFAILED;
- consts_scope.attr("TG_IMP_MINOR_NON_DEVFAILED") = TG_IMP_MINOR_NON_DEVFAILED;
-
- consts_scope.attr("TANGO_PY_MOD_NAME") = TANGO_PY_MOD_NAME;
- consts_scope.attr("DATABASE_CLASS") = DATABASE_CLASS;
-
+ consts_scope.attr("DescNotSet") = Tango::NotSet;
+ consts_scope.attr("NotSet") = Tango::NotSet;
+
+ consts_scope.attr("ResNotDefined") = Tango::ResNotDefined;
+ consts_scope.attr("MessBoxTitle") = Tango::MessBoxTitle;
+ consts_scope.attr("StatusNotSet") = Tango::StatusNotSet;
+ consts_scope.attr("TangoHostNotSet") = Tango::TangoHostNotSet;
+ consts_scope.attr("RootAttNotDef") = Tango::RootAttNotDef;
+
+ consts_scope.attr("DefaultWritAttrProp") = Tango::DefaultWritAttrProp;
+ consts_scope.attr("AllAttr") = Tango::AllAttr;
+ consts_scope.attr("AllAttr_3") = Tango::AllAttr_3;
+ consts_scope.attr("AllPipe") = Tango::AllPipe;
+ consts_scope.attr("AllCmd") = Tango::AllCmd;
+
+ consts_scope.attr("PollCommand") = Tango::PollCommand;
+ consts_scope.attr("PollAttribute") = Tango::PollAttribute;
+
+ consts_scope.attr("LOCAL_POLL_REQUEST") = Tango::LOCAL_POLL_REQUEST;
+ consts_scope.attr("LOCAL_REQUEST_STR_SIZE") = Tango::LOCAL_REQUEST_STR_SIZE;
+
+ consts_scope.attr("MIN_POLL_PERIOD") = Tango::MIN_POLL_PERIOD;
+ consts_scope.attr("DELTA_T") = Tango::DELTA_T;
+ consts_scope.attr("MIN_DELTA_WORK") = Tango::MIN_DELTA_WORK;
+ consts_scope.attr("TIME_HEARTBEAT") = Tango::TIME_HEARTBEAT;
+ consts_scope.attr("POLL_LOOP_NB") = Tango::POLL_LOOP_NB;
+ consts_scope.attr("ONE_SECOND") = Tango::ONE_SECOND;
+ consts_scope.attr("DISCARD_THRESHOLD") = Tango::DISCARD_THRESHOLD;
+
+ consts_scope.attr("DEFAULT_TIMEOUT") = Tango::DEFAULT_TIMEOUT;
+ consts_scope.attr("DEFAULT_POLL_OLD_FACTOR") = Tango::DEFAULT_POLL_OLD_FACTOR;
+
+ consts_scope.attr("TG_IMP_MINOR_TO") = Tango::TG_IMP_MINOR_TO;
+ consts_scope.attr("TG_IMP_MINOR_DEVFAILED") = Tango::TG_IMP_MINOR_DEVFAILED;
+ consts_scope.attr("TG_IMP_MINOR_NON_DEVFAILED") = Tango::TG_IMP_MINOR_NON_DEVFAILED;
+
+ consts_scope.attr("TANGO_PY_MOD_NAME") = Tango::TANGO_PY_MOD_NAME;
+ consts_scope.attr("DATABASE_CLASS") = Tango::DATABASE_CLASS;
+
+ consts_scope.attr("TANGO_FLOAT_PRECISION") = Tango::TANGO_FLOAT_PRECISION;
+ consts_scope.attr("NoClass") = Tango::NoClass;
+
//
// Event related define
//
-
- consts_scope.attr("EVENT_HEARTBEAT_PERIOD") = EVENT_HEARTBEAT_PERIOD;
- consts_scope.attr("EVENT_RESUBSCRIBE_PERIOD") = EVENT_RESUBSCRIBE_PERIOD;
- consts_scope.attr("DEFAULT_EVENT_PERIOD") = DEFAULT_EVENT_PERIOD;
- consts_scope.attr("DELTA_PERIODIC") = DELTA_PERIODIC;
- consts_scope.attr("DELTA_PERIODIC_LONG") = DELTA_PERIODIC_LONG;
- consts_scope.attr("HEARTBEAT") = HEARTBEAT;
-
+
+ consts_scope.attr("EVENT_HEARTBEAT_PERIOD") = Tango::EVENT_HEARTBEAT_PERIOD;
+ consts_scope.attr("EVENT_RESUBSCRIBE_PERIOD") = Tango::EVENT_RESUBSCRIBE_PERIOD;
+ consts_scope.attr("DEFAULT_EVENT_PERIOD") = Tango::DEFAULT_EVENT_PERIOD;
+ consts_scope.attr("DELTA_PERIODIC") = Tango::DELTA_PERIODIC;
+ consts_scope.attr("DELTA_PERIODIC_LONG") = Tango::DELTA_PERIODIC_LONG;
+ consts_scope.attr("HEARTBEAT") = Tango::HEARTBEAT;
+
+ //
+ // ZMQ event system related define
+ //
+ consts_scope.attr("ZMQ_EVENT_PROT_VERSION") = Tango::ZMQ_EVENT_PROT_VERSION;
+ consts_scope.attr("HEARTBEAT_METHOD_NAME") = Tango::HEARTBEAT_METHOD_NAME;
+ consts_scope.attr("EVENT_METHOD_NAME") = Tango::EVENT_METHOD_NAME;
+ consts_scope.attr("HEARTBEAT_EVENT_NAME") = Tango::HEARTBEAT_EVENT_NAME;
+ consts_scope.attr("CTRL_SOCK_ENDPOINT") = Tango::CTRL_SOCK_ENDPOINT;
+ consts_scope.attr("MCAST_PROT") = Tango::MCAST_PROT;
+ consts_scope.attr("MCAST_HOPS") = Tango::MCAST_HOPS;
+ consts_scope.attr("PGM_RATE") = Tango::PGM_RATE;
+ consts_scope.attr("PGM_IVL") = Tango::PGM_IVL;
+ consts_scope.attr("MAX_SOCKET_SUB") = Tango::MAX_SOCKET_SUB;
+ consts_scope.attr("PUB_HWM") = Tango::PUB_HWM;
+ consts_scope.attr("SUB_HWM") = Tango::SUB_HWM;
+ consts_scope.attr("SUB_SEND_HWM") = Tango::SUB_SEND_HWM;
+
+ consts_scope.attr("NOTIFD_CHANNEL") = Tango::NOTIFD_CHANNEL;
+
//
// Locking feature related defines
//
-
- consts_scope.attr("DEFAULT_LOCK_VALIDITY") = DEFAULT_LOCK_VALIDITY;
- consts_scope.attr("DEVICE_UNLOCKED_REASON") = DEVICE_UNLOCKED_REASON;
- consts_scope.attr("MIN_LOCK_VALIDITY") = MIN_LOCK_VALIDITY;
-
+
+ consts_scope.attr("DEFAULT_LOCK_VALIDITY") = Tango::DEFAULT_LOCK_VALIDITY;
+ consts_scope.attr("DEVICE_UNLOCKED_REASON") = Tango::DEVICE_UNLOCKED_REASON;
+ consts_scope.attr("MIN_LOCK_VALIDITY") = Tango::MIN_LOCK_VALIDITY;
+ consts_scope.attr("TG_LOCAL_HOST") = Tango::TG_LOCAL_HOST;
+
//
// Client timeout as defined by omniORB4.0.0
//
-
- consts_scope.attr("CLNT_TIMEOUT_STR") = CLNT_TIMEOUT_STR;
- consts_scope.attr("CLNT_TIMEOUT") = CLNT_TIMEOUT;
-
+
+ consts_scope.attr("CLNT_TIMEOUT_STR") = Tango::CLNT_TIMEOUT_STR;
+ consts_scope.attr("CLNT_TIMEOUT") = Tango::CLNT_TIMEOUT;
+ consts_scope.attr("NARROW_CLNT_TIMEOUT") = Tango::NARROW_CLNT_TIMEOUT;
+
//
// Connection and call timeout for database device
//
-
- consts_scope.attr("DB_CONNECT_TIMEOUT") = DB_CONNECT_TIMEOUT;
- consts_scope.attr("DB_RECONNECT_TIMEOUT") = DB_RECONNECT_TIMEOUT;
- consts_scope.attr("DB_TIMEOUT") = DB_TIMEOUT;
- consts_scope.attr("DB_START_PHASE_RETRIES") = DB_START_PHASE_RETRIES;
-
+
+ consts_scope.attr("DB_CONNECT_TIMEOUT") = Tango::DB_CONNECT_TIMEOUT;
+ consts_scope.attr("DB_RECONNECT_TIMEOUT") = Tango::DB_RECONNECT_TIMEOUT;
+ consts_scope.attr("DB_TIMEOUT") = Tango::DB_TIMEOUT;
+ consts_scope.attr("DB_START_PHASE_RETRIES") = Tango::DB_START_PHASE_RETRIES;
+
//
// Time to wait before trying to reconnect after
// a connevtion failure
//
- consts_scope.attr("RECONNECTION_DELAY") = RECONNECTION_DELAY;
-
+ consts_scope.attr("RECONNECTION_DELAY") = Tango::RECONNECTION_DELAY;
+
//
// Access Control related defines
// WARNING: these string are also used within the Db stored procedure
// introduced in Tango V6.1. If you chang eit here, don't forget to
// also update the stored procedure
//
-
- consts_scope.attr("CONTROL_SYSTEM") = CONTROL_SYSTEM;
- consts_scope.attr("SERVICE_PROP_NAME") = SERVICE_PROP_NAME;
- consts_scope.attr("ACCESS_SERVICE") = ACCESS_SERVICE;
-
+
+ consts_scope.attr("CONTROL_SYSTEM") = Tango::CONTROL_SYSTEM;
+ consts_scope.attr("SERVICE_PROP_NAME") = Tango::SERVICE_PROP_NAME;
+ consts_scope.attr("ACCESS_SERVICE") = Tango::ACCESS_SERVICE;
+
//
// Polling threads pool related defines
//
-
- consts_scope.attr("DEFAULT_POLLING_THREADS_POOL_SIZE") = DEFAULT_POLLING_THREADS_POOL_SIZE;
-
+
+ consts_scope.attr("DEFAULT_POLLING_THREADS_POOL_SIZE") = Tango::DEFAULT_POLLING_THREADS_POOL_SIZE;
+
//
// Max transfer size 256 MBytes (in byte). Needed by omniORB
//
-
- consts_scope.attr("MAX_TRANSFER_SIZE") = MAX_TRANSFER_SIZE;
-
+
+ consts_scope.attr("MAX_TRANSFER_SIZE") = Tango::MAX_TRANSFER_SIZE;
+
+ //
+ // Max GIOP connection per server . Needed by omniORB
+ //
+
+ consts_scope.attr("MAX_GIOP_PER_SERVER") = Tango::MAX_GIOP_PER_SERVER;
+
//
// Tango name length
//
-
- consts_scope.attr("MaxServerNameLength") = MaxServerNameLength;
-
+
+ consts_scope.attr("MaxServerNameLength") = Tango::MaxServerNameLength;
+ consts_scope.attr("MaxDevPropLength") = Tango::MaxDevPropLength;
+
+ //
+ // For forwarded attribute implementation
+ //
+ consts_scope.attr("MIN_IDL_CONF5") = Tango::MIN_IDL_CONF5;
+ consts_scope.attr("MIN_IDL_DEV_INTR") = Tango::MIN_IDL_DEV_INTR;
+ consts_scope.attr("ALL_EVENTS") = Tango::ALL_EVENTS;
+
+ // --------------------------------------------------------
+
//
// Files used to retrieve env. variables
//
-
- consts_scope.attr("USER_ENV_VAR_FILE") = USER_ENV_VAR_FILE;
-
- consts_scope.attr("kLogTargetConsole") = kLogTargetConsole;
- consts_scope.attr("kLogTargetFile") = kLogTargetFile;
- consts_scope.attr("kLogTargetDevice") = kLogTargetDevice;
- consts_scope.attr("kLogTargetSep") = kLogTargetSep;
-
- consts_scope.attr("AlrmValueNotSpec") = AlrmValueNotSpec;
- consts_scope.attr("AssocWritNotSpec") = AssocWritNotSpec;
- consts_scope.attr("LabelNotSpec") = LabelNotSpec;
- consts_scope.attr("DescNotSpec") = DescNotSpec;
- consts_scope.attr("UnitNotSpec") = UnitNotSpec;
- consts_scope.attr("StdUnitNotSpec") = StdUnitNotSpec;
- consts_scope.attr("DispUnitNotSpec") = DispUnitNotSpec;
+
+ consts_scope.attr("USER_ENV_VAR_FILE") = Tango::USER_ENV_VAR_FILE;
+
+ consts_scope.attr("kLogTargetConsole") = Tango::kLogTargetConsole;
+ consts_scope.attr("kLogTargetFile") = Tango::kLogTargetFile;
+ consts_scope.attr("kLogTargetDevice") = Tango::kLogTargetDevice;
+ consts_scope.attr("kLogTargetSep") = Tango::kLogTargetSep;
+
+ consts_scope.attr("AlrmValueNotSpec") = Tango::AlrmValueNotSpec;
+ consts_scope.attr("AssocWritNotSpec") = Tango::AssocWritNotSpec;
+ consts_scope.attr("LabelNotSpec") = Tango::LabelNotSpec;
+ consts_scope.attr("DescNotSpec") = Tango::DescNotSpec;
+ consts_scope.attr("UnitNotSpec") = Tango::UnitNotSpec;
+ consts_scope.attr("StdUnitNotSpec") = Tango::StdUnitNotSpec;
+ consts_scope.attr("DispUnitNotSpec") = Tango::DispUnitNotSpec;
#ifdef FormatNotSpec
- consts_scope.attr("FormatNotSpec") = FormatNotSpec;
+ consts_scope.attr("FormatNotSpec") = Tango::FormatNotSpec;
#else
- consts_scope.attr("FormatNotSpec") = FormatNotSpec_FL;
+ consts_scope.attr("FormatNotSpec") = Tango::FormatNotSpec_FL;
#endif
- consts_scope.attr("FormatNotSpec_FL") = FormatNotSpec_FL;
- consts_scope.attr("FormatNotSpec_INT") = FormatNotSpec_INT;
- consts_scope.attr("FormatNotSpec_STR") = FormatNotSpec_STR;
-
- consts_scope.attr("NotANumber") = NotANumber;
- consts_scope.attr("MemNotUsed") = MemNotUsed;
- consts_scope.attr("MemAttrPropName") = MemAttrPropName;
-
+ consts_scope.attr("FormatNotSpec_FL") = Tango::FormatNotSpec_FL;
+ consts_scope.attr("FormatNotSpec_INT") = Tango::FormatNotSpec_INT;
+ consts_scope.attr("FormatNotSpec_STR") = Tango::FormatNotSpec_STR;
+
+ consts_scope.attr("NotANumber") = Tango::NotANumber;
+ consts_scope.attr("MemNotUsed") = Tango::MemNotUsed;
+ consts_scope.attr("MemAttrPropName") = Tango::MemAttrPropName;
+
#ifdef TANGO_LONG64
consts_scope.attr("TANGO_LONG32") = false;
consts_scope.attr("TANGO_LONG64") = true;
#else
consts_scope.attr("TANGO_LONG32") = true;
consts_scope.attr("TANGO_LONG64") = false;
-#endif
-
- consts_scope.attr("API_AttrConfig") = API_AttrConfig;
- consts_scope.attr("API_AttrEventProp") = API_AttrEventProp;
- consts_scope.attr("API_AttrIncorrectDataNumber") = API_AttrIncorrectDataNumber;
- consts_scope.attr("API_AttrNoAlarm") = API_AttrNoAlarm;
- consts_scope.attr("API_AttrNotAllowed") = API_AttrNotAllowed;
- consts_scope.attr("API_AttrNotFound") = API_AttrNotFound;
- consts_scope.attr("API_AttrNotWritable") = API_AttrNotWritable;
- consts_scope.attr("API_AttrOptProp") = API_AttrOptProp;
- consts_scope.attr("API_AttrPropValueNotSet") = API_AttrPropValueNotSet;
- consts_scope.attr("API_AttrValueNotSet") = API_AttrValueNotSet;
- consts_scope.attr("API_AttrWrongDefined") = API_AttrWrongDefined;
- consts_scope.attr("API_AttrWrongMemValue") = API_AttrWrongMemValue;
- consts_scope.attr("API_BadConfigurationProperty") = API_BadConfigurationProperty;
- consts_scope.attr("API_BlackBoxArgument") = API_BlackBoxArgument;
- consts_scope.attr("API_BlackBoxEmpty") = API_BlackBoxEmpty;
- consts_scope.attr("API_CannotCheckAccessControl") = API_CannotCheckAccessControl;
- consts_scope.attr("API_CannotOpenFile") = API_CannotOpenFile;
- consts_scope.attr("API_CantActivatePOAManager") = API_CantActivatePOAManager;
- consts_scope.attr("API_CantCreateClassPoa") = API_CantCreateClassPoa;
- consts_scope.attr("API_CantCreateLockingThread") = API_CantCreateLockingThread;
- consts_scope.attr("API_CantFindLockingThread") = API_CantFindLockingThread;
- consts_scope.attr("API_CantGetClientIdent") = API_CantGetClientIdent;
- consts_scope.attr("API_CantGetDevObjectId") = API_CantGetDevObjectId;
- consts_scope.attr("API_CantInstallSignal") = API_CantInstallSignal;
- consts_scope.attr("API_CantRetrieveClass") = API_CantRetrieveClass;
- consts_scope.attr("API_CantRetrieveClassList") = API_CantRetrieveClassList;
- consts_scope.attr("API_CantStoreDeviceClass") = API_CantStoreDeviceClass;
- consts_scope.attr("API_ClassNotFound") = API_ClassNotFound;
- consts_scope.attr("API_CmdArgumentTypeNotSupported") = API_CmdArgumentTypeNotSupported;
- consts_scope.attr("API_CommandNotAllowed") = API_CommandNotAllowed;
- consts_scope.attr("API_CommandNotFound") = API_CommandNotFound;
- consts_scope.attr("API_CorbaSysException") = API_CorbaSysException;
- consts_scope.attr("API_CorruptedDatabase") = API_CorruptedDatabase;
- consts_scope.attr("API_DatabaseAccess") = API_DatabaseAccess;
- consts_scope.attr("API_DeviceLocked") = API_DeviceLocked;
- consts_scope.attr("API_DeviceNotFound") = API_DeviceNotFound;
- consts_scope.attr("API_DeviceNotLocked") = API_DeviceNotLocked;
- consts_scope.attr("API_DeviceUnlockable") = API_DeviceUnlockable;
- consts_scope.attr("API_DeviceUnlocked") = API_DeviceUnlocked;
- consts_scope.attr("API_EventSupplierNotConstructed") = API_EventSupplierNotConstructed;
- consts_scope.attr("API_IncoherentDbData") = API_IncoherentDbData;
- consts_scope.attr("API_IncoherentDevData") = API_IncoherentDevData;
- consts_scope.attr("API_IncoherentValues") = API_IncoherentValues;
- consts_scope.attr("API_IncompatibleAttrDataType") = API_IncompatibleAttrDataType;
- consts_scope.attr("API_IncompatibleCmdArgumentType") = API_IncompatibleCmdArgumentType;
- consts_scope.attr("API_InitMethodNotFound") = API_InitMethodNotFound;
- consts_scope.attr("API_InitNotPublic") = API_InitNotPublic;
- consts_scope.attr("API_InitThrowsException") = API_InitThrowsException;
- consts_scope.attr("API_JavaRuntimeSecurityException") = API_JavaRuntimeSecurityException;
- consts_scope.attr("API_MemoryAllocation") = API_MemoryAllocation;
- consts_scope.attr("API_MethodArgument") = API_MethodArgument;
- consts_scope.attr("API_MethodNotFound") = API_MethodNotFound;
- consts_scope.attr("API_MissedEvents") = API_MissedEvents;
- consts_scope.attr("API_NotSupportedFeature") = API_NotSupportedFeature;
- consts_scope.attr("API_NtDebugWindowError") = API_NtDebugWindowError;
- consts_scope.attr("API_OverloadingNotSupported") = API_OverloadingNotSupported;
- consts_scope.attr("API_PolledDeviceNotInPoolConf") = API_PolledDeviceNotInPoolConf;
- consts_scope.attr("API_PolledDeviceNotInPoolMap") = API_PolledDeviceNotInPoolMap;
- consts_scope.attr("API_PollingThreadNotFound") = API_PollingThreadNotFound;
- consts_scope.attr("API_ReadOnlyMode") = API_ReadOnlyMode;
- consts_scope.attr("API_SignalOutOfRange") = API_SignalOutOfRange;
- consts_scope.attr("API_SystemCallFailed") = API_SystemCallFailed;
- consts_scope.attr("API_WAttrOutsideLimit") = API_WAttrOutsideLimit;
- consts_scope.attr("API_WizardConfError") = API_WizardConfError;
- consts_scope.attr("API_WrongEventData") = API_WrongEventData;
- consts_scope.attr("API_WrongHistoryDataBuffer") = API_WrongHistoryDataBuffer;
- consts_scope.attr("API_WrongLockingStatus") = API_WrongLockingStatus;
- consts_scope.attr("API_ZmqInitFailed") = API_ZmqInitFailed;
+#endif
+
+ consts_scope.attr("API_AttrConfig") = Tango::API_AttrConfig;
+ consts_scope.attr("API_AttrEventProp") = Tango::API_AttrEventProp;
+ consts_scope.attr("API_AttrIncorrectDataNumber") = Tango::API_AttrIncorrectDataNumber;
+ consts_scope.attr("API_AttrNoAlarm") = Tango::API_AttrNoAlarm;
+ consts_scope.attr("API_AttrNotAllowed") = Tango::API_AttrNotAllowed;
+ consts_scope.attr("API_AttrNotFound") = Tango::API_AttrNotFound;
+ consts_scope.attr("API_AttrNotWritable") = Tango::API_AttrNotWritable;
+ consts_scope.attr("API_AttrOptProp") = Tango::API_AttrOptProp;
+ consts_scope.attr("API_AttrPropValueNotSet") = Tango::API_AttrPropValueNotSet;
+ consts_scope.attr("API_AttrValueNotSet") = Tango::API_AttrValueNotSet;
+ consts_scope.attr("API_AttrWrongDefined") = Tango::API_AttrWrongDefined;
+ consts_scope.attr("API_AttrWrongMemValue") = Tango::API_AttrWrongMemValue;
+ consts_scope.attr("API_BadConfigurationProperty") = Tango::API_BadConfigurationProperty;
+ consts_scope.attr("API_BlackBoxArgument") = Tango::API_BlackBoxArgument;
+ consts_scope.attr("API_BlackBoxEmpty") = Tango::API_BlackBoxEmpty;
+ consts_scope.attr("API_CannotCheckAccessControl") = Tango::API_CannotCheckAccessControl;
+ consts_scope.attr("API_CannotOpenFile") = Tango::API_CannotOpenFile;
+ consts_scope.attr("API_CantActivatePOAManager") = Tango::API_CantActivatePOAManager;
+ consts_scope.attr("API_CantCreateClassPoa") = Tango::API_CantCreateClassPoa;
+ consts_scope.attr("API_CantCreateLockingThread") = Tango::API_CantCreateLockingThread;
+ consts_scope.attr("API_CantFindLockingThread") = Tango::API_CantFindLockingThread;
+ consts_scope.attr("API_CantGetClientIdent") = Tango::API_CantGetClientIdent;
+ consts_scope.attr("API_CantGetDevObjectId") = Tango::API_CantGetDevObjectId;
+ consts_scope.attr("API_CantInstallSignal") = Tango::API_CantInstallSignal;
+ consts_scope.attr("API_CantRetrieveClass") = Tango::API_CantRetrieveClass;
+ consts_scope.attr("API_CantRetrieveClassList") = Tango::API_CantRetrieveClassList;
+ consts_scope.attr("API_CantStoreDeviceClass") = Tango::API_CantStoreDeviceClass;
+ consts_scope.attr("API_ClassNotFound") = Tango::API_ClassNotFound;
+ consts_scope.attr("API_CmdArgumentTypeNotSupported") = Tango::API_CmdArgumentTypeNotSupported;
+ consts_scope.attr("API_CommandNotAllowed") = Tango::API_CommandNotAllowed;
+ consts_scope.attr("API_CommandNotFound") = Tango::API_CommandNotFound;
+ consts_scope.attr("API_CorbaSysException") = Tango::API_CorbaSysException;
+ consts_scope.attr("API_CorruptedDatabase") = Tango::API_CorruptedDatabase;
+ consts_scope.attr("API_DatabaseAccess") = Tango::API_DatabaseAccess;
+ consts_scope.attr("API_DeviceLocked") = Tango::API_DeviceLocked;
+ consts_scope.attr("API_DeviceNotFound") = Tango::API_DeviceNotFound;
+ consts_scope.attr("API_DeviceNotLocked") = Tango::API_DeviceNotLocked;
+ consts_scope.attr("API_DeviceUnlockable") = Tango::API_DeviceUnlockable;
+ consts_scope.attr("API_DeviceUnlocked") = Tango::API_DeviceUnlocked;
+ consts_scope.attr("API_EventSupplierNotConstructed") = Tango::API_EventSupplierNotConstructed;
+ consts_scope.attr("API_IncoherentDbData") = Tango::API_IncoherentDbData;
+ consts_scope.attr("API_IncoherentDevData") = Tango::API_IncoherentDevData;
+ consts_scope.attr("API_IncoherentValues") = Tango::API_IncoherentValues;
+ consts_scope.attr("API_IncompatibleAttrDataType") = Tango::API_IncompatibleAttrDataType;
+ consts_scope.attr("API_IncompatibleCmdArgumentType") = Tango::API_IncompatibleCmdArgumentType;
+ consts_scope.attr("API_InitMethodNotFound") = Tango::API_InitMethodNotFound;
+ consts_scope.attr("API_InitNotPublic") = Tango::API_InitNotPublic;
+ consts_scope.attr("API_InitThrowsException") = Tango::API_InitThrowsException;
+ consts_scope.attr("API_JavaRuntimeSecurityException") = Tango::API_JavaRuntimeSecurityException;
+ consts_scope.attr("API_MemoryAllocation") = Tango::API_MemoryAllocation;
+ consts_scope.attr("API_MethodArgument") = Tango::API_MethodArgument;
+ consts_scope.attr("API_MethodNotFound") = Tango::API_MethodNotFound;
+ consts_scope.attr("API_MissedEvents") = Tango::API_MissedEvents;
+ consts_scope.attr("API_NotSupportedFeature") = Tango::API_NotSupportedFeature;
+ consts_scope.attr("API_NtDebugWindowError") = Tango::API_NtDebugWindowError;
+ consts_scope.attr("API_OverloadingNotSupported") = Tango::API_OverloadingNotSupported;
+ consts_scope.attr("API_PolledDeviceNotInPoolConf") = Tango::API_PolledDeviceNotInPoolConf;
+ consts_scope.attr("API_PolledDeviceNotInPoolMap") = Tango::API_PolledDeviceNotInPoolMap;
+ consts_scope.attr("API_PollingThreadNotFound") = Tango::API_PollingThreadNotFound;
+ consts_scope.attr("API_ReadOnlyMode") = Tango::API_ReadOnlyMode;
+ consts_scope.attr("API_SignalOutOfRange") = Tango::API_SignalOutOfRange;
+ consts_scope.attr("API_SystemCallFailed") = Tango::API_SystemCallFailed;
+ consts_scope.attr("API_WAttrOutsideLimit") = Tango::API_WAttrOutsideLimit;
+ consts_scope.attr("API_WizardConfError") = Tango::API_WizardConfError;
+ consts_scope.attr("API_WrongEventData") = Tango::API_WrongEventData;
+ consts_scope.attr("API_WrongHistoryDataBuffer") = Tango::API_WrongHistoryDataBuffer;
+ consts_scope.attr("API_WrongLockingStatus") = Tango::API_WrongLockingStatus;
+ consts_scope.attr("API_ZmqInitFailed") = Tango::API_ZmqInitFailed;
}
diff --git a/src/boost/cpp/server/attribute.cpp b/src/boost/cpp/server/attribute.cpp
index 94c321a..e92ad9b 100644
--- a/src/boost/cpp/server/attribute.cpp
+++ b/src/boost/cpp/server/attribute.cpp
@@ -393,6 +393,9 @@ namespace PyAttribute
long x, long y)
{ __set_value("set_value_date_quality", att, value, &x, &y, t, &quality); }
+ /* According to tango attribute.h these "methods not usable for
+ the external world (outside the lib)" */
+ /*
inline bopy::object get_properties(Tango::Attribute &att,
bopy::object &attr_cfg)
{
@@ -405,7 +408,7 @@ namespace PyAttribute
bopy::object &attr_cfg)
{
Tango::AttributeConfig_2 tg_attr_cfg;
- att.get_properties_2(tg_attr_cfg);
+ att.get_properties(tg_attr_cfg);
return to_py(tg_attr_cfg, attr_cfg);
}
@@ -413,9 +416,10 @@ namespace PyAttribute
bopy::object &attr_cfg)
{
Tango::AttributeConfig_3 tg_attr_cfg;
- att.get_properties_3(tg_attr_cfg);
+ att.get_properties(tg_attr_cfg);
return to_py(tg_attr_cfg, attr_cfg);
}
+ */
template<typename TangoScalarType>
inline void _get_properties_multi_attr_prop(Tango::Attribute &att, bopy::object &multi_attr_prop)
@@ -426,46 +430,8 @@ namespace PyAttribute
to_py(tg_multi_attr_prop,multi_attr_prop);
}
-#if TgLibVersNb < 80100 // _get_properties_multi_attr_prop<Tango::DevString>
-
- // This is a hook dealing with a bug in Tango 8.0.5 related to AttrProp<Tango::DevString> specialisation
- template<>
- inline void _get_properties_multi_attr_prop<Tango::DevString>(Tango::Attribute &att, bopy::object &multi_attr_prop)
- {
- Tango::AttributeConfig_3 tg_attr_cfg;
- att.get_properties_3(tg_attr_cfg);
-
- if(multi_attr_prop.ptr() == Py_None)
- {
- PYTANGO_MOD
- multi_attr_prop = pytango.attr("MultiAttrProp")();
- }
-
- multi_attr_prop.attr("label") = tg_attr_cfg.label;
- multi_attr_prop.attr("description") = tg_attr_cfg.description;
- multi_attr_prop.attr("unit") = tg_attr_cfg.unit;
- multi_attr_prop.attr("standard_unit") = tg_attr_cfg.standard_unit;
- multi_attr_prop.attr("display_unit") = tg_attr_cfg.display_unit;
- multi_attr_prop.attr("format") = tg_attr_cfg.format;
- multi_attr_prop.attr("min_value") = tg_attr_cfg.min_value;
- multi_attr_prop.attr("max_value") = tg_attr_cfg.max_value;
- multi_attr_prop.attr("min_alarm") = tg_attr_cfg.att_alarm.min_alarm;
- multi_attr_prop.attr("max_alarm") = tg_attr_cfg.att_alarm.max_alarm;
- multi_attr_prop.attr("min_warning") = tg_attr_cfg.att_alarm.min_warning;
- multi_attr_prop.attr("max_warning") = tg_attr_cfg.att_alarm.max_warning;
- multi_attr_prop.attr("delta_t") = tg_attr_cfg.att_alarm.delta_t;
- multi_attr_prop.attr("delta_val") = tg_attr_cfg.att_alarm.delta_val;
- multi_attr_prop.attr("event_period") = tg_attr_cfg.event_prop.per_event.period;
- multi_attr_prop.attr("archive_period") = tg_attr_cfg.event_prop.arch_event.period;
- multi_attr_prop.attr("rel_change") = tg_attr_cfg.event_prop.ch_event.rel_change;
- multi_attr_prop.attr("abs_change") = tg_attr_cfg.event_prop.ch_event.abs_change;
- multi_attr_prop.attr("archive_rel_change") = tg_attr_cfg.event_prop.arch_event.rel_change;
- multi_attr_prop.attr("archive_abs_change") = tg_attr_cfg.event_prop.arch_event.abs_change;
- }
-
-#endif // _get_properties_multi_attr_prop<Tango::DevString>
-
- inline bopy::object get_properties_multi_attr_prop(Tango::Attribute &att,
+ inline bopy::object
+ get_properties_multi_attr_prop(Tango::Attribute &att,
bopy::object &multi_attr_prop)
{
long tangoTypeConst = att.get_data_type();
@@ -473,6 +439,7 @@ namespace PyAttribute
return multi_attr_prop;
}
+ /*
void set_properties(Tango::Attribute &att, bopy::object &attr_cfg,
bopy::object &dev)
{
@@ -490,6 +457,7 @@ namespace PyAttribute
Tango::DeviceImpl *dev_ptr = extract<Tango::DeviceImpl*>(dev);
att.set_properties(tg_attr_cfg, dev_ptr);
}
+ */
template<typename TangoScalarType>
inline void _set_properties_multi_attr_prop(Tango::Attribute &att, bopy::object &multi_attr_prop)
@@ -558,7 +526,7 @@ namespace PyAttribute
self.set_min_alarm(c_value);
}
-#if TgLibVersNb < 80100 // set_min_alarm
+#if TANGO_VERSION_NB < 80100 // set_min_alarm
template<>
inline void _set_min_alarm<Tango::DevEncoded>(Tango::Attribute &self, bopy::object value)
@@ -601,7 +569,7 @@ namespace PyAttribute
self.set_max_alarm(c_value);
}
-#if TgLibVersNb < 80100 // set_max_alarm
+#if TANGO_VERSION_NB < 80100 // set_max_alarm
template<>
inline void _set_max_alarm<Tango::DevEncoded>(Tango::Attribute &self, bopy::object value)
@@ -644,7 +612,7 @@ namespace PyAttribute
self.set_min_warning(c_value);
}
-#if TgLibVersNb < 80100 // set_min_warning
+#if TANGO_VERSION_NB < 80100 // set_min_warning
template<>
inline void _set_min_warning<Tango::DevEncoded>(Tango::Attribute &self, bopy::object value)
@@ -687,7 +655,7 @@ namespace PyAttribute
self.set_max_warning(c_value);
}
-#if TgLibVersNb < 80100 // set_max_warning
+#if TANGO_VERSION_NB < 80100 // set_max_warning
template<>
inline void _set_max_warning<Tango::DevEncoded>(Tango::Attribute &self, bopy::object value)
@@ -953,14 +921,20 @@ void export_attribute()
.def("is_data_ready_event", &Tango::Attribute::is_data_ready_event)
.def("remove_configuration", &Tango::Attribute::remove_configuration)
+ /*
.def("_get_properties", &PyAttribute::get_properties)
.def("_get_properties_2", &PyAttribute::get_properties_2)
.def("_get_properties_3", &PyAttribute::get_properties_3)
- .def("_get_properties_multi_attr_prop", &PyAttribute::get_properties_multi_attr_prop)
+ */
+ .def("_get_properties_multi_attr_prop",
+ &PyAttribute::get_properties_multi_attr_prop)
+ /*
.def("_set_properties", &PyAttribute::set_properties)
.def("_set_properties_3", &PyAttribute::set_properties_3)
- .def("_set_properties_multi_attr_prop", &PyAttribute::set_properties_multi_attr_prop)
+ */
+ .def("_set_properties_multi_attr_prop",
+ &PyAttribute::set_properties_multi_attr_prop)
.def("set_upd_properties",
(void (*) (Tango::Attribute &, bopy::object &))
diff --git a/src/boost/cpp/server/device_impl.h b/src/boost/cpp/server/device_impl.h
index eca1630..50723b2 100644
--- a/src/boost/cpp/server/device_impl.h
+++ b/src/boost/cpp/server/device_impl.h
@@ -49,7 +49,7 @@ public:
DeviceImplWrap(PyObject *self, CppDeviceClass *cl, const char *name,
const char *desc = "A Tango device",
Tango::DevState sta = Tango::UNKNOWN,
- const char *status = StatusNotSet);
+ const char *status = Tango::StatusNotSet);
/**
* Destructor
@@ -104,7 +104,7 @@ public:
Device_2ImplWrap(PyObject *self, CppDeviceClass *cl, const char *name,
const char *desc = "A Tango device",
Tango::DevState sta = Tango::UNKNOWN,
- const char *status = StatusNotSet);
+ const char *status = Tango::StatusNotSet);
/**
* Destructor
@@ -161,7 +161,7 @@ public:
Device_3ImplWrap(PyObject *self, CppDeviceClass *cl, const char *name,
const char *desc = "A Tango device",
Tango::DevState sta = Tango::UNKNOWN,
- const char *status = StatusNotSet);
+ const char *status = Tango::StatusNotSet);
/**
* Destructor
@@ -288,7 +288,7 @@ public:
Device_4ImplWrap(PyObject *self, CppDeviceClass *cl, const char *name,
const char *desc = "A Tango device",
Tango::DevState sta = Tango::UNKNOWN,
- const char *status = StatusNotSet);
+ const char *status = Tango::StatusNotSet);
/**
* Destructor
diff --git a/src/boost/cpp/server/multi_class_attribute.cpp b/src/boost/cpp/server/multi_class_attribute.cpp
index 7dc2f31..8dc1ce6 100644
--- a/src/boost/cpp/server/multi_class_attribute.cpp
+++ b/src/boost/cpp/server/multi_class_attribute.cpp
@@ -18,17 +18,13 @@ void export_multi_class_attribute()
{
Tango::Attr& (Tango::MultiClassAttribute::*get_attr_)(std::string &) =
&Tango::MultiClassAttribute::get_attr;
- void (Tango::MultiClassAttribute::*remove_attr_)(std::string &, const std::string &) =
- &Tango::MultiClassAttribute::remove_attr;
class_<Tango::MultiClassAttribute, boost::noncopyable>("MultiClassAttribute", no_init)
.def("get_attr",
(Tango::Attr& (Tango::MultiClassAttribute::*) (const std::string &))
get_attr_,
return_value_policy<reference_existing_object>())
- .def("remove_attr",
- (void (Tango::MultiClassAttribute::*) (const std::string &, const std::string &))
- remove_attr_)
+ .def("remove_attr", &Tango::MultiClassAttribute::remove_attr)
.def("get_attr_list", &Tango::MultiClassAttribute::get_attr_list,
return_value_policy<reference_existing_object>())
;
diff --git a/src/boost/cpp/server/tango_util.cpp b/src/boost/cpp/server/tango_util.cpp
index 157afc2..25e0297 100644
--- a/src/boost/cpp/server/tango_util.cpp
+++ b/src/boost/cpp/server/tango_util.cpp
@@ -280,7 +280,6 @@ void export_util()
.def("server_init", &PyUtil::server_init, server_init_overload())
.def("server_run", &PyUtil::server_run)
.def("server_cleanup", &Tango::Util::server_cleanup)
- .def("shutdown_server", &Tango::Util::shutdown_server)
.def("trigger_cmd_polling", &Tango::Util::trigger_cmd_polling)
.def("trigger_attr_polling", &Tango::Util::trigger_attr_polling)
.def("set_polling_threads_pool_size", &Tango::Util::set_polling_threads_pool_size)
diff --git a/src/boost/cpp/tgutils.h b/src/boost/cpp/tgutils.h
index 30ffdbf..6ef6f14 100644
--- a/src/boost/cpp/tgutils.h
+++ b/src/boost/cpp/tgutils.h
@@ -14,8 +14,11 @@
#include <cassert>
#include <tango.h>
-#ifndef TgLibVersNb
-# define TgLibVersNb 80005
+#ifndef TANGO_VERSION_NB
+#define TANGO_VERSION_NB \
+ TANGO_VERSION_MAJOR*10000 + \
+ TANGO_VERSION_MINOR*100 + \
+ TANGO_VERSION_MINOR
#endif
namespace Tango
diff --git a/src/boost/cpp/version.cpp b/src/boost/cpp/version.cpp
index cfa950e..512d16e 100644
--- a/src/boost/cpp/version.cpp
+++ b/src/boost/cpp/version.cpp
@@ -16,5 +16,5 @@ using namespace boost::python;
void export_version()
{
- scope().attr("__tangolib_version__") = TgLibVers;
+ scope().attr("__tangolib_version__") = Tango::TgLibVers;
}
diff --git a/src/boost/python/__init__.py b/src/boost/python/__init__.py
index 01987fe..8fd6505 100644
--- a/src/boost/python/__init__.py
+++ b/src/boost/python/__init__.py
@@ -193,3 +193,14 @@ from .tango_numpy import NumpyType, numpy_type, numpy_spectrum, numpy_image
from .pytango_init import init as __init
__init()
+
+
+def __leave():
+ try:
+ _PyTango._leavefunc()
+ except:
+ pass
+
+#import atexit
+#atexit.register(__leave)
+
diff --git a/src/boost/python/release.py b/src/boost/python/release.py
index 503c72e..80a14e9 100644
--- a/src/boost/python/release.py
+++ b/src/boost/python/release.py
@@ -40,10 +40,10 @@ class Release:
- keywords : (seq<str>) list of keywords
- license : (str) the license"""
name = 'PyTango'
- version_info = (8, 1, 9, 'final', 0)
+ version_info = (9, 1, 0, 'dev', 0)
version = '.'.join(map(str, version_info[:3]))
version_long = version + ''.join(map(str, version_info[3:]))
- version_description = 'This version implements the C++ Tango 8.1 API.'
+ version_description = 'This version implements the C++ Tango 9 API.'
version_number = int(version.replace('.',''))
description = 'A python binding for the Tango control system'
long_description = 'This module implements the Python Tango Device API ' \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list