/* Generated by Cython 0.29.17 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "/opt/OpenSpliceDDS/V6.9.0/HDE/x86_64.linux/include/dcps/C/C99/dds.h",
            "dds_builtinTopics.h"
        ],
        "extra_compile_args": [
            "-DOSPL_BUILD_DCPSSAC"
        ],
        "include_dirs": [
            ".",
            "/opt/OpenSpliceDDS/V6.9.0/HDE/x86_64.linux/include/dcps/C/C99",
            "/opt/OpenSpliceDDS/V6.9.0/HDE/x86_64.linux/include/dcps/C/SAC",
            "/opt/OpenSpliceDDS/V6.9.0/HDE/x86_64.linux/include/sys"
        ],
        "libraries": [
            "dcpsc99",
            "dcpssac",
            "ddskernel"
        ],
        "library_dirs": [
            "/opt/OpenSpliceDDS/V6.9.0/HDE/x86_64.linux/lib"
        ],
        "name": "dds",
        "sources": [
            "dds.pyx",
            "dds_builtinTopicsDcps.c",
            "dds_builtinTopicsSacDcps.c",
            "dds_builtinTopicsSplDcps.c"
        ]
    },
    "module_name": "dds"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_17"
#define CYTHON_HEX_VERSION 0x001D11F0
#define CYTHON_FUTURE_DIVISION 0
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__dds
#define __PYX_HAVE_API__dds
/* Early includes */
#include "dds.h"
#include "dds_builtinTopics.h"
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "dds.pyx",
  "stringsource",
};
/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif


/*--- Type declarations ---*/
struct __pyx_obj_3dds_Qos;
struct __pyx_obj_3dds_Entity;
struct __pyx_obj_3dds_DomainParticipant;
struct __pyx_obj_3dds_TypeSupport;
struct __pyx_obj_3dds_Topic;
struct __pyx_obj_3dds_FoundTopic;
struct __pyx_obj_3dds_Publisher;
struct __pyx_obj_3dds_Subscriber;
struct __pyx_obj_3dds_DataWriter;
struct __pyx_obj_3dds_DataReader;
struct __pyx_obj_3dds_Condition;
struct __pyx_obj_3dds_StatusCondition;
struct __pyx_obj_3dds_GuardCondition;
struct __pyx_obj_3dds_ReadCondition;
struct __pyx_obj_3dds_QueryCondition;
struct __pyx_obj_3dds_WaitSet;
struct __pyx_obj_3dds_QosProvider;
struct __pyx_obj_3dds__SerializationHelper;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults1;
typedef struct __pyx_defaults1 __pyx_defaults1;
struct __pyx_defaults2;
typedef struct __pyx_defaults2 __pyx_defaults2;
struct __pyx_defaults3;
typedef struct __pyx_defaults3 __pyx_defaults3;
struct __pyx_defaults4;
typedef struct __pyx_defaults4 __pyx_defaults4;
struct __pyx_defaults5;
typedef struct __pyx_defaults5 __pyx_defaults5;
struct __pyx_defaults6;
typedef struct __pyx_defaults6 __pyx_defaults6;
struct __pyx_defaults7;
typedef struct __pyx_defaults7 __pyx_defaults7;
struct __pyx_defaults8;
typedef struct __pyx_defaults8 __pyx_defaults8;
struct __pyx_defaults9;
typedef struct __pyx_defaults9 __pyx_defaults9;
struct __pyx_defaults10;
typedef struct __pyx_defaults10 __pyx_defaults10;
struct __pyx_defaults11;
typedef struct __pyx_defaults11 __pyx_defaults11;
struct __pyx_defaults12;
typedef struct __pyx_defaults12 __pyx_defaults12;
struct __pyx_defaults13;
typedef struct __pyx_defaults13 __pyx_defaults13;
struct __pyx_defaults14;
typedef struct __pyx_defaults14 __pyx_defaults14;

/* "dds.pyx":2493
 * _Sample = namedtuple('_Sample',['data','status'])
 * 
 * ctypedef int (*_ReadOp)(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond)             # <<<<<<<<<<<<<<
 * 
 * cdef int _op_dds_read(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 */
typedef int (*__pyx_t_3dds__ReadOp)(dds_entity_t, void **, uint32_t, dds_sample_info_t *, uint32_t, dds_instance_handle_t, dds_condition_t);
struct __pyx_defaults {
  PyObject *__pyx_arg_kind;
};
struct __pyx_defaults1 {
  PyObject *__pyx_arg_kind;
};
struct __pyx_defaults2 {
  PyObject *__pyx_arg_max_samples;
  PyObject *__pyx_arg_max_instances;
  PyObject *__pyx_arg_max_samples_per_instance;
};
struct __pyx_defaults3 {
  PyObject *__pyx_arg_kind;
};
struct __pyx_defaults4 {
  PyObject *__pyx_arg_lifespan;
};
struct __pyx_defaults5 {
  PyObject *__pyx_arg_deadline;
};
struct __pyx_defaults6 {
  PyObject *__pyx_arg_duration;
};
struct __pyx_defaults7 {
  PyObject *__pyx_arg_kind;
};
struct __pyx_defaults8 {
  PyObject *__pyx_arg_kind;
  PyObject *__pyx_arg_lease_duration;
};
struct __pyx_defaults9 {
  PyObject *__pyx_arg_minimum_separation;
};
struct __pyx_defaults10 {
  PyObject *__pyx_arg_ps;
};
struct __pyx_defaults11 {
  PyObject *__pyx_arg_kind;
  PyObject *__pyx_arg_max_blocking_time;
};
struct __pyx_defaults12 {
  PyObject *__pyx_arg_kind;
};
struct __pyx_defaults13 {
  PyObject *__pyx_arg_autopurge_nowriter_samples;
  PyObject *__pyx_arg_autopurge_disposed_samples_delay;
};
struct __pyx_defaults14 {
  PyObject *__pyx_arg_service_cleanup_delay;
  PyObject *__pyx_arg_history_kind;
  PyObject *__pyx_arg_max_samples;
  PyObject *__pyx_arg_max_instances;
  PyObject *__pyx_arg_max_samples_per_instance;
};

/* "dds.pyx":658
 * 
 * # The QoS wrapper.
 * cdef class Qos:             # <<<<<<<<<<<<<<
 *     '''
 *     QoS class
 */
struct __pyx_obj_3dds_Qos {
  PyObject_HEAD
  struct __pyx_vtabstruct_3dds_Qos *__pyx_vtab;
  dds_qos_t *_c_qos;
  PyObject *_policies;
};


/* "dds.pyx":1031
 * # The handle and the entity are registered with a global dictionary
 * # to allow a listener callback to find the associated entity
 * cdef class Entity(object):             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract base entity class
 */
struct __pyx_obj_3dds_Entity {
  PyObject_HEAD
  struct __pyx_vtabstruct_3dds_Entity *__pyx_vtab;
  dds_entity_t _c_handle;
  PyObject *_parent;
  PyObject *_listener;
};


/* "dds.pyx":1615
 * # Note that the proper Exceptions are not yet defined and for
 * # all possible exceptions the standard DDSException is used.
 * cdef class DomainParticipant(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     Domain participant class
 */
struct __pyx_obj_3dds_DomainParticipant {
  struct __pyx_obj_3dds_Entity __pyx_base;
  PyObject *_publishers;
  PyObject *_subscribers;
  PyObject *_writers;
  PyObject *_readers;
};


/* "dds.pyx":1767
 * # For the serialization and deserialization the struct
 * # module is used
 * cdef class TypeSupport:             # <<<<<<<<<<<<<<
 *     '''
 *     It is used to generate a dds_topic_descriptor from the
 */
struct __pyx_obj_3dds_TypeSupport {
  PyObject_HEAD
};


/* "dds.pyx":1845
 * 
 * # The Topic wrapper
 * cdef class Topic(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     Topic class
 */
struct __pyx_obj_3dds_Topic {
  struct __pyx_obj_3dds_Entity __pyx_base;
  PyObject *_typesupport;
};


/* "dds.pyx":1997
 * 
 * #Wrapper for a 'found' topic
 * cdef class FoundTopic(Topic):             # <<<<<<<<<<<<<<
 *     '''
 *     FoundTopic class
 */
struct __pyx_obj_3dds_FoundTopic {
  struct __pyx_obj_3dds_Topic __pyx_base;
};


/* "dds.pyx":2030
 * 
 * # The publisher wrapper
 * cdef class Publisher(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     Publisher class
 */
struct __pyx_obj_3dds_Publisher {
  struct __pyx_obj_3dds_Entity __pyx_base;
  PyObject *_writers;
};


/* "dds.pyx":2095
 * 
 * # The subscriber wrapper
 * cdef class Subscriber(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     Subscriber class
 */
struct __pyx_obj_3dds_Subscriber {
  struct __pyx_obj_3dds_Entity __pyx_base;
  PyObject *_readers;
};


/* "dds.pyx":2160
 * 
 * # The Datawriter wrapper
 * cdef class DataWriter(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     DataWriter class
 */
struct __pyx_obj_3dds_DataWriter {
  struct __pyx_obj_3dds_Entity __pyx_base;
  PyObject *_typesupport;
  PyObject *_topic;
};


/* "dds.pyx":2561
 * 
 * # The DataReader wrapper
 * cdef class DataReader(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     DataReader class
 */
struct __pyx_obj_3dds_DataReader {
  struct __pyx_obj_3dds_Entity __pyx_base;
  PyObject *_typesupport;
  PyObject *_topic;
};


/* "dds.pyx":2989
 * # Abstract Condition wrapper
 * # maintains the handle to the C99 condition
 * cdef class Condition:             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract condition class
 */
struct __pyx_obj_3dds_Condition {
  PyObject_HEAD
  struct __pyx_vtabstruct_3dds_Condition *__pyx_vtab;
  dds_condition_t _c_handle;
};


/* "dds.pyx":3016
 * 
 * # The StatusCondition wrapper
 * cdef class StatusCondition(Condition):             # <<<<<<<<<<<<<<
 *     '''
 *     Status condition
 */
struct __pyx_obj_3dds_StatusCondition {
  struct __pyx_obj_3dds_Condition __pyx_base;
  PyObject *_entity;
  PyObject *_masks;
};


/* "dds.pyx":3055
 * 
 * # The GuardCondition wrapper
 * cdef class GuardCondition(Condition):             # <<<<<<<<<<<<<<
 *     '''
 *     Guard condition
 */
struct __pyx_obj_3dds_GuardCondition {
  struct __pyx_obj_3dds_Condition __pyx_base;
};


/* "dds.pyx":3077
 * 
 * # The ReadCondition wrapper
 * cdef class ReadCondition(Condition):             # <<<<<<<<<<<<<<
 *     '''
 *     Read condition
 */
struct __pyx_obj_3dds_ReadCondition {
  struct __pyx_obj_3dds_Condition __pyx_base;
  PyObject *_reader;
};


/* "dds.pyx":3103
 * 
 * # The QueryCondition wrapper
 * cdef class QueryCondition(Condition):             # <<<<<<<<<<<<<<
 *     '''
 *     Query condition
 */
struct __pyx_obj_3dds_QueryCondition {
  struct __pyx_obj_3dds_Condition __pyx_base;
  PyObject *_reader;
};


/* "dds.pyx":3156
 * 
 * # The WaitSet wrapper
 * cdef class WaitSet:             # <<<<<<<<<<<<<<
 *     '''
 *     WaitSet class
 */
struct __pyx_obj_3dds_WaitSet {
  PyObject_HEAD
  dds_waitset_t _c_handle;
  PyObject *_conditions;
};


/* "dds.pyx":3253
 *         return conditions
 * 
 * cdef class QosProvider:             # <<<<<<<<<<<<<<
 *     '''
 *     QoS Provider class
 */
struct __pyx_obj_3dds_QosProvider {
  PyObject_HEAD
  dds_entity_t _qp;
};


/* "dds.pyx":3381
 *         super(DDSException, self).__init__(msg)
 * 
 * cdef class _SerializationHelper:             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
struct __pyx_obj_3dds__SerializationHelper {
  PyObject_HEAD
};



/* "dds.pyx":658
 * 
 * # The QoS wrapper.
 * cdef class Qos:             # <<<<<<<<<<<<<<
 *     '''
 *     QoS class
 */

struct __pyx_vtabstruct_3dds_Qos {
  PyObject *(*_apply_all)(struct __pyx_obj_3dds_Qos *);
  PyObject *(*_apply_policy)(struct __pyx_obj_3dds_Qos *, PyObject *);
  dds_qos_t *(*handle)(struct __pyx_obj_3dds_Qos *);
};
static struct __pyx_vtabstruct_3dds_Qos *__pyx_vtabptr_3dds_Qos;


/* "dds.pyx":1031
 * # The handle and the entity are registered with a global dictionary
 * # to allow a listener callback to find the associated entity
 * cdef class Entity(object):             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract base entity class
 */

struct __pyx_vtabstruct_3dds_Entity {
  PyObject *(*set_handle)(struct __pyx_obj_3dds_Entity *, dds_entity_t);
  dds_entity_t (*get_handle)(struct __pyx_obj_3dds_Entity *);
  dds_entity_t (*handle)(struct __pyx_obj_3dds_Entity *);
};
static struct __pyx_vtabstruct_3dds_Entity *__pyx_vtabptr_3dds_Entity;


/* "dds.pyx":1615
 * # Note that the proper Exceptions are not yet defined and for
 * # all possible exceptions the standard DDSException is used.
 * cdef class DomainParticipant(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     Domain participant class
 */

struct __pyx_vtabstruct_3dds_DomainParticipant {
  struct __pyx_vtabstruct_3dds_Entity __pyx_base;
};
static struct __pyx_vtabstruct_3dds_DomainParticipant *__pyx_vtabptr_3dds_DomainParticipant;


/* "dds.pyx":1845
 * 
 * # The Topic wrapper
 * cdef class Topic(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     Topic class
 */

struct __pyx_vtabstruct_3dds_Topic {
  struct __pyx_vtabstruct_3dds_Entity __pyx_base;
};
static struct __pyx_vtabstruct_3dds_Topic *__pyx_vtabptr_3dds_Topic;


/* "dds.pyx":1997
 * 
 * #Wrapper for a 'found' topic
 * cdef class FoundTopic(Topic):             # <<<<<<<<<<<<<<
 *     '''
 *     FoundTopic class
 */

struct __pyx_vtabstruct_3dds_FoundTopic {
  struct __pyx_vtabstruct_3dds_Topic __pyx_base;
};
static struct __pyx_vtabstruct_3dds_FoundTopic *__pyx_vtabptr_3dds_FoundTopic;


/* "dds.pyx":2030
 * 
 * # The publisher wrapper
 * cdef class Publisher(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     Publisher class
 */

struct __pyx_vtabstruct_3dds_Publisher {
  struct __pyx_vtabstruct_3dds_Entity __pyx_base;
};
static struct __pyx_vtabstruct_3dds_Publisher *__pyx_vtabptr_3dds_Publisher;


/* "dds.pyx":2095
 * 
 * # The subscriber wrapper
 * cdef class Subscriber(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     Subscriber class
 */

struct __pyx_vtabstruct_3dds_Subscriber {
  struct __pyx_vtabstruct_3dds_Entity __pyx_base;
};
static struct __pyx_vtabstruct_3dds_Subscriber *__pyx_vtabptr_3dds_Subscriber;


/* "dds.pyx":2160
 * 
 * # The Datawriter wrapper
 * cdef class DataWriter(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     DataWriter class
 */

struct __pyx_vtabstruct_3dds_DataWriter {
  struct __pyx_vtabstruct_3dds_Entity __pyx_base;
};
static struct __pyx_vtabstruct_3dds_DataWriter *__pyx_vtabptr_3dds_DataWriter;


/* "dds.pyx":2561
 * 
 * # The DataReader wrapper
 * cdef class DataReader(Entity):             # <<<<<<<<<<<<<<
 *     '''
 *     DataReader class
 */

struct __pyx_vtabstruct_3dds_DataReader {
  struct __pyx_vtabstruct_3dds_Entity __pyx_base;
};
static struct __pyx_vtabstruct_3dds_DataReader *__pyx_vtabptr_3dds_DataReader;


/* "dds.pyx":2989
 * # Abstract Condition wrapper
 * # maintains the handle to the C99 condition
 * cdef class Condition:             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract condition class
 */

struct __pyx_vtabstruct_3dds_Condition {
  PyObject *(*set_handle)(struct __pyx_obj_3dds_Condition *, dds_condition_t);
  dds_condition_t (*get_handle)(struct __pyx_obj_3dds_Condition *);
};
static struct __pyx_vtabstruct_3dds_Condition *__pyx_vtabptr_3dds_Condition;


/* "dds.pyx":3016
 * 
 * # The StatusCondition wrapper
 * cdef class StatusCondition(Condition):             # <<<<<<<<<<<<<<
 *     '''
 *     Status condition
 */

struct __pyx_vtabstruct_3dds_StatusCondition {
  struct __pyx_vtabstruct_3dds_Condition __pyx_base;
};
static struct __pyx_vtabstruct_3dds_StatusCondition *__pyx_vtabptr_3dds_StatusCondition;


/* "dds.pyx":3055
 * 
 * # The GuardCondition wrapper
 * cdef class GuardCondition(Condition):             # <<<<<<<<<<<<<<
 *     '''
 *     Guard condition
 */

struct __pyx_vtabstruct_3dds_GuardCondition {
  struct __pyx_vtabstruct_3dds_Condition __pyx_base;
};
static struct __pyx_vtabstruct_3dds_GuardCondition *__pyx_vtabptr_3dds_GuardCondition;


/* "dds.pyx":3077
 * 
 * # The ReadCondition wrapper
 * cdef class ReadCondition(Condition):             # <<<<<<<<<<<<<<
 *     '''
 *     Read condition
 */

struct __pyx_vtabstruct_3dds_ReadCondition {
  struct __pyx_vtabstruct_3dds_Condition __pyx_base;
};
static struct __pyx_vtabstruct_3dds_ReadCondition *__pyx_vtabptr_3dds_ReadCondition;


/* "dds.pyx":3103
 * 
 * # The QueryCondition wrapper
 * cdef class QueryCondition(Condition):             # <<<<<<<<<<<<<<
 *     '''
 *     Query condition
 */

struct __pyx_vtabstruct_3dds_QueryCondition {
  struct __pyx_vtabstruct_3dds_Condition __pyx_base;
};
static struct __pyx_vtabstruct_3dds_QueryCondition *__pyx_vtabptr_3dds_QueryCondition;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* DelItemInt.proto */
#define __Pyx_DelItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_DelItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_DelItem_Generic(o, to_py_func(i))))
static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j);
static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
                                               int is_list, int wraparound);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* IncludeStringH.proto */
#include <string.h>

/* decode_c_string_utf16.proto */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* CallNextTpTraverse.proto */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

/* CallNextTpClear.proto */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchInspect.proto */
static PyObject* __Pyx_patch_inspect(PyObject* module);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dds_sample_rejected_status_kind(dds_sample_rejected_status_kind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dds_sample_state_t(dds_sample_state_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dds_view_state_t(dds_view_state_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dds_instance_state_t(dds_instance_state_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE dds_durability_kind_t __Pyx_PyInt_As_dds_durability_kind_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum dds_history_kind __Pyx_PyInt_As_enum__dds_history_kind(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum dds_presentation_access_scope_kind __Pyx_PyInt_As_enum__dds_presentation_access_scope_kind(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum dds_ownership_kind __Pyx_PyInt_As_enum__dds_ownership_kind(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum dds_liveliness_kind __Pyx_PyInt_As_enum__dds_liveliness_kind(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum dds_reliability_kind __Pyx_PyInt_As_enum__dds_reliability_kind(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum dds_destination_order_kind __Pyx_PyInt_As_enum__dds_destination_order_kind(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static PyObject *__pyx_f_3dds_3Qos__apply_all(struct __pyx_obj_3dds_Qos *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_3dds_3Qos__apply_policy(struct __pyx_obj_3dds_Qos *__pyx_v_self, PyObject *__pyx_v_policy); /* proto*/
static dds_qos_t *__pyx_f_3dds_3Qos_handle(struct __pyx_obj_3dds_Qos *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_3dds_6Entity_set_handle(struct __pyx_obj_3dds_Entity *__pyx_v_self, dds_entity_t __pyx_v_h); /* proto*/
static dds_entity_t __pyx_f_3dds_6Entity_get_handle(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto*/
static dds_entity_t __pyx_f_3dds_6Entity_handle(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_3dds_9Condition_set_handle(struct __pyx_obj_3dds_Condition *__pyx_v_self, dds_condition_t __pyx_v_handle); /* proto*/
static dds_condition_t __pyx_f_3dds_9Condition_get_handle(struct __pyx_obj_3dds_Condition *__pyx_v_self); /* proto*/

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'libc.stdint' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'dds' */
static PyTypeObject *__pyx_ptype_3dds_Qos = 0;
static PyTypeObject *__pyx_ptype_3dds_Entity = 0;
static PyTypeObject *__pyx_ptype_3dds_DomainParticipant = 0;
static PyTypeObject *__pyx_ptype_3dds_TypeSupport = 0;
static PyTypeObject *__pyx_ptype_3dds_Topic = 0;
static PyTypeObject *__pyx_ptype_3dds_FoundTopic = 0;
static PyTypeObject *__pyx_ptype_3dds_Publisher = 0;
static PyTypeObject *__pyx_ptype_3dds_Subscriber = 0;
static PyTypeObject *__pyx_ptype_3dds_DataWriter = 0;
static PyTypeObject *__pyx_ptype_3dds_DataReader = 0;
static PyTypeObject *__pyx_ptype_3dds_Condition = 0;
static PyTypeObject *__pyx_ptype_3dds_StatusCondition = 0;
static PyTypeObject *__pyx_ptype_3dds_GuardCondition = 0;
static PyTypeObject *__pyx_ptype_3dds_ReadCondition = 0;
static PyTypeObject *__pyx_ptype_3dds_QueryCondition = 0;
static PyTypeObject *__pyx_ptype_3dds_WaitSet = 0;
static PyTypeObject *__pyx_ptype_3dds_QosProvider = 0;
static PyTypeObject *__pyx_ptype_3dds__SerializationHelper = 0;
static PyObject *__pyx_v_3dds__entity_register = 0;
static dds_topiclistener_t __pyx_v_3dds_topic_listener;
static dds_writerlistener_t __pyx_v_3dds_writer_listener;
static dds_readerlistener_t __pyx_v_3dds_reader_listener;
static dds_publisherlistener_t __pyx_v_3dds_publisher_listener;
static dds_subscriberlistener_t __pyx_v_3dds_subscriber_listener;
static dds_participantlistener_t __pyx_v_3dds_participant_listener;
static PyObject *__pyx_v_3dds__builtin_topics_descriptors = 0;
static PyObject *__pyx_v_3dds__builtin_topics_type_name_map = 0;
static PyObject *__pyx_f_3dds__entity_register_add(struct __pyx_obj_3dds_Entity *); /*proto*/
static PyObject *__pyx_f_3dds__entity_register_remove(struct __pyx_obj_3dds_Entity *); /*proto*/
static PyObject *__pyx_f_3dds__entity_register_remove_children(struct __pyx_obj_3dds_Entity *); /*proto*/
static struct __pyx_obj_3dds_Entity *__pyx_f_3dds__entity_register_find(dds_entity_t); /*proto*/
static PyObject *__pyx_f_3dds__to_pystr_and_free(char const *); /*proto*/
static uint32_t __pyx_f_3dds__status_mask_for_listener(PyObject *); /*proto*/
static void __pyx_f_3dds_on_inconsistent_topic(dds_entity_t, dds_inconsistent_topic_status_t *); /*proto*/
static void __pyx_f_3dds_on_offered_deadline_missed(dds_entity_t, dds_offered_deadline_missed_status_t *); /*proto*/
static void __pyx_f_3dds_on_offered_incompatible_qos(dds_entity_t, dds_offered_incompatible_qos_status_t *); /*proto*/
static void __pyx_f_3dds_on_liveliness_lost(dds_entity_t, dds_liveliness_lost_status_t *); /*proto*/
static void __pyx_f_3dds_on_publication_matched(dds_entity_t, dds_publication_matched_status_t *); /*proto*/
static void __pyx_f_3dds_on_requested_deadline_missed(dds_entity_t, dds_requested_deadline_missed_status_t *); /*proto*/
static void __pyx_f_3dds_on_requested_incompatible_qos(dds_entity_t, dds_requested_incompatible_qos_status_t *); /*proto*/
static void __pyx_f_3dds_on_sample_rejected(dds_entity_t, dds_sample_rejected_status_t *); /*proto*/
static void __pyx_f_3dds_on_liveliness_changed(dds_entity_t, dds_liveliness_changed_status_t *); /*proto*/
static void __pyx_f_3dds_on_data_available(dds_entity_t); /*proto*/
static void __pyx_f_3dds_on_subscription_matched(dds_entity_t, dds_subscription_matched_status_t *); /*proto*/
static void __pyx_f_3dds_on_sample_lost(dds_entity_t, dds_sample_lost_status_t *); /*proto*/
static void __pyx_f_3dds_on_data_on_readers(dds_entity_t); /*proto*/
static PyObject *__pyx_f_3dds__set_status_for_listener(dds_entity_t, PyObject *); /*proto*/
static dds_topic_descriptor_t const *__pyx_f_3dds_get_descriptor(PyObject *); /*proto*/
static PyObject *__pyx_f_3dds__FoundTopic_Init(struct __pyx_obj_3dds_DomainParticipant *, dds_entity_t); /*proto*/
static int __pyx_f_3dds__op_dds_read(dds_entity_t, void **, uint32_t, dds_sample_info_t *, uint32_t, dds_instance_handle_t, dds_condition_t); /*proto*/
static int __pyx_f_3dds__op_dds_take(dds_entity_t, void **, uint32_t, dds_sample_info_t *, uint32_t, dds_instance_handle_t, dds_condition_t); /*proto*/
static int __pyx_f_3dds__op_dds_read_cond(dds_entity_t, void **, uint32_t, dds_sample_info_t *, uint32_t, dds_instance_handle_t, dds_condition_t); /*proto*/
static int __pyx_f_3dds__op_dds_take_cond(dds_entity_t, void **, uint32_t, dds_sample_info_t *, uint32_t, dds_instance_handle_t, dds_condition_t); /*proto*/
static int __pyx_f_3dds__op_dds_read_instance(dds_entity_t, void **, uint32_t, dds_sample_info_t *, uint32_t, dds_instance_handle_t, dds_condition_t); /*proto*/
static int __pyx_f_3dds__op_dds_take_instance(dds_entity_t, void **, uint32_t, dds_sample_info_t *, uint32_t, dds_instance_handle_t, dds_condition_t); /*proto*/
static PyObject *__pyx_f_3dds__set_sample_info(PyObject *, dds_sample_info_t); /*proto*/
static PyObject *__pyx_f_3dds__do_read_op(struct __pyx_obj_3dds_TypeSupport *, dds_entity_t, __pyx_t_3dds__ReadOp, uint32_t, uint32_t, dds_instance_handle_t, dds_condition_t); /*proto*/
static PyObject *__pyx_f_3dds___pyx_unpickle_TypeSupport__set_state(struct __pyx_obj_3dds_TypeSupport *, PyObject *); /*proto*/
static PyObject *__pyx_f_3dds___pyx_unpickle__SerializationHelper__set_state(struct __pyx_obj_3dds__SerializationHelper *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "dds"
extern int __pyx_module_is_main_dds;
int __pyx_module_is_main_dds = 0;

/* Implementation of 'dds' */
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_super;
static const char __pyx_k_[] = "";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_dp[] = "dp";
static const char __pyx_k_id[] = "_id";
static const char __pyx_k_ps[] = "ps";
static const char __pyx_k_ts[] = "ts";
static const char __pyx_k_Qos[] = "Qos";
static const char __pyx_k_dds[] = "dds";
static const char __pyx_k_did[] = "did";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_msg[] = "msg";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_ptr[] = "ptr";
static const char __pyx_k_qos[] = "qos";
static const char __pyx_k_sec[] = "sec";
static const char __pyx_k_str[] = "str";
static const char __pyx_k_uri[] = "uri";
static const char __pyx_k_Enum[] = "Enum";
static const char __pyx_k_addr[] = "addr";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_id_2[] = "id";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_kind[] = "_kind";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_spec[] = "spec";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_warn[] = "warn";
static const char __pyx_k_GROUP[] = "GROUP";
static const char __pyx_k_TOPIC[] = "TOPIC";
static const char __pyx_k_Topic[] = "Topic";
static const char __pyx_k_depth[] = "depth";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_lease[] = "_lease";
static const char __pyx_k_masks[] = "masks";
static const char __pyx_k_names[] = "_names";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_sleep[] = "sleep";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_topic[] = "topic";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_Entity[] = "Entity";
static const char __pyx_k_SHARED[] = "SHARED";
static const char __pyx_k_Sample[] = "_Sample";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_entity[] = "entity";
static const char __pyx_k_handle[] = "_handle";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_keys_2[] = "_keys";
static const char __pyx_k_kind_2[] = "kind";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "_name";
static const char __pyx_k_name_3[] = "__name__";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_parent[] = "parent";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reader[] = "reader";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_size_2[] = "_size";
static const char __pyx_k_spec_2[] = "_spec";
static const char __pyx_k_status[] = "status";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_writer[] = "writer";
static const char __pyx_k_DDSTime[] = "DDSTime";
static const char __pyx_k_WaitSet[] = "WaitSet";
static const char __pyx_k_dds_pyx[] = "dds.pyx";
static const char __pyx_k_depth_2[] = "_depth";
static const char __pyx_k_inspect[] = "inspect";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_nanosec[] = "nanosec";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_profile[] = "profile";
static const char __pyx_k_timeout[] = "timeout";
static const char __pyx_k_value_2[] = "_value";
static const char __pyx_k_DCPSType[] = "DCPSType";
static const char __pyx_k_INSTANCE[] = "INSTANCE";
static const char __pyx_k_KEEP_ALL[] = "KEEP_ALL";
static const char __pyx_k_Listener[] = "Listener";
static const char __pyx_k_RELIABLE[] = "RELIABLE";
static const char __pyx_k_VOLATILE[] = "VOLATILE";
static const char __pyx_k_deadline[] = "deadline";
static const char __pyx_k_duration[] = "duration";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_handle_2[] = "handle";
static const char __pyx_k_infinity[] = "infinity";
static const char __pyx_k_lifespan[] = "lifespan";
static const char __pyx_k_listener[] = "listener";
static const char __pyx_k_policies[] = "policies";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_warnings[] = "warnings";
static const char __pyx_k_ANY_STATE[] = "ANY_STATE";
static const char __pyx_k_AUTOMATIC[] = "AUTOMATIC";
static const char __pyx_k_Condition[] = "Condition";
static const char __pyx_k_DCPSTopic[] = "DCPSTopic";
static const char __pyx_k_EXCLUSIVE[] = "EXCLUSIVE";
static const char __pyx_k_KEEP_LAST[] = "KEEP_LAST";
static const char __pyx_k_Publisher[] = "Publisher";
static const char __pyx_k_QosPolicy[] = "QosPolicy";
static const char __pyx_k_TRANSIENT[] = "TRANSIENT";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_condition[] = "condition";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_predicate[] = "predicate";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_serialize[] = "_serialize";
static const char __pyx_k_timestamp[] = "timestamp";
static const char __pyx_k_DataReader[] = "DataReader";
static const char __pyx_k_DataWriter[] = "DataWriter";
static const char __pyx_k_FoundTopic[] = "FoundTopic";
static const char __pyx_k_ISO_8859_1[] = "ISO-8859-1";
static const char __pyx_k_PERSISTENT[] = "PERSISTENT";
static const char __pyx_k_QosProfile[] = "QosProfile";
static const char __pyx_k_SampleInfo[] = "SampleInfo";
static const char __pyx_k_Subscriber[] = "Subscriber";
static const char __pyx_k_deadline_2[] = "_deadline";
static const char __pyx_k_duration_2[] = "_duration";
static const char __pyx_k_expression[] = "expression";
static const char __pyx_k_getmembers[] = "getmembers";
static const char __pyx_k_isfunction[] = "isfunction";
static const char __pyx_k_lifespan_2[] = "_lifespan";
static const char __pyx_k_namedtuple[] = "namedtuple";
static const char __pyx_k_parameters[] = "parameters";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_subscriber[] = "subscriber";
static const char __pyx_k_valid_data[] = "valid_data";
static const char __pyx_k_view_state[] = "view_state";
static const char __pyx_k_BEST_EFFORT[] = "BEST_EFFORT";
static const char __pyx_k_CMPublisher[] = "CMPublisher";
static const char __pyx_k_DDSDuration[] = "DDSDuration";
static const char __pyx_k_DDSMaskUtil[] = "DDSMaskUtil";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_QosPolicyId[] = "QosPolicyId";
static const char __pyx_k_QosProvider[] = "QosProvider";
static const char __pyx_k_Return_code[] = "  Return code: ";
static const char __pyx_k_SAMPLE_LOST[] = "SAMPLE_LOST";
static const char __pyx_k_TypeSupport[] = "TypeSupport";
static const char __pyx_k_Wait_failed[] = "Wait failed";
static const char __pyx_k_alive_count[] = "alive_count";
static const char __pyx_k_all_samples[] = "all_samples";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_deserialize[] = "_deserialize";
static const char __pyx_k_last_reason[] = "last_reason";
static const char __pyx_k_max_samples[] = "max_samples";
static const char __pyx_k_new_samples[] = "new_samples";
static const char __pyx_k_sample_rank[] = "sample_rank";
static const char __pyx_k_total_count[] = "total_count";
static const char __pyx_k_CMDataReader[] = "CMDataReader";
static const char __pyx_k_CMDataWriter[] = "CMDataWriter";
static const char __pyx_k_CMSubscriber[] = "CMSubscriber";
static const char __pyx_k_DDSException[] = "DDSException";
static const char __pyx_k_DDSStateKind[] = "DDSStateKind";
static const char __pyx_k_ISO_8859_1_2[] = "ISO_8859-1";
static const char __pyx_k_ISO_8859_1_3[] = "ISO-8859.1";
static const char __pyx_k_NOT_REJECTED[] = "NOT_REJECTED";
static const char __pyx_k_QosPolicy_id[] = "QosPolicy.id";
static const char __pyx_k_bytes_to_ptr[] = "bytes_to_ptr";
static const char __pyx_k_check_handle[] = "_check_handle";
static const char __pyx_k_history_kind[] = "history_kind";
static const char __pyx_k_ptr_to_bytes[] = "ptr_to_bytes";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_read_samples[] = "read_samples";
static const char __pyx_k_sample_state[] = "sample_state";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_Bad_parameter[] = "Bad parameter";
static const char __pyx_k_CMParticipant[] = "CMParticipant";
static const char __pyx_k_DDSStatusKind[] = "DDSStatusKind";
static const char __pyx_k_DDS_exception[] = "\n    DDS exception\n    ";
static const char __pyx_k_ReadCondition[] = "ReadCondition";
static const char __pyx_k_current_count[] = "current_count";
static const char __pyx_k_history_depth[] = "history_depth";
static const char __pyx_k_max_instances[] = "max_instances";
static const char __pyx_k_max_samples_2[] = "_max_samples";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_ANY_VIEW_STATE[] = "ANY_VIEW_STATE";
static const char __pyx_k_DATA_AVAILABLE[] = "DATA_AVAILABLE";
static const char __pyx_k_DDSHistoryKind[] = "DDSHistoryKind";
static const char __pyx_k_DDSTime___init[] = "DDSTime.__init__";
static const char __pyx_k_GuardCondition[] = "GuardCondition";
static const char __pyx_k_NEW_VIEW_STATE[] = "NEW_VIEW_STATE";
static const char __pyx_k_QosPolicy_kind[] = "QosPolicy.kind";
static const char __pyx_k_QueryCondition[] = "QueryCondition";
static const char __pyx_k_history_kind_2[] = "_history_kind";
static const char __pyx_k_instance_state[] = "instance_state";
static const char __pyx_k_last_policy_id[] = "last_policy_id";
static const char __pyx_k_lease_duration[] = "lease_duration";
static const char __pyx_k_on_sample_lost[] = "on_sample_lost";
static const char __pyx_k_ordered_access[] = "ordered_access";
static const char __pyx_k_DATA_ON_READERS[] = "DATA_ON_READERS";
static const char __pyx_k_DCPSParticipant[] = "DCPSParticipant";
static const char __pyx_k_DCPSPublication[] = "DCPSPublication";
static const char __pyx_k_LIVELINESS_LOST[] = "LIVELINESS_LOST";
static const char __pyx_k_MANUAL_BY_TOPIC[] = "MANUAL_BY_TOPIC";
static const char __pyx_k_SAMPLE_REJECTED[] = "SAMPLE_REJECTED";
static const char __pyx_k_StatusCondition[] = "StatusCondition";
static const char __pyx_k_TRANSIENT_LOCAL[] = "TRANSIENT_LOCAL";
static const char __pyx_k_coherent_access[] = "coherent_access";
static const char __pyx_k_generation_rank[] = "generation_rank";
static const char __pyx_k_history_depth_2[] = "_history_depth";
static const char __pyx_k_instance_handle[] = "instance_handle";
static const char __pyx_k_max_instances_2[] = "_max_instances";
static const char __pyx_k_not_alive_count[] = "not_alive_count";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_ANY_SAMPLE_STATE[] = "ANY_SAMPLE_STATE";
static const char __pyx_k_DCPSSubscription[] = "DCPSSubscription";
static const char __pyx_k_DDSOwnershipKind[] = "DDSOwnershipKind";
static const char __pyx_k_HistoryQosPolicy[] = "HistoryQosPolicy";
static const char __pyx_k_QosPolicy___init[] = "QosPolicy.__init__";
static const char __pyx_k_SampleLostStatus[] = "SampleLostStatus";
static const char __pyx_k_method_to_status[] = "_method_to_status";
static const char __pyx_k_ordered_access_2[] = "_ordered_access";
static const char __pyx_k_source_timestamp[] = "source_timestamp";
static const char __pyx_k_DDSDurabilityKind[] = "DDSDurabilityKind";
static const char __pyx_k_DDSLivelinessKind[] = "DDSLivelinessKind";
static const char __pyx_k_DeadlineQosPolicy[] = "DeadlineQosPolicy";
static const char __pyx_k_DomainParticipant[] = "DomainParticipant";
static const char __pyx_k_LifespanQosPolicy[] = "LifespanQosPolicy";
static const char __pyx_k_READ_SAMPLE_STATE[] = "READ_SAMPLE_STATE";
static const char __pyx_k_SampleInfo___init[] = "SampleInfo.__init__";
static const char __pyx_k_UserdataQosPolicy[] = "UserdataQosPolicy";
static const char __pyx_k_coherent_access_2[] = "_coherent_access";
static const char __pyx_k_max_blocking_time[] = "max_blocking_time";
static const char __pyx_k_on_data_available[] = "on_data_available";
static const char __pyx_k_ANY_INSTANCE_STATE[] = "ANY_INSTANCE_STATE";
static const char __pyx_k_DDSReliabilityKind[] = "DDSReliabilityKind";
static const char __pyx_k_GroupdataQosPolicy[] = "GroupdataQosPolicy";
static const char __pyx_k_INCONSISTENT_TOPIC[] = "INCONSISTENT_TOPIC";
static const char __pyx_k_LIVELINESS_CHANGED[] = "LIVELINESS_CHANGED";
static const char __pyx_k_NOT_NEW_VIEW_STATE[] = "NOT_NEW_VIEW_STATE";
static const char __pyx_k_OwnershipQosPolicy[] = "OwnershipQosPolicy";
static const char __pyx_k_PartitionQosPolicy[] = "PartitionQosPolicy";
static const char __pyx_k_TopicdataQosPolicy[] = "TopicdataQosPolicy";
static const char __pyx_k_alive_count_change[] = "alive_count_change";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_minimum_separation[] = "minimum_separation";
static const char __pyx_k_on_data_on_readers[] = "on_data_on_readers";
static const char __pyx_k_on_liveliness_lost[] = "on_liveliness_lost";
static const char __pyx_k_on_sample_rejected[] = "on_sample_rejected";
static const char __pyx_k_publication_handle[] = "publication_handle";
static const char __pyx_k_total_count_change[] = "total_count_change";
static const char __pyx_k_BY_SOURCE_TIMESTAMP[] = "BY_SOURCE_TIMESTAMP";
static const char __pyx_k_DDSException___init[] = "DDSException.__init__";
static const char __pyx_k_DurabilityQosPolicy[] = "DurabilityQosPolicy";
static const char __pyx_k_LivelinessQosPolicy[] = "LivelinessQosPolicy";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_PUBLICATION_MATCHED[] = "PUBLICATION_MATCHED";
static const char __pyx_k_Qos_provider_failed[] = "Qos provider failed";
static const char __pyx_k_SerializationHelper[] = "_SerializationHelper";
static const char __pyx_k_max_blocking_time_2[] = "_max_blocking_time";
static const char __pyx_k_reception_timestamp[] = "reception_timestamp";
static const char __pyx_k_ALIVE_INSTANCE_STATE[] = "ALIVE_INSTANCE_STATE";
static const char __pyx_k_DDSDuration_infinity[] = "DDSDuration.infinity";
static const char __pyx_k_Failed_to_write_data[] = "Failed to write data";
static const char __pyx_k_LivelinessLostStatus[] = "LivelinessLostStatus";
static const char __pyx_k_ReliabilityQosPolicy[] = "ReliabilityQosPolicy";
static const char __pyx_k_SUBSCRIPTION_MATCHED[] = "SUBSCRIPTION_MATCHED";
static const char __pyx_k_SampleRejectedStatus[] = "SampleRejectedStatus";
static const char __pyx_k_current_count_change[] = "current_count_change";
static const char __pyx_k_last_instance_handle[] = "last_instance_handle";
static const char __pyx_k_minimum_separation_2[] = "_minimum_separation";
static const char __pyx_k_new_instance_samples[] = "new_instance_samples";
static const char __pyx_k_HISTORY_QOS_POLICY_ID[] = "HISTORY_QOS_POLICY_ID";
static const char __pyx_k_INVALID_QOS_POLICY_ID[] = "INVALID_QOS_POLICY_ID";
static const char __pyx_k_MANUAL_BY_PARTICIPANT[] = "MANUAL_BY_PARTICIPANT";
static const char __pyx_k_NOT_READ_SAMPLE_STATE[] = "NOT_READ_SAMPLE_STATE";
static const char __pyx_k_No_condition_attached[] = "No condition attached";
static const char __pyx_k_PartitionQosPolicy_ps[] = "PartitionQosPolicy.ps";
static const char __pyx_k_PresentationQosPolicy[] = "PresentationQosPolicy";
static const char __pyx_k_on_inconsistent_topic[] = "on_inconsistent_topic";
static const char __pyx_k_on_liveliness_changed[] = "on_liveliness_changed";
static const char __pyx_k_service_cleanup_delay[] = "service_cleanup_delay";
static const char __pyx_k_BY_RECEPTION_TIMESTAMP[] = "BY_RECEPTION_TIMESTAMP";
static const char __pyx_k_Base_sample_info_class[] = "\n    Base sample info class\n    ";
static const char __pyx_k_DEADLINE_QOS_POLICY_ID[] = "DEADLINE_QOS_POLICY_ID";
static const char __pyx_k_Failed_to_create_topic[] = "Failed to create topic.";
static const char __pyx_k_HistoryQosPolicy_depth[] = "HistoryQosPolicy.depth";
static const char __pyx_k_LIFESPAN_QOS_POLICY_ID[] = "LIFESPAN_QOS_POLICY_ID";
static const char __pyx_k_LatencyBudgetQosPolicy[] = "LatencyBudgetQosPolicy";
static const char __pyx_k_USERDATA_QOS_POLICY_ID[] = "USERDATA_QOS_POLICY_ID";
static const char __pyx_k_not_alive_count_change[] = "not_alive_count_change";
static const char __pyx_k_on_publication_matched[] = "on_publication_matched";
static const char __pyx_k_Abstract_Listener_class[] = "\n    Abstract Listener class.\n    ";
static const char __pyx_k_DDSDestinationOrderKind[] = "DDSDestinationOrderKind";
static const char __pyx_k_DDSMaskUtil_all_samples[] = "DDSMaskUtil.all_samples";
static const char __pyx_k_DDSMaskUtil_new_samples[] = "DDSMaskUtil.new_samples";
static const char __pyx_k_Failed_to_get_topic_QoS[] = "Failed to get topic QoS";
static const char __pyx_k_GROUPDATA_QOS_POLICY_ID[] = "GROUPDATA_QOS_POLICY_ID";
static const char __pyx_k_HistoryQosPolicy___init[] = "HistoryQosPolicy.__init__";
static const char __pyx_k_InconsistentTopicStatus[] = "InconsistentTopicStatus";
static const char __pyx_k_Listener_on_sample_lost[] = "Listener.on_sample_lost";
static const char __pyx_k_LivelinessChangedStatus[] = "LivelinessChangedStatus";
static const char __pyx_k_OFFERED_DEADLINE_MISSED[] = "OFFERED_DEADLINE_MISSED";
static const char __pyx_k_OWNERSHIP_QOS_POLICY_ID[] = "OWNERSHIP_QOS_POLICY_ID";
static const char __pyx_k_PARTITION_QOS_POLICY_ID[] = "PARTITION_QOS_POLICY_ID";
static const char __pyx_k_ResourceLimitsQosPolicy[] = "ResourceLimitsQosPolicy";
static const char __pyx_k_TOPICDATA_QOS_POLICY_ID[] = "TOPICDATA_QOS_POLICY_ID";
static const char __pyx_k_UserdataQosPolicy_value[] = "UserdataQosPolicy.value";
static const char __pyx_k_kernelModule_v_typeInfo[] = "kernelModule::v_typeInfo";
static const char __pyx_k_last_publication_handle[] = "last_publication_handle";
static const char __pyx_k_on_subscription_matched[] = "on_subscription_matched";
static const char __pyx_k_service_cleanup_delay_2[] = "_service_cleanup_delay";
static const char __pyx_k_DDSMaskUtil_read_samples[] = "DDSMaskUtil.read_samples";
static const char __pyx_k_DDS_TypeBuiltinTopicData[] = "DDS::TypeBuiltinTopicData";
static const char __pyx_k_DURABILITY_QOS_POLICY_ID[] = "DURABILITY_QOS_POLICY_ID";
static const char __pyx_k_DeadlineQosPolicy___init[] = "DeadlineQosPolicy.__init__";
static const char __pyx_k_Entity_is_already_closed[] = "Entity is already closed";
static const char __pyx_k_Failed_to_get_reader_QoS[] = "Failed to get reader QoS";
static const char __pyx_k_Failed_to_get_writer_QoS[] = "Failed to get writer QoS";
static const char __pyx_k_LIVELINESS_QOS_POLICY_ID[] = "LIVELINESS_QOS_POLICY_ID";
static const char __pyx_k_LifespanQosPolicy___init[] = "LifespanQosPolicy.__init__";
static const char __pyx_k_OFFERED_INCOMPATIBLE_QOS[] = "OFFERED_INCOMPATIBLE_QOS";
static const char __pyx_k_PublicationMatchedStatus[] = "PublicationMatchedStatus";
static const char __pyx_k_TimeBasedFilterQosPolicy[] = "TimeBasedFilterQosPolicy";
static const char __pyx_k_UserdataQosPolicy___init[] = "UserdataQosPolicy.__init__";
static const char __pyx_k_absolute_generation_rank[] = "absolute_generation_rank";
static const char __pyx_k_kernelModule_v_topicInfo[] = "kernelModule::v_topicInfo";
static const char __pyx_k_last_subscription_handle[] = "last_subscription_handle";
static const char __pyx_k_max_samples_per_instance[] = "max_samples_per_instance";
static const char __pyx_k_pyx_unpickle_TypeSupport[] = "__pyx_unpickle_TypeSupport";
static const char __pyx_k_DDS_Python_DCPS_API_class[] = "\nDDS Python DCPS API class\n\n";
static const char __pyx_k_DDS_TopicBuiltinTopicData[] = "DDS::TopicBuiltinTopicData";
static const char __pyx_k_DestinationOrderQosPolicy[] = "DestinationOrderQosPolicy";
static const char __pyx_k_GroupdataQosPolicy___init[] = "GroupdataQosPolicy.__init__";
static const char __pyx_k_OwnershipQosPolicy___init[] = "OwnershipQosPolicy.__init__";
static const char __pyx_k_PartitionQosPolicy___init[] = "PartitionQosPolicy.__init__";
static const char __pyx_k_REJECTED_BY_SAMPLES_LIMIT[] = "REJECTED_BY_SAMPLES_LIMIT";
static const char __pyx_k_RELIABILITY_QOS_POLICY_ID[] = "RELIABILITY_QOS_POLICY_ID";
static const char __pyx_k_REQUESTED_DEADLINE_MISSED[] = "REQUESTED_DEADLINE_MISSED";
static const char __pyx_k_SubscriptionMatchedStatus[] = "SubscriptionMatchedStatus";
static const char __pyx_k_TopicdataQosPolicy___init[] = "TopicdataQosPolicy.__init__";
static const char __pyx_k_disposed_generation_count[] = "disposed_generation_count";
static const char __pyx_k_DeadlineQosPolicy_deadline[] = "DeadlineQosPolicy.deadline";
static const char __pyx_k_DurabilityQosPolicy___init[] = "DurabilityQosPolicy.__init__";
static const char __pyx_k_DurabilityServiceQosPolicy[] = "DurabilityServiceQosPolicy";
static const char __pyx_k_Failed_to_attach_condition[] = "Failed to attach condition";
static const char __pyx_k_Failed_to_create_publisher[] = "Failed to create publisher";
static const char __pyx_k_Failed_to_dispose_instance[] = "Failed to dispose instance";
static const char __pyx_k_LifespanQosPolicy_lifespan[] = "LifespanQosPolicy.lifespan";
static const char __pyx_k_Listener_on_data_available[] = "Listener.on_data_available";
static const char __pyx_k_LivelinessQosPolicy___init[] = "LivelinessQosPolicy.__init__";
static const char __pyx_k_OwnershipStrengthQosPolicy[] = "OwnershipStrengthQosPolicy";
static const char __pyx_k_PRESENTATION_QOS_POLICY_ID[] = "PRESENTATION_QOS_POLICY_ID";
static const char __pyx_k_REJECTED_BY_INSTANCE_LIMIT[] = "REJECTED_BY_INSTANCE_LIMIT";
static const char __pyx_k_REQUESTED_INCOMPATIBLE_QOS[] = "REQUESTED_INCOMPATIBLE_QOS";
static const char __pyx_k_TransportPriorityQosPolicy[] = "TransportPriorityQosPolicy";
static const char __pyx_k_autopurge_nowriter_samples[] = "autopurge_nowriter_samples";
static const char __pyx_k_max_samples_per_instance_2[] = "_max_samples_per_instance";
static const char __pyx_k_not_alive_instance_samples[] = "not_alive_instance_samples";
static const char __pyx_k_on_offered_deadline_missed[] = "on_offered_deadline_missed";
static const char __pyx_k_DDSSampleRejectedStatusKind[] = "DDSSampleRejectedStatusKind";
static const char __pyx_k_ENTITYFACTORY_QOS_POLICY_ID[] = "ENTITYFACTORY_QOS_POLICY_ID";
static const char __pyx_k_Failed_to_create_subscriber[] = "Failed to create subscriber";
static const char __pyx_k_Failed_to_get_publisher_QoS[] = "Failed to get publisher QoS";
static const char __pyx_k_LATENCYBUDGET_QOS_POLICY_ID[] = "LATENCYBUDGET_QOS_POLICY_ID";
static const char __pyx_k_Listener_on_data_on_readers[] = "Listener.on_data_on_readers";
static const char __pyx_k_Listener_on_liveliness_lost[] = "Listener.on_liveliness_lost";
static const char __pyx_k_Listener_on_sample_rejected[] = "Listener.on_sample_rejected";
static const char __pyx_k_OfferedDeadlineMissedStatus[] = "OfferedDeadlineMissedStatus";
static const char __pyx_k_ReliabilityQosPolicy___init[] = "ReliabilityQosPolicy.__init__";
static const char __pyx_k_no_writers_generation_count[] = "no_writers_generation_count";
static const char __pyx_k_on_offered_incompatible_qos[] = "on_offered_incompatible_qos";
static const char __pyx_k_Failed_to_create_data_reader[] = "Failed to create data reader";
static const char __pyx_k_Failed_to_create_data_writer[] = "Failed to create data writer";
static const char __pyx_k_Failed_to_create_participant[] = "Failed to create participant";
static const char __pyx_k_Failed_to_get_subscriber_QoS[] = "Failed to get subscriber QoS";
static const char __pyx_k_Failure_unregistering_handle[] = "Failure unregistering handle";
static const char __pyx_k_OfferedIncompatibleQosStatus[] = "OfferedIncompatibleQosStatus";
static const char __pyx_k_PresentationQosPolicy___init[] = "PresentationQosPolicy.__init__";
static const char __pyx_k_RESOURCELIMITS_QOS_POLICY_ID[] = "RESOURCELIMITS_QOS_POLICY_ID";
static const char __pyx_k_ReaderDataLifecycleQosPolicy[] = "ReaderDataLifecycleQosPolicy";
static const char __pyx_k_WriterDataLifecycleQosPolicy[] = "WriterDataLifecycleQosPolicy";
static const char __pyx_k_autopurge_nowriter_samples_2[] = "_autopurge_nowriter_samples";
static const char __pyx_k_on_requested_deadline_missed[] = "on_requested_deadline_missed";
static const char __pyx_k_Failed_to_get_participant_QoS[] = "Failed to get participant QoS";
static const char __pyx_k_LatencyBudgetQosPolicy___init[] = "LatencyBudgetQosPolicy.__init__";
static const char __pyx_k_RequestedDeadlineMissedStatus[] = "RequestedDeadlineMissedStatus";
static const char __pyx_k_TIMEBASEDFILTER_QOS_POLICY_ID[] = "TIMEBASEDFILTER_QOS_POLICY_ID";
static const char __pyx_k_on_requested_incompatible_qos[] = "on_requested_incompatible_qos";
static const char __pyx_k_DDSPresentationAccessScopeKind[] = "DDSPresentationAccessScopeKind";
static const char __pyx_k_DDS_read_take_operation_failed[] = "DDS read/take operation failed";
static const char __pyx_k_DESTINATIONORDER_QOS_POLICY_ID[] = "DESTINATIONORDER_QOS_POLICY_ID";
static const char __pyx_k_Latency_budget_QoS_Policy_type[] = "\n    Latency budget QoS Policy\n\n    :type duration: DDSDuration\n    :param duration: Value for duration (default: 0)\n\n    ";
static const char __pyx_k_Listener_on_inconsistent_topic[] = "Listener.on_inconsistent_topic";
static const char __pyx_k_Listener_on_liveliness_changed[] = "Listener.on_liveliness_changed";
static const char __pyx_k_Ownership_QoS_Policy_type_kind[] = "\n    Ownership QoS Policy\n\n    :type kind: DDSOwnershipKind\n    :param kind: Ownership kind\n\n    ";
static const char __pyx_k_PublicationMatchedStatus_total[] = " PublicationMatchedStatus\n    total_count -> integer\n        Total cumulative count the concerned DataWriter discovered a\n        \"match\" with a DataReader. That is, it found a DataReader for the\n        same Topic with a requested QoS that is compatible with that offered\n        by the DataWriter.\n\n    total_count_change -> integer\n        The change in total_count since the last time the listener was called or\n        the status was read.\n\n    current_count -> integer\n        The number of DataReaders currently matched to the concerned\n        DataWriter.\n\n    current_count_change -> integer\n        The change in current_count since the last time the listener was called\n        or the status was read.\n\n    last_subscription_handle -> integer\n        Handle to the last DataReader that matched the DataWriter causing the\n        status to change.\n    ";
static const char __pyx_k_RequestedIncompatibleQosStatus[] = "RequestedIncompatibleQosStatus";
static const char __pyx_k_ResourceLimitsQosPolicy___init[] = "ResourceLimitsQosPolicy.__init__";
static const char __pyx_k_Resource_limit_QoS_Policy_type[] = "\n    Resource limit QoS Policy\n\n    :type max_samples: int\n    :param max_samples: maximum samples (default: -1)\n\n    :type max_instances: int\n    :param max_instances: maximum instances (default: -1)\n\n    :type max_samples_per_instance: int\n    :param max_samples_per_instance: maximum samples per instance (default: -1)\n    ";
static const char __pyx_k_Userdata_QoS_Policy_type_value[] = "\n    Userdata QoS Policy\n\n    :type value: string\n    :param value: value\n\n    ";
static const char __pyx_k_kernelModule_v_participantInfo[] = "kernelModule::v_participantInfo";
static const char __pyx_k_kernelModule_v_publicationInfo[] = "kernelModule::v_publicationInfo";
static const char __pyx_k_kernelModule_v_publisherCMInfo[] = "kernelModule::v_publisherCMInfo";
static const char __pyx_k_pyx_unpickle__SerializationHel[] = "__pyx_unpickle__SerializationHelper";
static const char __pyx_k_Abstract_QoS_policy_class_Users[] = "\n    Abstract QoS policy class.\n    Users should not instantiate this class.\n    ";
static const char __pyx_k_DDS_CMPublisherBuiltinTopicData[] = "DDS::CMPublisherBuiltinTopicData";
static const char __pyx_k_DDS_Duration_type_sec_long_para[] = "\n    DDS Duration\n\n    :type sec: long\n    :param sec: seconds (default: 0)\n\n    :type nanosec: long\n    :param nanosec: nanoseconds (default: 0)\n    ";
static const char __pyx_k_DDS_ParticipantBuiltinTopicData[] = "DDS::ParticipantBuiltinTopicData";
static const char __pyx_k_DDS_PublicationBuiltinTopicData[] = "DDS::PublicationBuiltinTopicData";
static const char __pyx_k_DDS_Time_type_sec_long_param_se[] = "\n    DDS Time\n\n    :type sec: long\n    :param sec: seconds (default: 1)\n\n    :type nanosec: long\n    :param nanosec: nanoseconds (default: 0)\n    ";
static const char __pyx_k_DURABILITYSERVICE_QOS_POLICY_ID[] = "DURABILITYSERVICE_QOS_POLICY_ID";
static const char __pyx_k_Deadline_QoS_Policy_type_deadli[] = "\n    Deadline QoS Policy\n\n    :type deadline: DDSDuration\n    :param deadline: Value for deadline (default: infinity)\n\n    ";
static const char __pyx_k_Destination_order_QoS_Policy_ty[] = "\n    Destination order QoS Policy\n\n    :type kind: DDSDestinationOrderKind\n    :param kind: Destination order kind\n\n    ";
static const char __pyx_k_Durability_QoS_Policy_type_k_DD[] = "\n    Durability QoS Policy\n\n    :type k: DDSDurabilityKind\n    :param k: Durability kind\n    ";
static const char __pyx_k_Durability_service_QoS_Policy_t[] = "\n    Durability service QoS Policy\n\n    :type service_cleanup_delay: DDSDuration\n    :param service_cleanup_delay: set service_cleanup_delay (default: 0)\n\n    :type history_kind: DDSHistoryKind\n    :param history_kind: set history kind (default: KEEP_LAST)\n\n    :type history_depth: long\n    :param history_depth: set history_depth (default: 1)\n\n    :type max_samples: long\n    :param max_samples: set max_samples (default: unlimited)\n\n    :type max_instances: long\n    :param max_instances: set max_instances (default: unlimited)\n\n    :type max_samples_per_instance: long\n    :param max_samples_per_instance: set max_samples_per_instance (default: unlimited)\n\n    ";
static const char __pyx_k_Enumeration_of_Qos_policy_kinds[] = "\n    Enumeration of Qos policy kinds\n    ";
static const char __pyx_k_Error_setting_entity_status_for[] = "Error setting entity status for listener";
static const char __pyx_k_Failed_to_create_read_condition[] = "Failed to create read condition";
static const char __pyx_k_Failure_retrieving_inconsistent[] = "Failure retrieving inconsistent_topic_status";
static const char __pyx_k_Failure_retrieving_subscription[] = "Failure retrieving subscription_matched_status";
static const char __pyx_k_Group_data_QoS_Policy_type_valu[] = "\n    Group data QoS Policy\n\n    :type value: string\n    :param value: value\n\n    ";
static const char __pyx_k_History_QoS_Policy_type_k_DDSHi[] = "\n    History QoS Policy\n\n    :type k: DDSHistoryKind\n    :param k: History kind\n\n    :type depth: int\n    :param depth: History depth (default: 1)\n    ";
static const char __pyx_k_InconsistentTopicStatus_total_c[] = " InconsistentTopicStatus\n\n    total_count -> integer\n        Total cumulative count of the Topics discovered whose name matches\n        the Topic to which this status is attached and whose type is\n        inconsistent with the Topic.\n\n    total_count_change -> integer\n        The incremental number of inconsistent topics discovered since the\n        last time the listener was called or the status was read.\n    ";
static const char __pyx_k_LatencyBudgetQosPolicy_duration[] = "LatencyBudgetQosPolicy.duration";
static const char __pyx_k_Lifespan_QoS_Policy_type_lifesp[] = "\n    Lifespan QoS Policy\n\n    :type lifespan: DDSDuration\n    :param lifespan: Value for lifespan (default: infinity)\n\n    ";
static const char __pyx_k_Listener_on_publication_matched[] = "Listener.on_publication_matched";
static const char __pyx_k_LivelinessChangedStatus_alive_c[] = " LivelinessChangedStatus\n\n    alive_count -> integer\n        The total number of currently active DataWriters that write the Topic\n        read by the DataReader. This count increases when a newly matched\n        DataWriter asserts its liveliness for the first time or when a DataWriter\n        previously considered to be not alive reasserts its liveliness. The count\n        decreases when a DataWriter considered alive fails to assert its\n        liveliness and becomes not alive, whether because it was deleted\n        normally or for some other reason.\n\n    not_alive_count -> integer\n        The total count of currently DataWriters that write the Topic read by\n        the DataReader that are no longer asserting their liveliness. This count\n        increases when a DataWriter considered alive fails to assert its\n        liveliness and becomes not alive for some reason other than the normal\n        deletion of that DataWriter. It decreases when a previously not alive\n        DataWriter either reasserts its liveliness or is deleted normally.\n\n    alive_count_change -> integer\n        The change in the alive_count since the last time the listener was\n        called or the status was read.\n\n    not_alive_count_change -> integer\n        The change in the not_alive_count since the last time the listener was\n        called or the status was read.\n\n    last_publication_handle -> integer\n        Handle to the last DataWriter whose change in liveliness caused this\n        status to change.\n    ";
static const char __pyx_k_LivelinessLostStatus_total_coun[] = " LivelinessLostStatus\n\n    total_count -> integer\n        Total cumulative number of times that a previously-alive DataWriter\n        became not alive due to a failure to actively signal its liveliness within\n        its offered liveliness period. This count does not change when an\n        already not alive DataWriter simply remains not alive for another\n        liveliness period.\n\n    total_count_change -> integer\n        The change in total_count since the last time the listener was called or\n        the status was read.\n    ";
static const char __pyx_k_Liveliness_QoS_Policy_type_kind[] = "\n    Liveliness QoS Policy\n\n    :type kind: DDSLivelinessKind\n    :param kind: Liveliness kind\n\n    :type lease_duration: DDSDuration\n    :param lease_duration: Lease duration (default: infinity)\n    ";
static const char __pyx_k_Mask_utility_Some_commonly_used[] = "\n    Mask utility.\n    Some commonly used mask combination\n    See :class:`DDSStateKind` for list of available status\n    ";
static const char __pyx_k_MetaData_version_1_0_0_Module_n[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><TypeDef name=\"octSeq\"><Sequence><Octet/></Sequence></TypeDef><Struct name=\"UserDataQosPolicy\"><Member name=\"value\"><Type name=\"octSeq\"/></Member></Struct><Struct name=\"ParticipantBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"user_data\"><Type name=\"UserDataQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_OWNERSHIPSTRENGTH_QOS_POLICY_ID[] = "OWNERSHIPSTRENGTH_QOS_POLICY_ID";
static const char __pyx_k_OfferedDeadlineMissedStatus_tot[] = " OfferedDeadlineMissedStatus\n\n    total_count -> integer\n        Total cumulative number of offered deadline periods elapsed during\n        which a DataWriter failed to provide data. Missed deadlines\n        accumulate; that is, each deadline period the total_count will be\n        incremented by one.\n\n    total_count_change -> integer\n        The change in total_count since the last time the listener was called or\n        the status was read.\n\n    last_instance_handle -> integer\n        Handle to the last instance in the DataWriter for which an offered\n        deadline was missed.\n    ";
static const char __pyx_k_OfferedIncompatibleQosStatus_to[] = " OfferedIncompatibleQosStatus\n\n    total_count -> integer\n        Total cumulative number of times the concerned DataWriter\n        discovered a DataReader for the same Topic with a requested QoS that\n        is incompatible with that offered by the DataWriter.\n\n    total_count_change -> integer\n        The change in total_count since the last time the listener was called or\n        the status was read.\n\n    last_policy_id -> dds.QosPolicyId\n        The QosPolicyId of one of the policies that was found to be\n        incompatible the last time an incompatibility was detected.\n    ";
static const char __pyx_k_Ownership_strenth_QoS_Policy_ty[] = "\n    Ownership strenth QoS Policy\n\n    :type value: int\n    :param value: value for strength (default: 0)\n\n    ";
static const char __pyx_k_Partition_QoS_Policy_type_ps_li[] = "\n    Partition QoS Policy\n\n    :type ps: list\n    :param ps: list of partition names\n\n    ";
static const char __pyx_k_Presentation_QoS_Policy_type_ki[] = "\n    Presentation QoS Policy\n\n    :type kind: DDSPresentationAccessScopeKind\n    :param kind: Presentation kind (default: INSTANCE)\n\n    :type coherent_access: bool\n    :param coherent_access: Set coherent access (default: False)\n\n    :type ordered_access: bool\n    :param ordered_access: Set ordered access (default: False)\n    ";
static const char __pyx_k_QosProfile_will_be_removed_in_a[] = " QosProfile will be removed in a future release.";
static const char __pyx_k_Reader_data_lifecycle_QoS_Polic[] = "\n    Reader data lifecycle QoS Policy\n\n    :type autopurge_nowriter_samples: DDSDuration\n    :param autopurge_nowriter_samples: set autopurge_nowriter_samples (default: infinity)\n\n    :type autopurge_disposed_samples_delay: DDSDuration\n    :param autopurge_disposed_samples_delay: set autopurge_nowriter_samples (default: infinity)\n    ";
static const char __pyx_k_Reliability_QoS_Policy_type_kin[] = "\n    Reliability QoS Policy\n\n    :type kind: DDSReliabilityKind\n    :param kind: Reliability kind\n\n    :type max_blocking_time: DDSDuration\n    :param max_blocking_time: Max blocking time (default: 100 milliseconds)\n    ";
static const char __pyx_k_RequestedDeadlineMissedStatus_t[] = " RequestedDeadlineMissedStatus\n\n    total_count -> integer\n        Total cumulative number of missed deadlines detected for any instance\n        read by the DataReader. Missed deadlines accumulate; that is, each\n        deadline period the total_count will be incremented by one for each\n        instance for which data was not received.\n\n    total_count_change -> integer\n        The incremental number of deadlines detected since the last time the\n        listener was called or the status was read.\n\n    last_instance_handle -> integer\n        Handle to the last instance in the DataReader for which a deadline was\n        detected.\n    ";
static const char __pyx_k_SampleLostStatus_total_count_in[] = " SampleLostStatus\n\n    total_count -> integer\n        Total cumulative count of all samples lost across of instances of data\n        published under the Topic.\n\n    total_count_change -> integer\n        The incremental number of samples lost since the last time the listener\n        was called or the status was read.\n    ";
static const char __pyx_k_SampleRejectedStatus_total_coun[] = " SampleRejectedStatus\n\n    total_count -> integer\n        Total cumulative count of samples rejected by the DataReader.\n\n    total_count_change -> integer\n        The incremental number of samples rejected since the last time the\n        listener was called or the status was read.\n\n    last_reason -> dds.DDSSampleRejectedStatusKind\n        Reason for rejecting the last sample rejected. If no samples have been\n        rejected, the reason is the special value NOT_REJECTED.\n\n    last_instance_handle -> integer\n        Handle to the instance being updated by the last sample that was\n        rejected.\n    ";
static const char __pyx_k_SubscriptionMatchedStatus_total[] = " SubscriptionMatchedStatus\n\n    total_count -> integer\n        Total cumulative count the concerned DataReader discovered a\n        \"match\" with a DataWriter. That is, it found a DataWriter for the same\n        Topic with a requested QoS that is compatible with that offered by the\n        DataReader.\n\n    total_count_change -> integer\n        The change in total_count since the last time the listener was called or\n        the status was read.\n\n    current_count -> integer\n        The number of DataWriters currently matched to the concerned\n        DataReader.\n\n    current_count_change -> integer\n        The change in current_count since the last time the listener was called\n        or the status was read.\n\n    last_publication_handle -> integer\n        Handle to the last DataWriter that matched the DataReader causing the\n        status to change.\n    ";
static const char __pyx_k_TRANSPORTPRIORITY_QOS_POLICY_ID[] = "TRANSPORTPRIORITY_QOS_POLICY_ID";
static const char __pyx_k_TimeBasedFilterQosPolicy___init[] = "TimeBasedFilterQosPolicy.__init__";
static const char __pyx_k_Time_based_filter_QoS_Policy_ty[] = "\n    Time based filter QoS Policy\n\n    :type minimum_separation: DDSDuration\n    :param minimum_separation: Value for minimum separation (default: 0)\n\n    ";
static const char __pyx_k_Topic_data_QoS_Policy_type_valu[] = "\n    Topic data QoS Policy\n\n    :type value: string\n    :param value: value\n\n    ";
static const char __pyx_k_Transport_priority_QoS_Policy_t[] = "\n    Transport priority QoS Policy\n\n    :type value: int\n    :param value: value for transport priority\n\n    ";
static const char __pyx_k_Wait_for_historical_data_failed[] = "Wait for historical data failed";
static const char __pyx_k_Writer_data_lifecycle_QoS_Polic[] = "\n    Writer data lifecycle QoS Policy\n\n    :type autodispose_unregistered_instances: bool\n    :param autodispose_unregistered_instances: set autodispose_unregistered_instances (default: true)\n\n    ";
static const char __pyx_k_autodispose_unregistered_instan[] = "_autodispose_unregistered_instances";
static const char __pyx_k_autopurge_disposed_samples_dela[] = "_autopurge_disposed_samples_delay";
static const char __pyx_k_kernelModule_v_dataReaderCMInfo[] = "kernelModule::v_dataReaderCMInfo";
static const char __pyx_k_kernelModule_v_dataWriterCMInfo[] = "kernelModule::v_dataWriterCMInfo";
static const char __pyx_k_kernelModule_v_subscriberCMInfo[] = "kernelModule::v_subscriberCMInfo";
static const char __pyx_k_kernelModule_v_subscriptionInfo[] = "kernelModule::v_subscriptionInfo";
static const char __pyx_k_Argument_1_is_not_of_type_dds_Re[] = "Argument 1 is not of type dds.ReadCondition or dds.QueryCondition";
static const char __pyx_k_Cannot_create_directly_data_read[] = "Cannot create directly data reader from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()";
static const char __pyx_k_Cannot_create_directly_data_writ[] = "Cannot create directly data writer from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()";
static const char __pyx_k_DDSMaskUtil_new_instance_samples[] = "DDSMaskUtil.new_instance_samples";
static const char __pyx_k_DDSMaskUtil_not_alive_instance_s[] = "DDSMaskUtil.not_alive_instance_samples";
static const char __pyx_k_DDS_CMDataReaderBuiltinTopicData[] = "DDS::CMDataReaderBuiltinTopicData";
static const char __pyx_k_DDS_CMDataWriterBuiltinTopicData[] = "DDS::CMDataWriterBuiltinTopicData";
static const char __pyx_k_DDS_CMParticipantBuiltinTopicDat[] = "DDS::CMParticipantBuiltinTopicData";
static const char __pyx_k_DDS_CMSubscriberBuiltinTopicData[] = "DDS::CMSubscriberBuiltinTopicData";
static const char __pyx_k_DDS_SubscriptionBuiltinTopicData[] = "DDS::SubscriptionBuiltinTopicData";
static const char __pyx_k_DestinationOrderQosPolicy___init[] = "DestinationOrderQosPolicy.__init__";
static const char __pyx_k_DurabilityServiceQosPolicy___ini[] = "DurabilityServiceQosPolicy.__init__";
static const char __pyx_k_DurabilityServiceQosPolicy_histo[] = "DurabilityServiceQosPolicy.history_kind";
static const char __pyx_k_DurabilityServiceQosPolicy_max_i[] = "DurabilityServiceQosPolicy.max_instances";
static const char __pyx_k_DurabilityServiceQosPolicy_max_s[] = "DurabilityServiceQosPolicy.max_samples";
static const char __pyx_k_DurabilityServiceQosPolicy_servi[] = "DurabilityServiceQosPolicy.service_cleanup_delay";
static const char __pyx_k_Either_data_or_handle_must_be_pr[] = "Either data or handle must be provided";
static const char __pyx_k_Failed_to_create_guard_condition[] = "Failed to create guard condition";
static const char __pyx_k_Failed_to_create_query_condition[] = "Failed to create query condition";
static const char __pyx_k_Failed_to_create_status_conditio[] = "Failed to create status condition";
static const char __pyx_k_Failure_retrieving_liveliness_lo[] = "Failure retrieving liveliness_lost_status";
static const char __pyx_k_Failure_retrieving_offered_deadl[] = "Failure retrieving offered_deadline_missed_status";
static const char __pyx_k_Failure_retrieving_offered_incom[] = "Failure retrieving offered_incompatible_qos_status";
static const char __pyx_k_Failure_retrieving_publication_m[] = "Failure retrieving publication_matched_status";
static const char __pyx_k_Failure_retrieving_requested_dea[] = "Failure retrieving requested_deadline_missed_status";
static const char __pyx_k_Failure_retrieving_requested_inc[] = "Failure retrieving requested_incompatible_qos_status";
static const char __pyx_k_Failure_retrieving_sample_lost_s[] = "Failure retrieving sample_lost_status";
static const char __pyx_k_Failure_retrieving_sample_reject[] = "Failure retrieving sample_rejected_status";
static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())";
static const char __pyx_k_Listener_on_offered_deadline_mis[] = "Listener.on_offered_deadline_missed";
static const char __pyx_k_Listener_on_offered_incompatible[] = "Listener.on_offered_incompatible_qos";
static const char __pyx_k_Listener_on_requested_deadline_m[] = "Listener.on_requested_deadline_missed";
static const char __pyx_k_Listener_on_requested_incompatib[] = "Listener.on_requested_incompatible_qos";
static const char __pyx_k_Listener_on_subscription_matched[] = "Listener.on_subscription_matched";
static const char __pyx_k_LivelinessQosPolicy_lease_durati[] = "LivelinessQosPolicy.lease_duration";
static const char __pyx_k_NOT_ALIVE_DISPOSED_INSTANCE_STAT[] = "NOT_ALIVE_DISPOSED_INSTANCE_STATE";
static const char __pyx_k_NOT_ALIVE_NO_WRITERS_INSTANCE_ST[] = "NOT_ALIVE_NO_WRITERS_INSTANCE_STATE";
static const char __pyx_k_OwnershipStrengthQosPolicy___ini[] = "OwnershipStrengthQosPolicy.__init__";
static const char __pyx_k_OwnershipStrengthQosPolicy_value[] = "OwnershipStrengthQosPolicy.value";
static const char __pyx_k_PresentationQosPolicy_coherent_a[] = "PresentationQosPolicy.coherent_access";
static const char __pyx_k_PresentationQosPolicy_ordered_ac[] = "PresentationQosPolicy.ordered_access";
static const char __pyx_k_READERDATALIFECYCLE_QOS_POLICY_I[] = "READERDATALIFECYCLE_QOS_POLICY_ID";
static const char __pyx_k_REJECTED_BY_SAMPLES_PER_INSTANCE[] = "REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT";
static const char __pyx_k_ReaderDataLifecycleQosPolicy___i[] = "ReaderDataLifecycleQosPolicy.__init__";
static const char __pyx_k_ReaderDataLifecycleQosPolicy_aut[] = "ReaderDataLifecycleQosPolicy.autopurge_nowriter_samples";
static const char __pyx_k_ReliabilityQosPolicy_max_blockin[] = "ReliabilityQosPolicy.max_blocking_time";
static const char __pyx_k_RequestedIncompatibleQosStatus_2[] = " RequestedIncompatibleQosStatus\n    total_count -> integer\n        Total cumulative number of times the concerned DataReader\n        discovered a DataWriter for the same Topic with an offered QoS that\n        was incompatible with that requested by the DataReader.\n\n    total_count_change -> integer\n        The change in total_count since the last time the listener was called or\n        the status was read.\n\n    last_policy_id -> dds.QosPolicyId\n        The QosPolicyId of one of the policies that was found to be\n        incompatible the last time an incompatibility was detected.\n    ";
static const char __pyx_k_ResourceLimitsQosPolicy_max_inst[] = "ResourceLimitsQosPolicy.max_instances";
static const char __pyx_k_ResourceLimitsQosPolicy_max_samp[] = "ResourceLimitsQosPolicy.max_samples";
static const char __pyx_k_Subclass_must_override_this_impl[] = "Subclass must override this implementation";
static const char __pyx_k_The_class_name_QosProfile_is_dep[] = "The class name QosProfile is deprecated. Use class QosProvider instead.";
static const char __pyx_k_TimeBasedFilterQosPolicy_minimum[] = "TimeBasedFilterQosPolicy.minimum_separation";
static const char __pyx_k_TransportPriorityQosPolicy___ini[] = "TransportPriorityQosPolicy.__init__";
static const char __pyx_k_TransportPriorityQosPolicy_value[] = "TransportPriorityQosPolicy.value";
static const char __pyx_k_WRITERDATALIFECYCLE_QOS_POLICY_I[] = "WRITERDATALIFECYCLE_QOS_POLICY_ID";
static const char __pyx_k_WriterDataLifecycleQosPolicy___i[] = "WriterDataLifecycleQosPolicy.__init__";
static const char __pyx_k_WriterDataLifecycleQosPolicy_aut[] = "WriterDataLifecycleQosPolicy.autodispose_unregistered_instances";
static const char __pyx_k_autodispose_unregistered_instanc[] = "autodispose_unregistered_instances";
static const char __pyx_k_autopurge_disposed_samples_delay[] = "autopurge_disposed_samples_delay";
static const char __pyx_k_kernelModule_v_participantCMInfo[] = "kernelModule::v_participantCMInfo";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_2[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><Enum name=\"DurabilityQosPolicyKind\"><Element name=\"VOLATILE_DURABILITY_QOS\" value=\"0\"/><Element name=\"TRANSIENT_LOCAL_DURABILITY_QOS\" value=\"1\"/><Element name=\"TRANSIENT_DURABILITY_QOS\" value=\"2\"/><Element name=\"PERSISTENT_DURABILITY_QOS\" value=\"3\"/></Enum><Struct name=\"Duration_t\"><Member name=\"sec\"><Long/></Member><Member name=\"nanosec\"><ULong/></Member></Struct><Enum name=\"HistoryQosPolicyKind\"><Element name=\"KEEP_LAST_HISTORY_QOS\" value=\"0\"/><Element name=\"KEEP_ALL_HISTORY_QOS\" value=\"1\"/></Enum><Enum name=\"LivelinessQosPolicyKind\"><Element name=\"AUTOMATIC_LIVELINESS_QOS\" value=\"0\"/><Element name=\"MANUAL_BY_PARTICIPANT_LIVELINESS_QOS\" value=\"1\"/><Element name=\"MANUAL_BY_TOPIC_LIVELINESS_QOS\" value=\"2\"/></Enum><Enum name=\"ReliabilityQosPolicyKind\"><Element name=\"BEST_EFFORT_RELIABILITY_QOS\" value=\"0\"/><Element name=\"RELIABLE_RELIABILITY_QOS\" value=\"1\"/></Enum><Struct name=\"TransportPriorityQosPolicy\"><Member name=\"value\"><Long/></Member></Struct><Enum name=\"DestinationOrderQosPolicyKind\"><Element name=\"BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS\" value=\"0\"/><Element name=\"BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS\" value=\"1\"/></Enum><Struct name=\"ResourceLimitsQosPolicy\"><Member name=\"max_samples\"><Long/></Member><Member name=\"max_instances\"><Long/></Member><Member name=\"max_samples_per_instance\"><Long/></Member></Struct><Enum name=\"OwnershipQosPolicyKind\"><Element name=\"SHARED_OWNERSHIP_QOS\" value=\"0\"/><Element name=\"EXCLUSIVE_OWNERSHIP_QOS\" value=\"1\"/></Enum><TypeDef name=\"octSeq\"><Sequence><Octet/></Sequence></TypeDef><Struct name=\"DurabilityQosPolicy\"><Member name=\"kind\"><Type name=\"DurabilityQosPolicyKind\"/></Member></Struct><Struct name=\"LifespanQosPolicy\"><Member name=\"duration\"><Type name=\"Duration_t\"/></Member></Struct><Struct ""name=\"LatencyBudgetQosPolicy\"><Member name=\"duration\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"DeadlineQosPolicy\"><Member name=\"period\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"HistoryQosPolicy\"><Member name=\"kind\"><Type name=\"HistoryQosPolicyKind\"/></Member><Member name=\"depth\"><Long/></Member></Struct><Struct name=\"DurabilityServiceQosPolicy\"><Member name=\"service_cleanup_delay\"><Type name=\"Duration_t\"/></Member><Member name=\"history_kind\"><Type name=\"HistoryQosPolicyKind\"/></Member><Member name=\"history_depth\"><Long/></Member><Member name=\"max_samples\"><Long/></Member><Member name=\"max_instances\"><Long/></Member><Member name=\"max_samples_per_instance\"><Long/></Member></Struct><Struct name=\"LivelinessQosPolicy\"><Member name=\"kind\"><Type name=\"LivelinessQosPolicyKind\"/></Member><Member name=\"lease_duration\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"ReliabilityQosPolicy\"><Member name=\"kind\"><Type name=\"ReliabilityQosPolicyKind\"/></Member><Member name=\"max_blocking_time\"><Type name=\"Duration_t\"/></Member><Member name=\"synchronous\"><Boolean/></Member></Struct><Struct name=\"DestinationOrderQosPolicy\"><Member name=\"kind\"><Type name=\"DestinationOrderQosPolicyKind\"/></Member></Struct><Struct name=\"OwnershipQosPolicy\"><Member name=\"kind\"><Type name=\"OwnershipQosPolicyKind\"/></Member></Struct><Struct name=\"TopicDataQosPolicy\"><Member name=\"value\"><Type name=\"octSeq\"/></Member></Struct><Struct name=\"TopicBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"name\"><String/></Member><Member name=\"type_name\"><String/></Member><Member name=\"durability\"><Type name=\"DurabilityQosPolicy\"/></Member><Member name=\"durability_service\"><Type name=\"DurabilityServiceQosPolicy\"/></Member><Member name=\"deadline\"><Type name=\"DeadlineQosPolicy\"/></Member><Member name=\"latency_budget\"><Type name=\"LatencyBudge""tQosPolicy\"/></Member><Member name=\"liveliness\"><Type name=\"LivelinessQosPolicy\"/></Member><Member name=\"reliability\"><Type name=\"ReliabilityQosPolicy\"/></Member><Member name=\"transport_priority\"><Type name=\"TransportPriorityQosPolicy\"/></Member><Member name=\"lifespan\"><Type name=\"LifespanQosPolicy\"/></Member><Member name=\"destination_order\"><Type name=\"DestinationOrderQosPolicy\"/></Member><Member name=\"history\"><Type name=\"HistoryQosPolicy\"/></Member><Member name=\"resource_limits\"><Type name=\"ResourceLimitsQosPolicy\"/></Member><Member name=\"ownership\"><Type name=\"OwnershipQosPolicy\"/></Member><Member name=\"topic_data\"><Type name=\"TopicDataQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_3[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><Enum name=\"DurabilityQosPolicyKind\"><Element name=\"VOLATILE_DURABILITY_QOS\" value=\"0\"/><Element name=\"TRANSIENT_LOCAL_DURABILITY_QOS\" value=\"1\"/><Element name=\"TRANSIENT_DURABILITY_QOS\" value=\"2\"/><Element name=\"PERSISTENT_DURABILITY_QOS\" value=\"3\"/></Enum><Struct name=\"Duration_t\"><Member name=\"sec\"><Long/></Member><Member name=\"nanosec\"><ULong/></Member></Struct><Enum name=\"LivelinessQosPolicyKind\"><Element name=\"AUTOMATIC_LIVELINESS_QOS\" value=\"0\"/><Element name=\"MANUAL_BY_PARTICIPANT_LIVELINESS_QOS\" value=\"1\"/><Element name=\"MANUAL_BY_TOPIC_LIVELINESS_QOS\" value=\"2\"/></Enum><Enum name=\"ReliabilityQosPolicyKind\"><Element name=\"BEST_EFFORT_RELIABILITY_QOS\" value=\"0\"/><Element name=\"RELIABLE_RELIABILITY_QOS\" value=\"1\"/></Enum><Enum name=\"DestinationOrderQosPolicyKind\"><Element name=\"BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS\" value=\"0\"/><Element name=\"BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS\" value=\"1\"/></Enum><TypeDef name=\"octSeq\"><Sequence><Octet/></Sequence></TypeDef><Enum name=\"OwnershipQosPolicyKind\"><Element name=\"SHARED_OWNERSHIP_QOS\" value=\"0\"/><Element name=\"EXCLUSIVE_OWNERSHIP_QOS\" value=\"1\"/></Enum><Struct name=\"OwnershipStrengthQosPolicy\"><Member name=\"value\"><Long/></Member></Struct><Enum name=\"PresentationQosPolicyAccessScopeKind\"><Element name=\"INSTANCE_PRESENTATION_QOS\" value=\"0\"/><Element name=\"TOPIC_PRESENTATION_QOS\" value=\"1\"/><Element name=\"GROUP_PRESENTATION_QOS\" value=\"2\"/></Enum><TypeDef name=\"StringSeq\"><Sequence><String/></Sequence></TypeDef><Struct name=\"DurabilityQosPolicy\"><Member name=\"kind\"><Type name=\"DurabilityQosPolicyKind\"/></Member></Struct><Struct name=\"LifespanQosPolicy\"><Member name=\"duration\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"LatencyBudgetQosPolicy\"><Member name=\"duration""\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"DeadlineQosPolicy\"><Member name=\"period\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"LivelinessQosPolicy\"><Member name=\"kind\"><Type name=\"LivelinessQosPolicyKind\"/></Member><Member name=\"lease_duration\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"ReliabilityQosPolicy\"><Member name=\"kind\"><Type name=\"ReliabilityQosPolicyKind\"/></Member><Member name=\"max_blocking_time\"><Type name=\"Duration_t\"/></Member><Member name=\"synchronous\"><Boolean/></Member></Struct><Struct name=\"DestinationOrderQosPolicy\"><Member name=\"kind\"><Type name=\"DestinationOrderQosPolicyKind\"/></Member></Struct><Struct name=\"GroupDataQosPolicy\"><Member name=\"value\"><Type name=\"octSeq\"/></Member></Struct><Struct name=\"TopicDataQosPolicy\"><Member name=\"value\"><Type name=\"octSeq\"/></Member></Struct><Struct name=\"UserDataQosPolicy\"><Member name=\"value\"><Type name=\"octSeq\"/></Member></Struct><Struct name=\"OwnershipQosPolicy\"><Member name=\"kind\"><Type name=\"OwnershipQosPolicyKind\"/></Member></Struct><Struct name=\"PresentationQosPolicy\"><Member name=\"access_scope\"><Type name=\"PresentationQosPolicyAccessScopeKind\"/></Member><Member name=\"coherent_access\"><Boolean/></Member><Member name=\"ordered_access\"><Boolean/></Member></Struct><Struct name=\"PartitionQosPolicy\"><Member name=\"name\"><Type name=\"StringSeq\"/></Member></Struct><Struct name=\"PublicationBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"participant_key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"topic_name\"><String/></Member><Member name=\"type_name\"><String/></Member><Member name=\"durability\"><Type name=\"DurabilityQosPolicy\"/></Member><Member name=\"deadline\"><Type name=\"DeadlineQosPolicy\"/></Member><Member name=\"latency_budget\"><Type name=\"LatencyBudgetQosPolicy\"/></Member><Member name=\"liveliness\"><Type name=""\"LivelinessQosPolicy\"/></Member><Member name=\"reliability\"><Type name=\"ReliabilityQosPolicy\"/></Member><Member name=\"lifespan\"><Type name=\"LifespanQosPolicy\"/></Member><Member name=\"destination_order\"><Type name=\"DestinationOrderQosPolicy\"/></Member><Member name=\"user_data\"><Type name=\"UserDataQosPolicy\"/></Member><Member name=\"ownership\"><Type name=\"OwnershipQosPolicy\"/></Member><Member name=\"ownership_strength\"><Type name=\"OwnershipStrengthQosPolicy\"/></Member><Member name=\"presentation\"><Type name=\"PresentationQosPolicy\"/></Member><Member name=\"partition\"><Type name=\"PartitionQosPolicy\"/></Member><Member name=\"topic_data\"><Type name=\"TopicDataQosPolicy\"/></Member><Member name=\"group_data\"><Type name=\"GroupDataQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_4[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><Enum name=\"DurabilityQosPolicyKind\"><Element name=\"VOLATILE_DURABILITY_QOS\" value=\"0\"/><Element name=\"TRANSIENT_LOCAL_DURABILITY_QOS\" value=\"1\"/><Element name=\"TRANSIENT_DURABILITY_QOS\" value=\"2\"/><Element name=\"PERSISTENT_DURABILITY_QOS\" value=\"3\"/></Enum><Struct name=\"Duration_t\"><Member name=\"sec\"><Long/></Member><Member name=\"nanosec\"><ULong/></Member></Struct><Enum name=\"LivelinessQosPolicyKind\"><Element name=\"AUTOMATIC_LIVELINESS_QOS\" value=\"0\"/><Element name=\"MANUAL_BY_PARTICIPANT_LIVELINESS_QOS\" value=\"1\"/><Element name=\"MANUAL_BY_TOPIC_LIVELINESS_QOS\" value=\"2\"/></Enum><Enum name=\"ReliabilityQosPolicyKind\"><Element name=\"BEST_EFFORT_RELIABILITY_QOS\" value=\"0\"/><Element name=\"RELIABLE_RELIABILITY_QOS\" value=\"1\"/></Enum><Enum name=\"OwnershipQosPolicyKind\"><Element name=\"SHARED_OWNERSHIP_QOS\" value=\"0\"/><Element name=\"EXCLUSIVE_OWNERSHIP_QOS\" value=\"1\"/></Enum><Enum name=\"DestinationOrderQosPolicyKind\"><Element name=\"BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS\" value=\"0\"/><Element name=\"BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS\" value=\"1\"/></Enum><TypeDef name=\"octSeq\"><Sequence><Octet/></Sequence></TypeDef><Enum name=\"PresentationQosPolicyAccessScopeKind\"><Element name=\"INSTANCE_PRESENTATION_QOS\" value=\"0\"/><Element name=\"TOPIC_PRESENTATION_QOS\" value=\"1\"/><Element name=\"GROUP_PRESENTATION_QOS\" value=\"2\"/></Enum><TypeDef name=\"StringSeq\"><Sequence><String/></Sequence></TypeDef><Struct name=\"DurabilityQosPolicy\"><Member name=\"kind\"><Type name=\"DurabilityQosPolicyKind\"/></Member></Struct><Struct name=\"TimeBasedFilterQosPolicy\"><Member name=\"minimum_separation\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"LatencyBudgetQosPolicy\"><Member name=\"duration\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"DeadlineQosPo""licy\"><Member name=\"period\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"LivelinessQosPolicy\"><Member name=\"kind\"><Type name=\"LivelinessQosPolicyKind\"/></Member><Member name=\"lease_duration\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"ReliabilityQosPolicy\"><Member name=\"kind\"><Type name=\"ReliabilityQosPolicyKind\"/></Member><Member name=\"max_blocking_time\"><Type name=\"Duration_t\"/></Member><Member name=\"synchronous\"><Boolean/></Member></Struct><Struct name=\"OwnershipQosPolicy\"><Member name=\"kind\"><Type name=\"OwnershipQosPolicyKind\"/></Member></Struct><Struct name=\"DestinationOrderQosPolicy\"><Member name=\"kind\"><Type name=\"DestinationOrderQosPolicyKind\"/></Member></Struct><Struct name=\"GroupDataQosPolicy\"><Member name=\"value\"><Type name=\"octSeq\"/></Member></Struct><Struct name=\"TopicDataQosPolicy\"><Member name=\"value\"><Type name=\"octSeq\"/></Member></Struct><Struct name=\"UserDataQosPolicy\"><Member name=\"value\"><Type name=\"octSeq\"/></Member></Struct><Struct name=\"PresentationQosPolicy\"><Member name=\"access_scope\"><Type name=\"PresentationQosPolicyAccessScopeKind\"/></Member><Member name=\"coherent_access\"><Boolean/></Member><Member name=\"ordered_access\"><Boolean/></Member></Struct><Struct name=\"PartitionQosPolicy\"><Member name=\"name\"><Type name=\"StringSeq\"/></Member></Struct><Struct name=\"SubscriptionBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"participant_key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"topic_name\"><String/></Member><Member name=\"type_name\"><String/></Member><Member name=\"durability\"><Type name=\"DurabilityQosPolicy\"/></Member><Member name=\"deadline\"><Type name=\"DeadlineQosPolicy\"/></Member><Member name=\"latency_budget\"><Type name=\"LatencyBudgetQosPolicy\"/></Member><Member name=\"liveliness\"><Type name=\"LivelinessQosPolicy\"/></Member><Member name=\"reliability\"><Type name=""\"ReliabilityQosPolicy\"/></Member><Member name=\"ownership\"><Type name=\"OwnershipQosPolicy\"/></Member><Member name=\"destination_order\"><Type name=\"DestinationOrderQosPolicy\"/></Member><Member name=\"user_data\"><Type name=\"UserDataQosPolicy\"/></Member><Member name=\"time_based_filter\"><Type name=\"TimeBasedFilterQosPolicy\"/></Member><Member name=\"presentation\"><Type name=\"PresentationQosPolicy\"/></Member><Member name=\"partition\"><Type name=\"PartitionQosPolicy\"/></Member><Member name=\"topic_data\"><Type name=\"TopicDataQosPolicy\"/></Member><Member name=\"group_data\"><Type name=\"GroupDataQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_5[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><Struct name=\"ProductDataQosPolicy\"><Member name=\"value\"><String/></Member></Struct><Struct name=\"CMParticipantBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"product\"><Type name=\"ProductDataQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_6[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><Struct name=\"ProductDataQosPolicy\"><Member name=\"value\"><String/></Member></Struct><Struct name=\"EntityFactoryQosPolicy\"><Member name=\"autoenable_created_entities\"><Boolean/></Member></Struct><TypeDef name=\"StringSeq\"><Sequence><String/></Sequence></TypeDef><Struct name=\"PartitionQosPolicy\"><Member name=\"name\"><Type name=\"StringSeq\"/></Member></Struct><Struct name=\"CMPublisherBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"product\"><Type name=\"ProductDataQosPolicy\"/></Member><Member name=\"participant_key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"name\"><String/></Member><Member name=\"entity_factory\"><Type name=\"EntityFactoryQosPolicy\"/></Member><Member name=\"partition\"><Type name=\"PartitionQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_7[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><Struct name=\"ProductDataQosPolicy\"><Member name=\"value\"><String/></Member></Struct><Struct name=\"EntityFactoryQosPolicy\"><Member name=\"autoenable_created_entities\"><Boolean/></Member></Struct><Struct name=\"ShareQosPolicy\"><Member name=\"name\"><String/></Member><Member name=\"enable\"><Boolean/></Member></Struct><TypeDef name=\"StringSeq\"><Sequence><String/></Sequence></TypeDef><Struct name=\"PartitionQosPolicy\"><Member name=\"name\"><Type name=\"StringSeq\"/></Member></Struct><Struct name=\"CMSubscriberBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"product\"><Type name=\"ProductDataQosPolicy\"/></Member><Member name=\"participant_key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"name\"><String/></Member><Member name=\"entity_factory\"><Type name=\"EntityFactoryQosPolicy\"/></Member><Member name=\"share\"><Type name=\"ShareQosPolicy\"/></Member><Member name=\"partition\"><Type name=\"PartitionQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_8[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><Struct name=\"ProductDataQosPolicy\"><Member name=\"value\"><String/></Member></Struct><Enum name=\"HistoryQosPolicyKind\"><Element name=\"KEEP_LAST_HISTORY_QOS\" value=\"0\"/><Element name=\"KEEP_ALL_HISTORY_QOS\" value=\"1\"/></Enum><Struct name=\"ResourceLimitsQosPolicy\"><Member name=\"max_samples\"><Long/></Member><Member name=\"max_instances\"><Long/></Member><Member name=\"max_samples_per_instance\"><Long/></Member></Struct><Struct name=\"Duration_t\"><Member name=\"sec\"><Long/></Member><Member name=\"nanosec\"><ULong/></Member></Struct><Struct name=\"HistoryQosPolicy\"><Member name=\"kind\"><Type name=\"HistoryQosPolicyKind\"/></Member><Member name=\"depth\"><Long/></Member></Struct><Struct name=\"WriterDataLifecycleQosPolicy\"><Member name=\"autodispose_unregistered_instances\"><Boolean/></Member><Member name=\"autopurge_suspended_samples_delay\"><Type name=\"Duration_t\"/></Member><Member name=\"autounregister_instance_delay\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"CMDataWriterBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"product\"><Type name=\"ProductDataQosPolicy\"/></Member><Member name=\"publisher_key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"name\"><String/></Member><Member name=\"history\"><Type name=\"HistoryQosPolicy\"/></Member><Member name=\"resource_limits\"><Type name=\"ResourceLimitsQosPolicy\"/></Member><Member name=\"writer_data_lifecycle\"><Type name=\"WriterDataLifecycleQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_9[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"BuiltinTopicKey_t\"><Array size=\"3\"><Long/></Array></TypeDef><Struct name=\"ProductDataQosPolicy\"><Member name=\"value\"><String/></Member></Struct><Enum name=\"HistoryQosPolicyKind\"><Element name=\"KEEP_LAST_HISTORY_QOS\" value=\"0\"/><Element name=\"KEEP_ALL_HISTORY_QOS\" value=\"1\"/></Enum><Struct name=\"ResourceLimitsQosPolicy\"><Member name=\"max_samples\"><Long/></Member><Member name=\"max_instances\"><Long/></Member><Member name=\"max_samples_per_instance\"><Long/></Member></Struct><Struct name=\"Duration_t\"><Member name=\"sec\"><Long/></Member><Member name=\"nanosec\"><ULong/></Member></Struct><Enum name=\"InvalidSampleVisibilityQosPolicyKind\"><Element name=\"NO_INVALID_SAMPLES\" value=\"0\"/><Element name=\"MINIMUM_INVALID_SAMPLES\" value=\"1\"/><Element name=\"ALL_INVALID_SAMPLES\" value=\"2\"/></Enum><Struct name=\"UserKeyQosPolicy\"><Member name=\"enable\"><Boolean/></Member><Member name=\"expression\"><String/></Member></Struct><Struct name=\"ShareQosPolicy\"><Member name=\"name\"><String/></Member><Member name=\"enable\"><Boolean/></Member></Struct><Struct name=\"HistoryQosPolicy\"><Member name=\"kind\"><Type name=\"HistoryQosPolicyKind\"/></Member><Member name=\"depth\"><Long/></Member></Struct><Struct name=\"ReaderLifespanQosPolicy\"><Member name=\"use_lifespan\"><Boolean/></Member><Member name=\"duration\"><Type name=\"Duration_t\"/></Member></Struct><Struct name=\"InvalidSampleVisibilityQosPolicy\"><Member name=\"kind\"><Type name=\"InvalidSampleVisibilityQosPolicyKind\"/></Member></Struct><Struct name=\"ReaderDataLifecycleQosPolicy\"><Member name=\"autopurge_nowriter_samples_delay\"><Type name=\"Duration_t\"/></Member><Member name=\"autopurge_disposed_samples_delay\"><Type name=\"Duration_t\"/></Member><Member name=\"autopurge_dispose_all\"><Boolean/></Member><Member name=\"enable_invalid_samples\"><Boolean/></Member><Member name=\"invalid_sample_visibility\"><Type name=\"Inva""lidSampleVisibilityQosPolicy\"/></Member></Struct><Struct name=\"CMDataReaderBuiltinTopicData\"><Member name=\"key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"product\"><Type name=\"ProductDataQosPolicy\"/></Member><Member name=\"subscriber_key\"><Type name=\"BuiltinTopicKey_t\"/></Member><Member name=\"name\"><String/></Member><Member name=\"history\"><Type name=\"HistoryQosPolicy\"/></Member><Member name=\"resource_limits\"><Type name=\"ResourceLimitsQosPolicy\"/></Member><Member name=\"reader_data_lifecycle\"><Type name=\"ReaderDataLifecycleQosPolicy\"/></Member><Member name=\"subscription_keys\"><Type name=\"UserKeyQosPolicy\"/></Member><Member name=\"reader_lifespan\"><Type name=\"ReaderLifespanQosPolicy\"/></Member><Member name=\"share\"><Type name=\"ShareQosPolicy\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_DurabilityServiceQosPolicy_histo_2[] = "DurabilityServiceQosPolicy.history_depth";
static const char __pyx_k_DurabilityServiceQosPolicy_max_s_2[] = "DurabilityServiceQosPolicy.max_samples_per_instance";
static const char __pyx_k_MetaData_version_1_0_0_Module_n_10[] = "<MetaData version=\"1.0.0\"><Module name=\"DDS\"><TypeDef name=\"DataRepresentationId_t\"><Short/></TypeDef><Struct name=\"TypeHash\"><Member name=\"msb\"><ULongLong/></Member><Member name=\"lsb\"><ULongLong/></Member></Struct><TypeDef name=\"octSeq\"><Sequence><Octet/></Sequence></TypeDef><Struct name=\"TypeBuiltinTopicData\"><Member name=\"name\"><String/></Member><Member name=\"data_representation_id\"><Type name=\"DataRepresentationId_t\"/></Member><Member name=\"type_hash\"><Type name=\"TypeHash\"/></Member><Member name=\"meta_data\"><Type name=\"octSeq\"/></Member><Member name=\"extentions\"><Type name=\"octSeq\"/></Member></Struct></Module></MetaData>";
static const char __pyx_k_ReaderDataLifecycleQosPolicy_aut_2[] = "ReaderDataLifecycleQosPolicy.autopurge_disposed_samples_delay";
static const char __pyx_k_ResourceLimitsQosPolicy_max_samp_2[] = "ResourceLimitsQosPolicy.max_samples_per_instance";
static PyObject *__pyx_kp_s_;
static PyObject *__pyx_n_s_ALIVE_INSTANCE_STATE;
static PyObject *__pyx_n_s_ANY_INSTANCE_STATE;
static PyObject *__pyx_n_s_ANY_SAMPLE_STATE;
static PyObject *__pyx_n_s_ANY_STATE;
static PyObject *__pyx_n_s_ANY_VIEW_STATE;
static PyObject *__pyx_n_s_AUTOMATIC;
static PyObject *__pyx_kp_s_Abstract_Listener_class;
static PyObject *__pyx_kp_s_Abstract_QoS_policy_class_Users;
static PyObject *__pyx_kp_s_Argument_1_is_not_of_type_dds_Re;
static PyObject *__pyx_n_s_BEST_EFFORT;
static PyObject *__pyx_n_s_BY_RECEPTION_TIMESTAMP;
static PyObject *__pyx_n_s_BY_SOURCE_TIMESTAMP;
static PyObject *__pyx_kp_s_Bad_parameter;
static PyObject *__pyx_kp_s_Base_sample_info_class;
static PyObject *__pyx_n_s_CMDataReader;
static PyObject *__pyx_n_s_CMDataWriter;
static PyObject *__pyx_n_s_CMParticipant;
static PyObject *__pyx_n_s_CMPublisher;
static PyObject *__pyx_n_s_CMSubscriber;
static PyObject *__pyx_kp_s_Cannot_create_directly_data_read;
static PyObject *__pyx_kp_s_Cannot_create_directly_data_writ;
static PyObject *__pyx_n_s_Condition;
static PyObject *__pyx_n_s_DATA_AVAILABLE;
static PyObject *__pyx_n_s_DATA_ON_READERS;
static PyObject *__pyx_n_s_DCPSParticipant;
static PyObject *__pyx_n_s_DCPSPublication;
static PyObject *__pyx_n_s_DCPSSubscription;
static PyObject *__pyx_n_s_DCPSTopic;
static PyObject *__pyx_n_s_DCPSType;
static PyObject *__pyx_n_s_DDSDestinationOrderKind;
static PyObject *__pyx_n_s_DDSDurabilityKind;
static PyObject *__pyx_n_s_DDSDuration;
static PyObject *__pyx_n_s_DDSDuration_infinity;
static PyObject *__pyx_n_s_DDSException;
static PyObject *__pyx_n_s_DDSException___init;
static PyObject *__pyx_n_s_DDSHistoryKind;
static PyObject *__pyx_n_s_DDSLivelinessKind;
static PyObject *__pyx_n_s_DDSMaskUtil;
static PyObject *__pyx_n_s_DDSMaskUtil_all_samples;
static PyObject *__pyx_n_s_DDSMaskUtil_new_instance_samples;
static PyObject *__pyx_n_s_DDSMaskUtil_new_samples;
static PyObject *__pyx_n_s_DDSMaskUtil_not_alive_instance_s;
static PyObject *__pyx_n_s_DDSMaskUtil_read_samples;
static PyObject *__pyx_n_s_DDSOwnershipKind;
static PyObject *__pyx_n_s_DDSPresentationAccessScopeKind;
static PyObject *__pyx_n_s_DDSReliabilityKind;
static PyObject *__pyx_n_s_DDSSampleRejectedStatusKind;
static PyObject *__pyx_n_s_DDSStateKind;
static PyObject *__pyx_n_s_DDSStatusKind;
static PyObject *__pyx_n_s_DDSTime;
static PyObject *__pyx_n_s_DDSTime___init;
static PyObject *__pyx_kp_s_DDS_CMDataReaderBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_CMDataWriterBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_CMParticipantBuiltinTopicDat;
static PyObject *__pyx_kp_s_DDS_CMPublisherBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_CMSubscriberBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_Duration_type_sec_long_para;
static PyObject *__pyx_kp_s_DDS_ParticipantBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_PublicationBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_SubscriptionBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_Time_type_sec_long_param_se;
static PyObject *__pyx_kp_s_DDS_TopicBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_TypeBuiltinTopicData;
static PyObject *__pyx_kp_s_DDS_exception;
static PyObject *__pyx_kp_s_DDS_read_take_operation_failed;
static PyObject *__pyx_n_s_DEADLINE_QOS_POLICY_ID;
static PyObject *__pyx_n_s_DESTINATIONORDER_QOS_POLICY_ID;
static PyObject *__pyx_n_s_DURABILITYSERVICE_QOS_POLICY_ID;
static PyObject *__pyx_n_s_DURABILITY_QOS_POLICY_ID;
static PyObject *__pyx_n_s_DataReader;
static PyObject *__pyx_n_s_DataWriter;
static PyObject *__pyx_n_s_DeadlineQosPolicy;
static PyObject *__pyx_n_s_DeadlineQosPolicy___init;
static PyObject *__pyx_n_s_DeadlineQosPolicy_deadline;
static PyObject *__pyx_kp_s_Deadline_QoS_Policy_type_deadli;
static PyObject *__pyx_n_s_DestinationOrderQosPolicy;
static PyObject *__pyx_n_s_DestinationOrderQosPolicy___init;
static PyObject *__pyx_kp_s_Destination_order_QoS_Policy_ty;
static PyObject *__pyx_n_s_DomainParticipant;
static PyObject *__pyx_n_s_DurabilityQosPolicy;
static PyObject *__pyx_n_s_DurabilityQosPolicy___init;
static PyObject *__pyx_n_s_DurabilityServiceQosPolicy;
static PyObject *__pyx_n_s_DurabilityServiceQosPolicy___ini;
static PyObject *__pyx_n_s_DurabilityServiceQosPolicy_histo;
static PyObject *__pyx_n_s_DurabilityServiceQosPolicy_histo_2;
static PyObject *__pyx_n_s_DurabilityServiceQosPolicy_max_i;
static PyObject *__pyx_n_s_DurabilityServiceQosPolicy_max_s;
static PyObject *__pyx_n_s_DurabilityServiceQosPolicy_max_s_2;
static PyObject *__pyx_n_s_DurabilityServiceQosPolicy_servi;
static PyObject *__pyx_kp_s_Durability_QoS_Policy_type_k_DD;
static PyObject *__pyx_kp_s_Durability_service_QoS_Policy_t;
static PyObject *__pyx_n_s_ENTITYFACTORY_QOS_POLICY_ID;
static PyObject *__pyx_n_s_EXCLUSIVE;
static PyObject *__pyx_kp_s_Either_data_or_handle_must_be_pr;
static PyObject *__pyx_n_s_Entity;
static PyObject *__pyx_kp_s_Entity_is_already_closed;
static PyObject *__pyx_n_s_Enum;
static PyObject *__pyx_kp_s_Enumeration_of_Qos_policy_kinds;
static PyObject *__pyx_kp_s_Error_setting_entity_status_for;
static PyObject *__pyx_kp_s_Failed_to_attach_condition;
static PyObject *__pyx_kp_s_Failed_to_create_data_reader;
static PyObject *__pyx_kp_s_Failed_to_create_data_writer;
static PyObject *__pyx_kp_s_Failed_to_create_guard_condition;
static PyObject *__pyx_kp_s_Failed_to_create_participant;
static PyObject *__pyx_kp_s_Failed_to_create_publisher;
static PyObject *__pyx_kp_s_Failed_to_create_query_condition;
static PyObject *__pyx_kp_s_Failed_to_create_read_condition;
static PyObject *__pyx_kp_s_Failed_to_create_status_conditio;
static PyObject *__pyx_kp_s_Failed_to_create_subscriber;
static PyObject *__pyx_kp_s_Failed_to_create_topic;
static PyObject *__pyx_kp_s_Failed_to_dispose_instance;
static PyObject *__pyx_kp_s_Failed_to_get_participant_QoS;
static PyObject *__pyx_kp_s_Failed_to_get_publisher_QoS;
static PyObject *__pyx_kp_s_Failed_to_get_reader_QoS;
static PyObject *__pyx_kp_s_Failed_to_get_subscriber_QoS;
static PyObject *__pyx_kp_s_Failed_to_get_topic_QoS;
static PyObject *__pyx_kp_s_Failed_to_get_writer_QoS;
static PyObject *__pyx_kp_s_Failed_to_write_data;
static PyObject *__pyx_kp_s_Failure_retrieving_inconsistent;
static PyObject *__pyx_kp_s_Failure_retrieving_liveliness_lo;
static PyObject *__pyx_kp_s_Failure_retrieving_offered_deadl;
static PyObject *__pyx_kp_s_Failure_retrieving_offered_incom;
static PyObject *__pyx_kp_s_Failure_retrieving_publication_m;
static PyObject *__pyx_kp_s_Failure_retrieving_requested_dea;
static PyObject *__pyx_kp_s_Failure_retrieving_requested_inc;
static PyObject *__pyx_kp_s_Failure_retrieving_sample_lost_s;
static PyObject *__pyx_kp_s_Failure_retrieving_sample_reject;
static PyObject *__pyx_kp_s_Failure_retrieving_subscription;
static PyObject *__pyx_kp_s_Failure_unregistering_handle;
static PyObject *__pyx_n_s_FoundTopic;
static PyObject *__pyx_n_s_GROUP;
static PyObject *__pyx_n_s_GROUPDATA_QOS_POLICY_ID;
static PyObject *__pyx_kp_s_Group_data_QoS_Policy_type_valu;
static PyObject *__pyx_n_s_GroupdataQosPolicy;
static PyObject *__pyx_n_s_GroupdataQosPolicy___init;
static PyObject *__pyx_n_s_GuardCondition;
static PyObject *__pyx_n_s_HISTORY_QOS_POLICY_ID;
static PyObject *__pyx_n_s_HistoryQosPolicy;
static PyObject *__pyx_n_s_HistoryQosPolicy___init;
static PyObject *__pyx_n_s_HistoryQosPolicy_depth;
static PyObject *__pyx_kp_s_History_QoS_Policy_type_k_DDSHi;
static PyObject *__pyx_n_s_INCONSISTENT_TOPIC;
static PyObject *__pyx_n_s_INSTANCE;
static PyObject *__pyx_n_s_INVALID_QOS_POLICY_ID;
static PyObject *__pyx_kp_s_ISO_8859_1;
static PyObject *__pyx_kp_s_ISO_8859_1_2;
static PyObject *__pyx_kp_s_ISO_8859_1_3;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4;
static PyObject *__pyx_n_s_InconsistentTopicStatus;
static PyObject *__pyx_kp_s_InconsistentTopicStatus_total_c;
static PyObject *__pyx_n_s_KEEP_ALL;
static PyObject *__pyx_n_s_KEEP_LAST;
static PyObject *__pyx_n_s_LATENCYBUDGET_QOS_POLICY_ID;
static PyObject *__pyx_n_s_LIFESPAN_QOS_POLICY_ID;
static PyObject *__pyx_n_s_LIVELINESS_CHANGED;
static PyObject *__pyx_n_s_LIVELINESS_LOST;
static PyObject *__pyx_n_s_LIVELINESS_QOS_POLICY_ID;
static PyObject *__pyx_n_s_LatencyBudgetQosPolicy;
static PyObject *__pyx_n_s_LatencyBudgetQosPolicy___init;
static PyObject *__pyx_n_s_LatencyBudgetQosPolicy_duration;
static PyObject *__pyx_kp_s_Latency_budget_QoS_Policy_type;
static PyObject *__pyx_n_s_LifespanQosPolicy;
static PyObject *__pyx_n_s_LifespanQosPolicy___init;
static PyObject *__pyx_n_s_LifespanQosPolicy_lifespan;
static PyObject *__pyx_kp_s_Lifespan_QoS_Policy_type_lifesp;
static PyObject *__pyx_n_s_Listener;
static PyObject *__pyx_n_s_Listener_on_data_available;
static PyObject *__pyx_n_s_Listener_on_data_on_readers;
static PyObject *__pyx_n_s_Listener_on_inconsistent_topic;
static PyObject *__pyx_n_s_Listener_on_liveliness_changed;
static PyObject *__pyx_n_s_Listener_on_liveliness_lost;
static PyObject *__pyx_n_s_Listener_on_offered_deadline_mis;
static PyObject *__pyx_n_s_Listener_on_offered_incompatible;
static PyObject *__pyx_n_s_Listener_on_publication_matched;
static PyObject *__pyx_n_s_Listener_on_requested_deadline_m;
static PyObject *__pyx_n_s_Listener_on_requested_incompatib;
static PyObject *__pyx_n_s_Listener_on_sample_lost;
static PyObject *__pyx_n_s_Listener_on_sample_rejected;
static PyObject *__pyx_n_s_Listener_on_subscription_matched;
static PyObject *__pyx_n_s_LivelinessChangedStatus;
static PyObject *__pyx_kp_s_LivelinessChangedStatus_alive_c;
static PyObject *__pyx_n_s_LivelinessLostStatus;
static PyObject *__pyx_kp_s_LivelinessLostStatus_total_coun;
static PyObject *__pyx_n_s_LivelinessQosPolicy;
static PyObject *__pyx_n_s_LivelinessQosPolicy___init;
static PyObject *__pyx_n_s_LivelinessQosPolicy_lease_durati;
static PyObject *__pyx_kp_s_Liveliness_QoS_Policy_type_kind;
static PyObject *__pyx_n_s_MANUAL_BY_PARTICIPANT;
static PyObject *__pyx_n_s_MANUAL_BY_TOPIC;
static PyObject *__pyx_kp_s_Mask_utility_Some_commonly_used;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_10;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_2;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_3;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_4;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_5;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_6;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_7;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_8;
static PyObject *__pyx_kp_s_MetaData_version_1_0_0_Module_n_9;
static PyObject *__pyx_n_s_NEW_VIEW_STATE;
static PyObject *__pyx_n_s_NOT_ALIVE_DISPOSED_INSTANCE_STAT;
static PyObject *__pyx_n_s_NOT_ALIVE_NO_WRITERS_INSTANCE_ST;
static PyObject *__pyx_n_s_NOT_NEW_VIEW_STATE;
static PyObject *__pyx_n_s_NOT_READ_SAMPLE_STATE;
static PyObject *__pyx_n_s_NOT_REJECTED;
static PyObject *__pyx_kp_s_No_condition_attached;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_OFFERED_DEADLINE_MISSED;
static PyObject *__pyx_n_s_OFFERED_INCOMPATIBLE_QOS;
static PyObject *__pyx_n_s_OWNERSHIPSTRENGTH_QOS_POLICY_ID;
static PyObject *__pyx_n_s_OWNERSHIP_QOS_POLICY_ID;
static PyObject *__pyx_n_s_OfferedDeadlineMissedStatus;
static PyObject *__pyx_kp_s_OfferedDeadlineMissedStatus_tot;
static PyObject *__pyx_n_s_OfferedIncompatibleQosStatus;
static PyObject *__pyx_kp_s_OfferedIncompatibleQosStatus_to;
static PyObject *__pyx_n_s_OwnershipQosPolicy;
static PyObject *__pyx_n_s_OwnershipQosPolicy___init;
static PyObject *__pyx_n_s_OwnershipStrengthQosPolicy;
static PyObject *__pyx_n_s_OwnershipStrengthQosPolicy___ini;
static PyObject *__pyx_n_s_OwnershipStrengthQosPolicy_value;
static PyObject *__pyx_kp_s_Ownership_QoS_Policy_type_kind;
static PyObject *__pyx_kp_s_Ownership_strenth_QoS_Policy_ty;
static PyObject *__pyx_n_s_PARTITION_QOS_POLICY_ID;
static PyObject *__pyx_n_s_PERSISTENT;
static PyObject *__pyx_n_s_PRESENTATION_QOS_POLICY_ID;
static PyObject *__pyx_n_s_PUBLICATION_MATCHED;
static PyObject *__pyx_n_s_PartitionQosPolicy;
static PyObject *__pyx_n_s_PartitionQosPolicy___init;
static PyObject *__pyx_n_s_PartitionQosPolicy_ps;
static PyObject *__pyx_kp_s_Partition_QoS_Policy_type_ps_li;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_PresentationQosPolicy;
static PyObject *__pyx_n_s_PresentationQosPolicy___init;
static PyObject *__pyx_n_s_PresentationQosPolicy_coherent_a;
static PyObject *__pyx_n_s_PresentationQosPolicy_ordered_ac;
static PyObject *__pyx_kp_s_Presentation_QoS_Policy_type_ki;
static PyObject *__pyx_n_s_PublicationMatchedStatus;
static PyObject *__pyx_kp_s_PublicationMatchedStatus_total;
static PyObject *__pyx_n_s_Publisher;
static PyObject *__pyx_n_s_Qos;
static PyObject *__pyx_n_s_QosPolicy;
static PyObject *__pyx_n_s_QosPolicyId;
static PyObject *__pyx_n_s_QosPolicy___init;
static PyObject *__pyx_n_s_QosPolicy_id;
static PyObject *__pyx_n_s_QosPolicy_kind;
static PyObject *__pyx_n_s_QosProfile;
static PyObject *__pyx_kp_s_QosProfile_will_be_removed_in_a;
static PyObject *__pyx_n_s_QosProvider;
static PyObject *__pyx_kp_s_Qos_provider_failed;
static PyObject *__pyx_n_s_QueryCondition;
static PyObject *__pyx_n_s_READERDATALIFECYCLE_QOS_POLICY_I;
static PyObject *__pyx_n_s_READ_SAMPLE_STATE;
static PyObject *__pyx_n_s_REJECTED_BY_INSTANCE_LIMIT;
static PyObject *__pyx_n_s_REJECTED_BY_SAMPLES_LIMIT;
static PyObject *__pyx_n_s_REJECTED_BY_SAMPLES_PER_INSTANCE;
static PyObject *__pyx_n_s_RELIABILITY_QOS_POLICY_ID;
static PyObject *__pyx_n_s_RELIABLE;
static PyObject *__pyx_n_s_REQUESTED_DEADLINE_MISSED;
static PyObject *__pyx_n_s_REQUESTED_INCOMPATIBLE_QOS;
static PyObject *__pyx_n_s_RESOURCELIMITS_QOS_POLICY_ID;
static PyObject *__pyx_n_s_ReadCondition;
static PyObject *__pyx_n_s_ReaderDataLifecycleQosPolicy;
static PyObject *__pyx_n_s_ReaderDataLifecycleQosPolicy___i;
static PyObject *__pyx_n_s_ReaderDataLifecycleQosPolicy_aut;
static PyObject *__pyx_n_s_ReaderDataLifecycleQosPolicy_aut_2;
static PyObject *__pyx_kp_s_Reader_data_lifecycle_QoS_Polic;
static PyObject *__pyx_n_s_ReliabilityQosPolicy;
static PyObject *__pyx_n_s_ReliabilityQosPolicy___init;
static PyObject *__pyx_n_s_ReliabilityQosPolicy_max_blockin;
static PyObject *__pyx_kp_s_Reliability_QoS_Policy_type_kin;
static PyObject *__pyx_n_s_RequestedDeadlineMissedStatus;
static PyObject *__pyx_kp_s_RequestedDeadlineMissedStatus_t;
static PyObject *__pyx_n_s_RequestedIncompatibleQosStatus;
static PyObject *__pyx_kp_s_RequestedIncompatibleQosStatus_2;
static PyObject *__pyx_n_s_ResourceLimitsQosPolicy;
static PyObject *__pyx_n_s_ResourceLimitsQosPolicy___init;
static PyObject *__pyx_n_s_ResourceLimitsQosPolicy_max_inst;
static PyObject *__pyx_n_s_ResourceLimitsQosPolicy_max_samp;
static PyObject *__pyx_n_s_ResourceLimitsQosPolicy_max_samp_2;
static PyObject *__pyx_kp_s_Resource_limit_QoS_Policy_type;
static PyObject *__pyx_kp_s_Return_code;
static PyObject *__pyx_n_s_SAMPLE_LOST;
static PyObject *__pyx_n_s_SAMPLE_REJECTED;
static PyObject *__pyx_n_s_SHARED;
static PyObject *__pyx_n_s_SUBSCRIPTION_MATCHED;
static PyObject *__pyx_n_s_Sample;
static PyObject *__pyx_n_s_SampleInfo;
static PyObject *__pyx_n_s_SampleInfo___init;
static PyObject *__pyx_n_s_SampleLostStatus;
static PyObject *__pyx_kp_s_SampleLostStatus_total_count_in;
static PyObject *__pyx_n_s_SampleRejectedStatus;
static PyObject *__pyx_kp_s_SampleRejectedStatus_total_coun;
static PyObject *__pyx_n_s_SerializationHelper;
static PyObject *__pyx_n_s_StatusCondition;
static PyObject *__pyx_kp_s_Subclass_must_override_this_impl;
static PyObject *__pyx_n_s_Subscriber;
static PyObject *__pyx_n_s_SubscriptionMatchedStatus;
static PyObject *__pyx_kp_s_SubscriptionMatchedStatus_total;
static PyObject *__pyx_n_s_TIMEBASEDFILTER_QOS_POLICY_ID;
static PyObject *__pyx_n_s_TOPIC;
static PyObject *__pyx_n_s_TOPICDATA_QOS_POLICY_ID;
static PyObject *__pyx_n_s_TRANSIENT;
static PyObject *__pyx_n_s_TRANSIENT_LOCAL;
static PyObject *__pyx_n_s_TRANSPORTPRIORITY_QOS_POLICY_ID;
static PyObject *__pyx_kp_s_The_class_name_QosProfile_is_dep;
static PyObject *__pyx_n_s_TimeBasedFilterQosPolicy;
static PyObject *__pyx_n_s_TimeBasedFilterQosPolicy___init;
static PyObject *__pyx_n_s_TimeBasedFilterQosPolicy_minimum;
static PyObject *__pyx_kp_s_Time_based_filter_QoS_Policy_ty;
static PyObject *__pyx_n_s_Topic;
static PyObject *__pyx_kp_s_Topic_data_QoS_Policy_type_valu;
static PyObject *__pyx_n_s_TopicdataQosPolicy;
static PyObject *__pyx_n_s_TopicdataQosPolicy___init;
static PyObject *__pyx_n_s_TransportPriorityQosPolicy;
static PyObject *__pyx_n_s_TransportPriorityQosPolicy___ini;
static PyObject *__pyx_n_s_TransportPriorityQosPolicy_value;
static PyObject *__pyx_kp_s_Transport_priority_QoS_Policy_t;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_TypeSupport;
static PyObject *__pyx_n_s_USERDATA_QOS_POLICY_ID;
static PyObject *__pyx_n_s_UserdataQosPolicy;
static PyObject *__pyx_n_s_UserdataQosPolicy___init;
static PyObject *__pyx_n_s_UserdataQosPolicy_value;
static PyObject *__pyx_kp_s_Userdata_QoS_Policy_type_value;
static PyObject *__pyx_n_s_VOLATILE;
static PyObject *__pyx_n_s_WRITERDATALIFECYCLE_QOS_POLICY_I;
static PyObject *__pyx_n_s_WaitSet;
static PyObject *__pyx_kp_s_Wait_failed;
static PyObject *__pyx_kp_s_Wait_for_historical_data_failed;
static PyObject *__pyx_n_s_WriterDataLifecycleQosPolicy;
static PyObject *__pyx_n_s_WriterDataLifecycleQosPolicy___i;
static PyObject *__pyx_n_s_WriterDataLifecycleQosPolicy_aut;
static PyObject *__pyx_kp_s_Writer_data_lifecycle_QoS_Polic;
static PyObject *__pyx_n_s_absolute_generation_rank;
static PyObject *__pyx_n_s_addr;
static PyObject *__pyx_n_s_alive_count;
static PyObject *__pyx_n_s_alive_count_change;
static PyObject *__pyx_n_s_all_samples;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_autodispose_unregistered_instan;
static PyObject *__pyx_n_s_autodispose_unregistered_instanc;
static PyObject *__pyx_n_s_autopurge_disposed_samples_dela;
static PyObject *__pyx_n_s_autopurge_disposed_samples_delay;
static PyObject *__pyx_n_s_autopurge_nowriter_samples;
static PyObject *__pyx_n_s_autopurge_nowriter_samples_2;
static PyObject *__pyx_n_s_bytes_to_ptr;
static PyObject *__pyx_n_s_check_handle;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_code;
static PyObject *__pyx_n_s_coherent_access;
static PyObject *__pyx_n_s_coherent_access_2;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_condition;
static PyObject *__pyx_n_s_current_count;
static PyObject *__pyx_n_s_current_count_change;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_dds;
static PyObject *__pyx_kp_s_dds_pyx;
static PyObject *__pyx_n_s_deadline;
static PyObject *__pyx_n_s_deadline_2;
static PyObject *__pyx_n_s_depth;
static PyObject *__pyx_n_s_depth_2;
static PyObject *__pyx_n_s_deserialize;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_did;
static PyObject *__pyx_n_s_disposed_generation_count;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dp;
static PyObject *__pyx_n_s_duration;
static PyObject *__pyx_n_s_duration_2;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_entity;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_expression;
static PyObject *__pyx_n_s_generation_rank;
static PyObject *__pyx_n_s_getmembers;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_handle;
static PyObject *__pyx_n_s_handle_2;
static PyObject *__pyx_n_s_history_depth;
static PyObject *__pyx_n_s_history_depth_2;
static PyObject *__pyx_n_s_history_kind;
static PyObject *__pyx_n_s_history_kind_2;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_id_2;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_infinity;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_inspect;
static PyObject *__pyx_n_s_instance_handle;
static PyObject *__pyx_n_s_instance_state;
static PyObject *__pyx_n_s_isfunction;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_kp_s_kernelModule_v_dataReaderCMInfo;
static PyObject *__pyx_kp_s_kernelModule_v_dataWriterCMInfo;
static PyObject *__pyx_kp_s_kernelModule_v_participantCMInfo;
static PyObject *__pyx_kp_s_kernelModule_v_participantInfo;
static PyObject *__pyx_kp_s_kernelModule_v_publicationInfo;
static PyObject *__pyx_kp_s_kernelModule_v_publisherCMInfo;
static PyObject *__pyx_kp_s_kernelModule_v_subscriberCMInfo;
static PyObject *__pyx_kp_s_kernelModule_v_subscriptionInfo;
static PyObject *__pyx_kp_s_kernelModule_v_topicInfo;
static PyObject *__pyx_kp_s_kernelModule_v_typeInfo;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_keys_2;
static PyObject *__pyx_n_s_kind;
static PyObject *__pyx_n_s_kind_2;
static PyObject *__pyx_n_s_last_instance_handle;
static PyObject *__pyx_n_s_last_policy_id;
static PyObject *__pyx_n_s_last_publication_handle;
static PyObject *__pyx_n_s_last_reason;
static PyObject *__pyx_n_s_last_subscription_handle;
static PyObject *__pyx_n_s_lease;
static PyObject *__pyx_n_s_lease_duration;
static PyObject *__pyx_n_s_lifespan;
static PyObject *__pyx_n_s_lifespan_2;
static PyObject *__pyx_n_s_listener;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_masks;
static PyObject *__pyx_n_s_max_blocking_time;
static PyObject *__pyx_n_s_max_blocking_time_2;
static PyObject *__pyx_n_s_max_instances;
static PyObject *__pyx_n_s_max_instances_2;
static PyObject *__pyx_n_s_max_samples;
static PyObject *__pyx_n_s_max_samples_2;
static PyObject *__pyx_n_s_max_samples_per_instance;
static PyObject *__pyx_n_s_max_samples_per_instance_2;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_method_to_status;
static PyObject *__pyx_n_s_minimum_separation;
static PyObject *__pyx_n_s_minimum_separation_2;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_msg;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_name_3;
static PyObject *__pyx_n_s_namedtuple;
static PyObject *__pyx_n_s_names;
static PyObject *__pyx_n_s_nanosec;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_new_instance_samples;
static PyObject *__pyx_n_s_new_samples;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_no_writers_generation_count;
static PyObject *__pyx_n_s_not_alive_count;
static PyObject *__pyx_n_s_not_alive_count_change;
static PyObject *__pyx_n_s_not_alive_instance_samples;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_on_data_available;
static PyObject *__pyx_n_s_on_data_on_readers;
static PyObject *__pyx_n_s_on_inconsistent_topic;
static PyObject *__pyx_n_s_on_liveliness_changed;
static PyObject *__pyx_n_s_on_liveliness_lost;
static PyObject *__pyx_n_s_on_offered_deadline_missed;
static PyObject *__pyx_n_s_on_offered_incompatible_qos;
static PyObject *__pyx_n_s_on_publication_matched;
static PyObject *__pyx_n_s_on_requested_deadline_missed;
static PyObject *__pyx_n_s_on_requested_incompatible_qos;
static PyObject *__pyx_n_s_on_sample_lost;
static PyObject *__pyx_n_s_on_sample_rejected;
static PyObject *__pyx_n_s_on_subscription_matched;
static PyObject *__pyx_n_s_ordered_access;
static PyObject *__pyx_n_s_ordered_access_2;
static PyObject *__pyx_n_s_parameters;
static PyObject *__pyx_n_s_parent;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_policies;
static PyObject *__pyx_n_s_predicate;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_profile;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_ps;
static PyObject *__pyx_n_s_ptr;
static PyObject *__pyx_n_s_ptr_to_bytes;
static PyObject *__pyx_n_s_publication_handle;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_TypeSupport;
static PyObject *__pyx_n_s_pyx_unpickle__SerializationHel;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qos;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_read_samples;
static PyObject *__pyx_n_s_reader;
static PyObject *__pyx_n_s_reception_timestamp;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_n_s_sample_rank;
static PyObject *__pyx_n_s_sample_state;
static PyObject *__pyx_n_s_sec;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_serialize;
static PyObject *__pyx_n_s_service_cleanup_delay;
static PyObject *__pyx_n_s_service_cleanup_delay_2;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_size_2;
static PyObject *__pyx_n_s_sleep;
static PyObject *__pyx_n_s_source_timestamp;
static PyObject *__pyx_n_s_spec;
static PyObject *__pyx_n_s_spec_2;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_status;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_subscriber;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_timeout;
static PyObject *__pyx_n_s_timestamp;
static PyObject *__pyx_n_s_topic;
static PyObject *__pyx_n_s_total_count;
static PyObject *__pyx_n_s_total_count_change;
static PyObject *__pyx_n_s_ts;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_uri;
static PyObject *__pyx_n_s_valid_data;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_2;
static PyObject *__pyx_n_s_view_state;
static PyObject *__pyx_n_s_warn;
static PyObject *__pyx_n_s_warnings;
static PyObject *__pyx_n_s_writer;
static PyObject *__pyx_pf_3dds_7DDSTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sec, PyObject *__pyx_v_nanosec); /* proto */
static PyObject *__pyx_pf_3dds_11DDSDuration_infinity(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_9QosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_3dds_9QosPolicy_2id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_9QosPolicy_4kind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_19DurabilityQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind); /* proto */
static PyObject *__pyx_pf_3dds_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_16HistoryQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_depth); /* proto */
static PyObject *__pyx_pf_3dds_16HistoryQosPolicy_2depth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_23ResourceLimitsQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_samples, PyObject *__pyx_v_max_instances, PyObject *__pyx_v_max_samples_per_instance); /* proto */
static PyObject *__pyx_pf_3dds_23ResourceLimitsQosPolicy_2max_samples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_23ResourceLimitsQosPolicy_4max_instances(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_23ResourceLimitsQosPolicy_6max_samples_per_instance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_21PresentationQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_coherent_access, PyObject *__pyx_v_ordered_access); /* proto */
static PyObject *__pyx_pf_3dds_21PresentationQosPolicy_2coherent_access(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_21PresentationQosPolicy_4ordered_access(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_14__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_17LifespanQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lifespan); /* proto */
static PyObject *__pyx_pf_3dds_17LifespanQosPolicy_2lifespan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_16__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_17DeadlineQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_deadline); /* proto */
static PyObject *__pyx_pf_3dds_17DeadlineQosPolicy_2deadline(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_18__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_22LatencyBudgetQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_duration); /* proto */
static PyObject *__pyx_pf_3dds_22LatencyBudgetQosPolicy_2duration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_20__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_18OwnershipQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind); /* proto */
static PyObject *__pyx_pf_3dds_26OwnershipStrengthQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3dds_26OwnershipStrengthQosPolicy_2value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_22__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_19LivelinessQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_lease_duration); /* proto */
static PyObject *__pyx_pf_3dds_19LivelinessQosPolicy_2lease_duration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_24__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_24TimeBasedFilterQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_minimum_separation); /* proto */
static PyObject *__pyx_pf_3dds_24TimeBasedFilterQosPolicy_2minimum_separation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_26__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_18PartitionQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ps); /* proto */
static PyObject *__pyx_pf_3dds_18PartitionQosPolicy_2ps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_28__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_20ReliabilityQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_max_blocking_time); /* proto */
static PyObject *__pyx_pf_3dds_20ReliabilityQosPolicy_2max_blocking_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_26TransportPriorityQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3dds_26TransportPriorityQosPolicy_2value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_30__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_25DestinationOrderQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind); /* proto */
static PyObject *__pyx_pf_3dds_28WriterDataLifecycleQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_autodispose_unregistered_instances); /* proto */
static PyObject *__pyx_pf_3dds_28WriterDataLifecycleQosPolicy_2autodispose_unregistered_instances(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_32__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_28ReaderDataLifecycleQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_autopurge_nowriter_samples, PyObject *__pyx_v_autopurge_disposed_samples_delay); /* proto */
static PyObject *__pyx_pf_3dds_28ReaderDataLifecycleQosPolicy_2autopurge_nowriter_samples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_28ReaderDataLifecycleQosPolicy_4autopurge_disposed_samples_delay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_34__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_service_cleanup_delay, PyObject *__pyx_v_history_kind, PyObject *__pyx_v_history_depth, PyObject *__pyx_v_max_samples, PyObject *__pyx_v_max_instances, PyObject *__pyx_v_max_samples_per_instance); /* proto */
static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_2service_cleanup_delay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_4history_kind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_6history_depth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_8max_samples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_10max_instances(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_12max_samples_per_instance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_17UserdataQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3dds_17UserdataQosPolicy_2value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_18TopicdataQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3dds_18GroupdataQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_3dds_3Qos___cinit__(struct __pyx_obj_3dds_Qos *__pyx_v_self, PyObject *__pyx_v_policies); /* proto */
static void __pyx_pf_3dds_3Qos_2__dealloc__(struct __pyx_obj_3dds_Qos *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_3Qos_4set_policies(struct __pyx_obj_3dds_Qos *__pyx_v_self, PyObject *__pyx_v_policies); /* proto */
static PyObject *__pyx_pf_3dds_3Qos_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Qos *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_3Qos_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Qos *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3dds_11DDSMaskUtil_read_samples(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_11DDSMaskUtil_2new_samples(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_11DDSMaskUtil_4all_samples(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_11DDSMaskUtil_6new_instance_samples(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_11DDSMaskUtil_8not_alive_instance_samples(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_on_inconsistent_topic(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_topic, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_2on_offered_deadline_missed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_writer, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_4on_offered_incompatible_qos(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_writer, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_6on_liveliness_lost(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_writer, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_8on_publication_matched(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_writer, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_10on_requested_deadline_missed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_12on_requested_incompatible_qos(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_14on_sample_rejected(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_16on_liveliness_changed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_18on_data_available(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_20on_subscription_matched(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_22on_sample_lost(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status); /* proto */
static PyObject *__pyx_pf_3dds_8Listener_24on_data_on_readers(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_subscriber); /* proto */
static int __pyx_pf_3dds_6Entity___cinit__(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto */
static void __pyx_pf_3dds_6Entity_2__dealloc__(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_6Entity_4close(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_6Entity_6_check_handle(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_6Entity_6parent___get__(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto */
static int __pyx_pf_3dds_6Entity_6parent_2__set__(struct __pyx_obj_3dds_Entity *__pyx_v_self, struct __pyx_obj_3dds_Entity *__pyx_v_e); /* proto */
static PyObject *__pyx_pf_3dds_6Entity_8listener___get__(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto */
static int __pyx_pf_3dds_6Entity_8listener_2__set__(struct __pyx_obj_3dds_Entity *__pyx_v_self, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_6Entity_8get_statuscondition(struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_6Entity_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Entity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_6Entity_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Entity *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_17DomainParticipant___cinit__(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, int __pyx_v_did, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_17DomainParticipant_2create_publisher(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_17DomainParticipant_4create_datawriter(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_17DomainParticipant_6create_subscriber(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_17DomainParticipant_8create_datareader(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_17DomainParticipant_10find_topic(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_3dds_17DomainParticipant_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_17DomainParticipant_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_11TypeSupport___init__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_keys, PyObject *__pyx_v_spec, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_3dds_11TypeSupport_6handle___get__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11TypeSupport_2_serialize(CYTHON_UNUSED struct __pyx_obj_3dds_TypeSupport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_3dds_11TypeSupport_4size___get__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11TypeSupport_4_deserialize(CYTHON_UNUSED struct __pyx_obj_3dds_TypeSupport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_3dds_11TypeSupport_6__reduce_cython__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11TypeSupport_8__setstate_cython__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_5Topic___init__(struct __pyx_obj_3dds_Topic *__pyx_v_self, struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp, PyObject *__pyx_v_name, PyObject *__pyx_v_ts, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_5Topic_4name___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_5Topic_9type_name___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_5Topic_14metadescriptor___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_5Topic_7keylist___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_5Topic_3qos___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_5Topic_2inconsistent_topic_status(struct __pyx_obj_3dds_Topic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_5Topic_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Topic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_5Topic_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Topic *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_10FoundTopic___init__(struct __pyx_obj_3dds_FoundTopic *__pyx_v_self, struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp); /* proto */
static PyObject *__pyx_pf_3dds_10FoundTopic_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_FoundTopic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10FoundTopic_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_FoundTopic *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_9Publisher___cinit__(struct __pyx_obj_3dds_Publisher *__pyx_v_self, struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_9Publisher_2create_datawriter(struct __pyx_obj_3dds_Publisher *__pyx_v_self, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_9Publisher_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Publisher *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_9Publisher_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Publisher *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_10Subscriber___cinit__(struct __pyx_obj_3dds_Subscriber *__pyx_v_self, struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_10Subscriber_2create_datareader(struct __pyx_obj_3dds_Subscriber *__pyx_v_self, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_10Subscriber_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Subscriber *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10Subscriber_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Subscriber *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_10DataWriter___cinit__(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, struct __pyx_obj_3dds_Entity *__pyx_v_entity, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_2write(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_4write_ts(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_6dispose_instance(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_8dispose_instance_ts(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_10publication_matched_status(struct __pyx_obj_3dds_DataWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_12liveliness_lost_status(struct __pyx_obj_3dds_DataWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_14offered_deadline_missed_status(struct __pyx_obj_3dds_DataWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_16offered_incompatible_qos_status(struct __pyx_obj_3dds_DataWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_18register_instance(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_20unregister_instance(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_handle, PyObject *__pyx_v_timestamp); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_22lookup_instance(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DataWriter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataWriter_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DataWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3dds_10SampleInfo___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_3dds_10DataReader___cinit__(struct __pyx_obj_3dds_DataReader *__pyx_v_self, struct __pyx_obj_3dds_Entity *__pyx_v_entity, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_2read(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_masks); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_4take(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_masks); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_6read_cond(struct __pyx_obj_3dds_DataReader *__pyx_v_self, struct __pyx_obj_3dds_Condition *__pyx_v_condition, int __pyx_v_n); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_8take_cond(struct __pyx_obj_3dds_DataReader *__pyx_v_self, struct __pyx_obj_3dds_Condition *__pyx_v_condition, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_10take_instance(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_n, PyObject *__pyx_v_masks); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_12read_instance(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_n, PyObject *__pyx_v_masks); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_14wait_for_historical_data(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_16subscription_matched_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_18liveliness_changed_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_20requested_deadline_missed_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_22requested_incompatible_qos_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_24sample_rejected_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_26sample_lost_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_28create_readcondition(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_masks); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_30create_querycondition(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_masks, PyObject *__pyx_v_expression, PyObject *__pyx_v_parameters); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_32lookup_instance(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DataReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_10DataReader_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DataReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_9Condition___cinit__(struct __pyx_obj_3dds_Condition *__pyx_v_self); /* proto */
static void __pyx_pf_3dds_9Condition_2__dealloc__(struct __pyx_obj_3dds_Condition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_9Condition_4triggered(struct __pyx_obj_3dds_Condition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_9Condition_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Condition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_9Condition_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Condition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_15StatusCondition___cinit__(struct __pyx_obj_3dds_StatusCondition *__pyx_v_self, struct __pyx_obj_3dds_Entity *__pyx_v_entity); /* proto */
static PyObject *__pyx_pf_3dds_15StatusCondition_6entity___get__(struct __pyx_obj_3dds_StatusCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_15StatusCondition_2enable_status(struct __pyx_obj_3dds_StatusCondition *__pyx_v_self, PyObject *__pyx_v_masks); /* proto */
static PyObject *__pyx_pf_3dds_15StatusCondition_4get_enabled_status(struct __pyx_obj_3dds_StatusCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_15StatusCondition_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_StatusCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_15StatusCondition_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_StatusCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_14GuardCondition___cinit__(struct __pyx_obj_3dds_GuardCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_14GuardCondition_2trigger(struct __pyx_obj_3dds_GuardCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_14GuardCondition_4reset(struct __pyx_obj_3dds_GuardCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_14GuardCondition_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_GuardCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_14GuardCondition_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_GuardCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_13ReadCondition___cinit__(struct __pyx_obj_3dds_ReadCondition *__pyx_v_self, struct __pyx_obj_3dds_DataReader *__pyx_v_reader, PyObject *__pyx_v_masks); /* proto */
static PyObject *__pyx_pf_3dds_13ReadCondition_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_ReadCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_13ReadCondition_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_ReadCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_14QueryCondition___cinit__(struct __pyx_obj_3dds_QueryCondition *__pyx_v_self, struct __pyx_obj_3dds_DataReader *__pyx_v_reader, PyObject *__pyx_v_masks, PyObject *__pyx_v_expression, PyObject *__pyx_v_parameters); /* proto */
static PyObject *__pyx_pf_3dds_14QueryCondition_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_QueryCondition *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_14QueryCondition_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_QueryCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_7WaitSet___cinit__(struct __pyx_obj_3dds_WaitSet *__pyx_v_self); /* proto */
static void __pyx_pf_3dds_7WaitSet_2__dealloc__(struct __pyx_obj_3dds_WaitSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_7WaitSet_4get_conditions(struct __pyx_obj_3dds_WaitSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_7WaitSet_6attach(struct __pyx_obj_3dds_WaitSet *__pyx_v_self, struct __pyx_obj_3dds_Condition *__pyx_v_cond); /* proto */
static PyObject *__pyx_pf_3dds_7WaitSet_8detach(struct __pyx_obj_3dds_WaitSet *__pyx_v_self, struct __pyx_obj_3dds_Condition *__pyx_v_cond); /* proto */
static PyObject *__pyx_pf_3dds_7WaitSet_10wait(struct __pyx_obj_3dds_WaitSet *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_3dds_7WaitSet_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_WaitSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_7WaitSet_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_WaitSet *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3dds_11QosProvider___cinit__(struct __pyx_obj_3dds_QosProvider *__pyx_v_self, PyObject *__pyx_v_uri, PyObject *__pyx_v_profile); /* proto */
static void __pyx_pf_3dds_11QosProvider_2__dealloc__(struct __pyx_obj_3dds_QosProvider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11QosProvider_4get_participant_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11QosProvider_6get_topic_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11QosProvider_8get_publisher_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11QosProvider_10get_subscriber_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11QosProvider_12get_writer_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11QosProvider_14get_reader_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11QosProvider_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_QosProvider *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_11QosProvider_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_QosProvider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3dds_QosProfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_uri, PyObject *__pyx_v_profile); /* proto */
static PyObject *__pyx_pf_3dds_12DDSException___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_code); /* proto */
static PyObject *__pyx_pf_3dds_20_SerializationHelper_bytes_to_ptr(PyObject *__pyx_v_str); /* proto */
static PyObject *__pyx_pf_3dds_20_SerializationHelper_2ptr_to_bytes(PyObject *__pyx_v_ptr, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_3dds_20_SerializationHelper_4__reduce_cython__(struct __pyx_obj_3dds__SerializationHelper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3dds_20_SerializationHelper_6__setstate_cython__(struct __pyx_obj_3dds__SerializationHelper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3dds_2__pyx_unpickle_TypeSupport(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3dds_4__pyx_unpickle__SerializationHelper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_3dds_Qos(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_Entity(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_DomainParticipant(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_TypeSupport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_Topic(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_FoundTopic(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_Publisher(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_Subscriber(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_DataWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_DataReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_Condition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_StatusCondition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_GuardCondition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_ReadCondition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_QueryCondition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_WaitSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds_QosProvider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3dds__SerializationHelper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyString_Type_encode = {0, &__pyx_n_s_encode, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_9;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_11;
static PyObject *__pyx_int_12;
static PyObject *__pyx_int_13;
static PyObject *__pyx_int_14;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_16;
static PyObject *__pyx_int_17;
static PyObject *__pyx_int_18;
static PyObject *__pyx_int_19;
static PyObject *__pyx_int_20;
static PyObject *__pyx_int_21;
static PyObject *__pyx_int_22;
static PyObject *__pyx_int_32;
static PyObject *__pyx_int_64;
static PyObject *__pyx_int_100000000;
static PyObject *__pyx_int_222419149;
static PyObject *__pyx_int_1000000000;
static PyObject *__pyx_k__2;
static int __pyx_k__7;
static PyObject *__pyx_k__21;
static PyObject *__pyx_k__22;
static PyObject *__pyx_k__23;
static PyObject *__pyx_k__24;
static PyObject *__pyx_k__25;
static PyObject *__pyx_k__26;
static PyObject *__pyx_k__27;
static PyObject *__pyx_k__36;
static PyObject *__pyx_k__39;
static PyObject *__pyx_k__40;
static PyObject *__pyx_k__43;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__164;
static PyObject *__pyx_tuple__166;
static PyObject *__pyx_tuple__168;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__71;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__161;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__167;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__195;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
/* Late includes */

/* "dds.pyx":156
 *     :param nanosec: nanoseconds (default: 0)
 *     '''
 *     def __init__(self, sec = 1, nanosec = 0):             # <<<<<<<<<<<<<<
 *         self.value = (sec * 1000000000) + nanosec
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_7DDSTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_7DDSTime_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_7DDSTime_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_7DDSTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_sec = 0;
  PyObject *__pyx_v_nanosec = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_sec,&__pyx_n_s_nanosec,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sec);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nanosec);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 156, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_sec = values[1];
    __pyx_v_nanosec = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 156, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DDSTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_7DDSTime___init__(__pyx_self, __pyx_v_self, __pyx_v_sec, __pyx_v_nanosec);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_7DDSTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sec, PyObject *__pyx_v_nanosec) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":157
 *     '''
 *     def __init__(self, sec = 1, nanosec = 0):
 *         self.value = (sec * 1000000000) + nanosec             # <<<<<<<<<<<<<<
 * 
 * class DDSDuration(DDSTime):
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_sec, __pyx_int_1000000000); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_nanosec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value, __pyx_t_2) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":156
 *     :param nanosec: nanoseconds (default: 0)
 *     '''
 *     def __init__(self, sec = 1, nanosec = 0):             # <<<<<<<<<<<<<<
 *         self.value = (sec * 1000000000) + nanosec
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.DDSTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":171
 * 
 *     @staticmethod
 *     def infinity():             # <<<<<<<<<<<<<<
 *         ''' Return DDSDuration for infinity
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11DDSDuration_1infinity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11DDSDuration_infinity[] = " Return DDSDuration for infinity\n        ";
static PyMethodDef __pyx_mdef_3dds_11DDSDuration_1infinity = {"infinity", (PyCFunction)__pyx_pw_3dds_11DDSDuration_1infinity, METH_NOARGS, __pyx_doc_3dds_11DDSDuration_infinity};
static PyObject *__pyx_pw_3dds_11DDSDuration_1infinity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("infinity (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11DDSDuration_infinity(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11DDSDuration_infinity(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("infinity", 0);

  /* "dds.pyx":174
 *         ''' Return DDSDuration for infinity
 *         '''
 *         return DDSDuration(0, DDS_INFINITY)             # <<<<<<<<<<<<<<
 * 
 * ### Durability
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int64_t(DDS_INFINITY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_int_0, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_int_0, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":171
 * 
 *     @staticmethod
 *     def infinity():             # <<<<<<<<<<<<<<
 *         ''' Return DDSDuration for infinity
 *         '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.DDSDuration.infinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":227
 *     Users should not instantiate this class.
 *     '''
 *     def __init__(self, i):             # <<<<<<<<<<<<<<
 *         '''__init__(i)
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9QosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_9QosPolicy___init__[] = "__init__(i)\n        ";
static PyMethodDef __pyx_mdef_3dds_9QosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_9QosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_9QosPolicy___init__};
static PyObject *__pyx_pw_3dds_9QosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_i,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 227, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 227, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_i = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 227, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.QosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_9QosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_i);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9QosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":230
 *         '''__init__(i)
 *         '''
 *         self._kind = 0             # <<<<<<<<<<<<<<
 *         self._id = i
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kind, __pyx_int_0) < 0) __PYX_ERR(0, 230, __pyx_L1_error)

  /* "dds.pyx":231
 *         '''
 *         self._kind = 0
 *         self._id = i             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_id, __pyx_v_i) < 0) __PYX_ERR(0, 231, __pyx_L1_error)

  /* "dds.pyx":227
 *     Users should not instantiate this class.
 *     '''
 *     def __init__(self, i):             # <<<<<<<<<<<<<<
 *         '''__init__(i)
 *         '''
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("dds.QosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":234
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         '''
 *         An internal QoS Policy id
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9QosPolicy_3id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_3dds_9QosPolicy_2id[] = "\n        An internal QoS Policy id\n        ";
static PyMethodDef __pyx_mdef_3dds_9QosPolicy_3id = {"id", (PyCFunction)__pyx_pw_3dds_9QosPolicy_3id, METH_O, __pyx_doc_3dds_9QosPolicy_2id};
static PyObject *__pyx_pw_3dds_9QosPolicy_3id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("id (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_9QosPolicy_2id(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9QosPolicy_2id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("id", 0);

  /* "dds.pyx":238
 *         An internal QoS Policy id
 *         '''
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     # The kind property provides the kind of a specific QosPolicy when applicable
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":234
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         '''
 *         An internal QoS Policy id
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.QosPolicy.id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":242
 *     # The kind property provides the kind of a specific QosPolicy when applicable
 *     @property
 *     def kind(self):             # <<<<<<<<<<<<<<
 *         '''
 *         QoS Policy kind
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9QosPolicy_5kind(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_3dds_9QosPolicy_4kind[] = "\n        QoS Policy kind\n        ";
static PyMethodDef __pyx_mdef_3dds_9QosPolicy_5kind = {"kind", (PyCFunction)__pyx_pw_3dds_9QosPolicy_5kind, METH_O, __pyx_doc_3dds_9QosPolicy_4kind};
static PyObject *__pyx_pw_3dds_9QosPolicy_5kind(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kind (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_9QosPolicy_4kind(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9QosPolicy_4kind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("kind", 0);

  /* "dds.pyx":246
 *         QoS Policy kind
 *         '''
 *         return self._kind             # <<<<<<<<<<<<<<
 * 
 * class DurabilityQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":242
 *     # The kind property provides the kind of a specific QosPolicy when applicable
 *     @property
 *     def kind(self):             # <<<<<<<<<<<<<<
 *         '''
 *         QoS Policy kind
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.QosPolicy.kind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":256
 *     '''
 * 
 *     def __init__(self, kind=DDSDurabilityKind.VOLATILE):             # <<<<<<<<<<<<<<
 *         '''__init__(k=DDSDurabilityKind.VOLATILE)
 *         '''
 */

static PyObject *__pyx_pf_3dds_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_kind);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_kind);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_kind);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_19DurabilityQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_19DurabilityQosPolicy___init__[] = "__init__(k=DDSDurabilityKind.VOLATILE)\n        ";
static PyMethodDef __pyx_mdef_3dds_19DurabilityQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_19DurabilityQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_19DurabilityQosPolicy___init__};
static PyObject *__pyx_pw_3dds_19DurabilityQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kind = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_kind_2,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_kind;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind_2);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 256, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_kind = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 256, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DurabilityQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_19DurabilityQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_kind);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_19DurabilityQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":259
 *         '''__init__(k=DDSDurabilityKind.VOLATILE)
 *         '''
 *         QosPolicy.__init__(self, QosPolicyId.DURABILITY_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._kind = kind
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DURABILITY_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":260
 *         '''
 *         QosPolicy.__init__(self, QosPolicyId.DURABILITY_QOS_POLICY_ID)
 *         self._kind = kind             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kind, __pyx_v_kind) < 0) __PYX_ERR(0, 260, __pyx_L1_error)

  /* "dds.pyx":256
 *     '''
 * 
 *     def __init__(self, kind=DDSDurabilityKind.VOLATILE):             # <<<<<<<<<<<<<<
 *         '''__init__(k=DDSDurabilityKind.VOLATILE)
 *         '''
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.DurabilityQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":273
 *     :param depth: History depth (default: 1)
 *     '''
 *     def __init__(self, kind=DDSHistoryKind.KEEP_LAST, depth=1):             # <<<<<<<<<<<<<<
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 */

static PyObject *__pyx_pf_3dds_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_kind);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_kind);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_kind);
  __Pyx_INCREF(((PyObject *)__pyx_int_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_1));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_int_1));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_16HistoryQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_16HistoryQosPolicy___init__[] = "__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)\n        ";
static PyMethodDef __pyx_mdef_3dds_16HistoryQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_16HistoryQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_16HistoryQosPolicy___init__};
static PyObject *__pyx_pw_3dds_16HistoryQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kind = 0;
  PyObject *__pyx_v_depth = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_kind_2,&__pyx_n_s_depth,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_kind;
    values[2] = ((PyObject *)((PyObject *)__pyx_int_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind_2);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 273, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_kind = values[1];
    __pyx_v_depth = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 273, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.HistoryQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_16HistoryQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_kind, __pyx_v_depth);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_16HistoryQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_depth) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":276
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 *         QosPolicy.__init__(self, QosPolicyId.HISTORY_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._kind = kind
 *         self._depth = depth
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_HISTORY_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":277
 *         '''
 *         QosPolicy.__init__(self, QosPolicyId.HISTORY_QOS_POLICY_ID)
 *         self._kind = kind             # <<<<<<<<<<<<<<
 *         self._depth = depth
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kind, __pyx_v_kind) < 0) __PYX_ERR(0, 277, __pyx_L1_error)

  /* "dds.pyx":278
 *         QosPolicy.__init__(self, QosPolicyId.HISTORY_QOS_POLICY_ID)
 *         self._kind = kind
 *         self._depth = depth             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_depth_2, __pyx_v_depth) < 0) __PYX_ERR(0, 278, __pyx_L1_error)

  /* "dds.pyx":273
 *     :param depth: History depth (default: 1)
 *     '''
 *     def __init__(self, kind=DDSHistoryKind.KEEP_LAST, depth=1):             # <<<<<<<<<<<<<<
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.HistoryQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":281
 * 
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._depth
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_16HistoryQosPolicy_3depth(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_16HistoryQosPolicy_3depth = {"depth", (PyCFunction)__pyx_pw_3dds_16HistoryQosPolicy_3depth, METH_O, 0};
static PyObject *__pyx_pw_3dds_16HistoryQosPolicy_3depth(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("depth (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_16HistoryQosPolicy_2depth(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_16HistoryQosPolicy_2depth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("depth", 0);

  /* "dds.pyx":282
 *     @property
 *     def depth(self):
 *         return self._depth             # <<<<<<<<<<<<<<
 * 
 * class ResourceLimitsQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_depth_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":281
 * 
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._depth
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.HistoryQosPolicy.depth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":297
 *     :param max_samples_per_instance: maximum samples per instance (default: -1)
 *     '''
 *     def __init__(self, max_samples = DDS_LENGTH_UNLIMITED, max_instances = DDS_LENGTH_UNLIMITED, max_samples_per_instance = DDS_LENGTH_UNLIMITED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID)
 *         self._max_samples = max_samples
 */

static PyObject *__pyx_pf_3dds_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_samples);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_samples);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_samples);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_instances);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_instances);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_instances);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_samples_per_instance);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_samples_per_instance);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_max_samples_per_instance);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_23ResourceLimitsQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_23ResourceLimitsQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_23ResourceLimitsQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_23ResourceLimitsQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_max_samples = 0;
  PyObject *__pyx_v_max_instances = 0;
  PyObject *__pyx_v_max_samples_per_instance = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_max_samples,&__pyx_n_s_max_instances,&__pyx_n_s_max_samples_per_instance,0};
    PyObject* values[4] = {0,0,0,0};
    __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_max_samples;
    values[2] = __pyx_dynamic_args->__pyx_arg_max_instances;
    values[3] = __pyx_dynamic_args->__pyx_arg_max_samples_per_instance;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_samples);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_instances);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_samples_per_instance);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 297, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_max_samples = values[1];
    __pyx_v_max_instances = values[2];
    __pyx_v_max_samples_per_instance = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 297, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.ResourceLimitsQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_23ResourceLimitsQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_max_samples, __pyx_v_max_instances, __pyx_v_max_samples_per_instance);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_23ResourceLimitsQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_samples, PyObject *__pyx_v_max_instances, PyObject *__pyx_v_max_samples_per_instance) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":298
 *     '''
 *     def __init__(self, max_samples = DDS_LENGTH_UNLIMITED, max_instances = DDS_LENGTH_UNLIMITED, max_samples_per_instance = DDS_LENGTH_UNLIMITED):
 *         QosPolicy.__init__(self, QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._max_samples = max_samples
 *         self._max_instances = max_instances
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RESOURCELIMITS_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":299
 *     def __init__(self, max_samples = DDS_LENGTH_UNLIMITED, max_instances = DDS_LENGTH_UNLIMITED, max_samples_per_instance = DDS_LENGTH_UNLIMITED):
 *         QosPolicy.__init__(self, QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID)
 *         self._max_samples = max_samples             # <<<<<<<<<<<<<<
 *         self._max_instances = max_instances
 *         self._max_samples_per_instance = max_samples_per_instance
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_samples_2, __pyx_v_max_samples) < 0) __PYX_ERR(0, 299, __pyx_L1_error)

  /* "dds.pyx":300
 *         QosPolicy.__init__(self, QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID)
 *         self._max_samples = max_samples
 *         self._max_instances = max_instances             # <<<<<<<<<<<<<<
 *         self._max_samples_per_instance = max_samples_per_instance
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_instances_2, __pyx_v_max_instances) < 0) __PYX_ERR(0, 300, __pyx_L1_error)

  /* "dds.pyx":301
 *         self._max_samples = max_samples
 *         self._max_instances = max_instances
 *         self._max_samples_per_instance = max_samples_per_instance             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_samples_per_instance_2, __pyx_v_max_samples_per_instance) < 0) __PYX_ERR(0, 301, __pyx_L1_error)

  /* "dds.pyx":297
 *     :param max_samples_per_instance: maximum samples per instance (default: -1)
 *     '''
 *     def __init__(self, max_samples = DDS_LENGTH_UNLIMITED, max_instances = DDS_LENGTH_UNLIMITED, max_samples_per_instance = DDS_LENGTH_UNLIMITED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID)
 *         self._max_samples = max_samples
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.ResourceLimitsQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":304
 * 
 *     @property
 *     def max_samples(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_23ResourceLimitsQosPolicy_3max_samples(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_23ResourceLimitsQosPolicy_3max_samples = {"max_samples", (PyCFunction)__pyx_pw_3dds_23ResourceLimitsQosPolicy_3max_samples, METH_O, 0};
static PyObject *__pyx_pw_3dds_23ResourceLimitsQosPolicy_3max_samples(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_samples (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_23ResourceLimitsQosPolicy_2max_samples(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_23ResourceLimitsQosPolicy_2max_samples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("max_samples", 0);

  /* "dds.pyx":305
 *     @property
 *     def max_samples(self):
 *         return self._max_samples             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_samples_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":304
 * 
 *     @property
 *     def max_samples(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.ResourceLimitsQosPolicy.max_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":308
 * 
 *     @property
 *     def max_instances(self):             # <<<<<<<<<<<<<<
 *         return self._max_instances
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_23ResourceLimitsQosPolicy_5max_instances(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_23ResourceLimitsQosPolicy_5max_instances = {"max_instances", (PyCFunction)__pyx_pw_3dds_23ResourceLimitsQosPolicy_5max_instances, METH_O, 0};
static PyObject *__pyx_pw_3dds_23ResourceLimitsQosPolicy_5max_instances(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_instances (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_23ResourceLimitsQosPolicy_4max_instances(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_23ResourceLimitsQosPolicy_4max_instances(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("max_instances", 0);

  /* "dds.pyx":309
 *     @property
 *     def max_instances(self):
 *         return self._max_instances             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_instances_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":308
 * 
 *     @property
 *     def max_instances(self):             # <<<<<<<<<<<<<<
 *         return self._max_instances
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.ResourceLimitsQosPolicy.max_instances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":312
 * 
 *     @property
 *     def max_samples_per_instance(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples_per_instance
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_23ResourceLimitsQosPolicy_7max_samples_per_instance(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_23ResourceLimitsQosPolicy_7max_samples_per_instance = {"max_samples_per_instance", (PyCFunction)__pyx_pw_3dds_23ResourceLimitsQosPolicy_7max_samples_per_instance, METH_O, 0};
static PyObject *__pyx_pw_3dds_23ResourceLimitsQosPolicy_7max_samples_per_instance(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_samples_per_instance (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_23ResourceLimitsQosPolicy_6max_samples_per_instance(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_23ResourceLimitsQosPolicy_6max_samples_per_instance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("max_samples_per_instance", 0);

  /* "dds.pyx":313
 *     @property
 *     def max_samples_per_instance(self):
 *         return self._max_samples_per_instance             # <<<<<<<<<<<<<<
 * 
 * class PresentationQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_samples_per_instance_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":312
 * 
 *     @property
 *     def max_samples_per_instance(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples_per_instance
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.ResourceLimitsQosPolicy.max_samples_per_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":328
 *     :param ordered_access: Set ordered access (default: False)
 *     '''
 *     def __init__(self, kind=DDSPresentationAccessScopeKind.INSTANCE, coherent_access = False, ordered_access = False):             # <<<<<<<<<<<<<<
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 */

static PyObject *__pyx_pf_3dds_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_kind);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_kind);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_kind);
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_False));
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_False));
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_21PresentationQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_21PresentationQosPolicy___init__[] = "__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)\n        ";
static PyMethodDef __pyx_mdef_3dds_21PresentationQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_21PresentationQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_21PresentationQosPolicy___init__};
static PyObject *__pyx_pw_3dds_21PresentationQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kind = 0;
  PyObject *__pyx_v_coherent_access = 0;
  PyObject *__pyx_v_ordered_access = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_kind_2,&__pyx_n_s_coherent_access,&__pyx_n_s_ordered_access,0};
    PyObject* values[4] = {0,0,0,0};
    __pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_kind;
    values[2] = ((PyObject *)((PyObject *)Py_False));
    values[3] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind_2);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coherent_access);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ordered_access);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 328, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_kind = values[1];
    __pyx_v_coherent_access = values[2];
    __pyx_v_ordered_access = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 328, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.PresentationQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_21PresentationQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_kind, __pyx_v_coherent_access, __pyx_v_ordered_access);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_21PresentationQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_coherent_access, PyObject *__pyx_v_ordered_access) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":331
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 *         QosPolicy.__init__(self, QosPolicyId.PRESENTATION_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._kind = kind
 *         self._coherent_access = coherent_access
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PRESENTATION_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":332
 *         '''
 *         QosPolicy.__init__(self, QosPolicyId.PRESENTATION_QOS_POLICY_ID)
 *         self._kind = kind             # <<<<<<<<<<<<<<
 *         self._coherent_access = coherent_access
 *         self._ordered_access = ordered_access
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kind, __pyx_v_kind) < 0) __PYX_ERR(0, 332, __pyx_L1_error)

  /* "dds.pyx":333
 *         QosPolicy.__init__(self, QosPolicyId.PRESENTATION_QOS_POLICY_ID)
 *         self._kind = kind
 *         self._coherent_access = coherent_access             # <<<<<<<<<<<<<<
 *         self._ordered_access = ordered_access
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_coherent_access_2, __pyx_v_coherent_access) < 0) __PYX_ERR(0, 333, __pyx_L1_error)

  /* "dds.pyx":334
 *         self._kind = kind
 *         self._coherent_access = coherent_access
 *         self._ordered_access = ordered_access             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ordered_access_2, __pyx_v_ordered_access) < 0) __PYX_ERR(0, 334, __pyx_L1_error)

  /* "dds.pyx":328
 *     :param ordered_access: Set ordered access (default: False)
 *     '''
 *     def __init__(self, kind=DDSPresentationAccessScopeKind.INSTANCE, coherent_access = False, ordered_access = False):             # <<<<<<<<<<<<<<
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.PresentationQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":337
 * 
 *     @property
 *     def coherent_access(self):             # <<<<<<<<<<<<<<
 *         return self._coherent_access
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_21PresentationQosPolicy_3coherent_access(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_21PresentationQosPolicy_3coherent_access = {"coherent_access", (PyCFunction)__pyx_pw_3dds_21PresentationQosPolicy_3coherent_access, METH_O, 0};
static PyObject *__pyx_pw_3dds_21PresentationQosPolicy_3coherent_access(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("coherent_access (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_21PresentationQosPolicy_2coherent_access(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_21PresentationQosPolicy_2coherent_access(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("coherent_access", 0);

  /* "dds.pyx":338
 *     @property
 *     def coherent_access(self):
 *         return self._coherent_access             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coherent_access_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":337
 * 
 *     @property
 *     def coherent_access(self):             # <<<<<<<<<<<<<<
 *         return self._coherent_access
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.PresentationQosPolicy.coherent_access", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":341
 * 
 *     @property
 *     def ordered_access(self):             # <<<<<<<<<<<<<<
 *         return self._ordered_access
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_21PresentationQosPolicy_5ordered_access(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_21PresentationQosPolicy_5ordered_access = {"ordered_access", (PyCFunction)__pyx_pw_3dds_21PresentationQosPolicy_5ordered_access, METH_O, 0};
static PyObject *__pyx_pw_3dds_21PresentationQosPolicy_5ordered_access(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ordered_access (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_21PresentationQosPolicy_4ordered_access(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_21PresentationQosPolicy_4ordered_access(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ordered_access", 0);

  /* "dds.pyx":342
 *     @property
 *     def ordered_access(self):
 *         return self._ordered_access             # <<<<<<<<<<<<<<
 * 
 * class LifespanQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ordered_access_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":341
 * 
 *     @property
 *     def ordered_access(self):             # <<<<<<<<<<<<<<
 *         return self._ordered_access
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.PresentationQosPolicy.ordered_access", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":352
 * 
 *     '''
 *     def __init__(self, lifespan = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LIFESPAN_QOS_POLICY_ID)
 *         self._lifespan = lifespan.value
 */

static PyObject *__pyx_pf_3dds_14__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lifespan);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lifespan);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lifespan);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17LifespanQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_17LifespanQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_17LifespanQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_17LifespanQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_lifespan = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_lifespan,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults4 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_lifespan;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lifespan);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 352, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_lifespan = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 352, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.LifespanQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_17LifespanQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_lifespan);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17LifespanQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lifespan) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":353
 *     '''
 *     def __init__(self, lifespan = DDSDuration.infinity()):
 *         QosPolicy.__init__(self, QosPolicyId.LIFESPAN_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._lifespan = lifespan.value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LIFESPAN_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":354
 *     def __init__(self, lifespan = DDSDuration.infinity()):
 *         QosPolicy.__init__(self, QosPolicyId.LIFESPAN_QOS_POLICY_ID)
 *         self._lifespan = lifespan.value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lifespan, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lifespan_2, __pyx_t_1) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":352
 * 
 *     '''
 *     def __init__(self, lifespan = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LIFESPAN_QOS_POLICY_ID)
 *         self._lifespan = lifespan.value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.LifespanQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":357
 * 
 *     @property
 *     def lifespan(self):             # <<<<<<<<<<<<<<
 *         return self._lifespan
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17LifespanQosPolicy_3lifespan(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_17LifespanQosPolicy_3lifespan = {"lifespan", (PyCFunction)__pyx_pw_3dds_17LifespanQosPolicy_3lifespan, METH_O, 0};
static PyObject *__pyx_pw_3dds_17LifespanQosPolicy_3lifespan(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lifespan (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_17LifespanQosPolicy_2lifespan(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17LifespanQosPolicy_2lifespan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lifespan", 0);

  /* "dds.pyx":358
 *     @property
 *     def lifespan(self):
 *         return self._lifespan             # <<<<<<<<<<<<<<
 * 
 * class DeadlineQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lifespan_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":357
 * 
 *     @property
 *     def lifespan(self):             # <<<<<<<<<<<<<<
 *         return self._lifespan
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.LifespanQosPolicy.lifespan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":368
 * 
 *     '''
 *     def __init__(self, deadline = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DEADLINE_QOS_POLICY_ID)
 *         self._deadline = deadline.value
 */

static PyObject *__pyx_pf_3dds_16__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_deadline);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_deadline);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_deadline);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DeadlineQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_17DeadlineQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_17DeadlineQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_17DeadlineQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_deadline = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_deadline,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults5 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_deadline;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deadline);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 368, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_deadline = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 368, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DeadlineQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_17DeadlineQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_deadline);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DeadlineQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_deadline) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":369
 *     '''
 *     def __init__(self, deadline = DDSDuration.infinity()):
 *         QosPolicy.__init__(self, QosPolicyId.DEADLINE_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._deadline = deadline.value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DEADLINE_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":370
 *     def __init__(self, deadline = DDSDuration.infinity()):
 *         QosPolicy.__init__(self, QosPolicyId.DEADLINE_QOS_POLICY_ID)
 *         self._deadline = deadline.value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_deadline, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_deadline_2, __pyx_t_1) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":368
 * 
 *     '''
 *     def __init__(self, deadline = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DEADLINE_QOS_POLICY_ID)
 *         self._deadline = deadline.value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.DeadlineQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":373
 * 
 *     @property
 *     def deadline(self):             # <<<<<<<<<<<<<<
 *         return self._deadline
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DeadlineQosPolicy_3deadline(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_17DeadlineQosPolicy_3deadline = {"deadline", (PyCFunction)__pyx_pw_3dds_17DeadlineQosPolicy_3deadline, METH_O, 0};
static PyObject *__pyx_pw_3dds_17DeadlineQosPolicy_3deadline(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deadline (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_17DeadlineQosPolicy_2deadline(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DeadlineQosPolicy_2deadline(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("deadline", 0);

  /* "dds.pyx":374
 *     @property
 *     def deadline(self):
 *         return self._deadline             # <<<<<<<<<<<<<<
 * 
 * class LatencyBudgetQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_deadline_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":373
 * 
 *     @property
 *     def deadline(self):             # <<<<<<<<<<<<<<
 *         return self._deadline
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DeadlineQosPolicy.deadline", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":384
 * 
 *     '''
 *     def __init__(self, duration = DDSDuration()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID)
 *         self._duration = duration.value
 */

static PyObject *__pyx_pf_3dds_18__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_duration);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_duration);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_duration);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_22LatencyBudgetQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_22LatencyBudgetQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_22LatencyBudgetQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_22LatencyBudgetQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_duration = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_duration,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults6 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_duration;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_duration);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 384, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_duration = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 384, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.LatencyBudgetQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_22LatencyBudgetQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_duration);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_22LatencyBudgetQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_duration) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":385
 *     '''
 *     def __init__(self, duration = DDSDuration()):
 *         QosPolicy.__init__(self, QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._duration = duration.value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LATENCYBUDGET_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":386
 *     def __init__(self, duration = DDSDuration()):
 *         QosPolicy.__init__(self, QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID)
 *         self._duration = duration.value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_duration, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_duration_2, __pyx_t_1) < 0) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":384
 * 
 *     '''
 *     def __init__(self, duration = DDSDuration()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID)
 *         self._duration = duration.value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.LatencyBudgetQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":389
 * 
 *     @property
 *     def duration(self):             # <<<<<<<<<<<<<<
 *         return self._duration
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_22LatencyBudgetQosPolicy_3duration(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_22LatencyBudgetQosPolicy_3duration = {"duration", (PyCFunction)__pyx_pw_3dds_22LatencyBudgetQosPolicy_3duration, METH_O, 0};
static PyObject *__pyx_pw_3dds_22LatencyBudgetQosPolicy_3duration(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("duration (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_22LatencyBudgetQosPolicy_2duration(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_22LatencyBudgetQosPolicy_2duration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("duration", 0);

  /* "dds.pyx":390
 *     @property
 *     def duration(self):
 *         return self._duration             # <<<<<<<<<<<<<<
 * 
 * class OwnershipQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_duration_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":389
 * 
 *     @property
 *     def duration(self):             # <<<<<<<<<<<<<<
 *         return self._duration
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.LatencyBudgetQosPolicy.duration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":400
 * 
 *     '''
 *     def __init__(self, kind=DDSOwnershipKind.SHARED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIP_QOS_POLICY_ID)
 *         self._kind = kind
 */

static PyObject *__pyx_pf_3dds_20__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_kind);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_kind);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_kind);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_18OwnershipQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_18OwnershipQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_18OwnershipQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_18OwnershipQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kind = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_kind_2,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults7 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_kind;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind_2);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 400, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_kind = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 400, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.OwnershipQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_18OwnershipQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_kind);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_18OwnershipQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":401
 *     '''
 *     def __init__(self, kind=DDSOwnershipKind.SHARED):
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIP_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._kind = kind
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OWNERSHIP_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":402
 *     def __init__(self, kind=DDSOwnershipKind.SHARED):
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIP_QOS_POLICY_ID)
 *         self._kind = kind             # <<<<<<<<<<<<<<
 * 
 * class OwnershipStrengthQosPolicy(QosPolicy):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kind, __pyx_v_kind) < 0) __PYX_ERR(0, 402, __pyx_L1_error)

  /* "dds.pyx":400
 * 
 *     '''
 *     def __init__(self, kind=DDSOwnershipKind.SHARED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIP_QOS_POLICY_ID)
 *         self._kind = kind
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.OwnershipQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":412
 * 
 *     '''
 *     def __init__(self, value = 0):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID)
 *         self._value = value
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26OwnershipStrengthQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26OwnershipStrengthQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_26OwnershipStrengthQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_26OwnershipStrengthQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.OwnershipStrengthQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_26OwnershipStrengthQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26OwnershipStrengthQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":413
 *     '''
 *     def __init__(self, value = 0):
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._value = value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OWNERSHIPSTRENGTH_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":414
 *     def __init__(self, value = 0):
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID)
 *         self._value = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value_2, __pyx_v_value) < 0) __PYX_ERR(0, 414, __pyx_L1_error)

  /* "dds.pyx":412
 * 
 *     '''
 *     def __init__(self, value = 0):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID)
 *         self._value = value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.OwnershipStrengthQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":417
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26OwnershipStrengthQosPolicy_3value(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26OwnershipStrengthQosPolicy_3value = {"value", (PyCFunction)__pyx_pw_3dds_26OwnershipStrengthQosPolicy_3value, METH_O, 0};
static PyObject *__pyx_pw_3dds_26OwnershipStrengthQosPolicy_3value(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_26OwnershipStrengthQosPolicy_2value(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26OwnershipStrengthQosPolicy_2value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("value", 0);

  /* "dds.pyx":418
 *     @property
 *     def value(self):
 *         return self._value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":417
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.OwnershipStrengthQosPolicy.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":431
 *     :param lease_duration: Lease duration (default: infinity)
 *     '''
 *     def __init__(self, kind=DDSLivelinessKind.AUTOMATIC, lease_duration=DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LIVELINESS_QOS_POLICY_ID)
 *         self._kind = kind
 */

static PyObject *__pyx_pf_3dds_22__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_kind);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_kind);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_kind);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_lease_duration);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_lease_duration);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_lease_duration);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_19LivelinessQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_19LivelinessQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_19LivelinessQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_19LivelinessQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kind = 0;
  PyObject *__pyx_v_lease_duration = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_kind_2,&__pyx_n_s_lease_duration,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults8 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_kind;
    values[2] = __pyx_dynamic_args->__pyx_arg_lease_duration;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind_2);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lease_duration);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 431, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_kind = values[1];
    __pyx_v_lease_duration = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 431, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.LivelinessQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_19LivelinessQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_kind, __pyx_v_lease_duration);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_19LivelinessQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_lease_duration) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":432
 *     '''
 *     def __init__(self, kind=DDSLivelinessKind.AUTOMATIC, lease_duration=DDSDuration.infinity()):
 *         QosPolicy.__init__(self, QosPolicyId.LIVELINESS_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._kind = kind
 *         self._lease = lease_duration.value
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LIVELINESS_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":433
 *     def __init__(self, kind=DDSLivelinessKind.AUTOMATIC, lease_duration=DDSDuration.infinity()):
 *         QosPolicy.__init__(self, QosPolicyId.LIVELINESS_QOS_POLICY_ID)
 *         self._kind = kind             # <<<<<<<<<<<<<<
 *         self._lease = lease_duration.value
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kind, __pyx_v_kind) < 0) __PYX_ERR(0, 433, __pyx_L1_error)

  /* "dds.pyx":434
 *         QosPolicy.__init__(self, QosPolicyId.LIVELINESS_QOS_POLICY_ID)
 *         self._kind = kind
 *         self._lease = lease_duration.value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lease_duration, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lease, __pyx_t_1) < 0) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":431
 *     :param lease_duration: Lease duration (default: infinity)
 *     '''
 *     def __init__(self, kind=DDSLivelinessKind.AUTOMATIC, lease_duration=DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LIVELINESS_QOS_POLICY_ID)
 *         self._kind = kind
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.LivelinessQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":437
 * 
 *     @property
 *     def lease_duration(self):             # <<<<<<<<<<<<<<
 *         return self._lease
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_19LivelinessQosPolicy_3lease_duration(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_19LivelinessQosPolicy_3lease_duration = {"lease_duration", (PyCFunction)__pyx_pw_3dds_19LivelinessQosPolicy_3lease_duration, METH_O, 0};
static PyObject *__pyx_pw_3dds_19LivelinessQosPolicy_3lease_duration(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lease_duration (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_19LivelinessQosPolicy_2lease_duration(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_19LivelinessQosPolicy_2lease_duration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lease_duration", 0);

  /* "dds.pyx":438
 *     @property
 *     def lease_duration(self):
 *         return self._lease             # <<<<<<<<<<<<<<
 * 
 * class TimeBasedFilterQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lease); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":437
 * 
 *     @property
 *     def lease_duration(self):             # <<<<<<<<<<<<<<
 *         return self._lease
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.LivelinessQosPolicy.lease_duration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":448
 * 
 *     '''
 *     def __init__(self, minimum_separation = DDSDuration(0,0)):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID)
 *         self._minimum_separation = minimum_separation.value
 */

static PyObject *__pyx_pf_3dds_24__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_minimum_separation);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_minimum_separation);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_minimum_separation);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_24TimeBasedFilterQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_24TimeBasedFilterQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_24TimeBasedFilterQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_24TimeBasedFilterQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_minimum_separation = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_minimum_separation,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults9 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_minimum_separation;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_minimum_separation);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 448, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_minimum_separation = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 448, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.TimeBasedFilterQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_24TimeBasedFilterQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_minimum_separation);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_24TimeBasedFilterQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_minimum_separation) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":449
 *     '''
 *     def __init__(self, minimum_separation = DDSDuration(0,0)):
 *         QosPolicy.__init__(self, QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._minimum_separation = minimum_separation.value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TIMEBASEDFILTER_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":450
 *     def __init__(self, minimum_separation = DDSDuration(0,0)):
 *         QosPolicy.__init__(self, QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID)
 *         self._minimum_separation = minimum_separation.value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_minimum_separation, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_minimum_separation_2, __pyx_t_1) < 0) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":448
 * 
 *     '''
 *     def __init__(self, minimum_separation = DDSDuration(0,0)):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID)
 *         self._minimum_separation = minimum_separation.value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.TimeBasedFilterQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":453
 * 
 *     @property
 *     def minimum_separation(self):             # <<<<<<<<<<<<<<
 *         return self._minimum_separation
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_24TimeBasedFilterQosPolicy_3minimum_separation(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_24TimeBasedFilterQosPolicy_3minimum_separation = {"minimum_separation", (PyCFunction)__pyx_pw_3dds_24TimeBasedFilterQosPolicy_3minimum_separation, METH_O, 0};
static PyObject *__pyx_pw_3dds_24TimeBasedFilterQosPolicy_3minimum_separation(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("minimum_separation (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_24TimeBasedFilterQosPolicy_2minimum_separation(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_24TimeBasedFilterQosPolicy_2minimum_separation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("minimum_separation", 0);

  /* "dds.pyx":454
 *     @property
 *     def minimum_separation(self):
 *         return self._minimum_separation             # <<<<<<<<<<<<<<
 * 
 * class PartitionQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minimum_separation_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":453
 * 
 *     @property
 *     def minimum_separation(self):             # <<<<<<<<<<<<<<
 *         return self._minimum_separation
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.TimeBasedFilterQosPolicy.minimum_separation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":464
 * 
 *     '''
 *     def __init__(self, ps = []):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.PARTITION_QOS_POLICY_ID)
 *         self._names = ps
 */

static PyObject *__pyx_pf_3dds_26__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_ps);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_ps);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_ps);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_18PartitionQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_18PartitionQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_18PartitionQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_18PartitionQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_ps = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ps,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults10 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_ps;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ps);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 464, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_ps = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 464, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.PartitionQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_18PartitionQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_ps);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_18PartitionQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ps) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":465
 *     '''
 *     def __init__(self, ps = []):
 *         QosPolicy.__init__(self, QosPolicyId.PARTITION_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._names = ps
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PARTITION_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":466
 *     def __init__(self, ps = []):
 *         QosPolicy.__init__(self, QosPolicyId.PARTITION_QOS_POLICY_ID)
 *         self._names = ps             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_names, __pyx_v_ps) < 0) __PYX_ERR(0, 466, __pyx_L1_error)

  /* "dds.pyx":464
 * 
 *     '''
 *     def __init__(self, ps = []):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.PARTITION_QOS_POLICY_ID)
 *         self._names = ps
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.PartitionQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":469
 * 
 *     @property
 *     def ps(self):             # <<<<<<<<<<<<<<
 *         return self._names
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_18PartitionQosPolicy_3ps(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_18PartitionQosPolicy_3ps = {"ps", (PyCFunction)__pyx_pw_3dds_18PartitionQosPolicy_3ps, METH_O, 0};
static PyObject *__pyx_pw_3dds_18PartitionQosPolicy_3ps(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ps (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_18PartitionQosPolicy_2ps(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_18PartitionQosPolicy_2ps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ps", 0);

  /* "dds.pyx":470
 *     @property
 *     def ps(self):
 *         return self._names             # <<<<<<<<<<<<<<
 * 
 * class ReliabilityQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":469
 * 
 *     @property
 *     def ps(self):             # <<<<<<<<<<<<<<
 *         return self._names
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.PartitionQosPolicy.ps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":482
 *     :param max_blocking_time: Max blocking time (default: 100 milliseconds)
 *     '''
 *     def __init__(self, kind=DDSReliabilityKind.BEST_EFFORT, max_blocking_time=DDSDuration(0,100000000)):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.RELIABILITY_QOS_POLICY_ID)
 *         self._kind = kind
 */

static PyObject *__pyx_pf_3dds_28__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_kind);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_kind);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_kind);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_max_blocking_time);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_max_blocking_time);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_max_blocking_time);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_20ReliabilityQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_20ReliabilityQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_20ReliabilityQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_20ReliabilityQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kind = 0;
  PyObject *__pyx_v_max_blocking_time = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_kind_2,&__pyx_n_s_max_blocking_time,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults11 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_kind;
    values[2] = __pyx_dynamic_args->__pyx_arg_max_blocking_time;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind_2);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_blocking_time);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 482, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_kind = values[1];
    __pyx_v_max_blocking_time = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 482, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.ReliabilityQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_20ReliabilityQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_kind, __pyx_v_max_blocking_time);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_20ReliabilityQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_max_blocking_time) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":483
 *     '''
 *     def __init__(self, kind=DDSReliabilityKind.BEST_EFFORT, max_blocking_time=DDSDuration(0,100000000)):
 *         QosPolicy.__init__(self, QosPolicyId.RELIABILITY_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._kind = kind
 *         self._max_blocking_time = max_blocking_time.value
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RELIABILITY_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":484
 *     def __init__(self, kind=DDSReliabilityKind.BEST_EFFORT, max_blocking_time=DDSDuration(0,100000000)):
 *         QosPolicy.__init__(self, QosPolicyId.RELIABILITY_QOS_POLICY_ID)
 *         self._kind = kind             # <<<<<<<<<<<<<<
 *         self._max_blocking_time = max_blocking_time.value
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kind, __pyx_v_kind) < 0) __PYX_ERR(0, 484, __pyx_L1_error)

  /* "dds.pyx":485
 *         QosPolicy.__init__(self, QosPolicyId.RELIABILITY_QOS_POLICY_ID)
 *         self._kind = kind
 *         self._max_blocking_time = max_blocking_time.value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_blocking_time, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_blocking_time_2, __pyx_t_1) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":482
 *     :param max_blocking_time: Max blocking time (default: 100 milliseconds)
 *     '''
 *     def __init__(self, kind=DDSReliabilityKind.BEST_EFFORT, max_blocking_time=DDSDuration(0,100000000)):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.RELIABILITY_QOS_POLICY_ID)
 *         self._kind = kind
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.ReliabilityQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":488
 * 
 *     @property
 *     def max_blocking_time(self):             # <<<<<<<<<<<<<<
 *         return self._max_blocking_time
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_20ReliabilityQosPolicy_3max_blocking_time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_20ReliabilityQosPolicy_3max_blocking_time = {"max_blocking_time", (PyCFunction)__pyx_pw_3dds_20ReliabilityQosPolicy_3max_blocking_time, METH_O, 0};
static PyObject *__pyx_pw_3dds_20ReliabilityQosPolicy_3max_blocking_time(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_blocking_time (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_20ReliabilityQosPolicy_2max_blocking_time(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_20ReliabilityQosPolicy_2max_blocking_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("max_blocking_time", 0);

  /* "dds.pyx":489
 *     @property
 *     def max_blocking_time(self):
 *         return self._max_blocking_time             # <<<<<<<<<<<<<<
 * 
 * class TransportPriorityQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_blocking_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":488
 * 
 *     @property
 *     def max_blocking_time(self):             # <<<<<<<<<<<<<<
 *         return self._max_blocking_time
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.ReliabilityQosPolicy.max_blocking_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":499
 * 
 *     '''
 *     def __init__(self, value = 0):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID)
 *         self._value = value
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26TransportPriorityQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26TransportPriorityQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_26TransportPriorityQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_26TransportPriorityQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 499, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 499, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.TransportPriorityQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_26TransportPriorityQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26TransportPriorityQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":500
 *     '''
 *     def __init__(self, value = 0):
 *         QosPolicy.__init__(self, QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._value = value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TRANSPORTPRIORITY_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":501
 *     def __init__(self, value = 0):
 *         QosPolicy.__init__(self, QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID)
 *         self._value = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value_2, __pyx_v_value) < 0) __PYX_ERR(0, 501, __pyx_L1_error)

  /* "dds.pyx":499
 * 
 *     '''
 *     def __init__(self, value = 0):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID)
 *         self._value = value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.TransportPriorityQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":504
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26TransportPriorityQosPolicy_3value(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26TransportPriorityQosPolicy_3value = {"value", (PyCFunction)__pyx_pw_3dds_26TransportPriorityQosPolicy_3value, METH_O, 0};
static PyObject *__pyx_pw_3dds_26TransportPriorityQosPolicy_3value(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_26TransportPriorityQosPolicy_2value(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26TransportPriorityQosPolicy_2value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("value", 0);

  /* "dds.pyx":505
 *     @property
 *     def value(self):
 *         return self._value             # <<<<<<<<<<<<<<
 * 
 * class DestinationOrderQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":504
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.TransportPriorityQosPolicy.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":515
 * 
 *     '''
 *     def __init__(self, kind=DDSDestinationOrderKind.BY_RECEPTION_TIMESTAMP):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID)
 *         self._kind = kind
 */

static PyObject *__pyx_pf_3dds_30__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self)->__pyx_arg_kind);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self)->__pyx_arg_kind);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self)->__pyx_arg_kind);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_25DestinationOrderQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_25DestinationOrderQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_25DestinationOrderQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_25DestinationOrderQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kind = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_kind_2,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults12 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_kind;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind_2);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 515, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_kind = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 515, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DestinationOrderQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_25DestinationOrderQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_kind);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_25DestinationOrderQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":516
 *     '''
 *     def __init__(self, kind=DDSDestinationOrderKind.BY_RECEPTION_TIMESTAMP):
 *         QosPolicy.__init__(self, QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._kind = kind
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DESTINATIONORDER_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":517
 *     def __init__(self, kind=DDSDestinationOrderKind.BY_RECEPTION_TIMESTAMP):
 *         QosPolicy.__init__(self, QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID)
 *         self._kind = kind             # <<<<<<<<<<<<<<
 * 
 * class WriterDataLifecycleQosPolicy(QosPolicy):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_kind, __pyx_v_kind) < 0) __PYX_ERR(0, 517, __pyx_L1_error)

  /* "dds.pyx":515
 * 
 *     '''
 *     def __init__(self, kind=DDSDestinationOrderKind.BY_RECEPTION_TIMESTAMP):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID)
 *         self._kind = kind
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.DestinationOrderQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":527
 * 
 *     '''
 *     def __init__(self, autodispose_unregistered_instances = True):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autodispose_unregistered_instances = autodispose_unregistered_instances
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_28WriterDataLifecycleQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_28WriterDataLifecycleQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_28WriterDataLifecycleQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_28WriterDataLifecycleQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_autodispose_unregistered_instances = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_autodispose_unregistered_instanc,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_autodispose_unregistered_instanc);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 527, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_autodispose_unregistered_instances = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 527, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.WriterDataLifecycleQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_28WriterDataLifecycleQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_autodispose_unregistered_instances);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_28WriterDataLifecycleQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_autodispose_unregistered_instances) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":528
 *     '''
 *     def __init__(self, autodispose_unregistered_instances = True):
 *         QosPolicy.__init__(self, QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._autodispose_unregistered_instances = autodispose_unregistered_instances
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WRITERDATALIFECYCLE_QOS_POLICY_I); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":529
 *     def __init__(self, autodispose_unregistered_instances = True):
 *         QosPolicy.__init__(self, QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autodispose_unregistered_instances = autodispose_unregistered_instances             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_autodispose_unregistered_instan, __pyx_v_autodispose_unregistered_instances) < 0) __PYX_ERR(0, 529, __pyx_L1_error)

  /* "dds.pyx":527
 * 
 *     '''
 *     def __init__(self, autodispose_unregistered_instances = True):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autodispose_unregistered_instances = autodispose_unregistered_instances
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.WriterDataLifecycleQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":532
 * 
 *     @property
 *     def autodispose_unregistered_instances(self):             # <<<<<<<<<<<<<<
 *         return self._autodispose_unregistered_instances
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_28WriterDataLifecycleQosPolicy_3autodispose_unregistered_instances(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_28WriterDataLifecycleQosPolicy_3autodispose_unregistered_instances = {"autodispose_unregistered_instances", (PyCFunction)__pyx_pw_3dds_28WriterDataLifecycleQosPolicy_3autodispose_unregistered_instances, METH_O, 0};
static PyObject *__pyx_pw_3dds_28WriterDataLifecycleQosPolicy_3autodispose_unregistered_instances(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("autodispose_unregistered_instances (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_28WriterDataLifecycleQosPolicy_2autodispose_unregistered_instances(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_28WriterDataLifecycleQosPolicy_2autodispose_unregistered_instances(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("autodispose_unregistered_instances", 0);

  /* "dds.pyx":533
 *     @property
 *     def autodispose_unregistered_instances(self):
 *         return self._autodispose_unregistered_instances             # <<<<<<<<<<<<<<
 * 
 * class ReaderDataLifecycleQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_autodispose_unregistered_instan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":532
 * 
 *     @property
 *     def autodispose_unregistered_instances(self):             # <<<<<<<<<<<<<<
 *         return self._autodispose_unregistered_instances
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.WriterDataLifecycleQosPolicy.autodispose_unregistered_instances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":545
 *     :param autopurge_disposed_samples_delay: set autopurge_nowriter_samples (default: infinity)
 *     '''
 *     def __init__(self, autopurge_nowriter_samples = DDSDuration.infinity(), autopurge_disposed_samples_delay = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autopurge_nowriter_samples = autopurge_nowriter_samples.value
 */

static PyObject *__pyx_pf_3dds_32__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_autopurge_nowriter_samples);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_autopurge_nowriter_samples);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_autopurge_nowriter_samples);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_autopurge_disposed_samples_delay);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_autopurge_disposed_samples_delay);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_autopurge_disposed_samples_delay);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_28ReaderDataLifecycleQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_autopurge_nowriter_samples = 0;
  PyObject *__pyx_v_autopurge_disposed_samples_delay = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_autopurge_nowriter_samples,&__pyx_n_s_autopurge_disposed_samples_delay,0};
    PyObject* values[3] = {0,0,0};
    __pyx_defaults13 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_autopurge_nowriter_samples;
    values[2] = __pyx_dynamic_args->__pyx_arg_autopurge_disposed_samples_delay;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_autopurge_nowriter_samples);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_autopurge_disposed_samples_delay);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 545, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_autopurge_nowriter_samples = values[1];
    __pyx_v_autopurge_disposed_samples_delay = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 545, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.ReaderDataLifecycleQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_28ReaderDataLifecycleQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_autopurge_nowriter_samples, __pyx_v_autopurge_disposed_samples_delay);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_28ReaderDataLifecycleQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_autopurge_nowriter_samples, PyObject *__pyx_v_autopurge_disposed_samples_delay) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":546
 *     '''
 *     def __init__(self, autopurge_nowriter_samples = DDSDuration.infinity(), autopurge_disposed_samples_delay = DDSDuration.infinity()):
 *         QosPolicy.__init__(self, QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._autopurge_nowriter_samples = autopurge_nowriter_samples.value
 *         self._autopurge_disposed_samples_delay = autopurge_disposed_samples_delay.value
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_READERDATALIFECYCLE_QOS_POLICY_I); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":547
 *     def __init__(self, autopurge_nowriter_samples = DDSDuration.infinity(), autopurge_disposed_samples_delay = DDSDuration.infinity()):
 *         QosPolicy.__init__(self, QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autopurge_nowriter_samples = autopurge_nowriter_samples.value             # <<<<<<<<<<<<<<
 *         self._autopurge_disposed_samples_delay = autopurge_disposed_samples_delay.value
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_autopurge_nowriter_samples, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_autopurge_nowriter_samples_2, __pyx_t_1) < 0) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":548
 *         QosPolicy.__init__(self, QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autopurge_nowriter_samples = autopurge_nowriter_samples.value
 *         self._autopurge_disposed_samples_delay = autopurge_disposed_samples_delay.value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_autopurge_disposed_samples_delay, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_autopurge_disposed_samples_dela, __pyx_t_1) < 0) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":545
 *     :param autopurge_disposed_samples_delay: set autopurge_nowriter_samples (default: infinity)
 *     '''
 *     def __init__(self, autopurge_nowriter_samples = DDSDuration.infinity(), autopurge_disposed_samples_delay = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autopurge_nowriter_samples = autopurge_nowriter_samples.value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.ReaderDataLifecycleQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":551
 * 
 *     @property
 *     def autopurge_nowriter_samples(self):             # <<<<<<<<<<<<<<
 *         return self._autopurge_nowriter_samples
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_3autopurge_nowriter_samples(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_28ReaderDataLifecycleQosPolicy_3autopurge_nowriter_samples = {"autopurge_nowriter_samples", (PyCFunction)__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_3autopurge_nowriter_samples, METH_O, 0};
static PyObject *__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_3autopurge_nowriter_samples(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("autopurge_nowriter_samples (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_28ReaderDataLifecycleQosPolicy_2autopurge_nowriter_samples(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_28ReaderDataLifecycleQosPolicy_2autopurge_nowriter_samples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("autopurge_nowriter_samples", 0);

  /* "dds.pyx":552
 *     @property
 *     def autopurge_nowriter_samples(self):
 *         return self._autopurge_nowriter_samples             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_autopurge_nowriter_samples_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":551
 * 
 *     @property
 *     def autopurge_nowriter_samples(self):             # <<<<<<<<<<<<<<
 *         return self._autopurge_nowriter_samples
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.ReaderDataLifecycleQosPolicy.autopurge_nowriter_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":555
 * 
 *     @property
 *     def autopurge_disposed_samples_delay(self):             # <<<<<<<<<<<<<<
 *         return self._autopurge_disposed_samples_delay
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_5autopurge_disposed_samples_delay(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_28ReaderDataLifecycleQosPolicy_5autopurge_disposed_samples_delay = {"autopurge_disposed_samples_delay", (PyCFunction)__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_5autopurge_disposed_samples_delay, METH_O, 0};
static PyObject *__pyx_pw_3dds_28ReaderDataLifecycleQosPolicy_5autopurge_disposed_samples_delay(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("autopurge_disposed_samples_delay (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_28ReaderDataLifecycleQosPolicy_4autopurge_disposed_samples_delay(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_28ReaderDataLifecycleQosPolicy_4autopurge_disposed_samples_delay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("autopurge_disposed_samples_delay", 0);

  /* "dds.pyx":556
 *     @property
 *     def autopurge_disposed_samples_delay(self):
 *         return self._autopurge_disposed_samples_delay             # <<<<<<<<<<<<<<
 * 
 * class DurabilityServiceQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_autopurge_disposed_samples_dela); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":555
 * 
 *     @property
 *     def autopurge_disposed_samples_delay(self):             # <<<<<<<<<<<<<<
 *         return self._autopurge_disposed_samples_delay
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.ReaderDataLifecycleQosPolicy.autopurge_disposed_samples_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":581
 * 
 *     '''
 *     def __init__(self, service_cleanup_delay = DDSDuration(0,0), history_kind = DDSHistoryKind.KEEP_LAST,             # <<<<<<<<<<<<<<
 *                  history_depth = 1, max_samples = DDS_LENGTH_UNLIMITED,
 *                  max_instances = DDS_LENGTH_UNLIMITED,
 */

static PyObject *__pyx_pf_3dds_34__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_service_cleanup_delay);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_service_cleanup_delay);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_service_cleanup_delay);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_history_kind);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_history_kind);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_history_kind);
  __Pyx_INCREF(((PyObject *)__pyx_int_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_1));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_int_1));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_samples);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_samples);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_samples);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_instances);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_instances);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_instances);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_samples_per_instance);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_samples_per_instance);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_max_samples_per_instance);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26DurabilityServiceQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_26DurabilityServiceQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_service_cleanup_delay = 0;
  PyObject *__pyx_v_history_kind = 0;
  PyObject *__pyx_v_history_depth = 0;
  PyObject *__pyx_v_max_samples = 0;
  PyObject *__pyx_v_max_instances = 0;
  PyObject *__pyx_v_max_samples_per_instance = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_service_cleanup_delay,&__pyx_n_s_history_kind,&__pyx_n_s_history_depth,&__pyx_n_s_max_samples,&__pyx_n_s_max_instances,&__pyx_n_s_max_samples_per_instance,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    __pyx_defaults14 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_service_cleanup_delay;
    values[2] = __pyx_dynamic_args->__pyx_arg_history_kind;
    values[3] = ((PyObject *)((PyObject *)__pyx_int_1));
    values[4] = __pyx_dynamic_args->__pyx_arg_max_samples;
    values[5] = __pyx_dynamic_args->__pyx_arg_max_instances;
    values[6] = __pyx_dynamic_args->__pyx_arg_max_samples_per_instance;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_service_cleanup_delay);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_history_kind);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_history_depth);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_samples);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_instances);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_samples_per_instance);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 581, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_service_cleanup_delay = values[1];
    __pyx_v_history_kind = values[2];
    __pyx_v_history_depth = values[3];
    __pyx_v_max_samples = values[4];
    __pyx_v_max_instances = values[5];
    __pyx_v_max_samples_per_instance = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 581, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DurabilityServiceQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_26DurabilityServiceQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_service_cleanup_delay, __pyx_v_history_kind, __pyx_v_history_depth, __pyx_v_max_samples, __pyx_v_max_instances, __pyx_v_max_samples_per_instance);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_service_cleanup_delay, PyObject *__pyx_v_history_kind, PyObject *__pyx_v_history_depth, PyObject *__pyx_v_max_samples, PyObject *__pyx_v_max_instances, PyObject *__pyx_v_max_samples_per_instance) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":585
 *                  max_instances = DDS_LENGTH_UNLIMITED,
 *                  max_samples_per_instance = DDS_LENGTH_UNLIMITED):
 *         QosPolicy.__init__(self, QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._service_cleanup_delay = service_cleanup_delay.value
 *         self._history_kind = history_kind
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DURABILITYSERVICE_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":586
 *                  max_samples_per_instance = DDS_LENGTH_UNLIMITED):
 *         QosPolicy.__init__(self, QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID)
 *         self._service_cleanup_delay = service_cleanup_delay.value             # <<<<<<<<<<<<<<
 *         self._history_kind = history_kind
 *         self._history_depth = history_depth
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_service_cleanup_delay, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_service_cleanup_delay_2, __pyx_t_1) < 0) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":587
 *         QosPolicy.__init__(self, QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID)
 *         self._service_cleanup_delay = service_cleanup_delay.value
 *         self._history_kind = history_kind             # <<<<<<<<<<<<<<
 *         self._history_depth = history_depth
 *         self._max_samples = max_samples
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_history_kind_2, __pyx_v_history_kind) < 0) __PYX_ERR(0, 587, __pyx_L1_error)

  /* "dds.pyx":588
 *         self._service_cleanup_delay = service_cleanup_delay.value
 *         self._history_kind = history_kind
 *         self._history_depth = history_depth             # <<<<<<<<<<<<<<
 *         self._max_samples = max_samples
 *         self._max_instances = max_instances
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_history_depth_2, __pyx_v_history_depth) < 0) __PYX_ERR(0, 588, __pyx_L1_error)

  /* "dds.pyx":589
 *         self._history_kind = history_kind
 *         self._history_depth = history_depth
 *         self._max_samples = max_samples             # <<<<<<<<<<<<<<
 *         self._max_instances = max_instances
 *         self._max_samples_per_instance = max_samples_per_instance
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_samples_2, __pyx_v_max_samples) < 0) __PYX_ERR(0, 589, __pyx_L1_error)

  /* "dds.pyx":590
 *         self._history_depth = history_depth
 *         self._max_samples = max_samples
 *         self._max_instances = max_instances             # <<<<<<<<<<<<<<
 *         self._max_samples_per_instance = max_samples_per_instance
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_instances_2, __pyx_v_max_instances) < 0) __PYX_ERR(0, 590, __pyx_L1_error)

  /* "dds.pyx":591
 *         self._max_samples = max_samples
 *         self._max_instances = max_instances
 *         self._max_samples_per_instance = max_samples_per_instance             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_samples_per_instance_2, __pyx_v_max_samples_per_instance) < 0) __PYX_ERR(0, 591, __pyx_L1_error)

  /* "dds.pyx":581
 * 
 *     '''
 *     def __init__(self, service_cleanup_delay = DDSDuration(0,0), history_kind = DDSHistoryKind.KEEP_LAST,             # <<<<<<<<<<<<<<
 *                  history_depth = 1, max_samples = DDS_LENGTH_UNLIMITED,
 *                  max_instances = DDS_LENGTH_UNLIMITED,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.DurabilityServiceQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":594
 * 
 *     @property
 *     def service_cleanup_delay(self):             # <<<<<<<<<<<<<<
 *         return self._service_cleanup_delay
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_3service_cleanup_delay(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26DurabilityServiceQosPolicy_3service_cleanup_delay = {"service_cleanup_delay", (PyCFunction)__pyx_pw_3dds_26DurabilityServiceQosPolicy_3service_cleanup_delay, METH_O, 0};
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_3service_cleanup_delay(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("service_cleanup_delay (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_26DurabilityServiceQosPolicy_2service_cleanup_delay(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_2service_cleanup_delay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("service_cleanup_delay", 0);

  /* "dds.pyx":595
 *     @property
 *     def service_cleanup_delay(self):
 *         return self._service_cleanup_delay             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_service_cleanup_delay_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":594
 * 
 *     @property
 *     def service_cleanup_delay(self):             # <<<<<<<<<<<<<<
 *         return self._service_cleanup_delay
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DurabilityServiceQosPolicy.service_cleanup_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":598
 * 
 *     @property
 *     def history_kind(self):             # <<<<<<<<<<<<<<
 *         return self._history_kind
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_5history_kind(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26DurabilityServiceQosPolicy_5history_kind = {"history_kind", (PyCFunction)__pyx_pw_3dds_26DurabilityServiceQosPolicy_5history_kind, METH_O, 0};
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_5history_kind(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("history_kind (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_26DurabilityServiceQosPolicy_4history_kind(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_4history_kind(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("history_kind", 0);

  /* "dds.pyx":599
 *     @property
 *     def history_kind(self):
 *         return self._history_kind             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_history_kind_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":598
 * 
 *     @property
 *     def history_kind(self):             # <<<<<<<<<<<<<<
 *         return self._history_kind
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DurabilityServiceQosPolicy.history_kind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":602
 * 
 *     @property
 *     def history_depth(self):             # <<<<<<<<<<<<<<
 *         return self._history_depth
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_7history_depth(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26DurabilityServiceQosPolicy_7history_depth = {"history_depth", (PyCFunction)__pyx_pw_3dds_26DurabilityServiceQosPolicy_7history_depth, METH_O, 0};
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_7history_depth(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("history_depth (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_26DurabilityServiceQosPolicy_6history_depth(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_6history_depth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("history_depth", 0);

  /* "dds.pyx":603
 *     @property
 *     def history_depth(self):
 *         return self._history_depth             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_history_depth_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":602
 * 
 *     @property
 *     def history_depth(self):             # <<<<<<<<<<<<<<
 *         return self._history_depth
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DurabilityServiceQosPolicy.history_depth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":606
 * 
 *     @property
 *     def max_samples(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_9max_samples(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26DurabilityServiceQosPolicy_9max_samples = {"max_samples", (PyCFunction)__pyx_pw_3dds_26DurabilityServiceQosPolicy_9max_samples, METH_O, 0};
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_9max_samples(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_samples (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_26DurabilityServiceQosPolicy_8max_samples(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_8max_samples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("max_samples", 0);

  /* "dds.pyx":607
 *     @property
 *     def max_samples(self):
 *         return self._max_samples             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_samples_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":606
 * 
 *     @property
 *     def max_samples(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DurabilityServiceQosPolicy.max_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":610
 * 
 *     @property
 *     def max_instances(self):             # <<<<<<<<<<<<<<
 *         return self._max_instances
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_11max_instances(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26DurabilityServiceQosPolicy_11max_instances = {"max_instances", (PyCFunction)__pyx_pw_3dds_26DurabilityServiceQosPolicy_11max_instances, METH_O, 0};
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_11max_instances(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_instances (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_26DurabilityServiceQosPolicy_10max_instances(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_10max_instances(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("max_instances", 0);

  /* "dds.pyx":611
 *     @property
 *     def max_instances(self):
 *         return self._max_instances             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_instances_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":610
 * 
 *     @property
 *     def max_instances(self):             # <<<<<<<<<<<<<<
 *         return self._max_instances
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DurabilityServiceQosPolicy.max_instances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":614
 * 
 *     @property
 *     def max_samples_per_instance(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples_per_instance
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_13max_samples_per_instance(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_26DurabilityServiceQosPolicy_13max_samples_per_instance = {"max_samples_per_instance", (PyCFunction)__pyx_pw_3dds_26DurabilityServiceQosPolicy_13max_samples_per_instance, METH_O, 0};
static PyObject *__pyx_pw_3dds_26DurabilityServiceQosPolicy_13max_samples_per_instance(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_samples_per_instance (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_26DurabilityServiceQosPolicy_12max_samples_per_instance(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_26DurabilityServiceQosPolicy_12max_samples_per_instance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("max_samples_per_instance", 0);

  /* "dds.pyx":615
 *     @property
 *     def max_samples_per_instance(self):
 *         return self._max_samples_per_instance             # <<<<<<<<<<<<<<
 * 
 * class UserdataQosPolicy(QosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_samples_per_instance_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":614
 * 
 *     @property
 *     def max_samples_per_instance(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples_per_instance
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DurabilityServiceQosPolicy.max_samples_per_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":625
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.USERDATA_QOS_POLICY_ID)
 *         self._value = value
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17UserdataQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_17UserdataQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_17UserdataQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_17UserdataQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_s_));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 625, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 625, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.UserdataQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_17UserdataQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17UserdataQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":626
 *     '''
 *     def __init__(self, value = ''):
 *         QosPolicy.__init__(self, QosPolicyId.USERDATA_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._value = value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_USERDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":627
 *     def __init__(self, value = ''):
 *         QosPolicy.__init__(self, QosPolicyId.USERDATA_QOS_POLICY_ID)
 *         self._value = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value_2, __pyx_v_value) < 0) __PYX_ERR(0, 627, __pyx_L1_error)

  /* "dds.pyx":625
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.USERDATA_QOS_POLICY_ID)
 *         self._value = value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.UserdataQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":630
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17UserdataQosPolicy_3value(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_17UserdataQosPolicy_3value = {"value", (PyCFunction)__pyx_pw_3dds_17UserdataQosPolicy_3value, METH_O, 0};
static PyObject *__pyx_pw_3dds_17UserdataQosPolicy_3value(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_17UserdataQosPolicy_2value(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17UserdataQosPolicy_2value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("value", 0);

  /* "dds.pyx":631
 *     @property
 *     def value(self):
 *         return self._value             # <<<<<<<<<<<<<<
 * 
 * class TopicdataQosPolicy(UserdataQosPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":630
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.UserdataQosPolicy.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":641
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TOPICDATA_QOS_POLICY_ID)
 *         self._value = value
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_18TopicdataQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_18TopicdataQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_18TopicdataQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_18TopicdataQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_s_));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 641, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 641, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.TopicdataQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_18TopicdataQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_18TopicdataQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":642
 *     '''
 *     def __init__(self, value = ''):
 *         QosPolicy.__init__(self, QosPolicyId.TOPICDATA_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._value = value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TOPICDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":643
 *     def __init__(self, value = ''):
 *         QosPolicy.__init__(self, QosPolicyId.TOPICDATA_QOS_POLICY_ID)
 *         self._value = value             # <<<<<<<<<<<<<<
 * 
 * class GroupdataQosPolicy(UserdataQosPolicy):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value_2, __pyx_v_value) < 0) __PYX_ERR(0, 643, __pyx_L1_error)

  /* "dds.pyx":641
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TOPICDATA_QOS_POLICY_ID)
 *         self._value = value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.TopicdataQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":653
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.GROUPDATA_QOS_POLICY_ID)
 *         self._value = value
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_18GroupdataQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_18GroupdataQosPolicy_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_18GroupdataQosPolicy_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_18GroupdataQosPolicy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_s_));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 653, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 653, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.GroupdataQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_18GroupdataQosPolicy___init__(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_18GroupdataQosPolicy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":654
 *     '''
 *     def __init__(self, value = ''):
 *         QosPolicy.__init__(self, QosPolicyId.GROUPDATA_QOS_POLICY_ID)             # <<<<<<<<<<<<<<
 *         self._value = value
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GROUPDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":655
 *     def __init__(self, value = ''):
 *         QosPolicy.__init__(self, QosPolicyId.GROUPDATA_QOS_POLICY_ID)
 *         self._value = value             # <<<<<<<<<<<<<<
 * 
 * # The QoS wrapper.
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value_2, __pyx_v_value) < 0) __PYX_ERR(0, 655, __pyx_L1_error)

  /* "dds.pyx":653
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.GROUPDATA_QOS_POLICY_ID)
 *         self._value = value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.GroupdataQosPolicy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":669
 * 
 *     # The init function takes a list of QosPolicies
 *     def __cinit__(self, policies=[]):             # <<<<<<<<<<<<<<
 *         self._c_qos = dds.dds_qos_create() #gil_ok
 *         self._policies = {}
 */

/* Python wrapper */
static int __pyx_pw_3dds_3Qos_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_3Qos_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_policies = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_policies,0};
    PyObject* values[1] = {0};
    values[0] = __pyx_k__2;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_policies);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 669, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_policies = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 669, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Qos.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_3Qos___cinit__(((struct __pyx_obj_3dds_Qos *)__pyx_v_self), __pyx_v_policies);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_3Qos___cinit__(struct __pyx_obj_3dds_Qos *__pyx_v_self, PyObject *__pyx_v_policies) {
  PyObject *__pyx_v_p = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":670
 *     # The init function takes a list of QosPolicies
 *     def __cinit__(self, policies=[]):
 *         self._c_qos = dds.dds_qos_create() #gil_ok             # <<<<<<<<<<<<<<
 *         self._policies = {}
 *         for p in policies:
 */
  __pyx_v_self->_c_qos = dds_qos_create();

  /* "dds.pyx":671
 *     def __cinit__(self, policies=[]):
 *         self._c_qos = dds.dds_qos_create() #gil_ok
 *         self._policies = {}             # <<<<<<<<<<<<<<
 *         for p in policies:
 *             self._policies[p.id] = p
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_policies);
  __Pyx_DECREF(__pyx_v_self->_policies);
  __pyx_v_self->_policies = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":672
 *         self._c_qos = dds.dds_qos_create() #gil_ok
 *         self._policies = {}
 *         for p in policies:             # <<<<<<<<<<<<<<
 *             self._policies[p.id] = p
 *         self._apply_all()
 */
  if (likely(PyList_CheckExact(__pyx_v_policies)) || PyTuple_CheckExact(__pyx_v_policies)) {
    __pyx_t_1 = __pyx_v_policies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_policies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 672, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 672, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 672, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "dds.pyx":673
 *         self._policies = {}
 *         for p in policies:
 *             self._policies[p.id] = p             # <<<<<<<<<<<<<<
 *         self._apply_all()
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_id_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(PyObject_SetItem(__pyx_v_self->_policies, __pyx_t_4, __pyx_v_p) < 0)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "dds.pyx":672
 *         self._c_qos = dds.dds_qos_create() #gil_ok
 *         self._policies = {}
 *         for p in policies:             # <<<<<<<<<<<<<<
 *             self._policies[p.id] = p
 *         self._apply_all()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":674
 *         for p in policies:
 *             self._policies[p.id] = p
 *         self._apply_all()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_self->__pyx_vtab)->_apply_all(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":669
 * 
 *     # The init function takes a list of QosPolicies
 *     def __cinit__(self, policies=[]):             # <<<<<<<<<<<<<<
 *         self._c_qos = dds.dds_qos_create() #gil_ok
 *         self._policies = {}
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.Qos.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":676
 *         self._apply_all()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_qos is not NULL:
 *             dds.dds_qos_delete(self._c_qos) #gil_ok
 */

/* Python wrapper */
static void __pyx_pw_3dds_3Qos_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3dds_3Qos_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3dds_3Qos_2__dealloc__(((struct __pyx_obj_3dds_Qos *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3dds_3Qos_2__dealloc__(struct __pyx_obj_3dds_Qos *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "dds.pyx":677
 * 
 *     def __dealloc__(self):
 *         if self._c_qos is not NULL:             # <<<<<<<<<<<<<<
 *             dds.dds_qos_delete(self._c_qos) #gil_ok
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->_c_qos != NULL) != 0);
  if (__pyx_t_1) {

    /* "dds.pyx":678
 *     def __dealloc__(self):
 *         if self._c_qos is not NULL:
 *             dds.dds_qos_delete(self._c_qos) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *     def set_policies(self, policies):
 */
    dds_qos_delete(__pyx_v_self->_c_qos);

    /* "dds.pyx":677
 * 
 *     def __dealloc__(self):
 *         if self._c_qos is not NULL:             # <<<<<<<<<<<<<<
 *             dds.dds_qos_delete(self._c_qos) #gil_ok
 * 
 */
  }

  /* "dds.pyx":676
 *         self._apply_all()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_qos is not NULL:
 *             dds.dds_qos_delete(self._c_qos) #gil_ok
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "dds.pyx":680
 *             dds.dds_qos_delete(self._c_qos) #gil_ok
 * 
 *     def set_policies(self, policies):             # <<<<<<<<<<<<<<
 *         '''set_policies(policies)
 *         Set policies
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_3Qos_5set_policies(PyObject *__pyx_v_self, PyObject *__pyx_v_policies); /*proto*/
static char __pyx_doc_3dds_3Qos_4set_policies[] = "set_policies(policies)\n        Set policies\n        :type policies: list\n        :param policies: list of QoS policies\n        ";
static PyObject *__pyx_pw_3dds_3Qos_5set_policies(PyObject *__pyx_v_self, PyObject *__pyx_v_policies) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_policies (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_3Qos_4set_policies(((struct __pyx_obj_3dds_Qos *)__pyx_v_self), ((PyObject *)__pyx_v_policies));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_3Qos_4set_policies(struct __pyx_obj_3dds_Qos *__pyx_v_self, PyObject *__pyx_v_policies) {
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("set_policies", 0);

  /* "dds.pyx":686
 *         :param policies: list of QoS policies
 *         '''
 *         for p in policies:             # <<<<<<<<<<<<<<
 *             self._policies[p.id] = p
 *             self._apply_policy(p)
 */
  if (likely(PyList_CheckExact(__pyx_v_policies)) || PyTuple_CheckExact(__pyx_v_policies)) {
    __pyx_t_1 = __pyx_v_policies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_policies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 686, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 686, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 686, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "dds.pyx":687
 *         '''
 *         for p in policies:
 *             self._policies[p.id] = p             # <<<<<<<<<<<<<<
 *             self._apply_policy(p)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_id_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(PyObject_SetItem(__pyx_v_self->_policies, __pyx_t_4, __pyx_v_p) < 0)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "dds.pyx":688
 *         for p in policies:
 *             self._policies[p.id] = p
 *             self._apply_policy(p)             # <<<<<<<<<<<<<<
 * 
 *     cdef _apply_all(self):
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_self->__pyx_vtab)->_apply_policy(__pyx_v_self, __pyx_v_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "dds.pyx":686
 *         :param policies: list of QoS policies
 *         '''
 *         for p in policies:             # <<<<<<<<<<<<<<
 *             self._policies[p.id] = p
 *             self._apply_policy(p)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":680
 *             dds.dds_qos_delete(self._c_qos) #gil_ok
 * 
 *     def set_policies(self, policies):             # <<<<<<<<<<<<<<
 *         '''set_policies(policies)
 *         Set policies
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.Qos.set_policies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":690
 *             self._apply_policy(p)
 * 
 *     cdef _apply_all(self):             # <<<<<<<<<<<<<<
 *         for key, p in self._policies.items():
 *             self._apply_policy(p)
 */

static PyObject *__pyx_f_3dds_3Qos__apply_all(struct __pyx_obj_3dds_Qos *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  __Pyx_RefNannySetupContext("_apply_all", 0);

  /* "dds.pyx":691
 * 
 *     cdef _apply_all(self):
 *         for key, p in self._policies.items():             # <<<<<<<<<<<<<<
 *             self._apply_policy(p)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_policies, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 691, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 691, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 691, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 691, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 691, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 691, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "dds.pyx":692
 *     cdef _apply_all(self):
 *         for key, p in self._policies.items():
 *             self._apply_policy(p)             # <<<<<<<<<<<<<<
 * 
 *     cdef _apply_policy(self, policy):
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_self->__pyx_vtab)->_apply_policy(__pyx_v_self, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "dds.pyx":691
 * 
 *     cdef _apply_all(self):
 *         for key, p in self._policies.items():             # <<<<<<<<<<<<<<
 *             self._apply_policy(p)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":690
 *             self._apply_policy(p)
 * 
 *     cdef _apply_all(self):             # <<<<<<<<<<<<<<
 *         for key, p in self._policies.items():
 *             self._apply_policy(p)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds.Qos._apply_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":694
 *             self._apply_policy(p)
 * 
 *     cdef _apply_policy(self, policy):             # <<<<<<<<<<<<<<
 * 
 *         cdef char **_c_partitions = NULL;
 */

static PyObject *__pyx_f_3dds_3Qos__apply_policy(struct __pyx_obj_3dds_Qos *__pyx_v_self, PyObject *__pyx_v_policy) {
  char **__pyx_v__c_partitions;
  char *__pyx_v__c_xxxdata_value;
  size_t __pyx_v__c_xxxdata_length;
  PyObject *__pyx_v_partitions = NULL;
  PyObject *__pyx_v_numpar = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_bytes_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  size_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  Py_ssize_t __pyx_t_10;
  uint32_t __pyx_t_11;
  int __pyx_t_12;
  dds_durability_kind_t __pyx_t_13;
  enum dds_history_kind __pyx_t_14;
  int32_t __pyx_t_15;
  int32_t __pyx_t_16;
  int32_t __pyx_t_17;
  enum dds_presentation_access_scope_kind __pyx_t_18;
  dds_duration_t __pyx_t_19;
  enum dds_ownership_kind __pyx_t_20;
  enum dds_liveliness_kind __pyx_t_21;
  enum dds_reliability_kind __pyx_t_22;
  enum dds_destination_order_kind __pyx_t_23;
  dds_duration_t __pyx_t_24;
  int32_t __pyx_t_25;
  __Pyx_RefNannySetupContext("_apply_policy", 0);

  /* "dds.pyx":696
 *     cdef _apply_policy(self, policy):
 * 
 *         cdef char **_c_partitions = NULL;             # <<<<<<<<<<<<<<
 *         cdef char *_c_xxxdata_value = NULL
 *         cdef size_t _c_xxxdata_length = 0;
 */
  __pyx_v__c_partitions = NULL;

  /* "dds.pyx":697
 * 
 *         cdef char **_c_partitions = NULL;
 *         cdef char *_c_xxxdata_value = NULL             # <<<<<<<<<<<<<<
 *         cdef size_t _c_xxxdata_length = 0;
 * 
 */
  __pyx_v__c_xxxdata_value = NULL;

  /* "dds.pyx":698
 *         cdef char **_c_partitions = NULL;
 *         cdef char *_c_xxxdata_value = NULL
 *         cdef size_t _c_xxxdata_length = 0;             # <<<<<<<<<<<<<<
 * 
 *         if policy.id == QosPolicyId.PARTITION_QOS_POLICY_ID:
 */
  __pyx_v__c_xxxdata_length = 0;

  /* "dds.pyx":700
 *         cdef size_t _c_xxxdata_length = 0;
 * 
 *         if policy.id == QosPolicyId.PARTITION_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             partitions = policy.ps
 *             numpar = len(partitions)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PARTITION_QOS_POLICY_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":701
 * 
 *         if policy.id == QosPolicyId.PARTITION_QOS_POLICY_ID:
 *             partitions = policy.ps             # <<<<<<<<<<<<<<
 *             numpar = len(partitions)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_ps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_partitions = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "dds.pyx":702
 *         if policy.id == QosPolicyId.PARTITION_QOS_POLICY_ID:
 *             partitions = policy.ps
 *             numpar = len(partitions)             # <<<<<<<<<<<<<<
 * 
 *             if numpar > 0:
 */
    __pyx_t_5 = PyObject_Length(__pyx_v_partitions); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 702, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_numpar = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "dds.pyx":704
 *             numpar = len(partitions)
 * 
 *             if numpar > 0:             # <<<<<<<<<<<<<<
 *                 _c_partitions = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *                 if _c_partitions is NULL:
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_numpar, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 704, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "dds.pyx":705
 * 
 *             if numpar > 0:
 *                 _c_partitions = <char **>PyMem_Malloc(numpar * sizeof(char *))             # <<<<<<<<<<<<<<
 *                 if _c_partitions is NULL:
 *                     raise DDSException()
 */
      __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Multiply(__pyx_v_numpar, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 705, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v__c_partitions = ((char **)PyMem_Malloc(__pyx_t_6));

      /* "dds.pyx":706
 *             if numpar > 0:
 *                 _c_partitions = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *                 if _c_partitions is NULL:             # <<<<<<<<<<<<<<
 *                     raise DDSException()
 *                 for i in range(numpar):
 */
      __pyx_t_4 = ((__pyx_v__c_partitions == NULL) != 0);
      if (unlikely(__pyx_t_4)) {

        /* "dds.pyx":707
 *                 _c_partitions = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *                 if _c_partitions is NULL:
 *                     raise DDSException()             # <<<<<<<<<<<<<<
 *                 for i in range(numpar):
 *                     s = partitions[i].encode()
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 707, __pyx_L1_error)

        /* "dds.pyx":706
 *             if numpar > 0:
 *                 _c_partitions = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *                 if _c_partitions is NULL:             # <<<<<<<<<<<<<<
 *                     raise DDSException()
 *                 for i in range(numpar):
 */
      }

      /* "dds.pyx":708
 *                 if _c_partitions is NULL:
 *                     raise DDSException()
 *                 for i in range(numpar):             # <<<<<<<<<<<<<<
 *                     s = partitions[i].encode()
 *                     _c_partitions[i] = s
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_numpar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
        __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 708, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 708, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 708, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_7(__pyx_t_2);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 708, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "dds.pyx":709
 *                     raise DDSException()
 *                 for i in range(numpar):
 *                     s = partitions[i].encode()             # <<<<<<<<<<<<<<
 *                     _c_partitions[i] = s
 *             dds.dds_qset_partition(self._c_qos, numpar, <const char **>_c_partitions) #gil_ok
 */
        __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_partitions, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 709, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "dds.pyx":710
 *                 for i in range(numpar):
 *                     s = partitions[i].encode()
 *                     _c_partitions[i] = s             # <<<<<<<<<<<<<<
 *             dds.dds_qset_partition(self._c_qos, numpar, <const char **>_c_partitions) #gil_ok
 *             PyMem_Free(_c_partitions)
 */
        __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error)
        __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error)
        (__pyx_v__c_partitions[__pyx_t_10]) = __pyx_t_9;

        /* "dds.pyx":708
 *                 if _c_partitions is NULL:
 *                     raise DDSException()
 *                 for i in range(numpar):             # <<<<<<<<<<<<<<
 *                     s = partitions[i].encode()
 *                     _c_partitions[i] = s
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "dds.pyx":704
 *             numpar = len(partitions)
 * 
 *             if numpar > 0:             # <<<<<<<<<<<<<<
 *                 _c_partitions = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *                 if _c_partitions is NULL:
 */
    }

    /* "dds.pyx":711
 *                     s = partitions[i].encode()
 *                     _c_partitions[i] = s
 *             dds.dds_qset_partition(self._c_qos, numpar, <const char **>_c_partitions) #gil_ok             # <<<<<<<<<<<<<<
 *             PyMem_Free(_c_partitions)
 * 
 */
    __pyx_t_11 = __Pyx_PyInt_As_uint32_t(__pyx_v_numpar); if (unlikely((__pyx_t_11 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
    dds_qset_partition(__pyx_v_self->_c_qos, __pyx_t_11, ((char const **)__pyx_v__c_partitions));

    /* "dds.pyx":712
 *                     _c_partitions[i] = s
 *             dds.dds_qset_partition(self._c_qos, numpar, <const char **>_c_partitions) #gil_ok
 *             PyMem_Free(_c_partitions)             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID \
 */
    PyMem_Free(__pyx_v__c_partitions);

    /* "dds.pyx":700
 *         cdef size_t _c_xxxdata_length = 0;
 * 
 *         if policy.id == QosPolicyId.PARTITION_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             partitions = policy.ps
 *             numpar = len(partitions)
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":714
 *             PyMem_Free(_c_partitions)
 * 
 *         elif policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID \             # <<<<<<<<<<<<<<
 *                 or policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID \
 *                 or policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID :
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_USERDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_12) {
  } else {
    __pyx_t_4 = __pyx_t_12;
    goto __pyx_L8_bool_binop_done;
  }

  /* "dds.pyx":715
 * 
 *         elif policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID \
 *                 or policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID \             # <<<<<<<<<<<<<<
 *                 or policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID :
 *             bytes_value = None
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TOPICDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!__pyx_t_12) {
  } else {
    __pyx_t_4 = __pyx_t_12;
    goto __pyx_L8_bool_binop_done;
  }

  /* "dds.pyx":716
 *         elif policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID \
 *                 or policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID \
 *                 or policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID :             # <<<<<<<<<<<<<<
 *             bytes_value = None
 *             if isinstance(policy.value, str):
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GROUPDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_t_12;
  __pyx_L8_bool_binop_done:;

  /* "dds.pyx":714
 *             PyMem_Free(_c_partitions)
 * 
 *         elif policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID \             # <<<<<<<<<<<<<<
 *                 or policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID \
 *                 or policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID :
 */
  if (__pyx_t_4) {

    /* "dds.pyx":717
 *                 or policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID \
 *                 or policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID :
 *             bytes_value = None             # <<<<<<<<<<<<<<
 *             if isinstance(policy.value, str):
 *                 bytes_value = policy.value.encode('ISO-8859-1')
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_bytes_value = Py_None;

    /* "dds.pyx":718
 *                 or policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID :
 *             bytes_value = None
 *             if isinstance(policy.value, str):             # <<<<<<<<<<<<<<
 *                 bytes_value = policy.value.encode('ISO-8859-1')
 *             elif isinstance(policy.value, bytes):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyString_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_12 = (__pyx_t_4 != 0);
    if (__pyx_t_12) {

      /* "dds.pyx":719
 *             bytes_value = None
 *             if isinstance(policy.value, str):
 *                 bytes_value = policy.value.encode('ISO-8859-1')             # <<<<<<<<<<<<<<
 *             elif isinstance(policy.value, bytes):
 *                 bytes_value = policy.value
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_kp_s_ISO_8859_1) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_ISO_8859_1);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_bytes_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "dds.pyx":718
 *                 or policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID :
 *             bytes_value = None
 *             if isinstance(policy.value, str):             # <<<<<<<<<<<<<<
 *                 bytes_value = policy.value.encode('ISO-8859-1')
 *             elif isinstance(policy.value, bytes):
 */
      goto __pyx_L11;
    }

    /* "dds.pyx":720
 *             if isinstance(policy.value, str):
 *                 bytes_value = policy.value.encode('ISO-8859-1')
 *             elif isinstance(policy.value, bytes):             # <<<<<<<<<<<<<<
 *                 bytes_value = policy.value
 *             if bytes_value is not None:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = PyBytes_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_12 != 0);
    if (__pyx_t_4) {

      /* "dds.pyx":721
 *                 bytes_value = policy.value.encode('ISO-8859-1')
 *             elif isinstance(policy.value, bytes):
 *                 bytes_value = policy.value             # <<<<<<<<<<<<<<
 *             if bytes_value is not None:
 *                 _c_xxxdata_value = <char *>bytes_value
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_bytes_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "dds.pyx":720
 *             if isinstance(policy.value, str):
 *                 bytes_value = policy.value.encode('ISO-8859-1')
 *             elif isinstance(policy.value, bytes):             # <<<<<<<<<<<<<<
 *                 bytes_value = policy.value
 *             if bytes_value is not None:
 */
    }
    __pyx_L11:;

    /* "dds.pyx":722
 *             elif isinstance(policy.value, bytes):
 *                 bytes_value = policy.value
 *             if bytes_value is not None:             # <<<<<<<<<<<<<<
 *                 _c_xxxdata_value = <char *>bytes_value
 *                 _c_xxxdata_length = len(bytes_value)
 */
    __pyx_t_4 = (__pyx_v_bytes_value != Py_None);
    __pyx_t_12 = (__pyx_t_4 != 0);
    if (__pyx_t_12) {

      /* "dds.pyx":723
 *                 bytes_value = policy.value
 *             if bytes_value is not None:
 *                 _c_xxxdata_value = <char *>bytes_value             # <<<<<<<<<<<<<<
 *                 _c_xxxdata_length = len(bytes_value)
 *                 if policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID:
 */
      __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_bytes_value); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 723, __pyx_L1_error)
      __pyx_v__c_xxxdata_value = ((char *)__pyx_t_9);

      /* "dds.pyx":724
 *             if bytes_value is not None:
 *                 _c_xxxdata_value = <char *>bytes_value
 *                 _c_xxxdata_length = len(bytes_value)             # <<<<<<<<<<<<<<
 *                 if policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_userdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 */
      __pyx_t_5 = PyObject_Length(__pyx_v_bytes_value); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 724, __pyx_L1_error)
      __pyx_v__c_xxxdata_length = __pyx_t_5;

      /* "dds.pyx":725
 *                 _c_xxxdata_value = <char *>bytes_value
 *                 _c_xxxdata_length = len(bytes_value)
 *                 if policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *                     dds.dds_qset_userdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_USERDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_12) {

        /* "dds.pyx":726
 *                 _c_xxxdata_length = len(bytes_value)
 *                 if policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_userdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok             # <<<<<<<<<<<<<<
 *                 elif policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_topicdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 */
        dds_qset_userdata(__pyx_v_self->_c_qos, ((void const *)__pyx_v__c_xxxdata_value), __pyx_v__c_xxxdata_length);

        /* "dds.pyx":725
 *                 _c_xxxdata_value = <char *>bytes_value
 *                 _c_xxxdata_length = len(bytes_value)
 *                 if policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *                     dds.dds_qset_userdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID:
 */
        goto __pyx_L13;
      }

      /* "dds.pyx":727
 *                 if policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_userdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *                     dds.dds_qset_topicdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TOPICDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_12) {

        /* "dds.pyx":728
 *                     dds.dds_qset_userdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_topicdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok             # <<<<<<<<<<<<<<
 *                 elif policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_groupdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 */
        dds_qset_topicdata(__pyx_v_self->_c_qos, ((void const *)__pyx_v__c_xxxdata_value), __pyx_v__c_xxxdata_length);

        /* "dds.pyx":727
 *                 if policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_userdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *                     dds.dds_qset_topicdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID:
 */
        goto __pyx_L13;
      }

      /* "dds.pyx":729
 *                 elif policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_topicdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *                     dds.dds_qset_groupdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GROUPDATA_QOS_POLICY_ID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_12) {

        /* "dds.pyx":730
 *                     dds.dds_qset_topicdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_groupdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.DURABILITY_QOS_POLICY_ID:
 */
        dds_qset_groupdata(__pyx_v_self->_c_qos, ((void const *)__pyx_v__c_xxxdata_value), __pyx_v__c_xxxdata_length);

        /* "dds.pyx":729
 *                 elif policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID:
 *                     dds.dds_qset_topicdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 *                 elif policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *                     dds.dds_qset_groupdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 * 
 */
      }
      __pyx_L13:;

      /* "dds.pyx":722
 *             elif isinstance(policy.value, bytes):
 *                 bytes_value = policy.value
 *             if bytes_value is not None:             # <<<<<<<<<<<<<<
 *                 _c_xxxdata_value = <char *>bytes_value
 *                 _c_xxxdata_length = len(bytes_value)
 */
    }

    /* "dds.pyx":714
 *             PyMem_Free(_c_partitions)
 * 
 *         elif policy.id == QosPolicyId.USERDATA_QOS_POLICY_ID \             # <<<<<<<<<<<<<<
 *                 or policy.id == QosPolicyId.TOPICDATA_QOS_POLICY_ID \
 *                 or policy.id == QosPolicyId.GROUPDATA_QOS_POLICY_ID :
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":732
 *                     dds.dds_qset_groupdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.DURABILITY_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_durability(self._c_qos, policy.kind.value) #gil_ok
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DURABILITY_QOS_POLICY_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_12) {

    /* "dds.pyx":733
 * 
 *         elif policy.id == QosPolicyId.DURABILITY_QOS_POLICY_ID:
 *             dds.dds_qset_durability(self._c_qos, policy.kind.value) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.HISTORY_QOS_POLICY_ID:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_kind_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_13 = ((dds_durability_kind_t)__Pyx_PyInt_As_dds_durability_kind_t(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    dds_qset_durability(__pyx_v_self->_c_qos, __pyx_t_13);

    /* "dds.pyx":732
 *                     dds.dds_qset_groupdata(self._c_qos, <const void *> _c_xxxdata_value, _c_xxxdata_length) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.DURABILITY_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_durability(self._c_qos, policy.kind.value) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":735
 *             dds.dds_qset_durability(self._c_qos, policy.kind.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.HISTORY_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_history(self._c_qos, policy.kind.value, policy.depth) #gil_ok
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_HISTORY_QOS_POLICY_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_12) {

    /* "dds.pyx":736
 * 
 *         elif policy.id == QosPolicyId.HISTORY_QOS_POLICY_ID:
 *             dds.dds_qset_history(self._c_qos, policy.kind.value, policy.depth) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_kind_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_14 = ((enum dds_history_kind)__Pyx_PyInt_As_enum__dds_history_kind(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_depth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_15 = __Pyx_PyInt_As_int32_t(__pyx_t_2); if (unlikely((__pyx_t_15 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    dds_qset_history(__pyx_v_self->_c_qos, __pyx_t_14, __pyx_t_15);

    /* "dds.pyx":735
 *             dds.dds_qset_durability(self._c_qos, policy.kind.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.HISTORY_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_history(self._c_qos, policy.kind.value, policy.depth) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":738
 *             dds.dds_qset_history(self._c_qos, policy.kind.value, policy.depth) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_resource_limits(self._c_qos, policy.max_samples,
 *                                          policy.max_instances, policy.max_samples_per_instance) #gil_ok
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_RESOURCELIMITS_QOS_POLICY_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_12) {

    /* "dds.pyx":739
 * 
 *         elif policy.id == QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID:
 *             dds.dds_qset_resource_limits(self._c_qos, policy.max_samples,             # <<<<<<<<<<<<<<
 *                                          policy.max_instances, policy.max_samples_per_instance) #gil_ok
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_max_samples); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_15 = __Pyx_PyInt_As_int32_t(__pyx_t_8); if (unlikely((__pyx_t_15 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "dds.pyx":740
 *         elif policy.id == QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID:
 *             dds.dds_qset_resource_limits(self._c_qos, policy.max_samples,
 *                                          policy.max_instances, policy.max_samples_per_instance) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.PRESENTATION_QOS_POLICY_ID:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_max_instances); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_16 = __Pyx_PyInt_As_int32_t(__pyx_t_8); if (unlikely((__pyx_t_16 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_max_samples_per_instance); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_t_8); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "dds.pyx":739
 * 
 *         elif policy.id == QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID:
 *             dds.dds_qset_resource_limits(self._c_qos, policy.max_samples,             # <<<<<<<<<<<<<<
 *                                          policy.max_instances, policy.max_samples_per_instance) #gil_ok
 * 
 */
    dds_qset_resource_limits(__pyx_v_self->_c_qos, __pyx_t_15, __pyx_t_16, __pyx_t_17);

    /* "dds.pyx":738
 *             dds.dds_qset_history(self._c_qos, policy.kind.value, policy.depth) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_resource_limits(self._c_qos, policy.max_samples,
 *                                          policy.max_instances, policy.max_samples_per_instance) #gil_ok
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":742
 *                                          policy.max_instances, policy.max_samples_per_instance) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.PRESENTATION_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_presentation(self._c_qos, policy.kind.value,
 *                                       int(policy.coherent_access), int(policy.ordered_access)) #gil_ok
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PRESENTATION_QOS_POLICY_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_12) {

    /* "dds.pyx":743
 * 
 *         elif policy.id == QosPolicyId.PRESENTATION_QOS_POLICY_ID:
 *             dds.dds_qset_presentation(self._c_qos, policy.kind.value,             # <<<<<<<<<<<<<<
 *                                       int(policy.coherent_access), int(policy.ordered_access)) #gil_ok
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_kind_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_18 = ((enum dds_presentation_access_scope_kind)__Pyx_PyInt_As_enum__dds_presentation_access_scope_kind(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "dds.pyx":744
 *         elif policy.id == QosPolicyId.PRESENTATION_QOS_POLICY_ID:
 *             dds.dds_qset_presentation(self._c_qos, policy.kind.value,
 *                                       int(policy.coherent_access), int(policy.ordered_access)) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.LIFESPAN_QOS_POLICY_ID:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_coherent_access); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_ordered_access); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "dds.pyx":743
 * 
 *         elif policy.id == QosPolicyId.PRESENTATION_QOS_POLICY_ID:
 *             dds.dds_qset_presentation(self._c_qos, policy.kind.value,             # <<<<<<<<<<<<<<
 *                                       int(policy.coherent_access), int(policy.ordered_access)) #gil_ok
 * 
 */
    dds_qset_presentation(__pyx_v_self->_c_qos, __pyx_t_18, __pyx_t_12, __pyx_t_4);

    /* "dds.pyx":742
 *                                          policy.max_instances, policy.max_samples_per_instance) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.PRESENTATION_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_presentation(self._c_qos, policy.kind.value,
 *                                       int(policy.coherent_access), int(policy.ordered_access)) #gil_ok
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":746
 *                                       int(policy.coherent_access), int(policy.ordered_access)) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.LIFESPAN_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_lifespan(self._c_qos, policy.lifespan) #gil_ok
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LIFESPAN_QOS_POLICY_ID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":747
 * 
 *         elif policy.id == QosPolicyId.LIFESPAN_QOS_POLICY_ID:
 *             dds.dds_qset_lifespan(self._c_qos, policy.lifespan) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.DEADLINE_QOS_POLICY_ID:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_lifespan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_19 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    dds_qset_lifespan(__pyx_v_self->_c_qos, __pyx_t_19);

    /* "dds.pyx":746
 *                                       int(policy.coherent_access), int(policy.ordered_access)) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.LIFESPAN_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_lifespan(self._c_qos, policy.lifespan) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":749
 *             dds.dds_qset_lifespan(self._c_qos, policy.lifespan) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.DEADLINE_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_deadline(self._c_qos, policy.deadline) #gil_ok
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DEADLINE_QOS_POLICY_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":750
 * 
 *         elif policy.id == QosPolicyId.DEADLINE_QOS_POLICY_ID:
 *             dds.dds_qset_deadline(self._c_qos, policy.deadline) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_deadline); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_19 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    dds_qset_deadline(__pyx_v_self->_c_qos, __pyx_t_19);

    /* "dds.pyx":749
 *             dds.dds_qset_lifespan(self._c_qos, policy.lifespan) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.DEADLINE_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_deadline(self._c_qos, policy.deadline) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":752
 *             dds.dds_qset_deadline(self._c_qos, policy.deadline) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_latency_budget(self._c_qos, policy.duration) #gil_ok
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LATENCYBUDGET_QOS_POLICY_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":753
 * 
 *         elif policy.id == QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID:
 *             dds.dds_qset_latency_budget(self._c_qos, policy.duration) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.OWNERSHIP_QOS_POLICY_ID:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_duration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_19 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 753, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    dds_qset_latency_budget(__pyx_v_self->_c_qos, __pyx_t_19);

    /* "dds.pyx":752
 *             dds.dds_qset_deadline(self._c_qos, policy.deadline) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_latency_budget(self._c_qos, policy.duration) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":755
 *             dds.dds_qset_latency_budget(self._c_qos, policy.duration) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.OWNERSHIP_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_ownership(self._c_qos, policy.kind.value) #gil_ok
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OWNERSHIP_QOS_POLICY_ID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":756
 * 
 *         elif policy.id == QosPolicyId.OWNERSHIP_QOS_POLICY_ID:
 *             dds.dds_qset_ownership(self._c_qos, policy.kind.value) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_kind_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_20 = ((enum dds_ownership_kind)__Pyx_PyInt_As_enum__dds_ownership_kind(__pyx_t_8)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    dds_qset_ownership(__pyx_v_self->_c_qos, __pyx_t_20);

    /* "dds.pyx":755
 *             dds.dds_qset_latency_budget(self._c_qos, policy.duration) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.OWNERSHIP_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_ownership(self._c_qos, policy.kind.value) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":758
 *             dds.dds_qset_ownership(self._c_qos, policy.kind.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_ownership_strength(self._c_qos, policy.value) #gil_ok
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OWNERSHIPSTRENGTH_QOS_POLICY_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":759
 * 
 *         elif policy.id == QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID:
 *             dds.dds_qset_ownership_strength(self._c_qos, policy.value) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.LIVELINESS_QOS_POLICY_ID:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_t_3); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    dds_qset_ownership_strength(__pyx_v_self->_c_qos, __pyx_t_17);

    /* "dds.pyx":758
 *             dds.dds_qset_ownership(self._c_qos, policy.kind.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_ownership_strength(self._c_qos, policy.value) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":761
 *             dds.dds_qset_ownership_strength(self._c_qos, policy.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.LIVELINESS_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_liveliness(self._c_qos, policy.kind.value, policy.lease_duration) #gil_ok
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LIVELINESS_QOS_POLICY_ID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":762
 * 
 *         elif policy.id == QosPolicyId.LIVELINESS_QOS_POLICY_ID:
 *             dds.dds_qset_liveliness(self._c_qos, policy.kind.value, policy.lease_duration) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_kind_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_21 = ((enum dds_liveliness_kind)__Pyx_PyInt_As_enum__dds_liveliness_kind(__pyx_t_8)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_lease_duration); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_19 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    dds_qset_liveliness(__pyx_v_self->_c_qos, __pyx_t_21, __pyx_t_19);

    /* "dds.pyx":761
 *             dds.dds_qset_ownership_strength(self._c_qos, policy.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.LIVELINESS_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_liveliness(self._c_qos, policy.kind.value, policy.lease_duration) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":764
 *             dds.dds_qset_liveliness(self._c_qos, policy.kind.value, policy.lease_duration) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_time_based_filter(self._c_qos, policy.minimum_separation) #gil_ok
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TIMEBASEDFILTER_QOS_POLICY_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":765
 * 
 *         elif policy.id == QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID:
 *             dds.dds_qset_time_based_filter(self._c_qos, policy.minimum_separation) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.RELIABILITY_QOS_POLICY_ID:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_minimum_separation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_19 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    dds_qset_time_based_filter(__pyx_v_self->_c_qos, __pyx_t_19);

    /* "dds.pyx":764
 *             dds.dds_qset_liveliness(self._c_qos, policy.kind.value, policy.lease_duration) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_time_based_filter(self._c_qos, policy.minimum_separation) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":767
 *             dds.dds_qset_time_based_filter(self._c_qos, policy.minimum_separation) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.RELIABILITY_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_reliability(self._c_qos, policy.kind.value, policy.max_blocking_time) #gil_ok
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_RELIABILITY_QOS_POLICY_ID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":768
 * 
 *         elif policy.id == QosPolicyId.RELIABILITY_QOS_POLICY_ID:
 *             dds.dds_qset_reliability(self._c_qos, policy.kind.value, policy.max_blocking_time) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_kind_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_22 = ((enum dds_reliability_kind)__Pyx_PyInt_As_enum__dds_reliability_kind(__pyx_t_8)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_max_blocking_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_19 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    dds_qset_reliability(__pyx_v_self->_c_qos, __pyx_t_22, __pyx_t_19);

    /* "dds.pyx":767
 *             dds.dds_qset_time_based_filter(self._c_qos, policy.minimum_separation) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.RELIABILITY_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_reliability(self._c_qos, policy.kind.value, policy.max_blocking_time) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":770
 *             dds.dds_qset_reliability(self._c_qos, policy.kind.value, policy.max_blocking_time) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_transport_priority(self._c_qos, policy.value) #gil_ok
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TRANSPORTPRIORITY_QOS_POLICY_ID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":771
 * 
 *         elif policy.id == QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID:
 *             dds.dds_qset_transport_priority(self._c_qos, policy.value) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_t_3); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    dds_qset_transport_priority(__pyx_v_self->_c_qos, __pyx_t_17);

    /* "dds.pyx":770
 *             dds.dds_qset_reliability(self._c_qos, policy.kind.value, policy.max_blocking_time) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_transport_priority(self._c_qos, policy.value) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":773
 *             dds.dds_qset_transport_priority(self._c_qos, policy.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_destination_order(self._c_qos, policy.kind.value) #gil_ok
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DESTINATIONORDER_QOS_POLICY_ID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":774
 * 
 *         elif policy.id == QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID:
 *             dds.dds_qset_destination_order(self._c_qos, policy.kind.value) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_kind_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_23 = ((enum dds_destination_order_kind)__Pyx_PyInt_As_enum__dds_destination_order_kind(__pyx_t_8)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    dds_qset_destination_order(__pyx_v_self->_c_qos, __pyx_t_23);

    /* "dds.pyx":773
 *             dds.dds_qset_transport_priority(self._c_qos, policy.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_destination_order(self._c_qos, policy.kind.value) #gil_ok
 * 
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":776
 *             dds.dds_qset_destination_order(self._c_qos, policy.kind.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_writer_data_lifecycle(self._c_qos,
 *                                                int(policy.autodispose_unregistered_instances)) #gil_ok
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WRITERDATALIFECYCLE_QOS_POLICY_I); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":778
 *         elif policy.id == QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID:
 *             dds.dds_qset_writer_data_lifecycle(self._c_qos,
 *                                                int(policy.autodispose_unregistered_instances)) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *         elif policy.id == QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_autodispose_unregistered_instanc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "dds.pyx":777
 * 
 *         elif policy.id == QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID:
 *             dds.dds_qset_writer_data_lifecycle(self._c_qos,             # <<<<<<<<<<<<<<
 *                                                int(policy.autodispose_unregistered_instances)) #gil_ok
 * 
 */
    dds_qset_writer_data_lifecycle(__pyx_v_self->_c_qos, __pyx_t_4);

    /* "dds.pyx":776
 *             dds.dds_qset_destination_order(self._c_qos, policy.kind.value) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_writer_data_lifecycle(self._c_qos,
 *                                                int(policy.autodispose_unregistered_instances)) #gil_ok
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":780
 *                                                int(policy.autodispose_unregistered_instances)) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_reader_data_lifecycle(self._c_qos,
 *                                                policy.autopurge_nowriter_samples,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_READERDATALIFECYCLE_QOS_POLICY_I); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":782
 *         elif policy.id == QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID:
 *             dds.dds_qset_reader_data_lifecycle(self._c_qos,
 *                                                policy.autopurge_nowriter_samples,             # <<<<<<<<<<<<<<
 *                                                policy.autopurge_disposed_samples_delay) #gil_ok
 *         elif policy.id == QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_autopurge_nowriter_samples); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_19 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "dds.pyx":783
 *             dds.dds_qset_reader_data_lifecycle(self._c_qos,
 *                                                policy.autopurge_nowriter_samples,
 *                                                policy.autopurge_disposed_samples_delay) #gil_ok             # <<<<<<<<<<<<<<
 *         elif policy.id == QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID:
 *             dds.dds_qset_durability_service(self._c_qos, policy.service_cleanup_delay,
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_autopurge_disposed_samples_delay); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_24 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_24 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "dds.pyx":781
 * 
 *         elif policy.id == QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID:
 *             dds.dds_qset_reader_data_lifecycle(self._c_qos,             # <<<<<<<<<<<<<<
 *                                                policy.autopurge_nowriter_samples,
 *                                                policy.autopurge_disposed_samples_delay) #gil_ok
 */
    dds_qset_reader_data_lifecycle(__pyx_v_self->_c_qos, __pyx_t_19, __pyx_t_24);

    /* "dds.pyx":780
 *                                                int(policy.autodispose_unregistered_instances)) #gil_ok
 * 
 *         elif policy.id == QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_reader_data_lifecycle(self._c_qos,
 *                                                policy.autopurge_nowriter_samples,
 */
    goto __pyx_L3;
  }

  /* "dds.pyx":784
 *                                                policy.autopurge_nowriter_samples,
 *                                                policy.autopurge_disposed_samples_delay) #gil_ok
 *         elif policy.id == QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_durability_service(self._c_qos, policy.service_cleanup_delay,
 *                                             policy.history_kind.value, policy.history_depth,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DURABILITYSERVICE_QOS_POLICY_ID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_4) {

    /* "dds.pyx":785
 *                                                policy.autopurge_disposed_samples_delay) #gil_ok
 *         elif policy.id == QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID:
 *             dds.dds_qset_durability_service(self._c_qos, policy.service_cleanup_delay,             # <<<<<<<<<<<<<<
 *                                             policy.history_kind.value, policy.history_depth,
 *                                             policy.max_samples, policy.max_instances,
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_service_cleanup_delay); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_24 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_24 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "dds.pyx":786
 *         elif policy.id == QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID:
 *             dds.dds_qset_durability_service(self._c_qos, policy.service_cleanup_delay,
 *                                             policy.history_kind.value, policy.history_depth,             # <<<<<<<<<<<<<<
 *                                             policy.max_samples, policy.max_instances,
 *                                             policy.max_samples_per_instance) #gil_ok
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_history_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_14 = ((enum dds_history_kind)__Pyx_PyInt_As_enum__dds_history_kind(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_history_depth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_t_3); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "dds.pyx":787
 *             dds.dds_qset_durability_service(self._c_qos, policy.service_cleanup_delay,
 *                                             policy.history_kind.value, policy.history_depth,
 *                                             policy.max_samples, policy.max_instances,             # <<<<<<<<<<<<<<
 *                                             policy.max_samples_per_instance) #gil_ok
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_max_samples); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_16 = __Pyx_PyInt_As_int32_t(__pyx_t_3); if (unlikely((__pyx_t_16 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_max_instances); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_15 = __Pyx_PyInt_As_int32_t(__pyx_t_3); if (unlikely((__pyx_t_15 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "dds.pyx":788
 *                                             policy.history_kind.value, policy.history_depth,
 *                                             policy.max_samples, policy.max_instances,
 *                                             policy.max_samples_per_instance) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *     cdef dds.dds_qos_t * handle(self):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_policy, __pyx_n_s_max_samples_per_instance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_25 = __Pyx_PyInt_As_int32_t(__pyx_t_3); if (unlikely((__pyx_t_25 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "dds.pyx":785
 *                                                policy.autopurge_disposed_samples_delay) #gil_ok
 *         elif policy.id == QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID:
 *             dds.dds_qset_durability_service(self._c_qos, policy.service_cleanup_delay,             # <<<<<<<<<<<<<<
 *                                             policy.history_kind.value, policy.history_depth,
 *                                             policy.max_samples, policy.max_instances,
 */
    dds_qset_durability_service(__pyx_v_self->_c_qos, __pyx_t_24, __pyx_t_14, __pyx_t_17, __pyx_t_16, __pyx_t_15, __pyx_t_25);

    /* "dds.pyx":784
 *                                                policy.autopurge_nowriter_samples,
 *                                                policy.autopurge_disposed_samples_delay) #gil_ok
 *         elif policy.id == QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID:             # <<<<<<<<<<<<<<
 *             dds.dds_qset_durability_service(self._c_qos, policy.service_cleanup_delay,
 *                                             policy.history_kind.value, policy.history_depth,
 */
  }
  __pyx_L3:;

  /* "dds.pyx":694
 *             self._apply_policy(p)
 * 
 *     cdef _apply_policy(self, policy):             # <<<<<<<<<<<<<<
 * 
 *         cdef char **_c_partitions = NULL;
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.Qos._apply_policy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_partitions);
  __Pyx_XDECREF(__pyx_v_numpar);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_bytes_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":790
 *                                             policy.max_samples_per_instance) #gil_ok
 * 
 *     cdef dds.dds_qos_t * handle(self):             # <<<<<<<<<<<<<<
 *         return self._c_qos
 * 
 */

static dds_qos_t *__pyx_f_3dds_3Qos_handle(struct __pyx_obj_3dds_Qos *__pyx_v_self) {
  dds_qos_t *__pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle", 0);

  /* "dds.pyx":791
 * 
 *     cdef dds.dds_qos_t * handle(self):
 *         return self._c_qos             # <<<<<<<<<<<<<<
 * 
 * # Functions to set the state mask
 */
  __pyx_r = __pyx_v_self->_c_qos;
  goto __pyx_L0;

  /* "dds.pyx":790
 *                                             policy.max_samples_per_instance) #gil_ok
 * 
 *     cdef dds.dds_qos_t * handle(self):             # <<<<<<<<<<<<<<
 *         return self._c_qos
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_3Qos_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_3Qos_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_3Qos_6__reduce_cython__(((struct __pyx_obj_3dds_Qos *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_3Qos_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Qos *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Qos.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_3Qos_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_3Qos_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_3Qos_8__setstate_cython__(((struct __pyx_obj_3dds_Qos *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_3Qos_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Qos *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Qos.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":801
 *     '''
 *     @staticmethod
 *     def read_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_1read_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11DDSMaskUtil_read_samples[] = "\n        [DDSStateKind.READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]\n\n        :rtype: list\n        :return: list of :class:`.DDSStateKind` enumeration literals\n        ";
static PyMethodDef __pyx_mdef_3dds_11DDSMaskUtil_1read_samples = {"read_samples", (PyCFunction)__pyx_pw_3dds_11DDSMaskUtil_1read_samples, METH_NOARGS, __pyx_doc_3dds_11DDSMaskUtil_read_samples};
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_1read_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_samples (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11DDSMaskUtil_read_samples(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11DDSMaskUtil_read_samples(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("read_samples", 0);

  /* "dds.pyx":808
 *         :return: list of :class:`.DDSStateKind` enumeration literals
 *         '''
 *         return [DDSStateKind.READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_READ_SAMPLE_STATE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ALIVE_INSTANCE_STATE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ANY_VIEW_STATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":801
 *     '''
 *     @staticmethod
 *     def read_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.DDSMaskUtil.read_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":811
 * 
 *     @staticmethod
 *     def new_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_3new_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11DDSMaskUtil_2new_samples[] = "\n        [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]\n\n        :rtype: list\n        :return: list of :class:`.DDSStateKind` enumeration literals\n        ";
static PyMethodDef __pyx_mdef_3dds_11DDSMaskUtil_3new_samples = {"new_samples", (PyCFunction)__pyx_pw_3dds_11DDSMaskUtil_3new_samples, METH_NOARGS, __pyx_doc_3dds_11DDSMaskUtil_2new_samples};
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_3new_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("new_samples (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11DDSMaskUtil_2new_samples(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11DDSMaskUtil_2new_samples(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("new_samples", 0);

  /* "dds.pyx":818
 *         :return: list of :class:`.DDSStateKind` enumeration literals
 *         '''
 *         return [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NOT_READ_SAMPLE_STATE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ALIVE_INSTANCE_STATE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ANY_VIEW_STATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":811
 * 
 *     @staticmethod
 *     def new_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.DDSMaskUtil.new_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":821
 * 
 *     @staticmethod
 *     def all_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.ANY_STATE]
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_5all_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11DDSMaskUtil_4all_samples[] = "\n        [DDSStateKind.ANY_STATE]\n\n        :rtype: list\n        :return: list of :class:`.DDSStateKind` enumeration literals\n        ";
static PyMethodDef __pyx_mdef_3dds_11DDSMaskUtil_5all_samples = {"all_samples", (PyCFunction)__pyx_pw_3dds_11DDSMaskUtil_5all_samples, METH_NOARGS, __pyx_doc_3dds_11DDSMaskUtil_4all_samples};
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_5all_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("all_samples (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11DDSMaskUtil_4all_samples(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11DDSMaskUtil_4all_samples(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("all_samples", 0);

  /* "dds.pyx":828
 *         :return: list of :class:`.DDSStateKind` enumeration literals
 *         '''
 *         return [DDSStateKind.ANY_STATE]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ANY_STATE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":821
 * 
 *     @staticmethod
 *     def all_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.ANY_STATE]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.DDSMaskUtil.all_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":831
 * 
 *     @staticmethod
 *     def new_instance_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.NEW_VIEW_STATE]
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_7new_instance_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11DDSMaskUtil_6new_instance_samples[] = "\n        [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.NEW_VIEW_STATE]\n\n        :rtype: list\n        :return: list of :class:`.DDSStateKind` enumeration literals\n        ";
static PyMethodDef __pyx_mdef_3dds_11DDSMaskUtil_7new_instance_samples = {"new_instance_samples", (PyCFunction)__pyx_pw_3dds_11DDSMaskUtil_7new_instance_samples, METH_NOARGS, __pyx_doc_3dds_11DDSMaskUtil_6new_instance_samples};
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_7new_instance_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("new_instance_samples (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11DDSMaskUtil_6new_instance_samples(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11DDSMaskUtil_6new_instance_samples(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("new_instance_samples", 0);

  /* "dds.pyx":838
 *         :return: list of :class:`.DDSStateKind` enumeration literals
 *         '''
 *         return [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.NEW_VIEW_STATE]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NOT_READ_SAMPLE_STATE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ALIVE_INSTANCE_STATE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NEW_VIEW_STATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":831
 * 
 *     @staticmethod
 *     def new_instance_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.NEW_VIEW_STATE]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.DDSMaskUtil.new_instance_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":841
 * 
 *     @staticmethod
 *     def not_alive_instance_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.ANY_SAMPLE_STATE, DDSStateKind.ANY_VIEW_STATE, DDSStateKind.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE, DDSStateKind.NOT_ALIVE_DISPOSED_INSTANCE_STATE]
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_9not_alive_instance_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11DDSMaskUtil_8not_alive_instance_samples[] = "\n        [DDSStateKind.ANY_SAMPLE_STATE, DDSStateKind.ANY_VIEW_STATE, DDSStateKind.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE, DDSStateKind.NOT_ALIVE_DISPOSED_INSTANCE_STATE]\n\n        :rtype: list\n        :return: list of :class:`.DDSStateKind` enumeration literals\n        ";
static PyMethodDef __pyx_mdef_3dds_11DDSMaskUtil_9not_alive_instance_samples = {"not_alive_instance_samples", (PyCFunction)__pyx_pw_3dds_11DDSMaskUtil_9not_alive_instance_samples, METH_NOARGS, __pyx_doc_3dds_11DDSMaskUtil_8not_alive_instance_samples};
static PyObject *__pyx_pw_3dds_11DDSMaskUtil_9not_alive_instance_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("not_alive_instance_samples (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11DDSMaskUtil_8not_alive_instance_samples(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11DDSMaskUtil_8not_alive_instance_samples(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("not_alive_instance_samples", 0);

  /* "dds.pyx":848
 *         :return: list of :class:`.DDSStateKind` enumeration literals
 *         '''
 *         return [DDSStateKind.ANY_SAMPLE_STATE, DDSStateKind.ANY_VIEW_STATE, DDSStateKind.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE, DDSStateKind.NOT_ALIVE_DISPOSED_INSTANCE_STATE]             # <<<<<<<<<<<<<<
 * 
 * # Abstract listener
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ANY_SAMPLE_STATE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ANY_VIEW_STATE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NOT_ALIVE_NO_WRITERS_INSTANCE_ST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DDSStateKind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NOT_ALIVE_DISPOSED_INSTANCE_STAT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":841
 * 
 *     @staticmethod
 *     def not_alive_instance_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.ANY_SAMPLE_STATE, DDSStateKind.ANY_VIEW_STATE, DDSStateKind.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE, DDSStateKind.NOT_ALIVE_DISPOSED_INSTANCE_STATE]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("dds.DDSMaskUtil.not_alive_instance_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":856
 *     '''
 * 
 *     def on_inconsistent_topic(self, topic, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A participant registered a topic inconsistent with a locally registered one.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_1on_inconsistent_topic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_on_inconsistent_topic[] = "\n        A participant registered a topic inconsistent with a locally registered one.\n\n        This notification applies to: Topic and DomainParticipant\n\n        Note: this event is unlikely in OpenSplice because OpenSplice does\n        not allow inconsistent topics to register. It may, however, occur\n        in heterogeneous domains with participants using other DDS stacks.\n\n        :param topic: a handle to the locally registered topic\n        :type topic: dds.Topic\n        :param status: a namedtuple with fields: total_count, total_count_change\n        :param status: dds.InconsistentTopicStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_1on_inconsistent_topic = {"on_inconsistent_topic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_1on_inconsistent_topic, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_on_inconsistent_topic};
static PyObject *__pyx_pw_3dds_8Listener_1on_inconsistent_topic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_topic = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_inconsistent_topic (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_topic,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_topic)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_inconsistent_topic", 1, 3, 3, 1); __PYX_ERR(0, 856, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_inconsistent_topic", 1, 3, 3, 2); __PYX_ERR(0, 856, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_inconsistent_topic") < 0)) __PYX_ERR(0, 856, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_topic = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_inconsistent_topic", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 856, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_inconsistent_topic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_on_inconsistent_topic(__pyx_self, __pyx_v_self, __pyx_v_topic, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_on_inconsistent_topic(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_topic, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_inconsistent_topic", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":873
 *         pass
 * 
 *     def on_offered_deadline_missed(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A locally created data writer has failed to adhere it's DeadlinePolicy.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_3on_offered_deadline_missed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_2on_offered_deadline_missed[] = "\n        A locally created data writer has failed to adhere it's DeadlinePolicy.\n\n        This notification applies to: DataWriter, Publisher and DomainParticipant\n\n        :param writer: a handle to the writer that missed is write deadline\n        :type writer: dds.DataWriter\n        :param status: a namedtuple with fields: total_count, total_count_change, last_instance_handle\n        :type status: dds.OfferedDeadlineMissedStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_3on_offered_deadline_missed = {"on_offered_deadline_missed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_3on_offered_deadline_missed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_2on_offered_deadline_missed};
static PyObject *__pyx_pw_3dds_8Listener_3on_offered_deadline_missed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_writer = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_offered_deadline_missed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_writer,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_writer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_offered_deadline_missed", 1, 3, 3, 1); __PYX_ERR(0, 873, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_offered_deadline_missed", 1, 3, 3, 2); __PYX_ERR(0, 873, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_offered_deadline_missed") < 0)) __PYX_ERR(0, 873, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_writer = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_offered_deadline_missed", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_offered_deadline_missed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_2on_offered_deadline_missed(__pyx_self, __pyx_v_self, __pyx_v_writer, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_2on_offered_deadline_missed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_writer, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_offered_deadline_missed", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":886
 *         pass
 * 
 *     def on_offered_incompatible_qos(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data writer could not be matched with a data reader because of Qos incompatibilities
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_5on_offered_incompatible_qos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_4on_offered_incompatible_qos[] = "\n        A data writer could not be matched with a data reader because of Qos incompatibilities\n\n        This notification applies to: DataWriter, Publisher and DomainParticipant\n\n        :param writer: a handle to the writer\n        :type writer: dds.DataWriter\n        :param status: a namedtuple with fields: total_count, total_count_change, last_policy_id\n        :type status: dds.OfferedIncompatibleQosStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_5on_offered_incompatible_qos = {"on_offered_incompatible_qos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_5on_offered_incompatible_qos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_4on_offered_incompatible_qos};
static PyObject *__pyx_pw_3dds_8Listener_5on_offered_incompatible_qos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_writer = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_offered_incompatible_qos (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_writer,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_writer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_offered_incompatible_qos", 1, 3, 3, 1); __PYX_ERR(0, 886, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_offered_incompatible_qos", 1, 3, 3, 2); __PYX_ERR(0, 886, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_offered_incompatible_qos") < 0)) __PYX_ERR(0, 886, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_writer = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_offered_incompatible_qos", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 886, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_offered_incompatible_qos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_4on_offered_incompatible_qos(__pyx_self, __pyx_v_self, __pyx_v_writer, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_4on_offered_incompatible_qos(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_writer, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_offered_incompatible_qos", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":899
 *         pass
 * 
 *     def on_liveliness_lost(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data writer has not met its committed LivelinessQosPolicy
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_7on_liveliness_lost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_6on_liveliness_lost[] = "\n        A data writer has not met its committed LivelinessQosPolicy\n\n        This notification applies to: DataWriter, Publisher and DomainParticipant\n\n        :param writer: a handle to the writer\n        :type writer: dds.DataWriter\n        :param status: a namedtuple with fields: total_count, total_count_change\n        :type status: dds.LivelinessLostStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_7on_liveliness_lost = {"on_liveliness_lost", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_7on_liveliness_lost, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_6on_liveliness_lost};
static PyObject *__pyx_pw_3dds_8Listener_7on_liveliness_lost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_writer = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_liveliness_lost (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_writer,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_writer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_liveliness_lost", 1, 3, 3, 1); __PYX_ERR(0, 899, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_liveliness_lost", 1, 3, 3, 2); __PYX_ERR(0, 899, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_liveliness_lost") < 0)) __PYX_ERR(0, 899, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_writer = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_liveliness_lost", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 899, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_liveliness_lost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_6on_liveliness_lost(__pyx_self, __pyx_v_self, __pyx_v_writer, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_6on_liveliness_lost(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_writer, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_liveliness_lost", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":912
 *         pass
 * 
 *     def on_publication_matched(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The number of data readers matched to writer has changed.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_9on_publication_matched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_8on_publication_matched[] = "\n        The number of data readers matched to writer has changed.\n\n        This notification applies to: DataWriter, Publisher and DomainParticipant\n\n        :param writer: a handle to the writer\n        :type writer: dds.DataWriter\n        :param status: a namedtuple with fields: total_count, total_count_change, current_count, current_count_change, last_subscription_handle\n        :type status: dds.PublicationMatchedStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_9on_publication_matched = {"on_publication_matched", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_9on_publication_matched, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_8on_publication_matched};
static PyObject *__pyx_pw_3dds_8Listener_9on_publication_matched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_writer = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_publication_matched (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_writer,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_writer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_publication_matched", 1, 3, 3, 1); __PYX_ERR(0, 912, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_publication_matched", 1, 3, 3, 2); __PYX_ERR(0, 912, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_publication_matched") < 0)) __PYX_ERR(0, 912, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_writer = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_publication_matched", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 912, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_publication_matched", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_8on_publication_matched(__pyx_self, __pyx_v_self, __pyx_v_writer, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_8on_publication_matched(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_writer, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_publication_matched", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":925
 *         pass
 * 
 *     def on_requested_deadline_missed(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A reader's requested DeadlinePolicy was not met by it's matched writers.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_11on_requested_deadline_missed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_10on_requested_deadline_missed[] = "\n        A reader's requested DeadlinePolicy was not met by it's matched writers.\n\n        This notification applies to: DataReader, Subscriber and DomainParticipant\n\n        :param reader: a handle to the reader\n        :type reader: dds.DataReader\n        :param status: a namedtuple with fields: total_count, total_count_change, last_instance_handle\n        :type status: dds.RequestedDeadlineMissedStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_11on_requested_deadline_missed = {"on_requested_deadline_missed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_11on_requested_deadline_missed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_10on_requested_deadline_missed};
static PyObject *__pyx_pw_3dds_8Listener_11on_requested_deadline_missed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_reader = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_requested_deadline_missed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reader,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_requested_deadline_missed", 1, 3, 3, 1); __PYX_ERR(0, 925, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_requested_deadline_missed", 1, 3, 3, 2); __PYX_ERR(0, 925, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_requested_deadline_missed") < 0)) __PYX_ERR(0, 925, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_reader = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_requested_deadline_missed", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 925, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_requested_deadline_missed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_10on_requested_deadline_missed(__pyx_self, __pyx_v_self, __pyx_v_reader, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_10on_requested_deadline_missed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_requested_deadline_missed", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":938
 *         pass
 * 
 *     def on_requested_incompatible_qos(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data reader could not be matched with a data writer because of Qos incompatibilities
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_13on_requested_incompatible_qos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_12on_requested_incompatible_qos[] = "\n        A data reader could not be matched with a data writer because of Qos incompatibilities\n\n        This notification applies to: DataReader, Subscriber and DomainParticipant\n\n        :param reader: a handle to the reader\n        :type reader: dds.DataReader\n        :param status: a namedtuple with fields: total_count, total_count_change, last_policy_id\n        :type status: dds.RequestedIncompatibleQosStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_13on_requested_incompatible_qos = {"on_requested_incompatible_qos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_13on_requested_incompatible_qos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_12on_requested_incompatible_qos};
static PyObject *__pyx_pw_3dds_8Listener_13on_requested_incompatible_qos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_reader = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_requested_incompatible_qos (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reader,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_requested_incompatible_qos", 1, 3, 3, 1); __PYX_ERR(0, 938, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_requested_incompatible_qos", 1, 3, 3, 2); __PYX_ERR(0, 938, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_requested_incompatible_qos") < 0)) __PYX_ERR(0, 938, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_reader = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_requested_incompatible_qos", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 938, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_requested_incompatible_qos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_12on_requested_incompatible_qos(__pyx_self, __pyx_v_self, __pyx_v_reader, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_12on_requested_incompatible_qos(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_requested_incompatible_qos", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":951
 *         pass
 * 
 *     def on_sample_rejected(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The data reader did not receive samples because of the ResourceLimitsQosPolicy
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_15on_sample_rejected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_14on_sample_rejected[] = "\n        The data reader did not receive samples because of the ResourceLimitsQosPolicy\n\n        This notificiation applies to: DataReader, Subscriber and DomainParticipant\n\n        :param reader: a handle to the reader\n        :type reader: dds.DataReader\n        :param status: a namedtuple with fields: total_count,total_count_change,last_reason,last_instance_handle\n        :type status: dds.SampleRejectedStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_15on_sample_rejected = {"on_sample_rejected", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_15on_sample_rejected, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_14on_sample_rejected};
static PyObject *__pyx_pw_3dds_8Listener_15on_sample_rejected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_reader = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_sample_rejected (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reader,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_sample_rejected", 1, 3, 3, 1); __PYX_ERR(0, 951, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_sample_rejected", 1, 3, 3, 2); __PYX_ERR(0, 951, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_sample_rejected") < 0)) __PYX_ERR(0, 951, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_reader = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_sample_rejected", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 951, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_sample_rejected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_14on_sample_rejected(__pyx_self, __pyx_v_self, __pyx_v_reader, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_14on_sample_rejected(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_sample_rejected", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":964
 *         pass
 * 
 *     def on_liveliness_changed(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''on_liveliness_changed(reader, status)
 *         A data reader has experienced a liveliness change in a match writer
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_17on_liveliness_changed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_16on_liveliness_changed[] = "on_liveliness_changed(reader, status)\n        A data reader has experienced a liveliness change in a match writer\n\n        This notification applies to: DataReader, Subscriber and DomainParticipant\n\n        :param writer: a handle to the reader\n        :type writer: dds.ReaderWriter\n        :param status: a namedtuple with fields: alive_count, not_alive_count, alive_count_change, not_alive_count_change, last_publication_handle\n        :type status: dds.LivelinessChangedStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_17on_liveliness_changed = {"on_liveliness_changed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_17on_liveliness_changed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_16on_liveliness_changed};
static PyObject *__pyx_pw_3dds_8Listener_17on_liveliness_changed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_reader = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_liveliness_changed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reader,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_liveliness_changed", 1, 3, 3, 1); __PYX_ERR(0, 964, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_liveliness_changed", 1, 3, 3, 2); __PYX_ERR(0, 964, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_liveliness_changed") < 0)) __PYX_ERR(0, 964, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_reader = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_liveliness_changed", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 964, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_liveliness_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_16on_liveliness_changed(__pyx_self, __pyx_v_self, __pyx_v_reader, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_16on_liveliness_changed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_liveliness_changed", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":977
 *         pass
 * 
 *     def on_data_available(self, reader):             # <<<<<<<<<<<<<<
 *         '''
 *         Data is available on the passed data reader.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_19on_data_available(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_18on_data_available[] = "\n        Data is available on the passed data reader.\n\n        This notificiation applies: DataReader, Subscriber or DomainParticipant\n\n        :param writer: a handle to the reader\n        :type writer: dds.DataReader\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_19on_data_available = {"on_data_available", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_19on_data_available, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_18on_data_available};
static PyObject *__pyx_pw_3dds_8Listener_19on_data_available(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_reader = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_data_available (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reader,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_data_available", 1, 2, 2, 1); __PYX_ERR(0, 977, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_data_available") < 0)) __PYX_ERR(0, 977, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_reader = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_data_available", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 977, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_data_available", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_18on_data_available(__pyx_self, __pyx_v_self, __pyx_v_reader);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_18on_data_available(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_data_available", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":988
 *         pass
 * 
 *     def on_subscription_matched(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The number of data writers matched to a reader has changed.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_21on_subscription_matched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_20on_subscription_matched[] = "\n        The number of data writers matched to a reader has changed.\n\n        This notification applies to: DataReader, Subscriber and DomainParticipant\n\n        :param reader: a handle to the reader\n        :type reader: dds.DataReader\n        :param status: a namedtuple with fields: total_count, total_count_change, current_count, current_count_change, last_subscription_handle\n        :type status: dds.SubscriptionMatchedStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_21on_subscription_matched = {"on_subscription_matched", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_21on_subscription_matched, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_20on_subscription_matched};
static PyObject *__pyx_pw_3dds_8Listener_21on_subscription_matched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_reader = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_subscription_matched (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reader,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_subscription_matched", 1, 3, 3, 1); __PYX_ERR(0, 988, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_subscription_matched", 1, 3, 3, 2); __PYX_ERR(0, 988, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_subscription_matched") < 0)) __PYX_ERR(0, 988, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_reader = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_subscription_matched", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 988, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_subscription_matched", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_20on_subscription_matched(__pyx_self, __pyx_v_self, __pyx_v_reader, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_20on_subscription_matched(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_subscription_matched", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1001
 *         pass
 * 
 *     def on_sample_lost(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A sample for the data reader has been lost
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_23on_sample_lost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_22on_sample_lost[] = "\n        A sample for the data reader has been lost\n\n        This notification applies to DataReader, Subscriber and DomainParticipant\n\n        :param reader: a handle to the reader\n        :type reader: dds.DataReader\n        :param status: a namedtuple with fields: total_count, total_count_change\n        :type status: dds.SampleLostStatus\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_23on_sample_lost = {"on_sample_lost", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_23on_sample_lost, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_22on_sample_lost};
static PyObject *__pyx_pw_3dds_8Listener_23on_sample_lost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_reader = 0;
  CYTHON_UNUSED PyObject *__pyx_v_status = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_sample_lost (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reader,&__pyx_n_s_status,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_sample_lost", 1, 3, 3, 1); __PYX_ERR(0, 1001, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_sample_lost", 1, 3, 3, 2); __PYX_ERR(0, 1001, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_sample_lost") < 0)) __PYX_ERR(0, 1001, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_reader = values[1];
    __pyx_v_status = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_sample_lost", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1001, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_sample_lost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_22on_sample_lost(__pyx_self, __pyx_v_self, __pyx_v_reader, __pyx_v_status);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_22on_sample_lost(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_reader, CYTHON_UNUSED PyObject *__pyx_v_status) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_sample_lost", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1014
 *         pass
 * 
 *     def on_data_on_readers(self, subscriber):             # <<<<<<<<<<<<<<
 *         '''
 *         One or more data readers belonging to the subscriber have data available.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_8Listener_25on_data_on_readers(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_8Listener_24on_data_on_readers[] = "\n        One or more data readers belonging to the subscriber have data available.\n\n        This notification applies to: Subscriber and Domain Participant\n\n        Note 1: The underlying C99 API supports neither Subscriber.get_datareaders()\n        nor Subscriber.notifiy_datareaders(), making this listener only marginally useful.\n        Note 2: Per the DDS specification, registering this handler disables on_data_available() on all\n        contained data readers.\n        ";
static PyMethodDef __pyx_mdef_3dds_8Listener_25on_data_on_readers = {"on_data_on_readers", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_8Listener_25on_data_on_readers, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_8Listener_24on_data_on_readers};
static PyObject *__pyx_pw_3dds_8Listener_25on_data_on_readers(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_subscriber = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_data_on_readers (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_subscriber,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subscriber)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_data_on_readers", 1, 2, 2, 1); __PYX_ERR(0, 1014, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_data_on_readers") < 0)) __PYX_ERR(0, 1014, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_subscriber = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_data_on_readers", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1014, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Listener.on_data_on_readers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_8Listener_24on_data_on_readers(__pyx_self, __pyx_v_self, __pyx_v_subscriber);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_8Listener_24on_data_on_readers(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_subscriber) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_data_on_readers", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1040
 *     cdef object _listener
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._c_handle = NULL
 *         self._listener = None
 */

/* Python wrapper */
static int __pyx_pw_3dds_6Entity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_6Entity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_3dds_6Entity___cinit__(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_6Entity___cinit__(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":1041
 * 
 *     def __cinit__(self):
 *         self._c_handle = NULL             # <<<<<<<<<<<<<<
 *         self._listener = None
 * 
 */
  __pyx_v_self->_c_handle = NULL;

  /* "dds.pyx":1042
 *     def __cinit__(self):
 *         self._c_handle = NULL
 *         self._listener = None             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_listener);
  __Pyx_DECREF(__pyx_v_self->_listener);
  __pyx_v_self->_listener = Py_None;

  /* "dds.pyx":1040
 *     cdef object _listener
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._c_handle = NULL
 *         self._listener = None
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1044
 *         self._listener = None
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle is not NULL:
 *             with nogil:
 */

/* Python wrapper */
static void __pyx_pw_3dds_6Entity_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3dds_6Entity_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3dds_6Entity_2__dealloc__(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3dds_6Entity_2__dealloc__(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "dds.pyx":1045
 * 
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 */
  __pyx_t_1 = ((__pyx_v_self->_c_handle != NULL) != 0);
  if (__pyx_t_1) {

    /* "dds.pyx":1046
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 *         _entity_register_remove_children(self)
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "dds.pyx":1047
 *         if self._c_handle is not NULL:
 *             with nogil:
 *                 dds.dds_entity_delete(<void*>self._c_handle)             # <<<<<<<<<<<<<<
 *         _entity_register_remove_children(self)
 *         _entity_register_remove(self)
 */
          (void)(dds_entity_delete(((void *)__pyx_v_self->_c_handle)));
        }

        /* "dds.pyx":1046
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 *         _entity_register_remove_children(self)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L6;
          }
          __pyx_L6:;
        }
    }

    /* "dds.pyx":1045
 * 
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 */
  }

  /* "dds.pyx":1048
 *             with nogil:
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 *         _entity_register_remove_children(self)             # <<<<<<<<<<<<<<
 *         _entity_register_remove(self)
 *         self._c_handle = NULL
 */
  __pyx_t_2 = __pyx_f_3dds__entity_register_remove_children(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1049
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 *         _entity_register_remove_children(self)
 *         _entity_register_remove(self)             # <<<<<<<<<<<<<<
 *         self._c_handle = NULL
 *         self._listener = None
 */
  __pyx_t_2 = __pyx_f_3dds__entity_register_remove(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1050
 *         _entity_register_remove_children(self)
 *         _entity_register_remove(self)
 *         self._c_handle = NULL             # <<<<<<<<<<<<<<
 *         self._listener = None
 * 
 */
  __pyx_v_self->_c_handle = NULL;

  /* "dds.pyx":1051
 *         _entity_register_remove(self)
 *         self._c_handle = NULL
 *         self._listener = None             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_listener);
  __Pyx_DECREF(__pyx_v_self->_listener);
  __pyx_v_self->_listener = Py_None;

  /* "dds.pyx":1044
 *         self._listener = None
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle is not NULL:
 *             with nogil:
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("dds.Entity.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "dds.pyx":1053
 *         self._listener = None
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Delete this DDS entity. Recursively deletes contained
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_6Entity_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_6Entity_4close[] = "\n        Delete this DDS entity. Recursively deletes contained\n        entities before deleting this entity.\n        ";
static PyObject *__pyx_pw_3dds_6Entity_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_6Entity_4close(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_6Entity_4close(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("close", 0);

  /* "dds.pyx":1058
 *         entities before deleting this entity.
 *         '''
 *         self._listener = None             # <<<<<<<<<<<<<<
 *         if self._c_handle is not NULL:
 *             with nogil:
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_listener);
  __Pyx_DECREF(__pyx_v_self->_listener);
  __pyx_v_self->_listener = Py_None;

  /* "dds.pyx":1059
 *         '''
 *         self._listener = None
 *         if self._c_handle is not NULL:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 */
  __pyx_t_1 = ((__pyx_v_self->_c_handle != NULL) != 0);
  if (__pyx_t_1) {

    /* "dds.pyx":1060
 *         self._listener = None
 *         if self._c_handle is not NULL:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 *         # dds_entity_delete recursively frees the C entities,
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "dds.pyx":1061
 *         if self._c_handle is not NULL:
 *             with nogil:
 *                 dds.dds_entity_delete(<void*>self._c_handle)             # <<<<<<<<<<<<<<
 *         # dds_entity_delete recursively frees the C entities,
 *         # so we must do the same cleanup for the Python entities,
 */
          (void)(dds_entity_delete(((void *)__pyx_v_self->_c_handle)));
        }

        /* "dds.pyx":1060
 *         self._listener = None
 *         if self._c_handle is not NULL:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 *         # dds_entity_delete recursively frees the C entities,
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L6;
          }
          __pyx_L6:;
        }
    }

    /* "dds.pyx":1059
 *         '''
 *         self._listener = None
 *         if self._c_handle is not NULL:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 dds.dds_entity_delete(<void*>self._c_handle)
 */
  }

  /* "dds.pyx":1065
 *         # so we must do the same cleanup for the Python entities,
 *         # so as to avoid triggering a double delete.
 *         _entity_register_remove_children(self)             # <<<<<<<<<<<<<<
 *         _entity_register_remove(self)
 *         self._c_handle = NULL
 */
  __pyx_t_2 = __pyx_f_3dds__entity_register_remove_children(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1066
 *         # so as to avoid triggering a double delete.
 *         _entity_register_remove_children(self)
 *         _entity_register_remove(self)             # <<<<<<<<<<<<<<
 *         self._c_handle = NULL
 * 
 */
  __pyx_t_2 = __pyx_f_3dds__entity_register_remove(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1067
 *         _entity_register_remove_children(self)
 *         _entity_register_remove(self)
 *         self._c_handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     def _check_handle(self):
 */
  __pyx_v_self->_c_handle = NULL;

  /* "dds.pyx":1053
 *         self._listener = None
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Delete this DDS entity. Recursively deletes contained
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.Entity.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1069
 *         self._c_handle = NULL
 * 
 *     def _check_handle(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle is NULL:
 *             raise DDSException('Entity is already closed')
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_6Entity_7_check_handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_6Entity_7_check_handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_handle (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_6Entity_6_check_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_6Entity_6_check_handle(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_check_handle", 0);

  /* "dds.pyx":1070
 * 
 *     def _check_handle(self):
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Entity is already closed')
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->_c_handle == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "dds.pyx":1071
 *     def _check_handle(self):
 *         if self._c_handle is NULL:
 *             raise DDSException('Entity is already closed')             # <<<<<<<<<<<<<<
 * 
 *     cdef set_handle(self, dds.dds_entity_t h):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Entity_is_already_closed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Entity_is_already_closed);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1071, __pyx_L1_error)

    /* "dds.pyx":1070
 * 
 *     def _check_handle(self):
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Entity is already closed')
 * 
 */
  }

  /* "dds.pyx":1069
 *         self._c_handle = NULL
 * 
 *     def _check_handle(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle is NULL:
 *             raise DDSException('Entity is already closed')
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.Entity._check_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1073
 *             raise DDSException('Entity is already closed')
 * 
 *     cdef set_handle(self, dds.dds_entity_t h):             # <<<<<<<<<<<<<<
 *         self._c_handle = h
 * 
 */

static PyObject *__pyx_f_3dds_6Entity_set_handle(struct __pyx_obj_3dds_Entity *__pyx_v_self, dds_entity_t __pyx_v_h) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_handle", 0);

  /* "dds.pyx":1074
 * 
 *     cdef set_handle(self, dds.dds_entity_t h):
 *         self._c_handle = h             # <<<<<<<<<<<<<<
 * 
 *     cdef dds.dds_entity_t get_handle(self):
 */
  __pyx_v_self->_c_handle = __pyx_v_h;

  /* "dds.pyx":1073
 *             raise DDSException('Entity is already closed')
 * 
 *     cdef set_handle(self, dds.dds_entity_t h):             # <<<<<<<<<<<<<<
 *         self._c_handle = h
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1076
 *         self._c_handle = h
 * 
 *     cdef dds.dds_entity_t get_handle(self):             # <<<<<<<<<<<<<<
 *         return self._c_handle
 * 
 */

static dds_entity_t __pyx_f_3dds_6Entity_get_handle(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  dds_entity_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_handle", 0);

  /* "dds.pyx":1077
 * 
 *     cdef dds.dds_entity_t get_handle(self):
 *         return self._c_handle             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_r = __pyx_v_self->_c_handle;
  goto __pyx_L0;

  /* "dds.pyx":1076
 *         self._c_handle = h
 * 
 *     cdef dds.dds_entity_t get_handle(self):             # <<<<<<<<<<<<<<
 *         return self._c_handle
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1080
 * 
 *     @property
 *     def parent(self):             # <<<<<<<<<<<<<<
 *         ''' Parent entity
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_6Entity_6parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_6Entity_6parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_6Entity_6parent___get__(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_6Entity_6parent___get__(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1083
 *         ''' Parent entity
 *         '''
 *         return self._parent             # <<<<<<<<<<<<<<
 * 
 *     @parent.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

  /* "dds.pyx":1080
 * 
 *     @property
 *     def parent(self):             # <<<<<<<<<<<<<<
 *         ''' Parent entity
 *         '''
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1086
 * 
 *     @parent.setter
 *     def parent(self, Entity e):             # <<<<<<<<<<<<<<
 *         self._parent = e
 * 
 */

/* Python wrapper */
static int __pyx_pw_3dds_6Entity_6parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e); /*proto*/
static int __pyx_pw_3dds_6Entity_6parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_e), __pyx_ptype_3dds_Entity, 1, "e", 0))) __PYX_ERR(0, 1086, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_6Entity_6parent_2__set__(((struct __pyx_obj_3dds_Entity *)__pyx_v_self), ((struct __pyx_obj_3dds_Entity *)__pyx_v_e));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_6Entity_6parent_2__set__(struct __pyx_obj_3dds_Entity *__pyx_v_self, struct __pyx_obj_3dds_Entity *__pyx_v_e) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "dds.pyx":1087
 *     @parent.setter
 *     def parent(self, Entity e):
 *         self._parent = e             # <<<<<<<<<<<<<<
 * 
 *     cdef dds.dds_entity_t handle(self):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_e));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_e));
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = ((PyObject *)__pyx_v_e);

  /* "dds.pyx":1086
 * 
 *     @parent.setter
 *     def parent(self, Entity e):             # <<<<<<<<<<<<<<
 *         self._parent = e
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1089
 *         self._parent = e
 * 
 *     cdef dds.dds_entity_t handle(self):             # <<<<<<<<<<<<<<
 *         return self._c_handle
 * 
 */

static dds_entity_t __pyx_f_3dds_6Entity_handle(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  dds_entity_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle", 0);

  /* "dds.pyx":1090
 * 
 *     cdef dds.dds_entity_t handle(self):
 *         return self._c_handle             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_r = __pyx_v_self->_c_handle;
  goto __pyx_L0;

  /* "dds.pyx":1089
 *         self._parent = e
 * 
 *     cdef dds.dds_entity_t handle(self):             # <<<<<<<<<<<<<<
 *         return self._c_handle
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1093
 * 
 *     @property
 *     def listener(self):             # <<<<<<<<<<<<<<
 *         ''' Listener
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_6Entity_8listener_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_6Entity_8listener_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_6Entity_8listener___get__(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_6Entity_8listener___get__(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1096
 *         ''' Listener
 *         '''
 *         return self._listener             # <<<<<<<<<<<<<<
 * 
 *     @listener.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_listener);
  __pyx_r = __pyx_v_self->_listener;
  goto __pyx_L0;

  /* "dds.pyx":1093
 * 
 *     @property
 *     def listener(self):             # <<<<<<<<<<<<<<
 *         ''' Listener
 *         '''
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1099
 * 
 *     @listener.setter
 *     def listener(self, listener):             # <<<<<<<<<<<<<<
 *         self._listener = listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_3dds_6Entity_8listener_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_listener); /*proto*/
static int __pyx_pw_3dds_6Entity_8listener_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_6Entity_8listener_2__set__(((struct __pyx_obj_3dds_Entity *)__pyx_v_self), ((PyObject *)__pyx_v_listener));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_6Entity_8listener_2__set__(struct __pyx_obj_3dds_Entity *__pyx_v_self, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "dds.pyx":1100
 *     @listener.setter
 *     def listener(self, listener):
 *         self._listener = listener             # <<<<<<<<<<<<<<
 * 
 *     def get_statuscondition(self):
 */
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  __Pyx_GOTREF(__pyx_v_self->_listener);
  __Pyx_DECREF(__pyx_v_self->_listener);
  __pyx_v_self->_listener = __pyx_v_listener;

  /* "dds.pyx":1099
 * 
 *     @listener.setter
 *     def listener(self, listener):             # <<<<<<<<<<<<<<
 *         self._listener = listener
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1102
 *         self._listener = listener
 * 
 *     def get_statuscondition(self):             # <<<<<<<<<<<<<<
 *         return StatusCondition(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_6Entity_9get_statuscondition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_6Entity_9get_statuscondition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_statuscondition (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_6Entity_8get_statuscondition(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_6Entity_8get_statuscondition(struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_statuscondition", 0);

  /* "dds.pyx":1103
 * 
 *     def get_statuscondition(self):
 *         return StatusCondition(self)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3dds_StatusCondition), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":1102
 *         self._listener = listener
 * 
 *     def get_statuscondition(self):             # <<<<<<<<<<<<<<
 *         return StatusCondition(self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Entity.get_statuscondition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_6Entity_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_6Entity_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_6Entity_10__reduce_cython__(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_6Entity_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Entity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Entity.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_6Entity_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_6Entity_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_6Entity_12__setstate_cython__(((struct __pyx_obj_3dds_Entity *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_6Entity_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Entity *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Entity.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1109
 * cdef object _entity_register = {}
 * 
 * cdef _entity_register_add(Entity entity):             # <<<<<<<<<<<<<<
 *     key = <intptr_t>entity.handle()
 *     #print('entity_register_add: key={}'.format(key))
 */

static PyObject *__pyx_f_3dds__entity_register_add(struct __pyx_obj_3dds_Entity *__pyx_v_entity) {
  intptr_t __pyx_v_key;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_entity_register_add", 0);

  /* "dds.pyx":1110
 * 
 * cdef _entity_register_add(Entity entity):
 *     key = <intptr_t>entity.handle()             # <<<<<<<<<<<<<<
 *     #print('entity_register_add: key={}'.format(key))
 *     _entity_register[key] = entity
 */
  __pyx_v_key = ((intptr_t)((struct __pyx_vtabstruct_3dds_Entity *)__pyx_v_entity->__pyx_vtab)->handle(__pyx_v_entity));

  /* "dds.pyx":1112
 *     key = <intptr_t>entity.handle()
 *     #print('entity_register_add: key={}'.format(key))
 *     _entity_register[key] = entity             # <<<<<<<<<<<<<<
 * 
 * cdef _entity_register_remove(Entity entity):
 */
  if (unlikely(__Pyx_SetItemInt(__pyx_v_3dds__entity_register, __pyx_v_key, ((PyObject *)__pyx_v_entity), intptr_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(0, 1112, __pyx_L1_error)

  /* "dds.pyx":1109
 * cdef object _entity_register = {}
 * 
 * cdef _entity_register_add(Entity entity):             # <<<<<<<<<<<<<<
 *     key = <intptr_t>entity.handle()
 *     #print('entity_register_add: key={}'.format(key))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("dds._entity_register_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1114
 *     _entity_register[key] = entity
 * 
 * cdef _entity_register_remove(Entity entity):             # <<<<<<<<<<<<<<
 *     key = <intptr_t>entity.handle()
 *     if key != 0 and key in _entity_register:
 */

static PyObject *__pyx_f_3dds__entity_register_remove(struct __pyx_obj_3dds_Entity *__pyx_v_entity) {
  intptr_t __pyx_v_key;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("_entity_register_remove", 0);

  /* "dds.pyx":1115
 * 
 * cdef _entity_register_remove(Entity entity):
 *     key = <intptr_t>entity.handle()             # <<<<<<<<<<<<<<
 *     if key != 0 and key in _entity_register:
 *         del _entity_register[key]
 */
  __pyx_v_key = ((intptr_t)((struct __pyx_vtabstruct_3dds_Entity *)__pyx_v_entity->__pyx_vtab)->handle(__pyx_v_entity));

  /* "dds.pyx":1116
 * cdef _entity_register_remove(Entity entity):
 *     key = <intptr_t>entity.handle()
 *     if key != 0 and key in _entity_register:             # <<<<<<<<<<<<<<
 *         del _entity_register[key]
 * 
 */
  __pyx_t_2 = ((__pyx_v_key != 0) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_3dds__entity_register, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = (__pyx_t_2 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "dds.pyx":1117
 *     key = <intptr_t>entity.handle()
 *     if key != 0 and key in _entity_register:
 *         del _entity_register[key]             # <<<<<<<<<<<<<<
 * 
 * cdef _entity_register_remove_children(Entity entity):
 */
    if (unlikely(__Pyx_DelItemInt(__pyx_v_3dds__entity_register, __pyx_v_key, intptr_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(0, 1117, __pyx_L1_error)

    /* "dds.pyx":1116
 * cdef _entity_register_remove(Entity entity):
 *     key = <intptr_t>entity.handle()
 *     if key != 0 and key in _entity_register:             # <<<<<<<<<<<<<<
 *         del _entity_register[key]
 * 
 */
  }

  /* "dds.pyx":1114
 *     _entity_register[key] = entity
 * 
 * cdef _entity_register_remove(Entity entity):             # <<<<<<<<<<<<<<
 *     key = <intptr_t>entity.handle()
 *     if key != 0 and key in _entity_register:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds._entity_register_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1119
 *         del _entity_register[key]
 * 
 * cdef _entity_register_remove_children(Entity entity):             # <<<<<<<<<<<<<<
 *     if <intptr_t>entity.handle() != 0:
 *         child_entities = []
 */

static PyObject *__pyx_f_3dds__entity_register_remove_children(struct __pyx_obj_3dds_Entity *__pyx_v_entity) {
  PyObject *__pyx_v_child_entities = NULL;
  PyObject *__pyx_v_key = NULL;
  struct __pyx_obj_3dds_Entity *__pyx_v_e = NULL;
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_v_child = NULL;
  struct __pyx_obj_3dds_Entity *__pyx_v_echild = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  intptr_t __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("_entity_register_remove_children", 0);

  /* "dds.pyx":1120
 * 
 * cdef _entity_register_remove_children(Entity entity):
 *     if <intptr_t>entity.handle() != 0:             # <<<<<<<<<<<<<<
 *         child_entities = []
 *         for key in _entity_register:
 */
  __pyx_t_1 = ((((intptr_t)((struct __pyx_vtabstruct_3dds_Entity *)__pyx_v_entity->__pyx_vtab)->handle(__pyx_v_entity)) != 0) != 0);
  if (__pyx_t_1) {

    /* "dds.pyx":1121
 * cdef _entity_register_remove_children(Entity entity):
 *     if <intptr_t>entity.handle() != 0:
 *         child_entities = []             # <<<<<<<<<<<<<<
 *         for key in _entity_register:
 *             e = <Entity>_entity_register[key]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_child_entities = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "dds.pyx":1122
 *     if <intptr_t>entity.handle() != 0:
 *         child_entities = []
 *         for key in _entity_register:             # <<<<<<<<<<<<<<
 *             e = <Entity>_entity_register[key]
 *             p = e.parent
 */
    if (likely(PyList_CheckExact(__pyx_v_3dds__entity_register)) || PyTuple_CheckExact(__pyx_v_3dds__entity_register)) {
      __pyx_t_2 = __pyx_v_3dds__entity_register; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_3dds__entity_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1122, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "dds.pyx":1123
 *         child_entities = []
 *         for key in _entity_register:
 *             e = <Entity>_entity_register[key]             # <<<<<<<<<<<<<<
 *             p = e.parent
 *             while p:
 */
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_3dds__entity_register, __pyx_v_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __pyx_t_5;
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_e, ((struct __pyx_obj_3dds_Entity *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "dds.pyx":1124
 *         for key in _entity_register:
 *             e = <Entity>_entity_register[key]
 *             p = e.parent             # <<<<<<<<<<<<<<
 *             while p:
 *                 if p == entity:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_e), __pyx_n_s_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "dds.pyx":1125
 *             e = <Entity>_entity_register[key]
 *             p = e.parent
 *             while p:             # <<<<<<<<<<<<<<
 *                 if p == entity:
 *                     break
 */
      while (1) {
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_p); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1125, __pyx_L1_error)
        if (!__pyx_t_1) break;

        /* "dds.pyx":1126
 *             p = e.parent
 *             while p:
 *                 if p == entity:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        __pyx_t_6 = PyObject_RichCompare(__pyx_v_p, ((PyObject *)__pyx_v_entity), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1126, __pyx_L1_error)
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1126, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_1) {

          /* "dds.pyx":1127
 *             while p:
 *                 if p == entity:
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     p = p.parent
 */
          goto __pyx_L7_break;

          /* "dds.pyx":1126
 *             p = e.parent
 *             while p:
 *                 if p == entity:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        }

        /* "dds.pyx":1129
 *                     break
 *                 else:
 *                     p = p.parent             # <<<<<<<<<<<<<<
 *             if p:
 *                 child_entities.append(_entity_register[<intptr_t>e.handle()])
 */
        /*else*/ {
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_n_s_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1129, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF_SET(__pyx_v_p, __pyx_t_6);
          __pyx_t_6 = 0;
        }
      }
      __pyx_L7_break:;

      /* "dds.pyx":1130
 *                 else:
 *                     p = p.parent
 *             if p:             # <<<<<<<<<<<<<<
 *                 child_entities.append(_entity_register[<intptr_t>e.handle()])
 *         for child in child_entities:
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_p); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1130, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "dds.pyx":1131
 *                     p = p.parent
 *             if p:
 *                 child_entities.append(_entity_register[<intptr_t>e.handle()])             # <<<<<<<<<<<<<<
 *         for child in child_entities:
 *             echild = <Entity>child
 */
        __pyx_t_7 = ((intptr_t)((struct __pyx_vtabstruct_3dds_Entity *)__pyx_v_e->__pyx_vtab)->handle(__pyx_v_e));
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_3dds__entity_register, __pyx_t_7, intptr_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1131, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_child_entities, __pyx_t_6); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1131, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "dds.pyx":1130
 *                 else:
 *                     p = p.parent
 *             if p:             # <<<<<<<<<<<<<<
 *                 child_entities.append(_entity_register[<intptr_t>e.handle()])
 *         for child in child_entities:
 */
      }

      /* "dds.pyx":1122
 *     if <intptr_t>entity.handle() != 0:
 *         child_entities = []
 *         for key in _entity_register:             # <<<<<<<<<<<<<<
 *             e = <Entity>_entity_register[key]
 *             p = e.parent
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "dds.pyx":1132
 *             if p:
 *                 child_entities.append(_entity_register[<intptr_t>e.handle()])
 *         for child in child_entities:             # <<<<<<<<<<<<<<
 *             echild = <Entity>child
 *             del _entity_register[<intptr_t>echild.handle()]
 */
    __pyx_t_2 = __pyx_v_child_entities; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1132, __pyx_L1_error)
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "dds.pyx":1133
 *                 child_entities.append(_entity_register[<intptr_t>e.handle()])
 *         for child in child_entities:
 *             echild = <Entity>child             # <<<<<<<<<<<<<<
 *             del _entity_register[<intptr_t>echild.handle()]
 *             echild.set_handle(NULL)
 */
      __pyx_t_6 = __pyx_v_child;
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_echild, ((struct __pyx_obj_3dds_Entity *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "dds.pyx":1134
 *         for child in child_entities:
 *             echild = <Entity>child
 *             del _entity_register[<intptr_t>echild.handle()]             # <<<<<<<<<<<<<<
 *             echild.set_handle(NULL)
 * 
 */
      __pyx_t_7 = ((intptr_t)((struct __pyx_vtabstruct_3dds_Entity *)__pyx_v_echild->__pyx_vtab)->handle(__pyx_v_echild));
      if (unlikely(__Pyx_DelItemInt(__pyx_v_3dds__entity_register, __pyx_t_7, intptr_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(0, 1134, __pyx_L1_error)

      /* "dds.pyx":1135
 *             echild = <Entity>child
 *             del _entity_register[<intptr_t>echild.handle()]
 *             echild.set_handle(NULL)             # <<<<<<<<<<<<<<
 * 
 * cdef Entity _entity_register_find(dds_entity_t e):
 */
      __pyx_t_6 = ((struct __pyx_vtabstruct_3dds_Entity *)__pyx_v_echild->__pyx_vtab)->set_handle(__pyx_v_echild, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "dds.pyx":1132
 *             if p:
 *                 child_entities.append(_entity_register[<intptr_t>e.handle()])
 *         for child in child_entities:             # <<<<<<<<<<<<<<
 *             echild = <Entity>child
 *             del _entity_register[<intptr_t>echild.handle()]
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "dds.pyx":1120
 * 
 * cdef _entity_register_remove_children(Entity entity):
 *     if <intptr_t>entity.handle() != 0:             # <<<<<<<<<<<<<<
 *         child_entities = []
 *         for key in _entity_register:
 */
  }

  /* "dds.pyx":1119
 *         del _entity_register[key]
 * 
 * cdef _entity_register_remove_children(Entity entity):             # <<<<<<<<<<<<<<
 *     if <intptr_t>entity.handle() != 0:
 *         child_entities = []
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds._entity_register_remove_children", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_child_entities);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF((PyObject *)__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_child);
  __Pyx_XDECREF((PyObject *)__pyx_v_echild);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1137
 *             echild.set_handle(NULL)
 * 
 * cdef Entity _entity_register_find(dds_entity_t e):             # <<<<<<<<<<<<<<
 *     key = <intptr_t>e
 *     #print('entity_register_find: key={}'.format(key))
 */

static struct __pyx_obj_3dds_Entity *__pyx_f_3dds__entity_register_find(dds_entity_t __pyx_v_e) {
  intptr_t __pyx_v_key;
  struct __pyx_obj_3dds_Entity *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("_entity_register_find", 0);

  /* "dds.pyx":1138
 * 
 * cdef Entity _entity_register_find(dds_entity_t e):
 *     key = <intptr_t>e             # <<<<<<<<<<<<<<
 *     #print('entity_register_find: key={}'.format(key))
 *     if key != 0 and key in _entity_register:
 */
  __pyx_v_key = ((intptr_t)__pyx_v_e);

  /* "dds.pyx":1140
 *     key = <intptr_t>e
 *     #print('entity_register_find: key={}'.format(key))
 *     if key != 0 and key in _entity_register:             # <<<<<<<<<<<<<<
 *         return _entity_register[key]
 *     return None
 */
  __pyx_t_2 = ((__pyx_v_key != 0) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_3dds__entity_register, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = (__pyx_t_2 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "dds.pyx":1141
 *     #print('entity_register_find: key={}'.format(key))
 *     if key != 0 and key in _entity_register:
 *         return _entity_register[key]             # <<<<<<<<<<<<<<
 *     return None
 * 
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_3dds__entity_register, __pyx_v_key, intptr_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_3dds_Entity))))) __PYX_ERR(0, 1141, __pyx_L1_error)
    __pyx_r = ((struct __pyx_obj_3dds_Entity *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "dds.pyx":1140
 *     key = <intptr_t>e
 *     #print('entity_register_find: key={}'.format(key))
 *     if key != 0 and key in _entity_register:             # <<<<<<<<<<<<<<
 *         return _entity_register[key]
 *     return None
 */
  }

  /* "dds.pyx":1142
 *     if key != 0 and key in _entity_register:
 *         return _entity_register[key]
 *     return None             # <<<<<<<<<<<<<<
 * 
 * # unpacking dds API char * values to Python Strings
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_r = ((struct __pyx_obj_3dds_Entity *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "dds.pyx":1137
 *             echild.set_handle(NULL)
 * 
 * cdef Entity _entity_register_find(dds_entity_t e):             # <<<<<<<<<<<<<<
 *     key = <intptr_t>e
 *     #print('entity_register_find: key={}'.format(key))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds._entity_register_find", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1145
 * 
 * # unpacking dds API char * values to Python Strings
 * cdef str _to_pystr_and_free(const char *c_str):             # <<<<<<<<<<<<<<
 *     try:
 *         return c_str.decode('ISO-8859-1','strict')
 */

static PyObject *__pyx_f_3dds__to_pystr_and_free(char const *__pyx_v_c_str) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("_to_pystr_and_free", 0);

  /* "dds.pyx":1146
 * # unpacking dds API char * values to Python Strings
 * cdef str _to_pystr_and_free(const char *c_str):
 *     try:             # <<<<<<<<<<<<<<
 *         return c_str.decode('ISO-8859-1','strict')
 *     finally:
 */
  /*try:*/ {

    /* "dds.pyx":1147
 * cdef str _to_pystr_and_free(const char *c_str):
 *     try:
 *         return c_str.decode('ISO-8859-1','strict')             # <<<<<<<<<<<<<<
 *     finally:
 *         dds_free(<void*>c_str) #gil_ok
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_c_str, 0, strlen(__pyx_v_c_str), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyString_CheckExact(__pyx_t_1))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1147, __pyx_L4_error)
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "dds.pyx":1149
 *         return c_str.decode('ISO-8859-1','strict')
 *     finally:
 *         dds_free(<void*>c_str) #gil_ok             # <<<<<<<<<<<<<<
 * 
 * # map listener methods to status defines
 */
  /*finally:*/ {
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename;
      {
        dds_free(((void *)__pyx_v_c_str));
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0;
      __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_11 = __pyx_r;
      __pyx_r = 0;
      dds_free(((void *)__pyx_v_c_str));
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      goto __pyx_L0;
    }
  }

  /* "dds.pyx":1145
 * 
 * # unpacking dds API char * values to Python Strings
 * cdef str _to_pystr_and_free(const char *c_str):             # <<<<<<<<<<<<<<
 *     try:
 *         return c_str.decode('ISO-8859-1','strict')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds._to_pystr_and_free", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1417
 *     '''
 * 
 * cdef uint32_t _status_mask_for_listener(object listener):             # <<<<<<<<<<<<<<
 *     cdef uint32_t mask = 0
 * #     statuses = []
 */

static uint32_t __pyx_f_3dds__status_mask_for_listener(PyObject *__pyx_v_listener) {
  uint32_t __pyx_v_mask;
  PyObject *__pyx_v_name = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  uint32_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  uint32_t __pyx_t_11;
  __Pyx_RefNannySetupContext("_status_mask_for_listener", 0);

  /* "dds.pyx":1418
 * 
 * cdef uint32_t _status_mask_for_listener(object listener):
 *     cdef uint32_t mask = 0             # <<<<<<<<<<<<<<
 * #     statuses = []
 *     for name, _ in inspect.getmembers(type(listener), predicate=inspect.isfunction):
 */
  __pyx_v_mask = 0;

  /* "dds.pyx":1420
 *     cdef uint32_t mask = 0
 * #     statuses = []
 *     for name, _ in inspect.getmembers(type(listener), predicate=inspect.isfunction):             # <<<<<<<<<<<<<<
 *         if name in _method_to_status:
 * #             statuses.append(name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_inspect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getmembers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_listener)));
  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_listener)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(__pyx_v_listener)));
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_inspect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isfunction); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_predicate, __pyx_t_5) < 0) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1420, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1420, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1420, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1420, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
      PyObject* sequence = __pyx_t_5;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1420, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1420, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1420, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "dds.pyx":1421
 * #     statuses = []
 *     for name, _ in inspect.getmembers(type(listener), predicate=inspect.isfunction):
 *         if name in _method_to_status:             # <<<<<<<<<<<<<<
 * #             statuses.append(name)
 *             mask |= _method_to_status[name]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_method_to_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = (__pyx_t_9 != 0);
    if (__pyx_t_10) {

      /* "dds.pyx":1423
 *         if name in _method_to_status:
 * #             statuses.append(name)
 *             mask |= _method_to_status[name]             # <<<<<<<<<<<<<<
 * #     print('_status_mask_for_listener: mask = {:x} for status: {}'.format(mask, ','.join(statuses)))
 *     return mask
 */
      __pyx_t_5 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_method_to_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_InPlaceOr(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_11 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_mask = __pyx_t_11;

      /* "dds.pyx":1421
 * #     statuses = []
 *     for name, _ in inspect.getmembers(type(listener), predicate=inspect.isfunction):
 *         if name in _method_to_status:             # <<<<<<<<<<<<<<
 * #             statuses.append(name)
 *             mask |= _method_to_status[name]
 */
    }

    /* "dds.pyx":1420
 *     cdef uint32_t mask = 0
 * #     statuses = []
 *     for name, _ in inspect.getmembers(type(listener), predicate=inspect.isfunction):             # <<<<<<<<<<<<<<
 *         if name in _method_to_status:
 * #             statuses.append(name)
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1425
 *             mask |= _method_to_status[name]
 * #     print('_status_mask_for_listener: mask = {:x} for status: {}'.format(mask, ','.join(statuses)))
 *     return mask             # <<<<<<<<<<<<<<
 * 
 * # Implementation of the Listener callback routines. Currently only the on_data_available is implemented
 */
  __pyx_r = __pyx_v_mask;
  goto __pyx_L0;

  /* "dds.pyx":1417
 *     '''
 * 
 * cdef uint32_t _status_mask_for_listener(object listener):             # <<<<<<<<<<<<<<
 *     cdef uint32_t mask = 0
 * #     statuses = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("dds._status_mask_for_listener", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1428
 * 
 * # Implementation of the Listener callback routines. Currently only the on_data_available is implemented
 * cdef void on_inconsistent_topic (dds_entity_t topic, dds.dds_inconsistent_topic_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(topic)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_inconsistent_topic(dds_entity_t __pyx_v_topic, dds_inconsistent_topic_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_inconsistent_topic", 0);

  /* "dds.pyx":1429
 * # Implementation of the Listener callback routines. Currently only the on_data_available is implemented
 * cdef void on_inconsistent_topic (dds_entity_t topic, dds.dds_inconsistent_topic_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(topic)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_topic)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1430
 * cdef void on_inconsistent_topic (dds_entity_t topic, dds.dds_inconsistent_topic_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(topic)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1431
 *     cdef object entity = _entity_register_find(topic)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1433
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1433, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":1434
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_inconsistent_topic(entity,InconsistentTopicStatus(total_count, total_count_change))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1435
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_inconsistent_topic(entity,InconsistentTopicStatus(total_count, total_count_change))
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1435, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "dds.pyx":1436
 *         listener = entity.listener
 *         if listener:
 *             listener.on_inconsistent_topic(entity,InconsistentTopicStatus(total_count, total_count_change))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_offered_deadline_missed (dds_entity_t writer, dds_offered_deadline_missed_status_t * status) with gil:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_inconsistent_topic); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_InconsistentTopicStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1436, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_9);
        __pyx_t_8 = 0;
        __pyx_t_9 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1436, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1435
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_inconsistent_topic(entity,InconsistentTopicStatus(total_count, total_count_change))
 * 
 */
    }

    /* "dds.pyx":1433
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1428
 * 
 * # Implementation of the Listener callback routines. Currently only the on_data_available is implemented
 * cdef void on_inconsistent_topic (dds_entity_t topic, dds.dds_inconsistent_topic_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(topic)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_WriteUnraisable("dds.on_inconsistent_topic", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1438
 *             listener.on_inconsistent_topic(entity,InconsistentTopicStatus(total_count, total_count_change))
 * 
 * cdef void on_offered_deadline_missed (dds_entity_t writer, dds_offered_deadline_missed_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_offered_deadline_missed(dds_entity_t __pyx_v_writer, dds_offered_deadline_missed_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  dds_instance_handle_t __pyx_v_last_instance_handle;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  dds_instance_handle_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_offered_deadline_missed", 0);

  /* "dds.pyx":1439
 * 
 * cdef void on_offered_deadline_missed (dds_entity_t writer, dds_offered_deadline_missed_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(writer)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_writer)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1440
 * cdef void on_offered_deadline_missed (dds_entity_t writer, dds_offered_deadline_missed_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1441
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1442
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_4 = __pyx_v_status->last_instance_handle;
  __pyx_v_last_instance_handle = __pyx_t_4;

  /* "dds.pyx":1444
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1444, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":1445
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_offered_deadline_missed(entity,OfferedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1446
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_offered_deadline_missed(entity,OfferedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1446, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "dds.pyx":1447
 *         listener = entity.listener
 *         if listener:
 *             listener.on_offered_deadline_missed(entity,OfferedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_offered_incompatible_qos (dds_entity_t writer, dds_offered_incompatible_qos_status_t * status) with gil:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_offered_deadline_missed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_OfferedDeadlineMissedStatus); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_uint64_t(__pyx_v_last_instance_handle); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = NULL;
      __pyx_t_13 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_13 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_9, __pyx_t_10, __pyx_t_11};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1447, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_9, __pyx_t_10, __pyx_t_11};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1447, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1447, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_12) {
          __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_11);
        __pyx_t_9 = 0;
        __pyx_t_10 = 0;
        __pyx_t_11 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1447, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_13 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_13 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1447, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1446
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_offered_deadline_missed(entity,OfferedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 * 
 */
    }

    /* "dds.pyx":1444
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1438
 *             listener.on_inconsistent_topic(entity,InconsistentTopicStatus(total_count, total_count_change))
 * 
 * cdef void on_offered_deadline_missed (dds_entity_t writer, dds_offered_deadline_missed_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_WriteUnraisable("dds.on_offered_deadline_missed", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1449
 *             listener.on_offered_deadline_missed(entity,OfferedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 * 
 * cdef void on_offered_incompatible_qos (dds_entity_t writer, dds_offered_incompatible_qos_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_offered_incompatible_qos(dds_entity_t __pyx_v_writer, dds_offered_incompatible_qos_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  uint32_t __pyx_v_last_policy_id;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_offered_incompatible_qos", 0);

  /* "dds.pyx":1450
 * 
 * cdef void on_offered_incompatible_qos (dds_entity_t writer, dds_offered_incompatible_qos_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(writer)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_writer)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1451
 * cdef void on_offered_incompatible_qos (dds_entity_t writer, dds_offered_incompatible_qos_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t last_policy_id = status.last_policy_id
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1452
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 *     cdef uint32_t last_policy_id = status.last_policy_id
 * 
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1453
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t last_policy_id = status.last_policy_id             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_2 = __pyx_v_status->last_policy_id;
  __pyx_v_last_policy_id = __pyx_t_2;

  /* "dds.pyx":1455
 *     cdef uint32_t last_policy_id = status.last_policy_id
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1455, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":1456
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_offered_incompatible_qos(entity,OfferedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1457
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_offered_incompatible_qos(entity,OfferedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1457, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "dds.pyx":1458
 *         listener = entity.listener
 *         if listener:
 *             listener.on_offered_incompatible_qos(entity,OfferedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_liveliness_lost (dds_entity_t writer, dds_liveliness_lost_status_t * status) with gil:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_offered_incompatible_qos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_OfferedIncompatibleQosStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyInt_From_uint32_t(__pyx_v_last_policy_id); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_8, __pyx_t_9, __pyx_t_10};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1458, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_8, __pyx_t_9, __pyx_t_10};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1458, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1458, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_11) {
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_14, __pyx_t_10);
        __pyx_t_8 = 0;
        __pyx_t_9 = 0;
        __pyx_t_10 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1458, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1458, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1457
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_offered_incompatible_qos(entity,OfferedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 * 
 */
    }

    /* "dds.pyx":1455
 *     cdef uint32_t last_policy_id = status.last_policy_id
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1449
 *             listener.on_offered_deadline_missed(entity,OfferedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 * 
 * cdef void on_offered_incompatible_qos (dds_entity_t writer, dds_offered_incompatible_qos_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_WriteUnraisable("dds.on_offered_incompatible_qos", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1460
 *             listener.on_offered_incompatible_qos(entity,OfferedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 * 
 * cdef void on_liveliness_lost (dds_entity_t writer, dds_liveliness_lost_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_liveliness_lost(dds_entity_t __pyx_v_writer, dds_liveliness_lost_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_liveliness_lost", 0);

  /* "dds.pyx":1461
 * 
 * cdef void on_liveliness_lost (dds_entity_t writer, dds_liveliness_lost_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(writer)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_writer)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1462
 * cdef void on_liveliness_lost (dds_entity_t writer, dds_liveliness_lost_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1463
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1465
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1465, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":1466
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_liveliness_lost(entity,LivelinessLostStatus(total_count, total_count_change))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1467
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_liveliness_lost(entity,LivelinessLostStatus(total_count, total_count_change))
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1467, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "dds.pyx":1468
 *         listener = entity.listener
 *         if listener:
 *             listener.on_liveliness_lost(entity,LivelinessLostStatus(total_count, total_count_change))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_publication_matched (dds_entity_t writer, dds_publication_matched_status_t * status) with gil:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_liveliness_lost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_LivelinessLostStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1468, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1468, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1468, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_9);
        __pyx_t_8 = 0;
        __pyx_t_9 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1468, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1468, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1467
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_liveliness_lost(entity,LivelinessLostStatus(total_count, total_count_change))
 * 
 */
    }

    /* "dds.pyx":1465
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1460
 *             listener.on_offered_incompatible_qos(entity,OfferedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 * 
 * cdef void on_liveliness_lost (dds_entity_t writer, dds_liveliness_lost_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_WriteUnraisable("dds.on_liveliness_lost", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1470
 *             listener.on_liveliness_lost(entity,LivelinessLostStatus(total_count, total_count_change))
 * 
 * cdef void on_publication_matched (dds_entity_t writer, dds_publication_matched_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_publication_matched(dds_entity_t __pyx_v_writer, dds_publication_matched_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  uint32_t __pyx_v_current_count;
  int32_t __pyx_v_current_count_change;
  dds_instance_handle_t __pyx_v_last_subscription_handle;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  dds_instance_handle_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_publication_matched", 0);

  /* "dds.pyx":1471
 * 
 * cdef void on_publication_matched (dds_entity_t writer, dds_publication_matched_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(writer)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_writer)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1472
 * cdef void on_publication_matched (dds_entity_t writer, dds_publication_matched_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t current_count = status.current_count
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1473
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 *     cdef uint32_t current_count = status.current_count
 *     cdef int32_t current_count_change = status.current_count_change
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1474
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t current_count = status.current_count             # <<<<<<<<<<<<<<
 *     cdef int32_t current_count_change = status.current_count_change
 *     cdef dds_instance_handle_t last_subscription_handle = status.last_subscription_handle
 */
  __pyx_t_2 = __pyx_v_status->current_count;
  __pyx_v_current_count = __pyx_t_2;

  /* "dds.pyx":1475
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t current_count = status.current_count
 *     cdef int32_t current_count_change = status.current_count_change             # <<<<<<<<<<<<<<
 *     cdef dds_instance_handle_t last_subscription_handle = status.last_subscription_handle
 * 
 */
  __pyx_t_3 = __pyx_v_status->current_count_change;
  __pyx_v_current_count_change = __pyx_t_3;

  /* "dds.pyx":1476
 *     cdef uint32_t current_count = status.current_count
 *     cdef int32_t current_count_change = status.current_count_change
 *     cdef dds_instance_handle_t last_subscription_handle = status.last_subscription_handle             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_4 = __pyx_v_status->last_subscription_handle;
  __pyx_v_last_subscription_handle = __pyx_t_4;

  /* "dds.pyx":1478
 *     cdef dds_instance_handle_t last_subscription_handle = status.last_subscription_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1478, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":1479
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_publication_matched(entity,PublicationMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_subscription_handle))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1480
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_publication_matched(entity,PublicationMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_subscription_handle))
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1480, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "dds.pyx":1481
 *         listener = entity.listener
 *         if listener:
 *             listener.on_publication_matched(entity,PublicationMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_subscription_handle))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_requested_deadline_missed (dds_entity_t reader, dds_requested_deadline_missed_status_t * status) with gil:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_publication_matched); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_PublicationMatchedStatus); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_uint32_t(__pyx_v_current_count); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyInt_From_int32_t(__pyx_v_current_count_change); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyInt_From_uint64_t(__pyx_v_last_subscription_handle); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[6] = {__pyx_t_14, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 5+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1481, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[6] = {__pyx_t_14, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 5+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1481, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(5+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_14) {
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_15, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_16, 4+__pyx_t_15, __pyx_t_13);
        __pyx_t_9 = 0;
        __pyx_t_10 = 0;
        __pyx_t_11 = 0;
        __pyx_t_12 = 0;
        __pyx_t_13 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_16, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1480
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_publication_matched(entity,PublicationMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_subscription_handle))
 * 
 */
    }

    /* "dds.pyx":1478
 *     cdef dds_instance_handle_t last_subscription_handle = status.last_subscription_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1470
 *             listener.on_liveliness_lost(entity,LivelinessLostStatus(total_count, total_count_change))
 * 
 * cdef void on_publication_matched (dds_entity_t writer, dds_publication_matched_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(writer)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_WriteUnraisable("dds.on_publication_matched", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1483
 *             listener.on_publication_matched(entity,PublicationMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_subscription_handle))
 * 
 * cdef void on_requested_deadline_missed (dds_entity_t reader, dds_requested_deadline_missed_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_requested_deadline_missed(dds_entity_t __pyx_v_reader, dds_requested_deadline_missed_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  dds_instance_handle_t __pyx_v_last_instance_handle;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  dds_instance_handle_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_requested_deadline_missed", 0);

  /* "dds.pyx":1484
 * 
 * cdef void on_requested_deadline_missed (dds_entity_t reader, dds_requested_deadline_missed_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_reader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1485
 * cdef void on_requested_deadline_missed (dds_entity_t reader, dds_requested_deadline_missed_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1486
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1487
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_4 = __pyx_v_status->last_instance_handle;
  __pyx_v_last_instance_handle = __pyx_t_4;

  /* "dds.pyx":1489
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1489, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":1490
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_requested_deadline_missed(entity,RequestedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1491
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_requested_deadline_missed(entity,RequestedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1491, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "dds.pyx":1492
 *         listener = entity.listener
 *         if listener:
 *             listener.on_requested_deadline_missed(entity,RequestedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_requested_incompatible_qos (dds_entity_t reader, dds_requested_incompatible_qos_status_t * status) with gil:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_requested_deadline_missed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RequestedDeadlineMissedStatus); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_uint64_t(__pyx_v_last_instance_handle); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = NULL;
      __pyx_t_13 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_13 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_9, __pyx_t_10, __pyx_t_11};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1492, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_9, __pyx_t_10, __pyx_t_11};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1492, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1492, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_12) {
          __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_11);
        __pyx_t_9 = 0;
        __pyx_t_10 = 0;
        __pyx_t_11 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1492, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_13 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_13 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1492, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1491
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_requested_deadline_missed(entity,RequestedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 * 
 */
    }

    /* "dds.pyx":1489
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1483
 *             listener.on_publication_matched(entity,PublicationMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_subscription_handle))
 * 
 * cdef void on_requested_deadline_missed (dds_entity_t reader, dds_requested_deadline_missed_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_WriteUnraisable("dds.on_requested_deadline_missed", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1494
 *             listener.on_requested_deadline_missed(entity,RequestedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 * 
 * cdef void on_requested_incompatible_qos (dds_entity_t reader, dds_requested_incompatible_qos_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_requested_incompatible_qos(dds_entity_t __pyx_v_reader, dds_requested_incompatible_qos_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  uint32_t __pyx_v_last_policy_id;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_requested_incompatible_qos", 0);

  /* "dds.pyx":1495
 * 
 * cdef void on_requested_incompatible_qos (dds_entity_t reader, dds_requested_incompatible_qos_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_reader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1496
 * cdef void on_requested_incompatible_qos (dds_entity_t reader, dds_requested_incompatible_qos_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t last_policy_id = status.last_policy_id
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1497
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 *     cdef uint32_t last_policy_id = status.last_policy_id
 * 
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1498
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t last_policy_id = status.last_policy_id             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_2 = __pyx_v_status->last_policy_id;
  __pyx_v_last_policy_id = __pyx_t_2;

  /* "dds.pyx":1500
 *     cdef uint32_t last_policy_id = status.last_policy_id
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1500, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":1501
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_requested_incompatible_qos(entity,RequestedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1502
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_requested_incompatible_qos(entity,RequestedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1502, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "dds.pyx":1503
 *         listener = entity.listener
 *         if listener:
 *             listener.on_requested_incompatible_qos(entity,RequestedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_sample_rejected (dds_entity_t reader, dds_sample_rejected_status_t * status) with gil:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_requested_incompatible_qos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RequestedIncompatibleQosStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyInt_From_uint32_t(__pyx_v_last_policy_id); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_8, __pyx_t_9, __pyx_t_10};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1503, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_8, __pyx_t_9, __pyx_t_10};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1503, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_11) {
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_14, __pyx_t_10);
        __pyx_t_8 = 0;
        __pyx_t_9 = 0;
        __pyx_t_10 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1502
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_requested_incompatible_qos(entity,RequestedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 * 
 */
    }

    /* "dds.pyx":1500
 *     cdef uint32_t last_policy_id = status.last_policy_id
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1494
 *             listener.on_requested_deadline_missed(entity,RequestedDeadlineMissedStatus(total_count, total_count_change, last_instance_handle))
 * 
 * cdef void on_requested_incompatible_qos (dds_entity_t reader, dds_requested_incompatible_qos_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_WriteUnraisable("dds.on_requested_incompatible_qos", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1505
 *             listener.on_requested_incompatible_qos(entity,RequestedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 * 
 * cdef void on_sample_rejected (dds_entity_t reader, dds_sample_rejected_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_sample_rejected(dds_entity_t __pyx_v_reader, dds_sample_rejected_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  dds_sample_rejected_status_kind __pyx_v_last_reason;
  dds_instance_handle_t __pyx_v_last_instance_handle;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  dds_sample_rejected_status_kind __pyx_t_4;
  dds_instance_handle_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_sample_rejected", 0);

  /* "dds.pyx":1506
 * 
 * cdef void on_sample_rejected (dds_entity_t reader, dds_sample_rejected_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_reader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1507
 * cdef void on_sample_rejected (dds_entity_t reader, dds_sample_rejected_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef dds_sample_rejected_status_kind last_reason = status.last_reason
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1508
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 *     cdef dds_sample_rejected_status_kind last_reason = status.last_reason
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1509
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef dds_sample_rejected_status_kind last_reason = status.last_reason             # <<<<<<<<<<<<<<
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 */
  __pyx_t_4 = __pyx_v_status->last_reason;
  __pyx_v_last_reason = __pyx_t_4;

  /* "dds.pyx":1510
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef dds_sample_rejected_status_kind last_reason = status.last_reason
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_5 = __pyx_v_status->last_instance_handle;
  __pyx_v_last_instance_handle = __pyx_t_5;

  /* "dds.pyx":1512
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1512, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "dds.pyx":1513
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_sample_rejected(entity,SampleRejectedStatus(total_count, total_count_change,
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1514
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_sample_rejected(entity,SampleRejectedStatus(total_count, total_count_change,
 *                                                          DDSSampleRejectedStatusKind(last_reason), last_instance_handle))
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1514, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "dds.pyx":1515
 *         listener = entity.listener
 *         if listener:
 *             listener.on_sample_rejected(entity,SampleRejectedStatus(total_count, total_count_change,             # <<<<<<<<<<<<<<
 *                                                          DDSSampleRejectedStatusKind(last_reason), last_instance_handle))
 * 
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_sample_rejected); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1515, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_SampleRejectedStatus); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1515, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1515, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1515, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);

      /* "dds.pyx":1516
 *         if listener:
 *             listener.on_sample_rejected(entity,SampleRejectedStatus(total_count, total_count_change,
 *                                                          DDSSampleRejectedStatusKind(last_reason), last_instance_handle))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_liveliness_changed (dds_entity_t reader, dds_liveliness_changed_status_t * status) with gil:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_DDSSampleRejectedStatusKind); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = __Pyx_PyInt_From_dds_sample_rejected_status_kind(__pyx_v_last_reason); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_15 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_15)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_15);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
        }
      }
      __pyx_t_12 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_15, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14);
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyInt_From_uint64_t(__pyx_v_last_instance_handle); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = NULL;
      __pyx_t_16 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_16 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[5] = {__pyx_t_14, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_16, 4+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[5] = {__pyx_t_14, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_16, 4+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(4+__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__pyx_t_14) {
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_16, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_16, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_16, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_16, __pyx_t_13);
        __pyx_t_10 = 0;
        __pyx_t_11 = 0;
        __pyx_t_12 = 0;
        __pyx_t_13 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_16 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_16 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_entity, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_entity, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_16, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_16, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1514
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_sample_rejected(entity,SampleRejectedStatus(total_count, total_count_change,
 *                                                          DDSSampleRejectedStatusKind(last_reason), last_instance_handle))
 */
    }

    /* "dds.pyx":1512
 *     cdef dds_instance_handle_t last_instance_handle = status.last_instance_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1505
 *             listener.on_requested_incompatible_qos(entity,RequestedIncompatibleQosStatus(total_count, total_count_change, QosPolicyId(last_policy_id)))
 * 
 * cdef void on_sample_rejected (dds_entity_t reader, dds_sample_rejected_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_WriteUnraisable("dds.on_sample_rejected", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1518
 *                                                          DDSSampleRejectedStatusKind(last_reason), last_instance_handle))
 * 
 * cdef void on_liveliness_changed (dds_entity_t reader, dds_liveliness_changed_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t alive_count = status.alive_count
 */

static void __pyx_f_3dds_on_liveliness_changed(dds_entity_t __pyx_v_reader, dds_liveliness_changed_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_alive_count;
  uint32_t __pyx_v_not_alive_count;
  int32_t __pyx_v_alive_count_change;
  int32_t __pyx_v_not_alive_count_change;
  dds_instance_handle_t __pyx_v_last_publication_handle;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  dds_instance_handle_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_liveliness_changed", 0);

  /* "dds.pyx":1519
 * 
 * cdef void on_liveliness_changed (dds_entity_t reader, dds_liveliness_changed_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)             # <<<<<<<<<<<<<<
 *     cdef uint32_t alive_count = status.alive_count
 *     cdef uint32_t not_alive_count = status.not_alive_count
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_reader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1520
 * cdef void on_liveliness_changed (dds_entity_t reader, dds_liveliness_changed_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t alive_count = status.alive_count             # <<<<<<<<<<<<<<
 *     cdef uint32_t not_alive_count = status.not_alive_count
 *     cdef int32_t alive_count_change = status.alive_count_change
 */
  __pyx_t_2 = __pyx_v_status->alive_count;
  __pyx_v_alive_count = __pyx_t_2;

  /* "dds.pyx":1521
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t alive_count = status.alive_count
 *     cdef uint32_t not_alive_count = status.not_alive_count             # <<<<<<<<<<<<<<
 *     cdef int32_t alive_count_change = status.alive_count_change
 *     cdef int32_t not_alive_count_change = status.not_alive_count_change
 */
  __pyx_t_2 = __pyx_v_status->not_alive_count;
  __pyx_v_not_alive_count = __pyx_t_2;

  /* "dds.pyx":1522
 *     cdef uint32_t alive_count = status.alive_count
 *     cdef uint32_t not_alive_count = status.not_alive_count
 *     cdef int32_t alive_count_change = status.alive_count_change             # <<<<<<<<<<<<<<
 *     cdef int32_t not_alive_count_change = status.not_alive_count_change
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle
 */
  __pyx_t_3 = __pyx_v_status->alive_count_change;
  __pyx_v_alive_count_change = __pyx_t_3;

  /* "dds.pyx":1523
 *     cdef uint32_t not_alive_count = status.not_alive_count
 *     cdef int32_t alive_count_change = status.alive_count_change
 *     cdef int32_t not_alive_count_change = status.not_alive_count_change             # <<<<<<<<<<<<<<
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle
 * 
 */
  __pyx_t_3 = __pyx_v_status->not_alive_count_change;
  __pyx_v_not_alive_count_change = __pyx_t_3;

  /* "dds.pyx":1524
 *     cdef int32_t alive_count_change = status.alive_count_change
 *     cdef int32_t not_alive_count_change = status.not_alive_count_change
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_4 = __pyx_v_status->last_publication_handle;
  __pyx_v_last_publication_handle = __pyx_t_4;

  /* "dds.pyx":1526
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1526, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":1527
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_liveliness_changed(entity,LivelinessChangedStatus(alive_count,not_alive_count,alive_count_change,not_alive_count_change,last_publication_handle))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1528
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_liveliness_changed(entity,LivelinessChangedStatus(alive_count,not_alive_count,alive_count_change,not_alive_count_change,last_publication_handle))
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1528, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "dds.pyx":1529
 *         listener = entity.listener
 *         if listener:
 *             listener.on_liveliness_changed(entity,LivelinessChangedStatus(alive_count,not_alive_count,alive_count_change,not_alive_count_change,last_publication_handle))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_data_available (dds_entity_t reader) with gil:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_liveliness_changed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_LivelinessChangedStatus); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_alive_count); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyInt_From_uint32_t(__pyx_v_not_alive_count); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_alive_count_change); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyInt_From_int32_t(__pyx_v_not_alive_count_change); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyInt_From_uint64_t(__pyx_v_last_publication_handle); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[6] = {__pyx_t_14, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 5+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1529, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[6] = {__pyx_t_14, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 5+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1529, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(5+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1529, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_14) {
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_15, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_16, 4+__pyx_t_15, __pyx_t_13);
        __pyx_t_9 = 0;
        __pyx_t_10 = 0;
        __pyx_t_11 = 0;
        __pyx_t_12 = 0;
        __pyx_t_13 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_16, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1529, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1529, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1528
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_liveliness_changed(entity,LivelinessChangedStatus(alive_count,not_alive_count,alive_count_change,not_alive_count_change,last_publication_handle))
 * 
 */
    }

    /* "dds.pyx":1526
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1518
 *                                                          DDSSampleRejectedStatusKind(last_reason), last_instance_handle))
 * 
 * cdef void on_liveliness_changed (dds_entity_t reader, dds_liveliness_changed_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t alive_count = status.alive_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_WriteUnraisable("dds.on_liveliness_changed", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1531
 *             listener.on_liveliness_changed(entity,LivelinessChangedStatus(alive_count,not_alive_count,alive_count_change,not_alive_count_change,last_publication_handle))
 * 
 * cdef void on_data_available (dds_entity_t reader) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 * 
 */

static void __pyx_f_3dds_on_data_available(dds_entity_t __pyx_v_reader) {
  PyObject *__pyx_v_entity = 0;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_data_available", 0);

  /* "dds.pyx":1532
 * 
 * cdef void on_data_available (dds_entity_t reader) with gil:
 *     cdef object entity = _entity_register_find(reader)             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_reader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1534
 *     cdef object entity = _entity_register_find(reader)
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1534, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "dds.pyx":1535
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_data_available(entity)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1536
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_data_available(entity)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1536, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "dds.pyx":1537
 *         listener = entity.listener
 *         if listener:
 *             listener.on_data_available(entity)             # <<<<<<<<<<<<<<
 * 
 * cdef void on_subscription_matched (dds_entity_t reader, dds_subscription_matched_status_t * status) with gil:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_data_available); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_entity) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_entity);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1536
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_data_available(entity)
 * 
 */
    }

    /* "dds.pyx":1534
 *     cdef object entity = _entity_register_find(reader)
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1531
 *             listener.on_liveliness_changed(entity,LivelinessChangedStatus(alive_count,not_alive_count,alive_count_change,not_alive_count_change,last_publication_handle))
 * 
 * cdef void on_data_available (dds_entity_t reader) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("dds.on_data_available", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1539
 *             listener.on_data_available(entity)
 * 
 * cdef void on_subscription_matched (dds_entity_t reader, dds_subscription_matched_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_subscription_matched(dds_entity_t __pyx_v_reader, dds_subscription_matched_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  uint32_t __pyx_v_current_count;
  int32_t __pyx_v_current_count_change;
  dds_instance_handle_t __pyx_v_last_publication_handle;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  dds_instance_handle_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_subscription_matched", 0);

  /* "dds.pyx":1540
 * 
 * cdef void on_subscription_matched (dds_entity_t reader, dds_subscription_matched_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_reader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1541
 * cdef void on_subscription_matched (dds_entity_t reader, dds_subscription_matched_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t current_count = status.current_count
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1542
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 *     cdef uint32_t current_count = status.current_count
 *     cdef int32_t current_count_change = status.current_count_change
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1543
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t current_count = status.current_count             # <<<<<<<<<<<<<<
 *     cdef int32_t current_count_change = status.current_count_change
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle
 */
  __pyx_t_2 = __pyx_v_status->current_count;
  __pyx_v_current_count = __pyx_t_2;

  /* "dds.pyx":1544
 *     cdef int32_t total_count_change = status.total_count_change
 *     cdef uint32_t current_count = status.current_count
 *     cdef int32_t current_count_change = status.current_count_change             # <<<<<<<<<<<<<<
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle
 * 
 */
  __pyx_t_3 = __pyx_v_status->current_count_change;
  __pyx_v_current_count_change = __pyx_t_3;

  /* "dds.pyx":1545
 *     cdef uint32_t current_count = status.current_count
 *     cdef int32_t current_count_change = status.current_count_change
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_4 = __pyx_v_status->last_publication_handle;
  __pyx_v_last_publication_handle = __pyx_t_4;

  /* "dds.pyx":1547
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1547, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":1548
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_subscription_matched(entity,SubscriptionMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_publication_handle))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1549
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_subscription_matched(entity,SubscriptionMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_publication_handle))
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1549, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "dds.pyx":1550
 *         listener = entity.listener
 *         if listener:
 *             listener.on_subscription_matched(entity,SubscriptionMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_publication_handle))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_sample_lost (dds_entity_t reader, dds_sample_lost_status_t * status) with gil:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_subscription_matched); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_SubscriptionMatchedStatus); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_uint32_t(__pyx_v_current_count); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyInt_From_int32_t(__pyx_v_current_count_change); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyInt_From_uint64_t(__pyx_v_last_publication_handle); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[6] = {__pyx_t_14, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 5+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[6] = {__pyx_t_14, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 5+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(5+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_14) {
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_15, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_16, 4+__pyx_t_15, __pyx_t_13);
        __pyx_t_9 = 0;
        __pyx_t_10 = 0;
        __pyx_t_11 = 0;
        __pyx_t_12 = 0;
        __pyx_t_13 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_16, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_entity, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1549
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_subscription_matched(entity,SubscriptionMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_publication_handle))
 * 
 */
    }

    /* "dds.pyx":1547
 *     cdef dds_instance_handle_t last_publication_handle = status.last_publication_handle
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1539
 *             listener.on_data_available(entity)
 * 
 * cdef void on_subscription_matched (dds_entity_t reader, dds_subscription_matched_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_WriteUnraisable("dds.on_subscription_matched", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1552
 *             listener.on_subscription_matched(entity,SubscriptionMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_publication_handle))
 * 
 * cdef void on_sample_lost (dds_entity_t reader, dds_sample_lost_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

static void __pyx_f_3dds_on_sample_lost(dds_entity_t __pyx_v_reader, dds_sample_lost_status_t *__pyx_v_status) {
  PyObject *__pyx_v_entity = 0;
  uint32_t __pyx_v_total_count;
  int32_t __pyx_v_total_count_change;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_sample_lost", 0);

  /* "dds.pyx":1553
 * 
 * cdef void on_sample_lost (dds_entity_t reader, dds_sample_lost_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)             # <<<<<<<<<<<<<<
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_reader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1554
 * cdef void on_sample_lost (dds_entity_t reader, dds_sample_lost_status_t * status) with gil:
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count             # <<<<<<<<<<<<<<
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 */
  __pyx_t_2 = __pyx_v_status->total_count;
  __pyx_v_total_count = __pyx_t_2;

  /* "dds.pyx":1555
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 *     cdef int32_t total_count_change = status.total_count_change             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_3 = __pyx_v_status->total_count_change;
  __pyx_v_total_count_change = __pyx_t_3;

  /* "dds.pyx":1557
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1557, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":1558
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_sample_lost(entity,SampleLostStatus(total_count, total_count_change))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1559
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_sample_lost(entity,SampleLostStatus(total_count, total_count_change))
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1559, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "dds.pyx":1560
 *         listener = entity.listener
 *         if listener:
 *             listener.on_sample_lost(entity,SampleLostStatus(total_count, total_count_change))             # <<<<<<<<<<<<<<
 * 
 * cdef void on_data_on_readers (dds_entity_t subscriber) with gil:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_sample_lost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_SampleLostStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyInt_From_uint32_t(__pyx_v_total_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_From_int32_t(__pyx_v_total_count_change); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_9);
        __pyx_t_8 = 0;
        __pyx_t_9 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_entity, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_entity);
        __Pyx_GIVEREF(__pyx_v_entity);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_entity);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1559
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_sample_lost(entity,SampleLostStatus(total_count, total_count_change))
 * 
 */
    }

    /* "dds.pyx":1557
 *     cdef int32_t total_count_change = status.total_count_change
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1552
 *             listener.on_subscription_matched(entity,SubscriptionMatchedStatus(total_count, total_count_change, current_count, current_count_change, last_publication_handle))
 * 
 * cdef void on_sample_lost (dds_entity_t reader, dds_sample_lost_status_t * status) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(reader)
 *     cdef uint32_t total_count = status.total_count
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_WriteUnraisable("dds.on_sample_lost", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1562
 *             listener.on_sample_lost(entity,SampleLostStatus(total_count, total_count_change))
 * 
 * cdef void on_data_on_readers (dds_entity_t subscriber) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(subscriber)
 * 
 */

static void __pyx_f_3dds_on_data_on_readers(dds_entity_t __pyx_v_subscriber) {
  PyObject *__pyx_v_entity = 0;
  PyObject *__pyx_v_listener = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("on_data_on_readers", 0);

  /* "dds.pyx":1563
 * 
 * cdef void on_data_on_readers (dds_entity_t subscriber) with gil:
 *     cdef object entity = _entity_register_find(subscriber)             # <<<<<<<<<<<<<<
 * 
 *     if entity:
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_3dds__entity_register_find(__pyx_v_subscriber)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_entity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1565
 *     cdef object entity = _entity_register_find(subscriber)
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_entity); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1565, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "dds.pyx":1566
 * 
 *     if entity:
 *         listener = entity.listener             # <<<<<<<<<<<<<<
 *         if listener:
 *             listener.on_data_on_readers(entity)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entity, __pyx_n_s_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1567
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_data_on_readers(entity)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1567, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "dds.pyx":1568
 *         listener = entity.listener
 *         if listener:
 *             listener.on_data_on_readers(entity)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_on_data_on_readers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_entity) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_entity);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "dds.pyx":1567
 *     if entity:
 *         listener = entity.listener
 *         if listener:             # <<<<<<<<<<<<<<
 *             listener.on_data_on_readers(entity)
 * 
 */
    }

    /* "dds.pyx":1565
 *     cdef object entity = _entity_register_find(subscriber)
 * 
 *     if entity:             # <<<<<<<<<<<<<<
 *         listener = entity.listener
 *         if listener:
 */
  }

  /* "dds.pyx":1562
 *             listener.on_sample_lost(entity,SampleLostStatus(total_count, total_count_change))
 * 
 * cdef void on_data_on_readers (dds_entity_t subscriber) with gil:             # <<<<<<<<<<<<<<
 *     cdef object entity = _entity_register_find(subscriber)
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("dds.on_data_on_readers", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entity);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "dds.pyx":1603
 * participant_listener.subscriberlistener = subscriber_listener
 * 
 * cdef _set_status_for_listener(dds_entity_t c_entity, object listener):             # <<<<<<<<<<<<<<
 *     cdef uint32_t listener_mask = _status_mask_for_listener(listener)
 *     cdef int r
 */

static PyObject *__pyx_f_3dds__set_status_for_listener(dds_entity_t __pyx_v_c_entity, PyObject *__pyx_v_listener) {
  uint32_t __pyx_v_listener_mask;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("_set_status_for_listener", 0);

  /* "dds.pyx":1604
 * 
 * cdef _set_status_for_listener(dds_entity_t c_entity, object listener):
 *     cdef uint32_t listener_mask = _status_mask_for_listener(listener)             # <<<<<<<<<<<<<<
 *     cdef int r
 *     # this must be done as an indivisible step with listener registration
 */
  __pyx_v_listener_mask = __pyx_f_3dds__status_mask_for_listener(__pyx_v_listener);

  /* "dds.pyx":1607
 *     cdef int r
 *     # this must be done as an indivisible step with listener registration
 *     r = dds.dds_status_set_enabled(c_entity, listener_mask) #need_gil             # <<<<<<<<<<<<<<
 *     if r < 0:
 *         raise DDSException('Error setting entity status for listener', r)
 */
  __pyx_v_r = dds_status_set_enabled(__pyx_v_c_entity, __pyx_v_listener_mask);

  /* "dds.pyx":1608
 *     # this must be done as an indivisible step with listener registration
 *     r = dds.dds_status_set_enabled(c_entity, listener_mask) #need_gil
 *     if r < 0:             # <<<<<<<<<<<<<<
 *         raise DDSException('Error setting entity status for listener', r)
 * 
 */
  __pyx_t_1 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "dds.pyx":1609
 *     r = dds.dds_status_set_enabled(c_entity, listener_mask) #need_gil
 *     if r < 0:
 *         raise DDSException('Error setting entity status for listener', r)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Error_setting_entity_status_for, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Error_setting_entity_status_for, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Error_setting_entity_status_for);
      __Pyx_GIVEREF(__pyx_kp_s_Error_setting_entity_status_for);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Error_setting_entity_status_for);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1609, __pyx_L1_error)

    /* "dds.pyx":1608
 *     # this must be done as an indivisible step with listener registration
 *     r = dds.dds_status_set_enabled(c_entity, listener_mask) #need_gil
 *     if r < 0:             # <<<<<<<<<<<<<<
 *         raise DDSException('Error setting entity status for listener', r)
 * 
 */
  }

  /* "dds.pyx":1603
 * participant_listener.subscriberlistener = subscriber_listener
 * 
 * cdef _set_status_for_listener(dds_entity_t c_entity, object listener):             # <<<<<<<<<<<<<<
 *     cdef uint32_t listener_mask = _status_mask_for_listener(listener)
 *     cdef int r
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds._set_status_for_listener", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1631
 *     cdef object _readers
 * 
 *     def __cinit__(self, int did = DDS_DOMAIN_DEFAULT, dds.Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 * 
 *         self._publishers = []
 */

/* Python wrapper */
static int __pyx_pw_3dds_17DomainParticipant_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_17DomainParticipant_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_did;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_did,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_did);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1631, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_did = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_did == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1631, __pyx_L3_error)
    } else {
      __pyx_v_did = __pyx_k__7;
    }
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[1]);
    __pyx_v_listener = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1631, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DomainParticipant.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 1631, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_17DomainParticipant___cinit__(((struct __pyx_obj_3dds_DomainParticipant *)__pyx_v_self), __pyx_v_did, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_17DomainParticipant___cinit__(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, int __pyx_v_did, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  dds_qos_t *__pyx_v__c_qos;
  dds_participantlistener_t *__pyx_v__c_listener;
  int __pyx_v_r;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":1633
 *     def __cinit__(self, int did = DDS_DOMAIN_DEFAULT, dds.Qos qos = None, listener = None):
 * 
 *         self._publishers = []             # <<<<<<<<<<<<<<
 *         self._subscribers = []
 *         self._writers = []
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_publishers);
  __Pyx_DECREF(__pyx_v_self->_publishers);
  __pyx_v_self->_publishers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1634
 * 
 *         self._publishers = []
 *         self._subscribers = []             # <<<<<<<<<<<<<<
 *         self._writers = []
 *         self._readers = []
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_subscribers);
  __Pyx_DECREF(__pyx_v_self->_subscribers);
  __pyx_v_self->_subscribers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1635
 *         self._publishers = []
 *         self._subscribers = []
 *         self._writers = []             # <<<<<<<<<<<<<<
 *         self._readers = []
 *         self._listener = listener
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_writers);
  __Pyx_DECREF(__pyx_v_self->_writers);
  __pyx_v_self->_writers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1636
 *         self._subscribers = []
 *         self._writers = []
 *         self._readers = []             # <<<<<<<<<<<<<<
 *         self._listener = listener
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_readers);
  __Pyx_DECREF(__pyx_v_self->_readers);
  __pyx_v_self->_readers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1637
 *         self._writers = []
 *         self._readers = []
 *         self._listener = listener             # <<<<<<<<<<<<<<
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 */
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._listener);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._listener);
  __pyx_v_self->__pyx_base._listener = __pyx_v_listener;

  /* "dds.pyx":1639
 *         self._listener = listener
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL             # <<<<<<<<<<<<<<
 * 
 *         if qos and not isinstance(qos, Qos):
 */
  __pyx_v__c_qos = NULL;

  /* "dds.pyx":1641
 *         cdef dds.dds_qos_t *_c_qos = NULL
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1641, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_TypeCheck(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos); 
  __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":1642
 * 
 *         if qos and not isinstance(qos, Qos):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if listener and not isinstance(listener, Listener):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1642, __pyx_L1_error)

    /* "dds.pyx":1641
 *         cdef dds.dds_qos_t *_c_qos = NULL
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":1644
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1644, __pyx_L1_error)
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L7_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_listener, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L7_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":1645
 * 
 *         if listener and not isinstance(listener, Listener):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if qos:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1645, __pyx_L1_error)

    /* "dds.pyx":1644
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":1647
 *             raise DDSException('Bad parameter')
 * 
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1647, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "dds.pyx":1648
 * 
 *         if qos:
 *             _c_qos = qos.handle()             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_participantlistener_t *_c_listener = NULL
 */
    __pyx_v__c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

    /* "dds.pyx":1647
 *             raise DDSException('Bad parameter')
 * 
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  }

  /* "dds.pyx":1650
 *             _c_qos = qos.handle()
 * 
 *         cdef dds_participantlistener_t *_c_listener = NULL             # <<<<<<<<<<<<<<
 *         if listener:
 *             _c_listener = &participant_listener
 */
  __pyx_v__c_listener = NULL;

  /* "dds.pyx":1651
 * 
 *         cdef dds_participantlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &participant_listener
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1651, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "dds.pyx":1652
 *         cdef dds_participantlistener_t *_c_listener = NULL
 *         if listener:
 *             _c_listener = &participant_listener             # <<<<<<<<<<<<<<
 * 
 *         # enabling a listener requires three steps, done as a indivisible action:
 */
    __pyx_v__c_listener = (&__pyx_v_3dds_participant_listener);

    /* "dds.pyx":1651
 * 
 *         cdef dds_participantlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &participant_listener
 * 
 */
  }

  /* "dds.pyx":1659
 *         #   3) _set_status_for_listener
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds_participant_create(&self._c_handle, did, _c_qos, <dds_participantlistener_t *>_c_listener) # need_gil             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to create participant', r)
 */
  __pyx_v_r = dds_participant_create((&__pyx_v_self->__pyx_base._c_handle), __pyx_v_did, __pyx_v__c_qos, ((dds_participantlistener_t *)__pyx_v__c_listener));

  /* "dds.pyx":1660
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds_participant_create(&self._c_handle, did, _c_qos, <dds_participantlistener_t *>_c_listener) # need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create participant', r)
 * 
 */
  __pyx_t_2 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":1661
 *         r = dds_participant_create(&self._c_handle, did, _c_qos, <dds_participantlistener_t *>_c_listener) # need_gil
 *         if r < 0:
 *             raise DDSException('Failed to create participant', r)             # <<<<<<<<<<<<<<
 * 
 *         _entity_register_add(self)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_participant, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_participant, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_create_participant);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_create_participant);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Failed_to_create_participant);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1661, __pyx_L1_error)

    /* "dds.pyx":1660
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds_participant_create(&self._c_handle, did, _c_qos, <dds_participantlistener_t *>_c_listener) # need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create participant', r)
 * 
 */
  }

  /* "dds.pyx":1663
 *             raise DDSException('Failed to create participant', r)
 * 
 *         _entity_register_add(self)             # <<<<<<<<<<<<<<
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)
 */
  __pyx_t_1 = __pyx_f_3dds__entity_register_add(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1664
 * 
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1664, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "dds.pyx":1665
 *         _entity_register_add(self)
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)             # <<<<<<<<<<<<<<
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)
 */
    __pyx_t_1 = __pyx_f_3dds__set_status_for_listener(__pyx_v_self->__pyx_base._c_handle, __pyx_v_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "dds.pyx":1664
 * 
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  }

  /* "dds.pyx":1667
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)             # <<<<<<<<<<<<<<
 * 
 *     def create_publisher(self, Qos qos = None, listener = None):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sleep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_5, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1631
 *     cdef object _readers
 * 
 *     def __cinit__(self, int did = DDS_DOMAIN_DEFAULT, dds.Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 * 
 *         self._publishers = []
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.DomainParticipant.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1669
 *         time.sleep(0)
 * 
 *     def create_publisher(self, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_publisher(Qos qos = None, listener = None)
 *         Create a publisher
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DomainParticipant_3create_publisher(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_17DomainParticipant_2create_publisher[] = "create_publisher(Qos qos = None, listener = None)\n        Create a publisher\n\n        :type qos: QoS\n        :param qos: QoS\n\n        :type listener: Listener\n        :param listener: Listener\n\n        :rtype: Publisher\n        ";
static PyObject *__pyx_pw_3dds_17DomainParticipant_3create_publisher(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_publisher (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[0] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_publisher") < 0)) __PYX_ERR(0, 1669, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[0]);
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_publisher", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1669, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DomainParticipant.create_publisher", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 1669, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_17DomainParticipant_2create_publisher(((struct __pyx_obj_3dds_DomainParticipant *)__pyx_v_self), __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DomainParticipant_2create_publisher(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  struct __pyx_obj_3dds_Publisher *__pyx_v_pub = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("create_publisher", 0);

  /* "dds.pyx":1681
 *         :rtype: Publisher
 *         '''
 *         pub = Publisher(self, qos, listener)             # <<<<<<<<<<<<<<
 *         self._publishers.append(pub)
 *         return pub
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_qos));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_qos));
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_listener);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_Publisher), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pub = ((struct __pyx_obj_3dds_Publisher *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":1682
 *         '''
 *         pub = Publisher(self, qos, listener)
 *         self._publishers.append(pub)             # <<<<<<<<<<<<<<
 *         return pub
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_self->_publishers, ((PyObject *)__pyx_v_pub)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1682, __pyx_L1_error)

  /* "dds.pyx":1683
 *         pub = Publisher(self, qos, listener)
 *         self._publishers.append(pub)
 *         return pub             # <<<<<<<<<<<<<<
 * 
 *     def create_datawriter(self, Topic topic, Qos qos = None, listener = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_pub));
  __pyx_r = ((PyObject *)__pyx_v_pub);
  goto __pyx_L0;

  /* "dds.pyx":1669
 *         time.sleep(0)
 * 
 *     def create_publisher(self, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_publisher(Qos qos = None, listener = None)
 *         Create a publisher
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.DomainParticipant.create_publisher", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pub);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1685
 *         return pub
 * 
 *     def create_datawriter(self, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_datawriter(Topic topic, Qos qos = None, listener = None)
 *         Create a publisher
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DomainParticipant_5create_datawriter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_17DomainParticipant_4create_datawriter[] = "create_datawriter(Topic topic, Qos qos = None, listener = None)\n        Create a publisher\n\n        :type topic: Topic\n        :param topic: Topic\n\n        :type qos: QoS\n        :param qos: QoS\n\n        :type listener: Listener\n        :param listener: Listener\n\n        :rtype: DataWriter\n        ";
static PyObject *__pyx_pw_3dds_17DomainParticipant_5create_datawriter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Topic *__pyx_v_topic = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_datawriter (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_topic,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_topic)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_datawriter") < 0)) __PYX_ERR(0, 1685, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_topic = ((struct __pyx_obj_3dds_Topic *)values[0]);
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[1]);
    __pyx_v_listener = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_datawriter", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1685, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DomainParticipant.create_datawriter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_Topic, 1, "topic", 0))) __PYX_ERR(0, 1685, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 1685, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_17DomainParticipant_4create_datawriter(((struct __pyx_obj_3dds_DomainParticipant *)__pyx_v_self), __pyx_v_topic, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DomainParticipant_4create_datawriter(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  struct __pyx_obj_3dds_DataWriter *__pyx_v_writer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("create_datawriter", 0);

  /* "dds.pyx":1700
 *         :rtype: DataWriter
 *         '''
 *         writer = DataWriter(self, topic, qos, listener)             # <<<<<<<<<<<<<<
 *         self._writers.append(writer)
 *         return writer
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_v_topic));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_topic));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_topic));
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_qos));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_qos));
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_listener);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_DataWriter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_writer = ((struct __pyx_obj_3dds_DataWriter *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":1701
 *         '''
 *         writer = DataWriter(self, topic, qos, listener)
 *         self._writers.append(writer)             # <<<<<<<<<<<<<<
 *         return writer
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_self->_writers, ((PyObject *)__pyx_v_writer)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1701, __pyx_L1_error)

  /* "dds.pyx":1702
 *         writer = DataWriter(self, topic, qos, listener)
 *         self._writers.append(writer)
 *         return writer             # <<<<<<<<<<<<<<
 * 
 *     def create_subscriber(self, Qos qos = None, listener = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_writer));
  __pyx_r = ((PyObject *)__pyx_v_writer);
  goto __pyx_L0;

  /* "dds.pyx":1685
 *         return pub
 * 
 *     def create_datawriter(self, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_datawriter(Topic topic, Qos qos = None, listener = None)
 *         Create a publisher
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.DomainParticipant.create_datawriter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_writer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1704
 *         return writer
 * 
 *     def create_subscriber(self, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_subscriber(Qos qos = None, listener = None)
 *         Create a subscriber
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DomainParticipant_7create_subscriber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_17DomainParticipant_6create_subscriber[] = "create_subscriber(Qos qos = None, listener = None)\n        Create a subscriber\n\n        :type qos: QoS\n        :param qos: QoS\n\n        :type listener: Listener\n        :param listener: Listener\n\n        :rtype: Subscriber\n        ";
static PyObject *__pyx_pw_3dds_17DomainParticipant_7create_subscriber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_subscriber (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[0] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_subscriber") < 0)) __PYX_ERR(0, 1704, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[0]);
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_subscriber", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1704, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DomainParticipant.create_subscriber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 1704, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_17DomainParticipant_6create_subscriber(((struct __pyx_obj_3dds_DomainParticipant *)__pyx_v_self), __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DomainParticipant_6create_subscriber(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  struct __pyx_obj_3dds_Subscriber *__pyx_v_sub = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("create_subscriber", 0);

  /* "dds.pyx":1716
 *         :rtype: Subscriber
 *         '''
 *         sub = Subscriber(self, qos, listener)             # <<<<<<<<<<<<<<
 *         self._subscribers.append(sub)
 *         return sub
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_qos));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_qos));
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_listener);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_Subscriber), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sub = ((struct __pyx_obj_3dds_Subscriber *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":1717
 *         '''
 *         sub = Subscriber(self, qos, listener)
 *         self._subscribers.append(sub)             # <<<<<<<<<<<<<<
 *         return sub
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_self->_subscribers, ((PyObject *)__pyx_v_sub)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1717, __pyx_L1_error)

  /* "dds.pyx":1718
 *         sub = Subscriber(self, qos, listener)
 *         self._subscribers.append(sub)
 *         return sub             # <<<<<<<<<<<<<<
 * 
 *     def create_datareader(self, Topic topic, Qos qos = None, listener = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_sub));
  __pyx_r = ((PyObject *)__pyx_v_sub);
  goto __pyx_L0;

  /* "dds.pyx":1704
 *         return writer
 * 
 *     def create_subscriber(self, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_subscriber(Qos qos = None, listener = None)
 *         Create a subscriber
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.DomainParticipant.create_subscriber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_sub);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1720
 *         return sub
 * 
 *     def create_datareader(self, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_datareader(Topic topic, Qos qos = None, listener = None)
 *         Create a publisher
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DomainParticipant_9create_datareader(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_17DomainParticipant_8create_datareader[] = "create_datareader(Topic topic, Qos qos = None, listener = None)\n        Create a publisher\n\n        :type topic: Topic\n        :param topic: Topic\n\n        :type qos: QoS\n        :param qos: QoS\n\n        :type listener: Listener\n        :param listener: Listener\n\n        :rtype: DataReader\n        ";
static PyObject *__pyx_pw_3dds_17DomainParticipant_9create_datareader(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Topic *__pyx_v_topic = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_datareader (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_topic,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_topic)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_datareader") < 0)) __PYX_ERR(0, 1720, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_topic = ((struct __pyx_obj_3dds_Topic *)values[0]);
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[1]);
    __pyx_v_listener = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_datareader", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1720, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DomainParticipant.create_datareader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_Topic, 1, "topic", 0))) __PYX_ERR(0, 1720, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 1720, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_17DomainParticipant_8create_datareader(((struct __pyx_obj_3dds_DomainParticipant *)__pyx_v_self), __pyx_v_topic, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DomainParticipant_8create_datareader(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  struct __pyx_obj_3dds_DataReader *__pyx_v_reader = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("create_datareader", 0);

  /* "dds.pyx":1735
 *         :rtype: DataReader
 *         '''
 *         reader = DataReader(self, topic, qos, listener)             # <<<<<<<<<<<<<<
 *         self._readers.append(reader)
 *         return reader
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_v_topic));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_topic));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_topic));
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_qos));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_qos));
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_listener);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_DataReader), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_reader = ((struct __pyx_obj_3dds_DataReader *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":1736
 *         '''
 *         reader = DataReader(self, topic, qos, listener)
 *         self._readers.append(reader)             # <<<<<<<<<<<<<<
 *         return reader
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_self->_readers, ((PyObject *)__pyx_v_reader)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1736, __pyx_L1_error)

  /* "dds.pyx":1737
 *         reader = DataReader(self, topic, qos, listener)
 *         self._readers.append(reader)
 *         return reader             # <<<<<<<<<<<<<<
 * 
 *     def find_topic(self, str name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __pyx_r = ((PyObject *)__pyx_v_reader);
  goto __pyx_L0;

  /* "dds.pyx":1720
 *         return sub
 * 
 *     def create_datareader(self, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_datareader(Topic topic, Qos qos = None, listener = None)
 *         Create a publisher
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.DomainParticipant.create_datareader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1739
 *         return reader
 * 
 *     def find_topic(self, str name):             # <<<<<<<<<<<<<<
 *         '''find_topic(str name, listener = None)
 *         Find an already registered topic, and make it available locally
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DomainParticipant_11find_topic(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_3dds_17DomainParticipant_10find_topic[] = "find_topic(str name, listener = None)\n        Find an already registered topic, and make it available locally\n\n        :type name: str\n        :param name: the topic name\n\n        :rtype: Topic\n        ";
static PyObject *__pyx_pw_3dds_17DomainParticipant_11find_topic(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("find_topic (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 1739, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_17DomainParticipant_10find_topic(((struct __pyx_obj_3dds_DomainParticipant *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DomainParticipant_10find_topic(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, PyObject *__pyx_v_name) {
  dds_entity_t __pyx_v_c_topic;
  PyObject *__pyx_v_name_as_bytes = NULL;
  char *__pyx_v_name_as_char;
  dds_entity_t __pyx_v_c_entity;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("find_topic", 0);

  /* "dds.pyx":1749
 *         '''
 *         cdef dds.dds_entity_t c_topic
 *         name_as_bytes = name.encode('ISO-8859-1')             # <<<<<<<<<<<<<<
 *         cdef char *name_as_char = name_as_bytes
 *         cdef dds_entity_t c_entity = self.handle()
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_name, __pyx_kp_s_ISO_8859_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_as_bytes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1750
 *         cdef dds.dds_entity_t c_topic
 *         name_as_bytes = name.encode('ISO-8859-1')
 *         cdef char *name_as_char = name_as_bytes             # <<<<<<<<<<<<<<
 *         cdef dds_entity_t c_entity = self.handle()
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_name_as_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1750, __pyx_L1_error)
  __pyx_v_name_as_char = __pyx_t_2;

  /* "dds.pyx":1751
 *         name_as_bytes = name.encode('ISO-8859-1')
 *         cdef char *name_as_char = name_as_bytes
 *         cdef dds_entity_t c_entity = self.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_topic = dds.dds_topic_find(c_entity, name_as_char)
 */
  __pyx_v_c_entity = ((struct __pyx_vtabstruct_3dds_DomainParticipant *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* "dds.pyx":1752
 *         cdef char *name_as_char = name_as_bytes
 *         cdef dds_entity_t c_entity = self.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_topic = dds.dds_topic_find(c_entity, name_as_char)
 *         if c_topic != <dds_entity_t>0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":1753
 *         cdef dds_entity_t c_entity = self.handle()
 *         with nogil:
 *             c_topic = dds.dds_topic_find(c_entity, name_as_char)             # <<<<<<<<<<<<<<
 *         if c_topic != <dds_entity_t>0:
 *             return _FoundTopic_Init(self, c_topic)
 */
        __pyx_v_c_topic = dds_topic_find(__pyx_v_c_entity, __pyx_v_name_as_char);
      }

      /* "dds.pyx":1752
 *         cdef char *name_as_char = name_as_bytes
 *         cdef dds_entity_t c_entity = self.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_topic = dds.dds_topic_find(c_entity, name_as_char)
 *         if c_topic != <dds_entity_t>0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":1754
 *         with nogil:
 *             c_topic = dds.dds_topic_find(c_entity, name_as_char)
 *         if c_topic != <dds_entity_t>0:             # <<<<<<<<<<<<<<
 *             return _FoundTopic_Init(self, c_topic)
 *         else:
 */
  __pyx_t_3 = ((__pyx_v_c_topic != ((dds_entity_t)0)) != 0);
  if (__pyx_t_3) {

    /* "dds.pyx":1755
 *             c_topic = dds.dds_topic_find(c_entity, name_as_char)
 *         if c_topic != <dds_entity_t>0:
 *             return _FoundTopic_Init(self, c_topic)             # <<<<<<<<<<<<<<
 *         else:
 *             return None
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_3dds__FoundTopic_Init(__pyx_v_self, __pyx_v_c_topic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "dds.pyx":1754
 *         with nogil:
 *             c_topic = dds.dds_topic_find(c_entity, name_as_char)
 *         if c_topic != <dds_entity_t>0:             # <<<<<<<<<<<<<<
 *             return _FoundTopic_Init(self, c_topic)
 *         else:
 */
  }

  /* "dds.pyx":1757
 *             return _FoundTopic_Init(self, c_topic)
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "dds.pyx":1739
 *         return reader
 * 
 *     def find_topic(self, str name):             # <<<<<<<<<<<<<<
 *         '''find_topic(str name, listener = None)
 *         Find an already registered topic, and make it available locally
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DomainParticipant.find_topic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_as_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DomainParticipant_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_17DomainParticipant_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_17DomainParticipant_12__reduce_cython__(((struct __pyx_obj_3dds_DomainParticipant *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DomainParticipant_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DomainParticipant.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_17DomainParticipant_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_17DomainParticipant_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_17DomainParticipant_14__setstate_cython__(((struct __pyx_obj_3dds_DomainParticipant *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_17DomainParticipant_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DomainParticipant *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DomainParticipant.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1777
 *     '''
 * 
 *     def __init__(self, name, keys, spec, size):             # <<<<<<<<<<<<<<
 *         self._name = name
 *         self._keys = keys
 */

/* Python wrapper */
static int __pyx_pw_3dds_11TypeSupport_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_11TypeSupport_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_keys = 0;
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_keys,&__pyx_n_s_spec,&__pyx_n_s_size,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 1777, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_spec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 1777, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 1777, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1777, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_name = values[0];
    __pyx_v_keys = values[1];
    __pyx_v_spec = values[2];
    __pyx_v_size = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1777, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.TypeSupport.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_11TypeSupport___init__(((struct __pyx_obj_3dds_TypeSupport *)__pyx_v_self), __pyx_v_name, __pyx_v_keys, __pyx_v_spec, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_11TypeSupport___init__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_keys, PyObject *__pyx_v_spec, PyObject *__pyx_v_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":1778
 * 
 *     def __init__(self, name, keys, spec, size):
 *         self._name = name             # <<<<<<<<<<<<<<
 *         self._keys = keys
 *         self._spec = spec
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) __PYX_ERR(0, 1778, __pyx_L1_error)

  /* "dds.pyx":1779
 *     def __init__(self, name, keys, spec, size):
 *         self._name = name
 *         self._keys = keys             # <<<<<<<<<<<<<<
 *         self._spec = spec
 *         self._size = size
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys_2, __pyx_v_keys) < 0) __PYX_ERR(0, 1779, __pyx_L1_error)

  /* "dds.pyx":1780
 *         self._name = name
 *         self._keys = keys
 *         self._spec = spec             # <<<<<<<<<<<<<<
 *         self._size = size
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_spec_2, __pyx_v_spec) < 0) __PYX_ERR(0, 1780, __pyx_L1_error)

  /* "dds.pyx":1781
 *         self._keys = keys
 *         self._spec = spec
 *         self._size = size             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size_2, __pyx_v_size) < 0) __PYX_ERR(0, 1781, __pyx_L1_error)

  /* "dds.pyx":1777
 *     '''
 * 
 *     def __init__(self, name, keys, spec, size):             # <<<<<<<<<<<<<<
 *         self._name = name
 *         self._keys = keys
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("dds.TypeSupport.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1784
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         '''C handle
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11TypeSupport_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_11TypeSupport_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11TypeSupport_6handle___get__(((struct __pyx_obj_3dds_TypeSupport *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11TypeSupport_6handle___get__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1787
 *         '''C handle
 *         '''
 *         return self._handle             # <<<<<<<<<<<<<<
 * 
 *     def _serialize(self, o):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":1784
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         '''C handle
 *         '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.TypeSupport.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1789
 *         return self._handle
 * 
 *     def _serialize(self, o):             # <<<<<<<<<<<<<<
 *         '''_serialize(o)
 *         Serialize data
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11TypeSupport_3_serialize(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static char __pyx_doc_3dds_11TypeSupport_2_serialize[] = "_serialize(o)\n        Serialize data\n        ";
static PyObject *__pyx_pw_3dds_11TypeSupport_3_serialize(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_serialize (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11TypeSupport_2_serialize(((struct __pyx_obj_3dds_TypeSupport *)__pyx_v_self), ((PyObject *)__pyx_v_o));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11TypeSupport_2_serialize(CYTHON_UNUSED struct __pyx_obj_3dds_TypeSupport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_serialize", 0);

  /* "dds.pyx":1793
 *         Serialize data
 *         '''
 *         raise NotImplementedError('Subclass must override this implementation')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1793, __pyx_L1_error)

  /* "dds.pyx":1789
 *         return self._handle
 * 
 *     def _serialize(self, o):             # <<<<<<<<<<<<<<
 *         '''_serialize(o)
 *         Serialize data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.TypeSupport._serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1796
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         '''Data size
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11TypeSupport_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_11TypeSupport_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11TypeSupport_4size___get__(((struct __pyx_obj_3dds_TypeSupport *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11TypeSupport_4size___get__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1799
 *         '''Data size
 *         '''
 *         return self._size             # <<<<<<<<<<<<<<
 * 
 *     def _deserialize(self, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":1796
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         '''Data size
 *         '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.TypeSupport.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1801
 *         return self._size
 * 
 *     def _deserialize(self, b):             # <<<<<<<<<<<<<<
 *         '''_deserialize(b)
 *         Deserialize data
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11TypeSupport_5_deserialize(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/
static char __pyx_doc_3dds_11TypeSupport_4_deserialize[] = "_deserialize(b)\n        Deserialize data\n        ";
static PyObject *__pyx_pw_3dds_11TypeSupport_5_deserialize(PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_deserialize (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11TypeSupport_4_deserialize(((struct __pyx_obj_3dds_TypeSupport *)__pyx_v_self), ((PyObject *)__pyx_v_b));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11TypeSupport_4_deserialize(CYTHON_UNUSED struct __pyx_obj_3dds_TypeSupport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_deserialize", 0);

  /* "dds.pyx":1805
 *         Deserialize data
 *         '''
 *         raise NotImplementedError('Subclass must override this implementation')             # <<<<<<<<<<<<<<
 * 
 * # Function to create a C99 topic descriptor from a TypeSupport
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1805, __pyx_L1_error)

  /* "dds.pyx":1801
 *         return self._size
 * 
 *     def _deserialize(self, b):             # <<<<<<<<<<<<<<
 *         '''_deserialize(b)
 *         Deserialize data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.TypeSupport._deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11TypeSupport_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_11TypeSupport_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11TypeSupport_6__reduce_cython__(((struct __pyx_obj_3dds_TypeSupport *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11TypeSupport_6__reduce_cython__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_state = __pyx_empty_tuple;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TypeSupport); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TypeSupport__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TypeSupport); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("dds.TypeSupport.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypeSupport__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11TypeSupport_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_11TypeSupport_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11TypeSupport_8__setstate_cython__(((struct __pyx_obj_3dds_TypeSupport *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11TypeSupport_8__setstate_cython__(struct __pyx_obj_3dds_TypeSupport *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TypeSupport__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_3dds___pyx_unpickle_TypeSupport__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TypeSupport, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypeSupport__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.TypeSupport.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1808
 * 
 * # Function to create a C99 topic descriptor from a TypeSupport
 * cdef const dds.dds_topic_descriptor_t * get_descriptor(ts):             # <<<<<<<<<<<<<<
 *     cdef dds.dds_topic_descriptor_t *c_descriptor
 *     cdef char *c_name
 */

static dds_topic_descriptor_t const *__pyx_f_3dds_get_descriptor(PyObject *__pyx_v_ts) {
  dds_topic_descriptor_t *__pyx_v_c_descriptor;
  char *__pyx_v_c_name;
  char *__pyx_v_c_keys;
  char *__pyx_v_c_spec;
  PyObject *__pyx_v_name_as_bytes = NULL;
  PyObject *__pyx_v_keys_as_bytes = NULL;
  PyObject *__pyx_v_spec_as_bytes = NULL;
  dds_topic_descriptor_t const *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  __Pyx_RefNannySetupContext("get_descriptor", 0);

  /* "dds.pyx":1813
 *     cdef char *c_keys
 *     cdef char *c_spec
 *     if ts._name == 'DDS::ParticipantBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_ParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TopicBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_ParticipantBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1814
 *     cdef char *c_spec
 *     if ts._name == 'DDS::ParticipantBuiltinTopicData':
 *         return &DDS_ParticipantBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::TopicBuiltinTopicData':
 *         return &DDS_TopicBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_ParticipantBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1813
 *     cdef char *c_keys
 *     cdef char *c_spec
 *     if ts._name == 'DDS::ParticipantBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_ParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TopicBuiltinTopicData':
 */
  }

  /* "dds.pyx":1815
 *     if ts._name == 'DDS::ParticipantBuiltinTopicData':
 *         return &DDS_ParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TopicBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_TopicBuiltinTopicData_desc
 *     elif ts._name == 'DDS::PublicationBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_TopicBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1816
 *         return &DDS_ParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TopicBuiltinTopicData':
 *         return &DDS_TopicBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::PublicationBuiltinTopicData':
 *         return &DDS_PublicationBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_TopicBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1815
 *     if ts._name == 'DDS::ParticipantBuiltinTopicData':
 *         return &DDS_ParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TopicBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_TopicBuiltinTopicData_desc
 *     elif ts._name == 'DDS::PublicationBuiltinTopicData':
 */
  }

  /* "dds.pyx":1817
 *     elif ts._name == 'DDS::TopicBuiltinTopicData':
 *         return &DDS_TopicBuiltinTopicData_desc
 *     elif ts._name == 'DDS::PublicationBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_PublicationBuiltinTopicData_desc
 *     elif ts._name == 'DDS::SubscriptionBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_PublicationBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1818
 *         return &DDS_TopicBuiltinTopicData_desc
 *     elif ts._name == 'DDS::PublicationBuiltinTopicData':
 *         return &DDS_PublicationBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::SubscriptionBuiltinTopicData':
 *         return &DDS_SubscriptionBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_PublicationBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1817
 *     elif ts._name == 'DDS::TopicBuiltinTopicData':
 *         return &DDS_TopicBuiltinTopicData_desc
 *     elif ts._name == 'DDS::PublicationBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_PublicationBuiltinTopicData_desc
 *     elif ts._name == 'DDS::SubscriptionBuiltinTopicData':
 */
  }

  /* "dds.pyx":1819
 *     elif ts._name == 'DDS::PublicationBuiltinTopicData':
 *         return &DDS_PublicationBuiltinTopicData_desc
 *     elif ts._name == 'DDS::SubscriptionBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_SubscriptionBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMParticipantBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_SubscriptionBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1820
 *         return &DDS_PublicationBuiltinTopicData_desc
 *     elif ts._name == 'DDS::SubscriptionBuiltinTopicData':
 *         return &DDS_SubscriptionBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::CMParticipantBuiltinTopicData':
 *         return &DDS_CMParticipantBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_SubscriptionBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1819
 *     elif ts._name == 'DDS::PublicationBuiltinTopicData':
 *         return &DDS_PublicationBuiltinTopicData_desc
 *     elif ts._name == 'DDS::SubscriptionBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_SubscriptionBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMParticipantBuiltinTopicData':
 */
  }

  /* "dds.pyx":1821
 *     elif ts._name == 'DDS::SubscriptionBuiltinTopicData':
 *         return &DDS_SubscriptionBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMParticipantBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMPublisherBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_CMParticipantBuiltinTopicDat, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1822
 *         return &DDS_SubscriptionBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMParticipantBuiltinTopicData':
 *         return &DDS_CMParticipantBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::CMPublisherBuiltinTopicData':
 *         return &DDS_CMPublisherBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_CMParticipantBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1821
 *     elif ts._name == 'DDS::SubscriptionBuiltinTopicData':
 *         return &DDS_SubscriptionBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMParticipantBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMPublisherBuiltinTopicData':
 */
  }

  /* "dds.pyx":1823
 *     elif ts._name == 'DDS::CMParticipantBuiltinTopicData':
 *         return &DDS_CMParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMPublisherBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMPublisherBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMSubscriberBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_CMPublisherBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1824
 *         return &DDS_CMParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMPublisherBuiltinTopicData':
 *         return &DDS_CMPublisherBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::CMSubscriberBuiltinTopicData':
 *         return &DDS_CMSubscriberBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_CMPublisherBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1823
 *     elif ts._name == 'DDS::CMParticipantBuiltinTopicData':
 *         return &DDS_CMParticipantBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMPublisherBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMPublisherBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMSubscriberBuiltinTopicData':
 */
  }

  /* "dds.pyx":1825
 *     elif ts._name == 'DDS::CMPublisherBuiltinTopicData':
 *         return &DDS_CMPublisherBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMSubscriberBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMSubscriberBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataWriterBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_CMSubscriberBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1826
 *         return &DDS_CMPublisherBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMSubscriberBuiltinTopicData':
 *         return &DDS_CMSubscriberBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::CMDataWriterBuiltinTopicData':
 *         return &DDS_CMDataWriterBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_CMSubscriberBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1825
 *     elif ts._name == 'DDS::CMPublisherBuiltinTopicData':
 *         return &DDS_CMPublisherBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMSubscriberBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMSubscriberBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataWriterBuiltinTopicData':
 */
  }

  /* "dds.pyx":1827
 *     elif ts._name == 'DDS::CMSubscriberBuiltinTopicData':
 *         return &DDS_CMSubscriberBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataWriterBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMDataWriterBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataReaderBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_CMDataWriterBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1828
 *         return &DDS_CMSubscriberBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataWriterBuiltinTopicData':
 *         return &DDS_CMDataWriterBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::CMDataReaderBuiltinTopicData':
 *         return &DDS_CMDataReaderBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_CMDataWriterBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1827
 *     elif ts._name == 'DDS::CMSubscriberBuiltinTopicData':
 *         return &DDS_CMSubscriberBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataWriterBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMDataWriterBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataReaderBuiltinTopicData':
 */
  }

  /* "dds.pyx":1829
 *     elif ts._name == 'DDS::CMDataWriterBuiltinTopicData':
 *         return &DDS_CMDataWriterBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataReaderBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMDataReaderBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TypeBuiltinTopicData':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_CMDataReaderBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1829, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1830
 *         return &DDS_CMDataWriterBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataReaderBuiltinTopicData':
 *         return &DDS_CMDataReaderBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     elif ts._name == 'DDS::TypeBuiltinTopicData':
 *         return &DDS_TypeBuiltinTopicData_desc
 */
    __pyx_r = (&DDS_CMDataReaderBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1829
 *     elif ts._name == 'DDS::CMDataWriterBuiltinTopicData':
 *         return &DDS_CMDataWriterBuiltinTopicData_desc
 *     elif ts._name == 'DDS::CMDataReaderBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_CMDataReaderBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TypeBuiltinTopicData':
 */
  }

  /* "dds.pyx":1831
 *     elif ts._name == 'DDS::CMDataReaderBuiltinTopicData':
 *         return &DDS_CMDataReaderBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TypeBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_TypeBuiltinTopicData_desc
 *     else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DDS_TypeBuiltinTopicData, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":1832
 *         return &DDS_CMDataReaderBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TypeBuiltinTopicData':
 *         return &DDS_TypeBuiltinTopicData_desc             # <<<<<<<<<<<<<<
 *     else:
 *         name_as_bytes = ts._name.encode('ISO-8859-1')
 */
    __pyx_r = (&DDS_TypeBuiltinTopicData_desc);
    goto __pyx_L0;

    /* "dds.pyx":1831
 *     elif ts._name == 'DDS::CMDataReaderBuiltinTopicData':
 *         return &DDS_CMDataReaderBuiltinTopicData_desc
 *     elif ts._name == 'DDS::TypeBuiltinTopicData':             # <<<<<<<<<<<<<<
 *         return &DDS_TypeBuiltinTopicData_desc
 *     else:
 */
  }

  /* "dds.pyx":1834
 *         return &DDS_TypeBuiltinTopicData_desc
 *     else:
 *         name_as_bytes = ts._name.encode('ISO-8859-1')             # <<<<<<<<<<<<<<
 *         keys_as_bytes = ts._keys.encode('ISO-8859-1')
 *         spec_as_bytes = ts._spec.encode('ISO_8859-1')
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_s_ISO_8859_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_ISO_8859_1);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_name_as_bytes = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1835
 *     else:
 *         name_as_bytes = ts._name.encode('ISO-8859-1')
 *         keys_as_bytes = ts._keys.encode('ISO-8859-1')             # <<<<<<<<<<<<<<
 *         spec_as_bytes = ts._spec.encode('ISO_8859-1')
 *         c_name = name_as_bytes
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_keys_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_ISO_8859_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_ISO_8859_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_keys_as_bytes = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1836
 *         name_as_bytes = ts._name.encode('ISO-8859-1')
 *         keys_as_bytes = ts._keys.encode('ISO-8859-1')
 *         spec_as_bytes = ts._spec.encode('ISO_8859-1')             # <<<<<<<<<<<<<<
 *         c_name = name_as_bytes
 *         c_keys = keys_as_bytes
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_spec_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_s_ISO_8859_1_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_ISO_8859_1_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_spec_as_bytes = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "dds.pyx":1837
 *         keys_as_bytes = ts._keys.encode('ISO-8859-1')
 *         spec_as_bytes = ts._spec.encode('ISO_8859-1')
 *         c_name = name_as_bytes             # <<<<<<<<<<<<<<
 *         c_keys = keys_as_bytes
 *         c_spec = spec_as_bytes
 */
    __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_name_as_bytes); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1837, __pyx_L1_error)
    __pyx_v_c_name = __pyx_t_5;

    /* "dds.pyx":1838
 *         spec_as_bytes = ts._spec.encode('ISO_8859-1')
 *         c_name = name_as_bytes
 *         c_keys = keys_as_bytes             # <<<<<<<<<<<<<<
 *         c_spec = spec_as_bytes
 *         with nogil:
 */
    __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_keys_as_bytes); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1838, __pyx_L1_error)
    __pyx_v_c_keys = __pyx_t_5;

    /* "dds.pyx":1839
 *         c_name = name_as_bytes
 *         c_keys = keys_as_bytes
 *         c_spec = spec_as_bytes             # <<<<<<<<<<<<<<
 *         with nogil:
 *             c_descriptor = dds_topic_descriptor_create(c_name, c_keys, c_spec)
 */
    __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_spec_as_bytes); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1839, __pyx_L1_error)
    __pyx_v_c_spec = __pyx_t_5;

    /* "dds.pyx":1840
 *         c_keys = keys_as_bytes
 *         c_spec = spec_as_bytes
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_descriptor = dds_topic_descriptor_create(c_name, c_keys, c_spec)
 *         return c_descriptor
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "dds.pyx":1841
 *         c_spec = spec_as_bytes
 *         with nogil:
 *             c_descriptor = dds_topic_descriptor_create(c_name, c_keys, c_spec)             # <<<<<<<<<<<<<<
 *         return c_descriptor
 * 
 */
          __pyx_v_c_descriptor = dds_topic_descriptor_create(__pyx_v_c_name, __pyx_v_c_keys, __pyx_v_c_spec);
        }

        /* "dds.pyx":1840
 *         c_keys = keys_as_bytes
 *         c_spec = spec_as_bytes
 *         with nogil:             # <<<<<<<<<<<<<<
 *             c_descriptor = dds_topic_descriptor_create(c_name, c_keys, c_spec)
 *         return c_descriptor
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L6;
          }
          __pyx_L6:;
        }
    }

    /* "dds.pyx":1842
 *         with nogil:
 *             c_descriptor = dds_topic_descriptor_create(c_name, c_keys, c_spec)
 *         return c_descriptor             # <<<<<<<<<<<<<<
 * 
 * # The Topic wrapper
 */
    __pyx_r = __pyx_v_c_descriptor;
    goto __pyx_L0;
  }

  /* "dds.pyx":1808
 * 
 * # Function to create a C99 topic descriptor from a TypeSupport
 * cdef const dds.dds_topic_descriptor_t * get_descriptor(ts):             # <<<<<<<<<<<<<<
 *     cdef dds.dds_topic_descriptor_t *c_descriptor
 *     cdef char *c_name
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("dds.get_descriptor", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_as_bytes);
  __Pyx_XDECREF(__pyx_v_keys_as_bytes);
  __Pyx_XDECREF(__pyx_v_spec_as_bytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1864
 *     cdef object _typesupport
 * 
 *     def __init__(self, DomainParticipant dp, name, ts, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         dp._check_handle()
 *         cdef dds_qos_t *_c_qos = NULL
 */

/* Python wrapper */
static int __pyx_pw_3dds_5Topic_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_5Topic_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_ts = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dp,&__pyx_n_s_name,&__pyx_n_s_ts,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 1); __PYX_ERR(0, 1864, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 2); __PYX_ERR(0, 1864, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1864, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dp = ((struct __pyx_obj_3dds_DomainParticipant *)values[0]);
    __pyx_v_name = values[1];
    __pyx_v_ts = values[2];
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[3]);
    __pyx_v_listener = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1864, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Topic.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dp), __pyx_ptype_3dds_DomainParticipant, 1, "dp", 0))) __PYX_ERR(0, 1864, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 1864, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_5Topic___init__(((struct __pyx_obj_3dds_Topic *)__pyx_v_self), __pyx_v_dp, __pyx_v_name, __pyx_v_ts, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_5Topic___init__(struct __pyx_obj_3dds_Topic *__pyx_v_self, struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp, PyObject *__pyx_v_name, PyObject *__pyx_v_ts, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  dds_qos_t *__pyx_v__c_qos;
  dds_topiclistener_t *__pyx_v__c_listener;
  dds_topic_descriptor_t const *__pyx_v_descriptor;
  PyObject *__pyx_v_name_as_bytes = NULL;
  char *__pyx_v_c_name;
  int __pyx_v_r;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  char *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":1865
 * 
 *     def __init__(self, DomainParticipant dp, name, ts, Qos qos = None, listener = None):
 *         dp._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_qos_t *_c_qos = NULL
 *         if qos:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dp), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1866
 *     def __init__(self, DomainParticipant dp, name, ts, Qos qos = None, listener = None):
 *         dp._check_handle()
 *         cdef dds_qos_t *_c_qos = NULL             # <<<<<<<<<<<<<<
 *         if qos:
 *             _c_qos = qos.handle()
 */
  __pyx_v__c_qos = NULL;

  /* "dds.pyx":1867
 *         dp._check_handle()
 *         cdef dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1867, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":1868
 *         cdef dds_qos_t *_c_qos = NULL
 *         if qos:
 *             _c_qos = qos.handle()             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(dp, DomainParticipant):
 */
    __pyx_v__c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

    /* "dds.pyx":1867
 *         dp._check_handle()
 *         cdef dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  }

  /* "dds.pyx":1870
 *             _c_qos = qos.handle()
 * 
 *         if not isinstance(dp, DomainParticipant):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_4 = __Pyx_TypeCheck(((PyObject *)__pyx_v_dp), __pyx_ptype_3dds_DomainParticipant); 
  __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":1871
 * 
 *         if not isinstance(dp, DomainParticipant):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(ts, TypeSupport):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1871, __pyx_L1_error)

    /* "dds.pyx":1870
 *             _c_qos = qos.handle()
 * 
 *         if not isinstance(dp, DomainParticipant):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":1873
 *             raise DDSException('Bad parameter')
 * 
 *         if not isinstance(ts, TypeSupport):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_ts, __pyx_ptype_3dds_TypeSupport); 
  __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":1874
 * 
 *         if not isinstance(ts, TypeSupport):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if qos and not isinstance(qos, Qos):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1874, __pyx_L1_error)

    /* "dds.pyx":1873
 *             raise DDSException('Bad parameter')
 * 
 *         if not isinstance(ts, TypeSupport):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":1876
 *             raise DDSException('Bad parameter')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1876, __pyx_L1_error)
  if (__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos); 
  __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
  __pyx_t_4 = __pyx_t_6;
  __pyx_L7_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":1877
 * 
 *         if qos and not isinstance(qos, Qos):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if listener and not isinstance(listener, Listener):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1877, __pyx_L1_error)

    /* "dds.pyx":1876
 *             raise DDSException('Bad parameter')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":1879
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1879, __pyx_L1_error)
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L10_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_listener, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L10_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":1880
 * 
 *         if listener and not isinstance(listener, Listener):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1880, __pyx_L1_error)

    /* "dds.pyx":1879
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":1883
 * 
 * 
 *         self._typesupport = ts             # <<<<<<<<<<<<<<
 *         self.parent = dp
 *         self._listener = listener
 */
  __Pyx_INCREF(__pyx_v_ts);
  __Pyx_GIVEREF(__pyx_v_ts);
  __Pyx_GOTREF(__pyx_v_self->_typesupport);
  __Pyx_DECREF(__pyx_v_self->_typesupport);
  __pyx_v_self->_typesupport = __pyx_v_ts;

  /* "dds.pyx":1884
 * 
 *         self._typesupport = ts
 *         self.parent = dp             # <<<<<<<<<<<<<<
 *         self._listener = listener
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent, ((PyObject *)__pyx_v_dp)) < 0) __PYX_ERR(0, 1884, __pyx_L1_error)

  /* "dds.pyx":1885
 *         self._typesupport = ts
 *         self.parent = dp
 *         self._listener = listener             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_topiclistener_t *_c_listener = NULL
 */
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._listener);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._listener);
  __pyx_v_self->__pyx_base._listener = __pyx_v_listener;

  /* "dds.pyx":1887
 *         self._listener = listener
 * 
 *         cdef dds_topiclistener_t *_c_listener = NULL             # <<<<<<<<<<<<<<
 *         if listener:
 *             _c_listener = &topic_listener
 */
  __pyx_v__c_listener = NULL;

  /* "dds.pyx":1888
 * 
 *         cdef dds_topiclistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &topic_listener
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1888, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":1889
 *         cdef dds_topiclistener_t *_c_listener = NULL
 *         if listener:
 *             _c_listener = &topic_listener             # <<<<<<<<<<<<<<
 * 
 *         cdef const dds_topic_descriptor_t *descriptor = get_descriptor(ts)
 */
    __pyx_v__c_listener = (&__pyx_v_3dds_topic_listener);

    /* "dds.pyx":1888
 * 
 *         cdef dds_topiclistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &topic_listener
 * 
 */
  }

  /* "dds.pyx":1891
 *             _c_listener = &topic_listener
 * 
 *         cdef const dds_topic_descriptor_t *descriptor = get_descriptor(ts)             # <<<<<<<<<<<<<<
 *         name_as_bytes = name.encode('ISO-8859-1')
 *         cdef char *c_name = name_as_bytes
 */
  __pyx_v_descriptor = __pyx_f_3dds_get_descriptor(__pyx_v_ts);

  /* "dds.pyx":1892
 * 
 *         cdef const dds_topic_descriptor_t *descriptor = get_descriptor(ts)
 *         name_as_bytes = name.encode('ISO-8859-1')             # <<<<<<<<<<<<<<
 *         cdef char *c_name = name_as_bytes
 *         # enabling a listener requires three steps, done as a indivisible action:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_ISO_8859_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_ISO_8859_1);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_name_as_bytes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1893
 *         cdef const dds_topic_descriptor_t *descriptor = get_descriptor(ts)
 *         name_as_bytes = name.encode('ISO-8859-1')
 *         cdef char *c_name = name_as_bytes             # <<<<<<<<<<<<<<
 *         # enabling a listener requires three steps, done as a indivisible action:
 *         #   1) dds_topic_create
 */
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_name_as_bytes); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1893, __pyx_L1_error)
  __pyx_v_c_name = __pyx_t_7;

  /* "dds.pyx":1899
 *         #   3) _set_status_for_listener
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_topic_create(dp._c_handle, &self._c_handle, descriptor, c_name, _c_qos, <dds_topiclistener_t *>_c_listener) # need_gil             # <<<<<<<<<<<<<<
 *         if name not in _builtin_topics_descriptors.keys():
 *             dds.dds_topic_descriptor_delete(<dds_topic_descriptor_t *>descriptor) #gil_ok
 */
  __pyx_v_r = dds_topic_create(__pyx_v_dp->__pyx_base._c_handle, (&__pyx_v_self->__pyx_base._c_handle), __pyx_v_descriptor, __pyx_v_c_name, __pyx_v__c_qos, ((dds_topiclistener_t *)__pyx_v__c_listener));

  /* "dds.pyx":1900
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_topic_create(dp._c_handle, &self._c_handle, descriptor, c_name, _c_qos, <dds_topiclistener_t *>_c_listener) # need_gil
 *         if name not in _builtin_topics_descriptors.keys():             # <<<<<<<<<<<<<<
 *             dds.dds_topic_descriptor_delete(<dds_topic_descriptor_t *>descriptor) #gil_ok
 *         if r < 0:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_3dds__builtin_topics_descriptors, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":1901
 *         r = dds.dds_topic_create(dp._c_handle, &self._c_handle, descriptor, c_name, _c_qos, <dds_topiclistener_t *>_c_listener) # need_gil
 *         if name not in _builtin_topics_descriptors.keys():
 *             dds.dds_topic_descriptor_delete(<dds_topic_descriptor_t *>descriptor) #gil_ok             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to create topic.', r)
 */
    dds_topic_descriptor_delete(((dds_topic_descriptor_t *)__pyx_v_descriptor));

    /* "dds.pyx":1900
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_topic_create(dp._c_handle, &self._c_handle, descriptor, c_name, _c_qos, <dds_topiclistener_t *>_c_listener) # need_gil
 *         if name not in _builtin_topics_descriptors.keys():             # <<<<<<<<<<<<<<
 *             dds.dds_topic_descriptor_delete(<dds_topic_descriptor_t *>descriptor) #gil_ok
 *         if r < 0:
 */
  }

  /* "dds.pyx":1902
 *         if name not in _builtin_topics_descriptors.keys():
 *             dds.dds_topic_descriptor_delete(<dds_topic_descriptor_t *>descriptor) #gil_ok
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create topic.', r)
 * 
 */
  __pyx_t_5 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":1903
 *             dds.dds_topic_descriptor_delete(<dds_topic_descriptor_t *>descriptor) #gil_ok
 *         if r < 0:
 *             raise DDSException('Failed to create topic.', r)             # <<<<<<<<<<<<<<
 * 
 *         _entity_register_add(self)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_kp_s_Failed_to_create_topic, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_kp_s_Failed_to_create_topic, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_create_topic);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_create_topic);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_kp_s_Failed_to_create_topic);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1903, __pyx_L1_error)

    /* "dds.pyx":1902
 *         if name not in _builtin_topics_descriptors.keys():
 *             dds.dds_topic_descriptor_delete(<dds_topic_descriptor_t *>descriptor) #gil_ok
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create topic.', r)
 * 
 */
  }

  /* "dds.pyx":1905
 *             raise DDSException('Failed to create topic.', r)
 * 
 *         _entity_register_add(self)             # <<<<<<<<<<<<<<
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)
 */
  __pyx_t_1 = __pyx_f_3dds__entity_register_add(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1906
 * 
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1906, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":1907
 *         _entity_register_add(self)
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)             # <<<<<<<<<<<<<<
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)
 */
    __pyx_t_1 = __pyx_f_3dds__set_status_for_listener(__pyx_v_self->__pyx_base._c_handle, __pyx_v_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "dds.pyx":1906
 * 
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  }

  /* "dds.pyx":1909
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_2, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1864
 *     cdef object _typesupport
 * 
 *     def __init__(self, DomainParticipant dp, name, ts, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         dp._check_handle()
 *         cdef dds_qos_t *_c_qos = NULL
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("dds.Topic.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_as_bytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1912
 * 
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         '''
 *         The topic name, as registered in the DDS domain
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5Topic_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_5Topic_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_5Topic_4name___get__(((struct __pyx_obj_3dds_Topic *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_5Topic_4name___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self) {
  char *__pyx_v_cstr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1918
 *         :rtype: str
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *cstr = dds.dds_topic_get_name(self._c_handle) #gil_ok
 *         return _to_pystr_and_free(cstr)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1919
 *         '''
 *         self._check_handle()
 *         cdef char *cstr = dds.dds_topic_get_name(self._c_handle) #gil_ok             # <<<<<<<<<<<<<<
 *         return _to_pystr_and_free(cstr)
 * 
 */
  __pyx_v_cstr = dds_topic_get_name(__pyx_v_self->__pyx_base._c_handle);

  /* "dds.pyx":1920
 *         self._check_handle()
 *         cdef char *cstr = dds.dds_topic_get_name(self._c_handle) #gil_ok
 *         return _to_pystr_and_free(cstr)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_3dds__to_pystr_and_free(__pyx_v_cstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":1912
 * 
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         '''
 *         The topic name, as registered in the DDS domain
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.Topic.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1923
 * 
 *     @property
 *     def type_name(self):             # <<<<<<<<<<<<<<
 *         '''
 *         The fully qualified name of the topic data type (in IDL format)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5Topic_9type_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_5Topic_9type_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_5Topic_9type_name___get__(((struct __pyx_obj_3dds_Topic *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_5Topic_9type_name___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self) {
  char *__pyx_v_cstr;
  PyObject *__pyx_v_type_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1929
 *         :rtype: str
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *cstr = dds.dds_topic_get_type_name(self._c_handle) #gil_ok
 *         type_name = _to_pystr_and_free(cstr)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1930
 *         '''
 *         self._check_handle()
 *         cdef char *cstr = dds.dds_topic_get_type_name(self._c_handle) #gil_ok             # <<<<<<<<<<<<<<
 *         type_name = _to_pystr_and_free(cstr)
 *         if type_name in _builtin_topics_type_name_map.keys():
 */
  __pyx_v_cstr = dds_topic_get_type_name(__pyx_v_self->__pyx_base._c_handle);

  /* "dds.pyx":1931
 *         self._check_handle()
 *         cdef char *cstr = dds.dds_topic_get_type_name(self._c_handle) #gil_ok
 *         type_name = _to_pystr_and_free(cstr)             # <<<<<<<<<<<<<<
 *         if type_name in _builtin_topics_type_name_map.keys():
 *             type_name = _builtin_topics_type_name_map[type_name]
 */
  __pyx_t_1 = __pyx_f_3dds__to_pystr_and_free(__pyx_v_cstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_type_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1932
 *         cdef char *cstr = dds.dds_topic_get_type_name(self._c_handle) #gil_ok
 *         type_name = _to_pystr_and_free(cstr)
 *         if type_name in _builtin_topics_type_name_map.keys():             # <<<<<<<<<<<<<<
 *             type_name = _builtin_topics_type_name_map[type_name]
 *         return type_name
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_3dds__builtin_topics_type_name_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_type_name, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":1933
 *         type_name = _to_pystr_and_free(cstr)
 *         if type_name in _builtin_topics_type_name_map.keys():
 *             type_name = _builtin_topics_type_name_map[type_name]             # <<<<<<<<<<<<<<
 *         return type_name
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_3dds__builtin_topics_type_name_map, __pyx_v_type_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_type_name, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "dds.pyx":1932
 *         cdef char *cstr = dds.dds_topic_get_type_name(self._c_handle) #gil_ok
 *         type_name = _to_pystr_and_free(cstr)
 *         if type_name in _builtin_topics_type_name_map.keys():             # <<<<<<<<<<<<<<
 *             type_name = _builtin_topics_type_name_map[type_name]
 *         return type_name
 */
  }

  /* "dds.pyx":1934
 *         if type_name in _builtin_topics_type_name_map.keys():
 *             type_name = _builtin_topics_type_name_map[type_name]
 *         return type_name             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_type_name);
  __pyx_r = __pyx_v_type_name;
  goto __pyx_L0;

  /* "dds.pyx":1923
 * 
 *     @property
 *     def type_name(self):             # <<<<<<<<<<<<<<
 *         '''
 *         The fully qualified name of the topic data type (in IDL format)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.Topic.type_name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_type_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1937
 * 
 *     @property
 *     def metadescriptor(self):             # <<<<<<<<<<<<<<
 *         '''
 *         The XML meta-descriptor of the topic
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5Topic_14metadescriptor_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_5Topic_14metadescriptor_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_5Topic_14metadescriptor___get__(((struct __pyx_obj_3dds_Topic *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_5Topic_14metadescriptor___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self) {
  char *__pyx_v_cstr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1943
 *         :rtype: str
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *cstr
 *         if self.name in _builtin_topics_descriptors.keys():
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1945
 *         self._check_handle()
 *         cdef char *cstr
 *         if self.name in _builtin_topics_descriptors.keys():             # <<<<<<<<<<<<<<
 *             return _builtin_topics_descriptors[self.name]
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_3dds__builtin_topics_descriptors, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "dds.pyx":1946
 *         cdef char *cstr
 *         if self.name in _builtin_topics_descriptors.keys():
 *             return _builtin_topics_descriptors[self.name]             # <<<<<<<<<<<<<<
 *         else:
 *             cstr = dds.dds_topic_get_metadescriptor(self._c_handle) #gil_ok
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_3dds__builtin_topics_descriptors, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "dds.pyx":1945
 *         self._check_handle()
 *         cdef char *cstr
 *         if self.name in _builtin_topics_descriptors.keys():             # <<<<<<<<<<<<<<
 *             return _builtin_topics_descriptors[self.name]
 *         else:
 */
  }

  /* "dds.pyx":1948
 *             return _builtin_topics_descriptors[self.name]
 *         else:
 *             cstr = dds.dds_topic_get_metadescriptor(self._c_handle) #gil_ok             # <<<<<<<<<<<<<<
 *             return _to_pystr_and_free(cstr)
 * 
 */
  /*else*/ {
    __pyx_v_cstr = dds_topic_get_metadescriptor(__pyx_v_self->__pyx_base._c_handle);

    /* "dds.pyx":1949
 *         else:
 *             cstr = dds.dds_topic_get_metadescriptor(self._c_handle) #gil_ok
 *             return _to_pystr_and_free(cstr)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_3dds__to_pystr_and_free(__pyx_v_cstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "dds.pyx":1937
 * 
 *     @property
 *     def metadescriptor(self):             # <<<<<<<<<<<<<<
 *         '''
 *         The XML meta-descriptor of the topic
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.Topic.metadescriptor.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1952
 * 
 *     @property
 *     def keylist(self):             # <<<<<<<<<<<<<<
 *         '''
 *         The possibly empty list of topic key fields, separated by commas.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5Topic_7keylist_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_5Topic_7keylist_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_5Topic_7keylist___get__(((struct __pyx_obj_3dds_Topic *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_5Topic_7keylist___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self) {
  char *__pyx_v_cstr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1958
 *         :rtype: str
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *cstr = dds.dds_topic_get_keylist(self._c_handle) #gil_ok
 *         return _to_pystr_and_free(cstr)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1959
 *         '''
 *         self._check_handle()
 *         cdef char *cstr = dds.dds_topic_get_keylist(self._c_handle) #gil_ok             # <<<<<<<<<<<<<<
 *         return _to_pystr_and_free(cstr)
 * 
 */
  __pyx_v_cstr = dds_topic_get_keylist(__pyx_v_self->__pyx_base._c_handle);

  /* "dds.pyx":1960
 *         self._check_handle()
 *         cdef char *cstr = dds.dds_topic_get_keylist(self._c_handle) #gil_ok
 *         return _to_pystr_and_free(cstr)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_3dds__to_pystr_and_free(__pyx_v_cstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":1952
 * 
 *     @property
 *     def keylist(self):             # <<<<<<<<<<<<<<
 *         '''
 *         The possibly empty list of topic key fields, separated by commas.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.Topic.keylist.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1963
 * 
 *     @property
 *     def qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the QoS policy for the entity
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5Topic_3qos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_5Topic_3qos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_5Topic_3qos___get__(((struct __pyx_obj_3dds_Topic *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_5Topic_3qos___get__(struct __pyx_obj_3dds_Topic *__pyx_v_self) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = NULL;
  dds_entity_t __pyx_v_c_entity;
  dds_qos_t *__pyx_v_c_qos;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":1969
 *         :rtype: dds.Qos
 *         '''
 *         qos = Qos();             # <<<<<<<<<<<<<<
 *         cdef dds_entity_t c_entity = self.handle()
 *         cdef dds_qos_t *c_qos = qos.handle()
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3dds_Qos)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":1970
 *         '''
 *         qos = Qos();
 *         cdef dds_entity_t c_entity = self.handle()             # <<<<<<<<<<<<<<
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 */
  __pyx_v_c_entity = ((struct __pyx_vtabstruct_3dds_Topic *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self));

  /* "dds.pyx":1971
 *         qos = Qos();
 *         cdef dds_entity_t c_entity = self.handle()
 *         cdef dds_qos_t *c_qos = qos.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             dds_qos_get(c_entity, c_qos)
 */
  __pyx_v_c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

  /* "dds.pyx":1972
 *         cdef dds_entity_t c_entity = self.handle()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             dds_qos_get(c_entity, c_qos)
 *         return qos
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":1973
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 *             dds_qos_get(c_entity, c_qos)             # <<<<<<<<<<<<<<
 *         return qos
 * 
 */
        dds_qos_get(__pyx_v_c_entity, __pyx_v_c_qos);
      }

      /* "dds.pyx":1972
 *         cdef dds_entity_t c_entity = self.handle()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             dds_qos_get(c_entity, c_qos)
 *         return qos
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":1974
 *         with nogil:
 *             dds_qos_get(c_entity, c_qos)
 *         return qos             # <<<<<<<<<<<<<<
 * 
 *     def inconsistent_topic_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __pyx_r = ((PyObject *)__pyx_v_qos);
  goto __pyx_L0;

  /* "dds.pyx":1963
 * 
 *     @property
 *     def qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the QoS policy for the entity
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Topic.qos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_qos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":1976
 *         return qos
 * 
 *     def inconsistent_topic_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the InconstistentTopicStatus for the topic
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5Topic_3inconsistent_topic_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_5Topic_2inconsistent_topic_status[] = "\n        Return the InconstistentTopicStatus for the topic\n\n        InconstistentTopicStatus has fields:\n        total_count,\n        total_count_change\n\n        :rtype: dds.InconstistentTopicStatus\n        ";
static PyObject *__pyx_pw_3dds_5Topic_3inconsistent_topic_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inconsistent_topic_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_5Topic_2inconsistent_topic_status(((struct __pyx_obj_3dds_Topic *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_5Topic_2inconsistent_topic_status(struct __pyx_obj_3dds_Topic *__pyx_v_self) {
  dds_inconsistent_topic_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("inconsistent_topic_status", 0);

  /* "dds.pyx":1986
 *         :rtype: dds.InconstistentTopicStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_inconsistent_topic_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1988
 *         self._check_handle()
 *         cdef dds_inconsistent_topic_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_inconsistent_topic_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":1989
 *         cdef dds_inconsistent_topic_status_t c_status
 *         with nogil:
 *             ret = dds_get_inconsistent_topic_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving inconsistent_topic_status', ret)
 */
        __pyx_v_ret = dds_get_inconsistent_topic_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":1988
 *         self._check_handle()
 *         cdef dds_inconsistent_topic_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_inconsistent_topic_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":1990
 *         with nogil:
 *             ret = dds_get_inconsistent_topic_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving inconsistent_topic_status', ret)
 *         status = InconsistentTopicStatus(c_status.total_count, c_status.total_count_change)
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":1991
 *             ret = dds_get_inconsistent_topic_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving inconsistent_topic_status', ret)             # <<<<<<<<<<<<<<
 *         status = InconsistentTopicStatus(c_status.total_count, c_status.total_count_change)
 *         return status
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_inconsistent, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_inconsistent, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_inconsistent);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_inconsistent);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_inconsistent);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1991, __pyx_L1_error)

    /* "dds.pyx":1990
 *         with nogil:
 *             ret = dds_get_inconsistent_topic_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving inconsistent_topic_status', ret)
 *         status = InconsistentTopicStatus(c_status.total_count, c_status.total_count_change)
 */
  }

  /* "dds.pyx":1992
 *         if ret < 0:
 *             raise DDSException('Failure retrieving inconsistent_topic_status', ret)
 *         status = InconsistentTopicStatus(c_status.total_count, c_status.total_count_change)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_InconsistentTopicStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":1993
 *             raise DDSException('Failure retrieving inconsistent_topic_status', ret)
 *         status = InconsistentTopicStatus(c_status.total_count, c_status.total_count_change)
 *         return status             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":1976
 *         return qos
 * 
 *     def inconsistent_topic_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the InconstistentTopicStatus for the topic
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.Topic.inconsistent_topic_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5Topic_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_5Topic_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_5Topic_4__reduce_cython__(((struct __pyx_obj_3dds_Topic *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_5Topic_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Topic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Topic.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5Topic_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_5Topic_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_5Topic_6__setstate_cython__(((struct __pyx_obj_3dds_Topic *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_5Topic_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Topic *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Topic.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2012
 *     '''
 * 
 *     def __init__(self, DomainParticipant dp):             # <<<<<<<<<<<<<<
 *         self.parent = dp
 *         _entity_register_add(self)
 */

/* Python wrapper */
static int __pyx_pw_3dds_10FoundTopic_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_10FoundTopic_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dp,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2012, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_dp = ((struct __pyx_obj_3dds_DomainParticipant *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2012, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.FoundTopic.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dp), __pyx_ptype_3dds_DomainParticipant, 1, "dp", 0))) __PYX_ERR(0, 2012, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_10FoundTopic___init__(((struct __pyx_obj_3dds_FoundTopic *)__pyx_v_self), __pyx_v_dp);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_10FoundTopic___init__(struct __pyx_obj_3dds_FoundTopic *__pyx_v_self, struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":2013
 * 
 *     def __init__(self, DomainParticipant dp):
 *         self.parent = dp             # <<<<<<<<<<<<<<
 *         _entity_register_add(self)
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent, ((PyObject *)__pyx_v_dp)) < 0) __PYX_ERR(0, 2013, __pyx_L1_error)

  /* "dds.pyx":2014
 *     def __init__(self, DomainParticipant dp):
 *         self.parent = dp
 *         _entity_register_add(self)             # <<<<<<<<<<<<<<
 * 
 * cdef _FoundTopic_Init(DomainParticipant dp, dds_entity_t c_topic):
 */
  __pyx_t_1 = __pyx_f_3dds__entity_register_add(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2012
 *     '''
 * 
 *     def __init__(self, DomainParticipant dp):             # <<<<<<<<<<<<<<
 *         self.parent = dp
 *         _entity_register_add(self)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.FoundTopic.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10FoundTopic_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_10FoundTopic_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10FoundTopic_2__reduce_cython__(((struct __pyx_obj_3dds_FoundTopic *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10FoundTopic_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_FoundTopic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.FoundTopic.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10FoundTopic_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_10FoundTopic_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10FoundTopic_4__setstate_cython__(((struct __pyx_obj_3dds_FoundTopic *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10FoundTopic_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_FoundTopic *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.FoundTopic.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2016
 *         _entity_register_add(self)
 * 
 * cdef _FoundTopic_Init(DomainParticipant dp, dds_entity_t c_topic):             # <<<<<<<<<<<<<<
 *     '''
 *     _FoundTopic_Init(DomainParticipant dp, dds_entity_t c_topic)
 */

static PyObject *__pyx_f_3dds__FoundTopic_Init(struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp, dds_entity_t __pyx_v_c_topic) {
  struct __pyx_obj_3dds_FoundTopic *__pyx_v_foundTopic = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_FoundTopic_Init", 0);

  /* "dds.pyx":2023
 *     See: https://stackoverflow.com/questions/12204441/passing-c-pointer-as-argument-into-cython-function
 *     '''
 *     foundTopic = FoundTopic(dp)             # <<<<<<<<<<<<<<
 *     foundTopic.set_handle(c_topic)
 *     _entity_register_add(foundTopic)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3dds_FoundTopic), ((PyObject *)__pyx_v_dp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_foundTopic = ((struct __pyx_obj_3dds_FoundTopic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":2024
 *     '''
 *     foundTopic = FoundTopic(dp)
 *     foundTopic.set_handle(c_topic)             # <<<<<<<<<<<<<<
 *     _entity_register_add(foundTopic)
 *     return foundTopic
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3dds_FoundTopic *)__pyx_v_foundTopic->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.set_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_foundTopic), __pyx_v_c_topic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2025
 *     foundTopic = FoundTopic(dp)
 *     foundTopic.set_handle(c_topic)
 *     _entity_register_add(foundTopic)             # <<<<<<<<<<<<<<
 *     return foundTopic
 * 
 */
  __pyx_t_1 = __pyx_f_3dds__entity_register_add(((struct __pyx_obj_3dds_Entity *)__pyx_v_foundTopic)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2026
 *     foundTopic.set_handle(c_topic)
 *     _entity_register_add(foundTopic)
 *     return foundTopic             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_foundTopic));
  __pyx_r = ((PyObject *)__pyx_v_foundTopic);
  goto __pyx_L0;

  /* "dds.pyx":2016
 *         _entity_register_add(self)
 * 
 * cdef _FoundTopic_Init(DomainParticipant dp, dds_entity_t c_topic):             # <<<<<<<<<<<<<<
 *     '''
 *     _FoundTopic_Init(DomainParticipant dp, dds_entity_t c_topic)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds._FoundTopic_Init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_foundTopic);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2037
 *     cdef object _writers
 * 
 *     def __cinit__(self, DomainParticipant dp, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         dp._check_handle()
 *         self._writers = []
 */

/* Python wrapper */
static int __pyx_pw_3dds_9Publisher_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_9Publisher_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dp,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2037, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dp = ((struct __pyx_obj_3dds_DomainParticipant *)values[0]);
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[1]);
    __pyx_v_listener = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2037, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Publisher.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dp), __pyx_ptype_3dds_DomainParticipant, 1, "dp", 0))) __PYX_ERR(0, 2037, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 2037, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_9Publisher___cinit__(((struct __pyx_obj_3dds_Publisher *)__pyx_v_self), __pyx_v_dp, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_9Publisher___cinit__(struct __pyx_obj_3dds_Publisher *__pyx_v_self, struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  dds_qos_t *__pyx_v__c_qos;
  dds_publisherlistener_t *__pyx_v__c_listener;
  int __pyx_v_r;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":2038
 * 
 *     def __cinit__(self, DomainParticipant dp, Qos qos = None, listener = None):
 *         dp._check_handle()             # <<<<<<<<<<<<<<
 *         self._writers = []
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dp), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2039
 *     def __cinit__(self, DomainParticipant dp, Qos qos = None, listener = None):
 *         dp._check_handle()
 *         self._writers = []             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(dp, DomainParticipant):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_writers);
  __Pyx_DECREF(__pyx_v_self->_writers);
  __pyx_v_self->_writers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2041
 *         self._writers = []
 * 
 *         if not isinstance(dp, DomainParticipant):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_4 = __Pyx_TypeCheck(((PyObject *)__pyx_v_dp), __pyx_ptype_3dds_DomainParticipant); 
  __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2042
 * 
 *         if not isinstance(dp, DomainParticipant):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if qos and not isinstance(qos, Qos):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2042, __pyx_L1_error)

    /* "dds.pyx":2041
 *         self._writers = []
 * 
 *         if not isinstance(dp, DomainParticipant):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2044
 *             raise DDSException('Bad parameter')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2044, __pyx_L1_error)
  if (__pyx_t_4) {
  } else {
    __pyx_t_5 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_TypeCheck(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos); 
  __pyx_t_6 = ((!(__pyx_t_4 != 0)) != 0);
  __pyx_t_5 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2045
 * 
 *         if qos and not isinstance(qos, Qos):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if listener and not isinstance(listener, Listener):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2045, __pyx_L1_error)

    /* "dds.pyx":2044
 *             raise DDSException('Bad parameter')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2047
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2047, __pyx_L1_error)
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_listener, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_5 = __pyx_t_4;
  __pyx_L8_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2048
 * 
 *         if listener and not isinstance(listener, Listener):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2048, __pyx_L1_error)

    /* "dds.pyx":2047
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2050
 *             raise DDSException('Bad parameter')
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL             # <<<<<<<<<<<<<<
 *         if qos:
 *             _c_qos = qos.handle()
 */
  __pyx_v__c_qos = NULL;

  /* "dds.pyx":2051
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2051, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":2052
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:
 *             _c_qos = qos.handle()             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_publisherlistener_t *_c_listener = NULL
 */
    __pyx_v__c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

    /* "dds.pyx":2051
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  }

  /* "dds.pyx":2054
 *             _c_qos = qos.handle()
 * 
 *         cdef dds_publisherlistener_t *_c_listener = NULL             # <<<<<<<<<<<<<<
 *         if listener:
 *             _c_listener = &publisher_listener
 */
  __pyx_v__c_listener = NULL;

  /* "dds.pyx":2055
 * 
 *         cdef dds_publisherlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &publisher_listener
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2055, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":2056
 *         cdef dds_publisherlistener_t *_c_listener = NULL
 *         if listener:
 *             _c_listener = &publisher_listener             # <<<<<<<<<<<<<<
 * 
 *         self.parent = dp
 */
    __pyx_v__c_listener = (&__pyx_v_3dds_publisher_listener);

    /* "dds.pyx":2055
 * 
 *         cdef dds_publisherlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &publisher_listener
 * 
 */
  }

  /* "dds.pyx":2058
 *             _c_listener = &publisher_listener
 * 
 *         self.parent = dp             # <<<<<<<<<<<<<<
 *         self._listener = listener
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent, ((PyObject *)__pyx_v_dp)) < 0) __PYX_ERR(0, 2058, __pyx_L1_error)

  /* "dds.pyx":2059
 * 
 *         self.parent = dp
 *         self._listener = listener             # <<<<<<<<<<<<<<
 * 
 *         # enabling a listener requires three steps, done as a indivisible action:
 */
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._listener);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._listener);
  __pyx_v_self->__pyx_base._listener = __pyx_v_listener;

  /* "dds.pyx":2066
 *         #   3) _set_status_for_listener
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_publisher_create(dp._c_handle, &self._c_handle, _c_qos, <dds_publisherlistener_t *>_c_listener) # need_gil             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to create publisher', r)
 */
  __pyx_v_r = dds_publisher_create(__pyx_v_dp->__pyx_base._c_handle, (&__pyx_v_self->__pyx_base._c_handle), __pyx_v__c_qos, ((dds_publisherlistener_t *)__pyx_v__c_listener));

  /* "dds.pyx":2067
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_publisher_create(dp._c_handle, &self._c_handle, _c_qos, <dds_publisherlistener_t *>_c_listener) # need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create publisher', r)
 *         _entity_register_add(self)
 */
  __pyx_t_5 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2068
 *         r = dds.dds_publisher_create(dp._c_handle, &self._c_handle, _c_qos, <dds_publisherlistener_t *>_c_listener) # need_gil
 *         if r < 0:
 *             raise DDSException('Failed to create publisher', r)             # <<<<<<<<<<<<<<
 *         _entity_register_add(self)
 *         if listener:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_publisher, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2068, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_publisher, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2068, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_create_publisher);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_create_publisher);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Failed_to_create_publisher);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2068, __pyx_L1_error)

    /* "dds.pyx":2067
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_publisher_create(dp._c_handle, &self._c_handle, _c_qos, <dds_publisherlistener_t *>_c_listener) # need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create publisher', r)
 *         _entity_register_add(self)
 */
  }

  /* "dds.pyx":2069
 *         if r < 0:
 *             raise DDSException('Failed to create publisher', r)
 *         _entity_register_add(self)             # <<<<<<<<<<<<<<
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)
 */
  __pyx_t_1 = __pyx_f_3dds__entity_register_add(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2070
 *             raise DDSException('Failed to create publisher', r)
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2070, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":2071
 *         _entity_register_add(self)
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)             # <<<<<<<<<<<<<<
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)
 */
    __pyx_t_1 = __pyx_f_3dds__set_status_for_listener(__pyx_v_self->__pyx_base._c_handle, __pyx_v_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "dds.pyx":2070
 *             raise DDSException('Failed to create publisher', r)
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  }

  /* "dds.pyx":2073
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)             # <<<<<<<<<<<<<<
 * 
 *     def create_datawriter(self, Topic topic, Qos qos = None, listener = None):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_2, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2037
 *     cdef object _writers
 * 
 *     def __cinit__(self, DomainParticipant dp, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         dp._check_handle()
 *         self._writers = []
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.Publisher.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2075
 *         time.sleep(0)
 * 
 *     def create_datawriter(self, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_datawriter(Topic topic, Qos qos = None, listener = None)
 *         Create a data writer
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9Publisher_3create_datawriter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_9Publisher_2create_datawriter[] = "create_datawriter(Topic topic, Qos qos = None, listener = None)\n        Create a data writer\n        :type topic: Topic\n        :param topic: Topic\n\n        :type qos: Qos\n        :param qos: Qos\n\n        :type listener: Listener\n        :param listener: Listener\n\n        :rtype: DataWriter\n        ";
static PyObject *__pyx_pw_3dds_9Publisher_3create_datawriter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Topic *__pyx_v_topic = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_datawriter (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_topic,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_topic)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_datawriter") < 0)) __PYX_ERR(0, 2075, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_topic = ((struct __pyx_obj_3dds_Topic *)values[0]);
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[1]);
    __pyx_v_listener = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_datawriter", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2075, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Publisher.create_datawriter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_Topic, 1, "topic", 0))) __PYX_ERR(0, 2075, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 2075, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_9Publisher_2create_datawriter(((struct __pyx_obj_3dds_Publisher *)__pyx_v_self), __pyx_v_topic, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9Publisher_2create_datawriter(struct __pyx_obj_3dds_Publisher *__pyx_v_self, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  struct __pyx_obj_3dds_DataWriter *__pyx_v_writer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("create_datawriter", 0);

  /* "dds.pyx":2089
 *         :rtype: DataWriter
 *         '''
 *         writer = DataWriter(self, topic, qos, listener)             # <<<<<<<<<<<<<<
 *         self._writers.append(writer)
 *         return writer
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_v_topic));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_topic));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_topic));
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_qos));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_qos));
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_listener);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_DataWriter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_writer = ((struct __pyx_obj_3dds_DataWriter *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":2090
 *         '''
 *         writer = DataWriter(self, topic, qos, listener)
 *         self._writers.append(writer)             # <<<<<<<<<<<<<<
 *         return writer
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_self->_writers, ((PyObject *)__pyx_v_writer)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 2090, __pyx_L1_error)

  /* "dds.pyx":2091
 *         writer = DataWriter(self, topic, qos, listener)
 *         self._writers.append(writer)
 *         return writer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_writer));
  __pyx_r = ((PyObject *)__pyx_v_writer);
  goto __pyx_L0;

  /* "dds.pyx":2075
 *         time.sleep(0)
 * 
 *     def create_datawriter(self, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_datawriter(Topic topic, Qos qos = None, listener = None)
 *         Create a data writer
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.Publisher.create_datawriter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_writer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9Publisher_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_9Publisher_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_9Publisher_4__reduce_cython__(((struct __pyx_obj_3dds_Publisher *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9Publisher_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Publisher *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Publisher.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9Publisher_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_9Publisher_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_9Publisher_6__setstate_cython__(((struct __pyx_obj_3dds_Publisher *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9Publisher_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Publisher *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Publisher.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2103
 *     cdef object _readers
 * 
 *     def __cinit__(self, DomainParticipant dp, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         dp._check_handle()
 *         self._readers = []
 */

/* Python wrapper */
static int __pyx_pw_3dds_10Subscriber_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_10Subscriber_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dp,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2103, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dp = ((struct __pyx_obj_3dds_DomainParticipant *)values[0]);
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[1]);
    __pyx_v_listener = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2103, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Subscriber.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dp), __pyx_ptype_3dds_DomainParticipant, 1, "dp", 0))) __PYX_ERR(0, 2103, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 2103, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_10Subscriber___cinit__(((struct __pyx_obj_3dds_Subscriber *)__pyx_v_self), __pyx_v_dp, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_10Subscriber___cinit__(struct __pyx_obj_3dds_Subscriber *__pyx_v_self, struct __pyx_obj_3dds_DomainParticipant *__pyx_v_dp, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  dds_qos_t *__pyx_v__c_qos;
  dds_subscriberlistener_t *__pyx_v__c_listener;
  int __pyx_v_r;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":2104
 * 
 *     def __cinit__(self, DomainParticipant dp, Qos qos = None, listener = None):
 *         dp._check_handle()             # <<<<<<<<<<<<<<
 *         self._readers = []
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dp), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2105
 *     def __cinit__(self, DomainParticipant dp, Qos qos = None, listener = None):
 *         dp._check_handle()
 *         self._readers = []             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(dp, DomainParticipant):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_readers);
  __Pyx_DECREF(__pyx_v_self->_readers);
  __pyx_v_self->_readers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2107
 *         self._readers = []
 * 
 *         if not isinstance(dp, DomainParticipant):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_4 = __Pyx_TypeCheck(((PyObject *)__pyx_v_dp), __pyx_ptype_3dds_DomainParticipant); 
  __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2108
 * 
 *         if not isinstance(dp, DomainParticipant):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if qos and not isinstance(qos, Qos):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2108, __pyx_L1_error)

    /* "dds.pyx":2107
 *         self._readers = []
 * 
 *         if not isinstance(dp, DomainParticipant):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2110
 *             raise DDSException('Bad parameter')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2110, __pyx_L1_error)
  if (__pyx_t_4) {
  } else {
    __pyx_t_5 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_TypeCheck(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos); 
  __pyx_t_6 = ((!(__pyx_t_4 != 0)) != 0);
  __pyx_t_5 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2111
 * 
 *         if qos and not isinstance(qos, Qos):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if listener and not isinstance(listener, Listener):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2111, __pyx_L1_error)

    /* "dds.pyx":2110
 *             raise DDSException('Bad parameter')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2113
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2113, __pyx_L1_error)
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_listener, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_5 = __pyx_t_4;
  __pyx_L8_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2114
 * 
 *         if listener and not isinstance(listener, Listener):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2114, __pyx_L1_error)

    /* "dds.pyx":2113
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2116
 *             raise DDSException('Bad parameter')
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL             # <<<<<<<<<<<<<<
 *         if qos:
 *             _c_qos = qos.handle()
 */
  __pyx_v__c_qos = NULL;

  /* "dds.pyx":2117
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2117, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":2118
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:
 *             _c_qos = qos.handle()             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_subscriberlistener_t *_c_listener = NULL
 */
    __pyx_v__c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

    /* "dds.pyx":2117
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  }

  /* "dds.pyx":2120
 *             _c_qos = qos.handle()
 * 
 *         cdef dds_subscriberlistener_t *_c_listener = NULL             # <<<<<<<<<<<<<<
 *         if listener:
 *             _c_listener = &subscriber_listener
 */
  __pyx_v__c_listener = NULL;

  /* "dds.pyx":2121
 * 
 *         cdef dds_subscriberlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &subscriber_listener
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2121, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":2122
 *         cdef dds_subscriberlistener_t *_c_listener = NULL
 *         if listener:
 *             _c_listener = &subscriber_listener             # <<<<<<<<<<<<<<
 * 
 *         self.parent = dp
 */
    __pyx_v__c_listener = (&__pyx_v_3dds_subscriber_listener);

    /* "dds.pyx":2121
 * 
 *         cdef dds_subscriberlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &subscriber_listener
 * 
 */
  }

  /* "dds.pyx":2124
 *             _c_listener = &subscriber_listener
 * 
 *         self.parent = dp             # <<<<<<<<<<<<<<
 *         self._listener = listener
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent, ((PyObject *)__pyx_v_dp)) < 0) __PYX_ERR(0, 2124, __pyx_L1_error)

  /* "dds.pyx":2125
 * 
 *         self.parent = dp
 *         self._listener = listener             # <<<<<<<<<<<<<<
 * 
 *         # enabling a listener requires three steps, done as a indivisible action:
 */
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._listener);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._listener);
  __pyx_v_self->__pyx_base._listener = __pyx_v_listener;

  /* "dds.pyx":2132
 *         #   3) _set_status_for_listener
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_subscriber_create(dp._c_handle, &self._c_handle, _c_qos, <dds_subscriberlistener_t *>_c_listener) # need_gil             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to create subscriber', r)
 */
  __pyx_v_r = dds_subscriber_create(__pyx_v_dp->__pyx_base._c_handle, (&__pyx_v_self->__pyx_base._c_handle), __pyx_v__c_qos, ((dds_subscriberlistener_t *)__pyx_v__c_listener));

  /* "dds.pyx":2133
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_subscriber_create(dp._c_handle, &self._c_handle, _c_qos, <dds_subscriberlistener_t *>_c_listener) # need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create subscriber', r)
 *         _entity_register_add(self)
 */
  __pyx_t_5 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2134
 *         r = dds.dds_subscriber_create(dp._c_handle, &self._c_handle, _c_qos, <dds_subscriberlistener_t *>_c_listener) # need_gil
 *         if r < 0:
 *             raise DDSException('Failed to create subscriber', r)             # <<<<<<<<<<<<<<
 *         _entity_register_add(self)
 *         if listener:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_subscriber, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_subscriber, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_create_subscriber);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_create_subscriber);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Failed_to_create_subscriber);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2134, __pyx_L1_error)

    /* "dds.pyx":2133
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_subscriber_create(dp._c_handle, &self._c_handle, _c_qos, <dds_subscriberlistener_t *>_c_listener) # need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create subscriber', r)
 *         _entity_register_add(self)
 */
  }

  /* "dds.pyx":2135
 *         if r < 0:
 *             raise DDSException('Failed to create subscriber', r)
 *         _entity_register_add(self)             # <<<<<<<<<<<<<<
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)
 */
  __pyx_t_1 = __pyx_f_3dds__entity_register_add(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2136
 *             raise DDSException('Failed to create subscriber', r)
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2136, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "dds.pyx":2137
 *         _entity_register_add(self)
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)             # <<<<<<<<<<<<<<
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)
 */
    __pyx_t_1 = __pyx_f_3dds__set_status_for_listener(__pyx_v_self->__pyx_base._c_handle, __pyx_v_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "dds.pyx":2136
 *             raise DDSException('Failed to create subscriber', r)
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  }

  /* "dds.pyx":2139
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)             # <<<<<<<<<<<<<<
 * 
 *     def create_datareader(self, Topic topic, Qos qos = None, listener = None):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_2, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2103
 *     cdef object _readers
 * 
 *     def __cinit__(self, DomainParticipant dp, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         dp._check_handle()
 *         self._readers = []
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.Subscriber.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2141
 *         time.sleep(0)
 * 
 *     def create_datareader(self, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_datareader(Topic topic, Qos qos = None, listener = None)
 *         Create a data reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10Subscriber_3create_datareader(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10Subscriber_2create_datareader[] = "create_datareader(Topic topic, Qos qos = None, listener = None)\n        Create a data reader\n        :type topic: Topic\n        :param topic: Topic\n\n        :type qos: Qos\n        :param qos: Qos\n\n        :type listener: Listener\n        :param listener: Listener\n\n        :rtype: DataReader\n        ";
static PyObject *__pyx_pw_3dds_10Subscriber_3create_datareader(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Topic *__pyx_v_topic = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_datareader (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_topic,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_topic)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_datareader") < 0)) __PYX_ERR(0, 2141, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_topic = ((struct __pyx_obj_3dds_Topic *)values[0]);
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[1]);
    __pyx_v_listener = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_datareader", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2141, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.Subscriber.create_datareader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_Topic, 1, "topic", 0))) __PYX_ERR(0, 2141, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 2141, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_10Subscriber_2create_datareader(((struct __pyx_obj_3dds_Subscriber *)__pyx_v_self), __pyx_v_topic, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10Subscriber_2create_datareader(struct __pyx_obj_3dds_Subscriber *__pyx_v_self, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  struct __pyx_obj_3dds_DataReader *__pyx_v_reader = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("create_datareader", 0);

  /* "dds.pyx":2155
 *         :rtype: DataReader
 *         '''
 *         reader = DataReader(self, topic, qos, listener)             # <<<<<<<<<<<<<<
 *         self._readers.append(reader)
 *         return reader
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_v_topic));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_topic));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_topic));
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_qos));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_qos));
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_listener);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_DataReader), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_reader = ((struct __pyx_obj_3dds_DataReader *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":2156
 *         '''
 *         reader = DataReader(self, topic, qos, listener)
 *         self._readers.append(reader)             # <<<<<<<<<<<<<<
 *         return reader
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_self->_readers, ((PyObject *)__pyx_v_reader)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 2156, __pyx_L1_error)

  /* "dds.pyx":2157
 *         reader = DataReader(self, topic, qos, listener)
 *         self._readers.append(reader)
 *         return reader             # <<<<<<<<<<<<<<
 * 
 * # The Datawriter wrapper
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __pyx_r = ((PyObject *)__pyx_v_reader);
  goto __pyx_L0;

  /* "dds.pyx":2141
 *         time.sleep(0)
 * 
 *     def create_datareader(self, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         '''create_datareader(Topic topic, Qos qos = None, listener = None)
 *         Create a data reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.Subscriber.create_datareader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10Subscriber_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_10Subscriber_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10Subscriber_4__reduce_cython__(((struct __pyx_obj_3dds_Subscriber *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10Subscriber_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Subscriber *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Subscriber.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10Subscriber_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_10Subscriber_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10Subscriber_6__setstate_cython__(((struct __pyx_obj_3dds_Subscriber *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10Subscriber_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Subscriber *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Subscriber.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2168
 *     cdef object _topic
 * 
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Publisher):
 */

/* Python wrapper */
static int __pyx_pw_3dds_10DataWriter_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_10DataWriter_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Entity *__pyx_v_entity = 0;
  struct __pyx_obj_3dds_Topic *__pyx_v_topic = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_entity,&__pyx_n_s_topic,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_entity)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_topic)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, 1); __PYX_ERR(0, 2168, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2168, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_entity = ((struct __pyx_obj_3dds_Entity *)values[0]);
    __pyx_v_topic = ((struct __pyx_obj_3dds_Topic *)values[1]);
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[2]);
    __pyx_v_listener = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2168, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataWriter.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entity), __pyx_ptype_3dds_Entity, 1, "entity", 0))) __PYX_ERR(0, 2168, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_Topic, 1, "topic", 0))) __PYX_ERR(0, 2168, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 2168, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_10DataWriter___cinit__(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), __pyx_v_entity, __pyx_v_topic, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_10DataWriter___cinit__(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, struct __pyx_obj_3dds_Entity *__pyx_v_entity, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  dds_qos_t *__pyx_v__c_qos;
  dds_writerlistener_t *__pyx_v__c_listener;
  int __pyx_v_r;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":2169
 * 
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos = None, listener = None):
 *         entity._check_handle()             # <<<<<<<<<<<<<<
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Publisher):
 *             raise DDSException('Bad parameter')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_entity), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2170
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos = None, listener = None):
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Publisher):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_entity), __pyx_ptype_3dds_DomainParticipant); 
  __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(((PyObject *)__pyx_v_entity), __pyx_ptype_3dds_Publisher); 
  __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2171
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Publisher):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(topic, Topic):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2171, __pyx_L1_error)

    /* "dds.pyx":2170
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos = None, listener = None):
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Publisher):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2173
 *             raise DDSException('Bad parameter')
 * 
 *         if not isinstance(topic, Topic):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_4 = __Pyx_TypeCheck(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_Topic); 
  __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2174
 * 
 *         if not isinstance(topic, Topic):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(topic, FoundTopic):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2174, __pyx_L1_error)

    /* "dds.pyx":2173
 *             raise DDSException('Bad parameter')
 * 
 *         if not isinstance(topic, Topic):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2176
 *             raise DDSException('Bad parameter')
 * 
 *         if isinstance(topic, FoundTopic):             # <<<<<<<<<<<<<<
 *             raise DDSException('Cannot create directly data writer from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')
 * 
 */
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_FoundTopic); 
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2177
 * 
 *         if isinstance(topic, FoundTopic):
 *             raise DDSException('Cannot create directly data writer from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')             # <<<<<<<<<<<<<<
 * 
 *         if qos and not isinstance(qos, Qos):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Cannot_create_directly_data_writ) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Cannot_create_directly_data_writ);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2177, __pyx_L1_error)

    /* "dds.pyx":2176
 *             raise DDSException('Bad parameter')
 * 
 *         if isinstance(topic, FoundTopic):             # <<<<<<<<<<<<<<
 *             raise DDSException('Cannot create directly data writer from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')
 * 
 */
  }

  /* "dds.pyx":2179
 *             raise DDSException('Cannot create directly data writer from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2179, __pyx_L1_error)
  if (__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos); 
  __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
  __pyx_t_4 = __pyx_t_6;
  __pyx_L9_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2180
 * 
 *         if qos and not isinstance(qos, Qos):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if listener and not isinstance(listener, Listener):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2180, __pyx_L1_error)

    /* "dds.pyx":2179
 *             raise DDSException('Cannot create directly data writer from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2182
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2182, __pyx_L1_error)
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L12_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_listener, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L12_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2183
 * 
 *         if listener and not isinstance(listener, Listener):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2183, __pyx_L1_error)

    /* "dds.pyx":2182
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2185
 *             raise DDSException('Bad parameter')
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL             # <<<<<<<<<<<<<<
 *         if qos:
 *             _c_qos = qos.handle()
 */
  __pyx_v__c_qos = NULL;

  /* "dds.pyx":2186
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2186, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":2187
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:
 *             _c_qos = qos.handle()             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_writerlistener_t *_c_listener = NULL
 */
    __pyx_v__c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

    /* "dds.pyx":2186
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  }

  /* "dds.pyx":2189
 *             _c_qos = qos.handle()
 * 
 *         cdef dds_writerlistener_t *_c_listener = NULL             # <<<<<<<<<<<<<<
 *         if listener:
 *             _c_listener = &writer_listener
 */
  __pyx_v__c_listener = NULL;

  /* "dds.pyx":2190
 * 
 *         cdef dds_writerlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &writer_listener
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2190, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":2191
 *         cdef dds_writerlistener_t *_c_listener = NULL
 *         if listener:
 *             _c_listener = &writer_listener             # <<<<<<<<<<<<<<
 * 
 *         self.parent = entity
 */
    __pyx_v__c_listener = (&__pyx_v_3dds_writer_listener);

    /* "dds.pyx":2190
 * 
 *         cdef dds_writerlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &writer_listener
 * 
 */
  }

  /* "dds.pyx":2193
 *             _c_listener = &writer_listener
 * 
 *         self.parent = entity             # <<<<<<<<<<<<<<
 *         self._topic = topic
 *         self._typesupport = topic._typesupport
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent, ((PyObject *)__pyx_v_entity)) < 0) __PYX_ERR(0, 2193, __pyx_L1_error)

  /* "dds.pyx":2194
 * 
 *         self.parent = entity
 *         self._topic = topic             # <<<<<<<<<<<<<<
 *         self._typesupport = topic._typesupport
 *         self._listener = listener
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_topic));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_topic));
  __Pyx_GOTREF(__pyx_v_self->_topic);
  __Pyx_DECREF(__pyx_v_self->_topic);
  __pyx_v_self->_topic = ((PyObject *)__pyx_v_topic);

  /* "dds.pyx":2195
 *         self.parent = entity
 *         self._topic = topic
 *         self._typesupport = topic._typesupport             # <<<<<<<<<<<<<<
 *         self._listener = listener
 * 
 */
  __pyx_t_1 = __pyx_v_topic->_typesupport;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_typesupport);
  __Pyx_DECREF(__pyx_v_self->_typesupport);
  __pyx_v_self->_typesupport = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2196
 *         self._topic = topic
 *         self._typesupport = topic._typesupport
 *         self._listener = listener             # <<<<<<<<<<<<<<
 * 
 *         # enabling a listener requires three steps, done as a indivisible action:
 */
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._listener);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._listener);
  __pyx_v_self->__pyx_base._listener = __pyx_v_listener;

  /* "dds.pyx":2203
 *         #   3) _set_status_for_listener
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_writer_create(entity._c_handle, &self._c_handle, topic._c_handle, _c_qos, <dds_writerlistener_t *>_c_listener) # need_gil             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to create data writer', r)
 */
  __pyx_v_r = dds_writer_create(__pyx_v_entity->_c_handle, (&__pyx_v_self->__pyx_base._c_handle), __pyx_v_topic->__pyx_base._c_handle, __pyx_v__c_qos, ((dds_writerlistener_t *)__pyx_v__c_listener));

  /* "dds.pyx":2204
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_writer_create(entity._c_handle, &self._c_handle, topic._c_handle, _c_qos, <dds_writerlistener_t *>_c_listener) # need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create data writer', r)
 *         _entity_register_add(self)
 */
  __pyx_t_4 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2205
 *         r = dds.dds_writer_create(entity._c_handle, &self._c_handle, topic._c_handle, _c_qos, <dds_writerlistener_t *>_c_listener) # need_gil
 *         if r < 0:
 *             raise DDSException('Failed to create data writer', r)             # <<<<<<<<<<<<<<
 *         _entity_register_add(self)
 *         if listener:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_data_writer, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_data_writer, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_create_data_writer);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_create_data_writer);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Failed_to_create_data_writer);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2205, __pyx_L1_error)

    /* "dds.pyx":2204
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_writer_create(entity._c_handle, &self._c_handle, topic._c_handle, _c_qos, <dds_writerlistener_t *>_c_listener) # need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create data writer', r)
 *         _entity_register_add(self)
 */
  }

  /* "dds.pyx":2206
 *         if r < 0:
 *             raise DDSException('Failed to create data writer', r)
 *         _entity_register_add(self)             # <<<<<<<<<<<<<<
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)
 */
  __pyx_t_1 = __pyx_f_3dds__entity_register_add(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2207
 *             raise DDSException('Failed to create data writer', r)
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2207, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":2208
 *         _entity_register_add(self)
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)             # <<<<<<<<<<<<<<
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)
 */
    __pyx_t_1 = __pyx_f_3dds__set_status_for_listener(__pyx_v_self->__pyx_base._c_handle, __pyx_v_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "dds.pyx":2207
 *             raise DDSException('Failed to create data writer', r)
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  }

  /* "dds.pyx":2210
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)             # <<<<<<<<<<<<<<
 * 
 *     def write(self, data):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_2, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2168
 *     cdef object _topic
 * 
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Publisher):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.DataWriter.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2212
 *         time.sleep(0)
 * 
 *     def write(self, data):             # <<<<<<<<<<<<<<
 *         '''write(data)
 *         Write data
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_3write(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static char __pyx_doc_3dds_10DataWriter_2write[] = "write(data)\n        Write data\n\n        :type data: object\n        :param data: Topic data class instance\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_3write(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_2write(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_2write(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data) {
  char *__pyx_v_p;
  PyObject *__pyx_v_b = NULL;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("write", 0);

  /* "dds.pyx":2219
 *         :param data: Topic data class instance
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2220
 *         '''
 *         self._check_handle()
 *         cdef char *p = NULL             # <<<<<<<<<<<<<<
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 */
  __pyx_v_p = NULL;

  /* "dds.pyx":2221
 *         self._check_handle()
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]             # <<<<<<<<<<<<<<
 *         p = <bytes>b
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_serialize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "dds.pyx":2222
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_write(self._c_handle, <const void *>p)
 */
  if (unlikely(__pyx_v_b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2222, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2222, __pyx_L1_error)
  __pyx_v_p = __pyx_t_4;

  /* "dds.pyx":2223
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_write(self._c_handle, <const void *>p)
 *         if r < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2224
 *         p = <bytes>b
 *         with nogil:
 *             r = dds.dds_write(self._c_handle, <const void *>p)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to write data', r)
 */
        __pyx_v_r = dds_write(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p));
      }

      /* "dds.pyx":2223
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_write(self._c_handle, <const void *>p)
 *         if r < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2225
 *         with nogil:
 *             r = dds.dds_write(self._c_handle, <const void *>p)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to write data', r)
 * 
 */
  __pyx_t_5 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2226
 *             r = dds.dds_write(self._c_handle, <const void *>p)
 *         if r < 0:
 *             raise DDSException('Failed to write data', r)             # <<<<<<<<<<<<<<
 * 
 *     def write_ts(self, data, ts):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Failed_to_write_data, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2226, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Failed_to_write_data, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2226, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_write_data);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_write_data);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_Failed_to_write_data);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2226, __pyx_L1_error)

    /* "dds.pyx":2225
 *         with nogil:
 *             r = dds.dds_write(self._c_handle, <const void *>p)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to write data', r)
 * 
 */
  }

  /* "dds.pyx":2212
 *         time.sleep(0)
 * 
 *     def write(self, data):             # <<<<<<<<<<<<<<
 *         '''write(data)
 *         Write data
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.DataWriter.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2228
 *             raise DDSException('Failed to write data', r)
 * 
 *     def write_ts(self, data, ts):             # <<<<<<<<<<<<<<
 *         '''
 *         Write data with a given source timestamp
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_5write_ts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataWriter_4write_ts[] = "\n        Write data with a given source timestamp\n\n        :type data: object\n        :param data: data values\n        :type ts: dds.DDSTime\n        :param ts: a timestamp\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_5write_ts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_ts = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_ts (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_ts,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("write_ts", 1, 2, 2, 1); __PYX_ERR(0, 2228, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_ts") < 0)) __PYX_ERR(0, 2228, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_data = values[0];
    __pyx_v_ts = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("write_ts", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2228, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataWriter.write_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataWriter_4write_ts(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), __pyx_v_data, __pyx_v_ts);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_4write_ts(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_ts) {
  char *__pyx_v_p;
  PyObject *__pyx_v_b = NULL;
  dds_time_t __pyx_v_c_time;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  dds_time_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("write_ts", 0);

  /* "dds.pyx":2237
 *         :param ts: a timestamp
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2238
 *         '''
 *         self._check_handle()
 *         cdef char *p = NULL             # <<<<<<<<<<<<<<
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 */
  __pyx_v_p = NULL;

  /* "dds.pyx":2239
 *         self._check_handle()
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]             # <<<<<<<<<<<<<<
 *         p = <bytes>b
 *         cdef dds_time_t c_time = ts.value
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_serialize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "dds.pyx":2240
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b             # <<<<<<<<<<<<<<
 *         cdef dds_time_t c_time = ts.value
 *         with nogil:
 */
  if (unlikely(__pyx_v_b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2240, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2240, __pyx_L1_error)
  __pyx_v_p = __pyx_t_4;

  /* "dds.pyx":2241
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         cdef dds_time_t c_time = ts.value             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_write_ts(self._c_handle, <const void *>p, c_time)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ts, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((dds_time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_c_time = __pyx_t_5;

  /* "dds.pyx":2242
 *         p = <bytes>b
 *         cdef dds_time_t c_time = ts.value
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_write_ts(self._c_handle, <const void *>p, c_time)
 *         if r < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2243
 *         cdef dds_time_t c_time = ts.value
 *         with nogil:
 *             r = dds.dds_write_ts(self._c_handle, <const void *>p, c_time)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to write data', r)
 */
        __pyx_v_r = dds_write_ts(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p), __pyx_v_c_time);
      }

      /* "dds.pyx":2242
 *         p = <bytes>b
 *         cdef dds_time_t c_time = ts.value
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_write_ts(self._c_handle, <const void *>p, c_time)
 *         if r < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2244
 *         with nogil:
 *             r = dds.dds_write_ts(self._c_handle, <const void *>p, c_time)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to write data', r)
 * 
 */
  __pyx_t_6 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "dds.pyx":2245
 *             r = dds.dds_write_ts(self._c_handle, <const void *>p, c_time)
 *         if r < 0:
 *             raise DDSException('Failed to write data', r)             # <<<<<<<<<<<<<<
 * 
 *     def dispose_instance(self, data):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_write_data, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2245, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_write_data, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2245, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_write_data);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_write_data);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Failed_to_write_data);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2245, __pyx_L1_error)

    /* "dds.pyx":2244
 *         with nogil:
 *             r = dds.dds_write_ts(self._c_handle, <const void *>p, c_time)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to write data', r)
 * 
 */
  }

  /* "dds.pyx":2228
 *             raise DDSException('Failed to write data', r)
 * 
 *     def write_ts(self, data, ts):             # <<<<<<<<<<<<<<
 *         '''
 *         Write data with a given source timestamp
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.DataWriter.write_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2247
 *             raise DDSException('Failed to write data', r)
 * 
 *     def dispose_instance(self, data):             # <<<<<<<<<<<<<<
 *         '''dispose_instance(data)
 *         Dispose instance
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_7dispose_instance(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static char __pyx_doc_3dds_10DataWriter_6dispose_instance[] = "dispose_instance(data)\n        Dispose instance\n\n        :type data: object\n        :param data: Topic data class instance\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_7dispose_instance(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dispose_instance (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_6dispose_instance(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_6dispose_instance(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data) {
  char *__pyx_v_p;
  PyObject *__pyx_v_b = NULL;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("dispose_instance", 0);

  /* "dds.pyx":2254
 *         :param data: Topic data class instance
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2255
 *         '''
 *         self._check_handle()
 *         cdef char *p = NULL             # <<<<<<<<<<<<<<
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 */
  __pyx_v_p = NULL;

  /* "dds.pyx":2256
 *         self._check_handle()
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]             # <<<<<<<<<<<<<<
 *         p = <bytes>b
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_serialize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "dds.pyx":2257
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_instance_dispose(self._c_handle, <const void *>p)
 */
  if (unlikely(__pyx_v_b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2257, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2257, __pyx_L1_error)
  __pyx_v_p = __pyx_t_4;

  /* "dds.pyx":2258
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_instance_dispose(self._c_handle, <const void *>p)
 *         if r < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2259
 *         p = <bytes>b
 *         with nogil:
 *             r = dds.dds_instance_dispose(self._c_handle, <const void *>p)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to dispose instance', r)
 */
        __pyx_v_r = dds_instance_dispose(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p));
      }

      /* "dds.pyx":2258
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_instance_dispose(self._c_handle, <const void *>p)
 *         if r < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2260
 *         with nogil:
 *             r = dds.dds_instance_dispose(self._c_handle, <const void *>p)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to dispose instance', r)
 * 
 */
  __pyx_t_5 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2261
 *             r = dds.dds_instance_dispose(self._c_handle, <const void *>p)
 *         if r < 0:
 *             raise DDSException('Failed to dispose instance', r)             # <<<<<<<<<<<<<<
 * 
 *     def dispose_instance_ts(self, data, ts):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Failed_to_dispose_instance, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2261, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Failed_to_dispose_instance, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2261, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_dispose_instance);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_dispose_instance);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_Failed_to_dispose_instance);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2261, __pyx_L1_error)

    /* "dds.pyx":2260
 *         with nogil:
 *             r = dds.dds_instance_dispose(self._c_handle, <const void *>p)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to dispose instance', r)
 * 
 */
  }

  /* "dds.pyx":2247
 *             raise DDSException('Failed to write data', r)
 * 
 *     def dispose_instance(self, data):             # <<<<<<<<<<<<<<
 *         '''dispose_instance(data)
 *         Dispose instance
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.DataWriter.dispose_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2263
 *             raise DDSException('Failed to dispose instance', r)
 * 
 *     def dispose_instance_ts(self, data, ts):             # <<<<<<<<<<<<<<
 *         '''dispose_instance_ts(data, ts)
 *         Dispose instance with timestamp
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_9dispose_instance_ts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataWriter_8dispose_instance_ts[] = "dispose_instance_ts(data, ts)\n        Dispose instance with timestamp\n\n        :type data: object\n        :param data: Topic data class instance\n\n        :type ts: long\n        :param ts: timestamp\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_9dispose_instance_ts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_ts = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dispose_instance_ts (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_ts,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dispose_instance_ts", 1, 2, 2, 1); __PYX_ERR(0, 2263, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dispose_instance_ts") < 0)) __PYX_ERR(0, 2263, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_data = values[0];
    __pyx_v_ts = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dispose_instance_ts", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2263, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataWriter.dispose_instance_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataWriter_8dispose_instance_ts(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), __pyx_v_data, __pyx_v_ts);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_8dispose_instance_ts(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_ts) {
  char *__pyx_v_p;
  PyObject *__pyx_v_b = NULL;
  dds_time_t __pyx_v__c_ts;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  dds_time_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("dispose_instance_ts", 0);

  /* "dds.pyx":2273
 *         :param ts: timestamp
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2274
 *         '''
 *         self._check_handle()
 *         cdef char *p = NULL             # <<<<<<<<<<<<<<
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 */
  __pyx_v_p = NULL;

  /* "dds.pyx":2275
 *         self._check_handle()
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]             # <<<<<<<<<<<<<<
 *         p = <bytes>b
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_serialize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "dds.pyx":2276
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_time_t _c_ts = ts
 */
  if (unlikely(__pyx_v_b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2276, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2276, __pyx_L1_error)
  __pyx_v_p = __pyx_t_4;

  /* "dds.pyx":2278
 *         p = <bytes>b
 * 
 *         cdef dds_time_t _c_ts = ts             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_instance_dispose_ts(self._c_handle, <const void *>p, _c_ts)
 */
  __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_v_ts); if (unlikely((__pyx_t_5 == ((dds_time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2278, __pyx_L1_error)
  __pyx_v__c_ts = __pyx_t_5;

  /* "dds.pyx":2279
 * 
 *         cdef dds_time_t _c_ts = ts
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_instance_dispose_ts(self._c_handle, <const void *>p, _c_ts)
 *         if r < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2280
 *         cdef dds_time_t _c_ts = ts
 *         with nogil:
 *             r = dds.dds_instance_dispose_ts(self._c_handle, <const void *>p, _c_ts)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to dispose instance', r)
 */
        __pyx_v_r = dds_instance_dispose_ts(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p), __pyx_v__c_ts);
      }

      /* "dds.pyx":2279
 * 
 *         cdef dds_time_t _c_ts = ts
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_instance_dispose_ts(self._c_handle, <const void *>p, _c_ts)
 *         if r < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2281
 *         with nogil:
 *             r = dds.dds_instance_dispose_ts(self._c_handle, <const void *>p, _c_ts)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to dispose instance', r)
 * 
 */
  __pyx_t_6 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "dds.pyx":2282
 *             r = dds.dds_instance_dispose_ts(self._c_handle, <const void *>p, _c_ts)
 *         if r < 0:
 *             raise DDSException('Failed to dispose instance', r)             # <<<<<<<<<<<<<<
 * 
 *     def publication_matched_status(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_dispose_instance, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2282, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_dispose_instance, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2282, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_dispose_instance);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_dispose_instance);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Failed_to_dispose_instance);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2282, __pyx_L1_error)

    /* "dds.pyx":2281
 *         with nogil:
 *             r = dds.dds_instance_dispose_ts(self._c_handle, <const void *>p, _c_ts)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to dispose instance', r)
 * 
 */
  }

  /* "dds.pyx":2263
 *             raise DDSException('Failed to dispose instance', r)
 * 
 *     def dispose_instance_ts(self, data, ts):             # <<<<<<<<<<<<<<
 *         '''dispose_instance_ts(data, ts)
 *         Dispose instance with timestamp
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.DataWriter.dispose_instance_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2284
 *             raise DDSException('Failed to dispose instance', r)
 * 
 *     def publication_matched_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the PublicationMatchedStatus of the writer
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_11publication_matched_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataWriter_10publication_matched_status[] = "\n        Return the PublicationMatchedStatus of the writer\n\n        PublicationMatchedStatus has fields:\n            total_count,\n            total_count_change,\n            current_count,\n            current_count_change,\n            last_subscription_handle\n\n        :rtype: dds.PublicationMatchedStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_11publication_matched_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("publication_matched_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_10publication_matched_status(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_10publication_matched_status(struct __pyx_obj_3dds_DataWriter *__pyx_v_self) {
  dds_publication_matched_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("publication_matched_status", 0);

  /* "dds.pyx":2297
 *         :rtype: dds.PublicationMatchedStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_publication_matched_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2299
 *         self._check_handle()
 *         cdef dds_publication_matched_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_publication_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2300
 *         cdef dds_publication_matched_status_t c_status
 *         with nogil:
 *             ret = dds_get_publication_matched_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving publication_matched_status', ret)
 */
        __pyx_v_ret = dds_get_publication_matched_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2299
 *         self._check_handle()
 *         cdef dds_publication_matched_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_publication_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2301
 *         with nogil:
 *             ret = dds_get_publication_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving publication_matched_status', ret)
 *         status = PublicationMatchedStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2302
 *             ret = dds_get_publication_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving publication_matched_status', ret)             # <<<<<<<<<<<<<<
 *         status = PublicationMatchedStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_publication_m, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_publication_m, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_publication_m);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_publication_m);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_publication_m);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2302, __pyx_L1_error)

    /* "dds.pyx":2301
 *         with nogil:
 *             ret = dds_get_publication_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving publication_matched_status', ret)
 *         status = PublicationMatchedStatus(
 */
  }

  /* "dds.pyx":2303
 *         if ret < 0:
 *             raise DDSException('Failure retrieving publication_matched_status', ret)
 *         status = PublicationMatchedStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PublicationMatchedStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2304
 *             raise DDSException('Failure retrieving publication_matched_status', ret)
 *         status = PublicationMatchedStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change,
 *             c_status.current_count,
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2305
 *         status = PublicationMatchedStatus(
 *             c_status.total_count,
 *             c_status.total_count_change,             # <<<<<<<<<<<<<<
 *             c_status.current_count,
 *             c_status.current_count_change,
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2306
 *             c_status.total_count,
 *             c_status.total_count_change,
 *             c_status.current_count,             # <<<<<<<<<<<<<<
 *             c_status.current_count_change,
 *             c_status.last_subscription_handle)
 */
  __pyx_t_5 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.current_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":2307
 *             c_status.total_count_change,
 *             c_status.current_count,
 *             c_status.current_count_change,             # <<<<<<<<<<<<<<
 *             c_status.last_subscription_handle)
 *         return status
 */
  __pyx_t_8 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.current_count_change); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "dds.pyx":2308
 *             c_status.current_count,
 *             c_status.current_count_change,
 *             c_status.last_subscription_handle)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __pyx_t_9 = __Pyx_PyInt_From_uint64_t(__pyx_v_c_status.last_subscription_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_8, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_8, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_6, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_6, __pyx_t_9);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2309
 *             c_status.current_count_change,
 *             c_status.last_subscription_handle)
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def liveliness_lost_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2284
 *             raise DDSException('Failed to dispose instance', r)
 * 
 *     def publication_matched_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the PublicationMatchedStatus of the writer
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("dds.DataWriter.publication_matched_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2311
 *         return status
 * 
 *     def liveliness_lost_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the LivelinessLostStatus of the writer
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_13liveliness_lost_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataWriter_12liveliness_lost_status[] = "\n        Return the LivelinessLostStatus of the writer\n\n        LivelinessLostStatus has fields:\n            total_count,\n            total_count_change\n\n        :rtype: dds.LivelinessLostStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_13liveliness_lost_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("liveliness_lost_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_12liveliness_lost_status(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_12liveliness_lost_status(struct __pyx_obj_3dds_DataWriter *__pyx_v_self) {
  dds_liveliness_lost_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("liveliness_lost_status", 0);

  /* "dds.pyx":2321
 *         :rtype: dds.LivelinessLostStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_liveliness_lost_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2323
 *         self._check_handle()
 *         cdef dds_liveliness_lost_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_liveliness_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2324
 *         cdef dds_liveliness_lost_status_t c_status
 *         with nogil:
 *             ret = dds_get_liveliness_lost_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving liveliness_lost_status', ret)
 */
        __pyx_v_ret = dds_get_liveliness_lost_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2323
 *         self._check_handle()
 *         cdef dds_liveliness_lost_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_liveliness_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2325
 *         with nogil:
 *             ret = dds_get_liveliness_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving liveliness_lost_status', ret)
 *         status = LivelinessLostStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2326
 *             ret = dds_get_liveliness_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving liveliness_lost_status', ret)             # <<<<<<<<<<<<<<
 *         status = LivelinessLostStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_liveliness_lo, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_liveliness_lo, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_liveliness_lo);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_liveliness_lo);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_liveliness_lo);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2326, __pyx_L1_error)

    /* "dds.pyx":2325
 *         with nogil:
 *             ret = dds_get_liveliness_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving liveliness_lost_status', ret)
 *         status = LivelinessLostStatus(
 */
  }

  /* "dds.pyx":2327
 *         if ret < 0:
 *             raise DDSException('Failure retrieving liveliness_lost_status', ret)
 *         status = LivelinessLostStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LivelinessLostStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2328
 *             raise DDSException('Failure retrieving liveliness_lost_status', ret)
 *         status = LivelinessLostStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change)
 *         return status
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2329
 *         status = LivelinessLostStatus(
 *             c_status.total_count,
 *             c_status.total_count_change)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2327, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2327, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2330
 *             c_status.total_count,
 *             c_status.total_count_change)
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def offered_deadline_missed_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2311
 *         return status
 * 
 *     def liveliness_lost_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the LivelinessLostStatus of the writer
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.DataWriter.liveliness_lost_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2332
 *         return status
 * 
 *     def offered_deadline_missed_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the OfferedDeadlineMissedStatus of the writer
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_15offered_deadline_missed_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataWriter_14offered_deadline_missed_status[] = "\n        Return the OfferedDeadlineMissedStatus of the writer\n\n        OfferedDeadlineMissedStatus has fields:\n            total_count,\n            total_count_change,\n            last_instance_handle\n\n        :rtype: dds.OfferedDeadlineMissedStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_15offered_deadline_missed_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("offered_deadline_missed_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_14offered_deadline_missed_status(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_14offered_deadline_missed_status(struct __pyx_obj_3dds_DataWriter *__pyx_v_self) {
  dds_offered_deadline_missed_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("offered_deadline_missed_status", 0);

  /* "dds.pyx":2343
 *         :rtype: dds.OfferedDeadlineMissedStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_offered_deadline_missed_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2345
 *         self._check_handle()
 *         cdef dds_offered_deadline_missed_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_offered_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2346
 *         cdef dds_offered_deadline_missed_status_t c_status
 *         with nogil:
 *             ret = dds_get_offered_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving offered_deadline_missed_status', ret)
 */
        __pyx_v_ret = dds_get_offered_deadline_missed_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2345
 *         self._check_handle()
 *         cdef dds_offered_deadline_missed_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_offered_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2347
 *         with nogil:
 *             ret = dds_get_offered_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving offered_deadline_missed_status', ret)
 *         status = OfferedDeadlineMissedStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2348
 *             ret = dds_get_offered_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving offered_deadline_missed_status', ret)             # <<<<<<<<<<<<<<
 *         status = OfferedDeadlineMissedStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_offered_deadl, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_offered_deadl, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_offered_deadl);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_offered_deadl);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_offered_deadl);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2348, __pyx_L1_error)

    /* "dds.pyx":2347
 *         with nogil:
 *             ret = dds_get_offered_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving offered_deadline_missed_status', ret)
 *         status = OfferedDeadlineMissedStatus(
 */
  }

  /* "dds.pyx":2349
 *         if ret < 0:
 *             raise DDSException('Failure retrieving offered_deadline_missed_status', ret)
 *         status = OfferedDeadlineMissedStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OfferedDeadlineMissedStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2350
 *             raise DDSException('Failure retrieving offered_deadline_missed_status', ret)
 *         status = OfferedDeadlineMissedStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change,
 *             c_status.last_instance_handle)
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2351
 *         status = OfferedDeadlineMissedStatus(
 *             c_status.total_count,
 *             c_status.total_count_change,             # <<<<<<<<<<<<<<
 *             c_status.last_instance_handle)
 *         return status
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2352
 *             c_status.total_count,
 *             c_status.total_count_change,
 *             c_status.last_instance_handle)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_c_status.last_instance_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_6, __pyx_t_5);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2353
 *             c_status.total_count_change,
 *             c_status.last_instance_handle)
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def offered_incompatible_qos_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2332
 *         return status
 * 
 *     def offered_deadline_missed_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the OfferedDeadlineMissedStatus of the writer
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.DataWriter.offered_deadline_missed_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2355
 *         return status
 * 
 *     def offered_incompatible_qos_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the OfferedIncompatibleQosStatus of the writer
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_17offered_incompatible_qos_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataWriter_16offered_incompatible_qos_status[] = "\n        Return the OfferedIncompatibleQosStatus of the writer\n\n        OfferedIncompatibleQosStatus has fields:\n            total_count,\n            total_count_change,\n            last_policy_id\n\n        :rtype: dds.OfferedDeadlineMissedStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_17offered_incompatible_qos_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("offered_incompatible_qos_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_16offered_incompatible_qos_status(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_16offered_incompatible_qos_status(struct __pyx_obj_3dds_DataWriter *__pyx_v_self) {
  dds_offered_incompatible_qos_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("offered_incompatible_qos_status", 0);

  /* "dds.pyx":2366
 *         :rtype: dds.OfferedDeadlineMissedStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_offered_incompatible_qos_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2368
 *         self._check_handle()
 *         cdef dds_offered_incompatible_qos_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_offered_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2369
 *         cdef dds_offered_incompatible_qos_status_t c_status
 *         with nogil:
 *             ret = dds_get_offered_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving offered_incompatible_qos_status', ret)
 */
        __pyx_v_ret = dds_get_offered_incompatible_qos_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2368
 *         self._check_handle()
 *         cdef dds_offered_incompatible_qos_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_offered_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2370
 *         with nogil:
 *             ret = dds_get_offered_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving offered_incompatible_qos_status', ret)
 *         status = OfferedIncompatibleQosStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2371
 *             ret = dds_get_offered_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving offered_incompatible_qos_status', ret)             # <<<<<<<<<<<<<<
 *         status = OfferedIncompatibleQosStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_offered_incom, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2371, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_offered_incom, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2371, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2371, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_offered_incom);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_offered_incom);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_offered_incom);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2371, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2371, __pyx_L1_error)

    /* "dds.pyx":2370
 *         with nogil:
 *             ret = dds_get_offered_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving offered_incompatible_qos_status', ret)
 *         status = OfferedIncompatibleQosStatus(
 */
  }

  /* "dds.pyx":2372
 *         if ret < 0:
 *             raise DDSException('Failure retrieving offered_incompatible_qos_status', ret)
 *         status = OfferedIncompatibleQosStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OfferedIncompatibleQosStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2373
 *             raise DDSException('Failure retrieving offered_incompatible_qos_status', ret)
 *         status = OfferedIncompatibleQosStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change,
 *             QosPolicyId(c_status.last_policy_id))
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2374
 *         status = OfferedIncompatibleQosStatus(
 *             c_status.total_count,
 *             c_status.total_count_change,             # <<<<<<<<<<<<<<
 *             QosPolicyId(c_status.last_policy_id))
 *         return status
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2375
 *             c_status.total_count,
 *             c_status.total_count_change,
 *             QosPolicyId(c_status.last_policy_id))             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.last_policy_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2372, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2372, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_6, __pyx_t_5);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2376
 *             c_status.total_count_change,
 *             QosPolicyId(c_status.last_policy_id))
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def register_instance(self, data):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2355
 *         return status
 * 
 *     def offered_incompatible_qos_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the OfferedIncompatibleQosStatus of the writer
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("dds.DataWriter.offered_incompatible_qos_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2378
 *         return status
 * 
 *     def register_instance(self, data):             # <<<<<<<<<<<<<<
 *         '''
 *         Register a data instance
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_19register_instance(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static char __pyx_doc_3dds_10DataWriter_18register_instance[] = "\n        Register a data instance\n\n        :param data: a topic data instance\n        :type data: object\n        :return: the instance handle\n        :rtype: int\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_19register_instance(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("register_instance (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_18register_instance(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_18register_instance(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data) {
  char *__pyx_v_p;
  PyObject *__pyx_v_b = NULL;
  dds_instance_handle_t __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  __Pyx_RefNannySetupContext("register_instance", 0);

  /* "dds.pyx":2387
 *         :rtype: int
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2388
 *         '''
 *         self._check_handle()
 *         cdef char *p = NULL             # <<<<<<<<<<<<<<
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 */
  __pyx_v_p = NULL;

  /* "dds.pyx":2389
 *         self._check_handle()
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]             # <<<<<<<<<<<<<<
 *         p = <bytes>b
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_serialize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "dds.pyx":2390
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_instance_register(self._c_handle, <const void *>p)
 */
  if (unlikely(__pyx_v_b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2390, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2390, __pyx_L1_error)
  __pyx_v_p = __pyx_t_4;

  /* "dds.pyx":2391
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_instance_register(self._c_handle, <const void *>p)
 *         return r
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2392
 *         p = <bytes>b
 *         with nogil:
 *             r = dds.dds_instance_register(self._c_handle, <const void *>p)             # <<<<<<<<<<<<<<
 *         return r
 * 
 */
        __pyx_v_r = dds_instance_register(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p));
      }

      /* "dds.pyx":2391
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_instance_register(self._c_handle, <const void *>p)
 *         return r
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2393
 *         with nogil:
 *             r = dds.dds_instance_register(self._c_handle, <const void *>p)
 *         return r             # <<<<<<<<<<<<<<
 * 
 *     def unregister_instance(self, data=None, handle=None, timestamp=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2378
 *         return status
 * 
 *     def register_instance(self, data):             # <<<<<<<<<<<<<<
 *         '''
 *         Register a data instance
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataWriter.register_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2395
 *         return r
 * 
 *     def unregister_instance(self, data=None, handle=None, timestamp=None):             # <<<<<<<<<<<<<<
 *         '''
 *         Unregister a data instance. One of data and handle must be specified.
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_21unregister_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataWriter_20unregister_instance[] = "\n        Unregister a data instance. One of data and handle must be specified.\n\n        :param data: an optional data object\n        :type data: object\n        :param handle: an optional instance handle\n        :type handle: int\n        :param timestamp: an optional source timestamp\n        :type timestamp: dds.DDSTime\n\n        :raise DDSException: if incorrect parameters are applied\n\n        Note: If an unregistered key ID is passed as instance data, an error is logged and not flagged as return value\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_21unregister_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_handle = 0;
  PyObject *__pyx_v_timestamp = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unregister_instance (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_handle_2,&__pyx_n_s_timestamp,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_2);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timestamp);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unregister_instance") < 0)) __PYX_ERR(0, 2395, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_handle = values[1];
    __pyx_v_timestamp = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unregister_instance", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2395, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataWriter.unregister_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataWriter_20unregister_instance(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), __pyx_v_data, __pyx_v_handle, __pyx_v_timestamp);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_20unregister_instance(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_handle, PyObject *__pyx_v_timestamp) {
  char *__pyx_v_p;
  dds_instance_handle_t __pyx_v_h;
  dds_time_t __pyx_v_c_time;
  PyObject *__pyx_v_b = NULL;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  dds_instance_handle_t __pyx_t_7;
  char *__pyx_t_8;
  dds_time_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("unregister_instance", 0);

  /* "dds.pyx":2410
 *         Note: If an unregistered key ID is passed as instance data, an error is logged and not flagged as return value
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *p = NULL
 *         cdef dds_instance_handle_t h = DDS_HANDLE_NIL
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2411
 *         '''
 *         self._check_handle()
 *         cdef char *p = NULL             # <<<<<<<<<<<<<<
 *         cdef dds_instance_handle_t h = DDS_HANDLE_NIL
 *         cdef dds_time_t c_time
 */
  __pyx_v_p = NULL;

  /* "dds.pyx":2412
 *         self._check_handle()
 *         cdef char *p = NULL
 *         cdef dds_instance_handle_t h = DDS_HANDLE_NIL             # <<<<<<<<<<<<<<
 *         cdef dds_time_t c_time
 *         if data is None and handle is None:
 */
  __pyx_v_h = DDS_HANDLE_NIL;

  /* "dds.pyx":2414
 *         cdef dds_instance_handle_t h = DDS_HANDLE_NIL
 *         cdef dds_time_t c_time
 *         if data is None and handle is None:             # <<<<<<<<<<<<<<
 *             raise DDSException('Either data or handle must be provided')
 *         if handle:
 */
  __pyx_t_5 = (__pyx_v_data == Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_handle == Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2415
 *         cdef dds_time_t c_time
 *         if data is None and handle is None:
 *             raise DDSException('Either data or handle must be provided')             # <<<<<<<<<<<<<<
 *         if handle:
 *             h = handle
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Either_data_or_handle_must_be_pr) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Either_data_or_handle_must_be_pr);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2415, __pyx_L1_error)

    /* "dds.pyx":2414
 *         cdef dds_instance_handle_t h = DDS_HANDLE_NIL
 *         cdef dds_time_t c_time
 *         if data is None and handle is None:             # <<<<<<<<<<<<<<
 *             raise DDSException('Either data or handle must be provided')
 *         if handle:
 */
  }

  /* "dds.pyx":2416
 *         if data is None and handle is None:
 *             raise DDSException('Either data or handle must be provided')
 *         if handle:             # <<<<<<<<<<<<<<
 *             h = handle
 *         else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_handle); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2416, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":2417
 *             raise DDSException('Either data or handle must be provided')
 *         if handle:
 *             h = handle             # <<<<<<<<<<<<<<
 *         else:
 *             b = self._typesupport._serialize(data)[:self._typesupport.size]
 */
    __pyx_t_7 = __Pyx_PyInt_As_uint64_t(__pyx_v_handle); if (unlikely((__pyx_t_7 == ((dds_instance_handle_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2417, __pyx_L1_error)
    __pyx_v_h = __pyx_t_7;

    /* "dds.pyx":2416
 *         if data is None and handle is None:
 *             raise DDSException('Either data or handle must be provided')
 *         if handle:             # <<<<<<<<<<<<<<
 *             h = handle
 *         else:
 */
    goto __pyx_L6;
  }

  /* "dds.pyx":2419
 *             h = handle
 *         else:
 *             b = self._typesupport._serialize(data)[:self._typesupport.size]             # <<<<<<<<<<<<<<
 *             p = <bytes>b
 *         if not isinstance(timestamp,DDSTime):
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_serialize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_b = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "dds.pyx":2420
 *         else:
 *             b = self._typesupport._serialize(data)[:self._typesupport.size]
 *             p = <bytes>b             # <<<<<<<<<<<<<<
 *         if not isinstance(timestamp,DDSTime):
 *             with nogil:
 */
    if (unlikely(__pyx_v_b == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 2420, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2420, __pyx_L1_error)
    __pyx_v_p = __pyx_t_8;
  }
  __pyx_L6:;

  /* "dds.pyx":2421
 *             b = self._typesupport._serialize(data)[:self._typesupport.size]
 *             p = <bytes>b
 *         if not isinstance(timestamp,DDSTime):             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 r = dds.dds_instance_unregister(self._c_handle, <const void *>p, h)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSTime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_timestamp, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":2422
 *             p = <bytes>b
 *         if not isinstance(timestamp,DDSTime):
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 r = dds.dds_instance_unregister(self._c_handle, <const void *>p, h)
 *         else:
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "dds.pyx":2423
 *         if not isinstance(timestamp,DDSTime):
 *             with nogil:
 *                 r = dds.dds_instance_unregister(self._c_handle, <const void *>p, h)             # <<<<<<<<<<<<<<
 *         else:
 *             c_time = timestamp.value
 */
          __pyx_v_r = dds_instance_unregister(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p), __pyx_v_h);
        }

        /* "dds.pyx":2422
 *             p = <bytes>b
 *         if not isinstance(timestamp,DDSTime):
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 r = dds.dds_instance_unregister(self._c_handle, <const void *>p, h)
 *         else:
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L10;
          }
          __pyx_L10:;
        }
    }

    /* "dds.pyx":2421
 *             b = self._typesupport._serialize(data)[:self._typesupport.size]
 *             p = <bytes>b
 *         if not isinstance(timestamp,DDSTime):             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 r = dds.dds_instance_unregister(self._c_handle, <const void *>p, h)
 */
    goto __pyx_L7;
  }

  /* "dds.pyx":2425
 *                 r = dds.dds_instance_unregister(self._c_handle, <const void *>p, h)
 *         else:
 *             c_time = timestamp.value             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 r = dds.dds_instance_unregister_ts(self._c_handle, <const void *>p, h, c_time)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestamp, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_9 == ((dds_time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_c_time = __pyx_t_9;

    /* "dds.pyx":2426
 *         else:
 *             c_time = timestamp.value
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 r = dds.dds_instance_unregister_ts(self._c_handle, <const void *>p, h, c_time)
 *         if r < 0:
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "dds.pyx":2427
 *             c_time = timestamp.value
 *             with nogil:
 *                 r = dds.dds_instance_unregister_ts(self._c_handle, <const void *>p, h, c_time)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failure unregistering handle', r)
 */
          __pyx_v_r = dds_instance_unregister_ts(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p), __pyx_v_h, __pyx_v_c_time);
        }

        /* "dds.pyx":2426
 *         else:
 *             c_time = timestamp.value
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 r = dds.dds_instance_unregister_ts(self._c_handle, <const void *>p, h, c_time)
 *         if r < 0:
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L13;
          }
          __pyx_L13:;
        }
    }
  }
  __pyx_L7:;

  /* "dds.pyx":2428
 *             with nogil:
 *                 r = dds.dds_instance_unregister_ts(self._c_handle, <const void *>p, h, c_time)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure unregistering handle', r)
 * 
 */
  __pyx_t_5 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2429
 *                 r = dds.dds_instance_unregister_ts(self._c_handle, <const void *>p, h, c_time)
 *         if r < 0:
 *             raise DDSException('Failure unregistering handle', r)             # <<<<<<<<<<<<<<
 * 
 *     def lookup_instance(self, data):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = NULL;
    __pyx_t_11 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_11 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_s_Failure_unregistering_handle, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2429, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_kp_s_Failure_unregistering_handle, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2429, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_unregistering_handle);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_unregistering_handle);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_kp_s_Failure_unregistering_handle);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2429, __pyx_L1_error)

    /* "dds.pyx":2428
 *             with nogil:
 *                 r = dds.dds_instance_unregister_ts(self._c_handle, <const void *>p, h, c_time)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure unregistering handle', r)
 * 
 */
  }

  /* "dds.pyx":2395
 *         return r
 * 
 *     def unregister_instance(self, data=None, handle=None, timestamp=None):             # <<<<<<<<<<<<<<
 *         '''
 *         Unregister a data instance. One of data and handle must be specified.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("dds.DataWriter.unregister_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2431
 *             raise DDSException('Failure unregistering handle', r)
 * 
 *     def lookup_instance(self, data):             # <<<<<<<<<<<<<<
 *         '''
 *         Lookup the registered handle for the given data values
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_23lookup_instance(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static char __pyx_doc_3dds_10DataWriter_22lookup_instance[] = "\n        Lookup the registered handle for the given data values\n\n        :param data: a data object\n        :type data: object\n        :return: the instance handle or None\n        :rtype: int\n        ";
static PyObject *__pyx_pw_3dds_10DataWriter_23lookup_instance(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup_instance (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_22lookup_instance(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_22lookup_instance(struct __pyx_obj_3dds_DataWriter *__pyx_v_self, PyObject *__pyx_v_data) {
  char *__pyx_v_p;
  PyObject *__pyx_v_b = NULL;
  dds_instance_handle_t __pyx_v_h;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("lookup_instance", 0);

  /* "dds.pyx":2440
 *         :rtype: int
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2441
 *         '''
 *         self._check_handle()
 *         cdef char *p = NULL             # <<<<<<<<<<<<<<
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 */
  __pyx_v_p = NULL;

  /* "dds.pyx":2442
 *         self._check_handle()
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]             # <<<<<<<<<<<<<<
 *         p = <bytes>b
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_serialize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "dds.pyx":2443
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b             # <<<<<<<<<<<<<<
 *         with nogil:
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 */
  if (unlikely(__pyx_v_b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2443, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2443, __pyx_L1_error)
  __pyx_v_p = __pyx_t_4;

  /* "dds.pyx":2444
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2445
 *         p = <bytes>b
 *         with nogil:
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)             # <<<<<<<<<<<<<<
 *         if h == 0:
 *             return None
 */
        __pyx_v_h = dds_instance_lookup(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p));
      }

      /* "dds.pyx":2444
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2446
 *         with nogil:
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
 */
  __pyx_t_5 = ((__pyx_v_h == 0) != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":2447
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:
 *             return None             # <<<<<<<<<<<<<<
 *         else:
 *             return h
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "dds.pyx":2446
 *         with nogil:
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
 */
  }

  /* "dds.pyx":2449
 *             return None
 *         else:
 *             return h             # <<<<<<<<<<<<<<
 * 
 * # FIXME: cannot implement. dds_instance_get_key blows up
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_h); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "dds.pyx":2431
 *             raise DDSException('Failure unregistering handle', r)
 * 
 *     def lookup_instance(self, data):             # <<<<<<<<<<<<<<
 *         '''
 *         Lookup the registered handle for the given data values
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataWriter.lookup_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_10DataWriter_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_24__reduce_cython__(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DataWriter *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DataWriter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataWriter_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_10DataWriter_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataWriter_26__setstate_cython__(((struct __pyx_obj_3dds_DataWriter *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataWriter_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DataWriter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DataWriter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2488
 *     Base sample info class
 *     '''
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10SampleInfo_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3dds_10SampleInfo_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3dds_10SampleInfo_1__init__, METH_O, 0};
static PyObject *__pyx_pw_3dds_10SampleInfo_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10SampleInfo___init__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10SampleInfo___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2495
 * ctypedef int (*_ReadOp)(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond)
 * 
 * cdef int _op_dds_read(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_read(rd, buf, maxs, si, mask)
 */

static int __pyx_f_3dds__op_dds_read(dds_entity_t __pyx_v_rd, void **__pyx_v_buf, uint32_t __pyx_v_maxs, dds_sample_info_t *__pyx_v_si, uint32_t __pyx_v_mask, CYTHON_UNUSED dds_instance_handle_t __pyx_v_handle, CYTHON_UNUSED dds_condition_t __pyx_v_cond) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_op_dds_read", 0);

  /* "dds.pyx":2496
 * 
 * cdef int _op_dds_read(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_read(rd, buf, maxs, si, mask)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2497
 * cdef int _op_dds_read(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:
 *         return dds_read(rd, buf, maxs, si, mask)             # <<<<<<<<<<<<<<
 * 
 * cdef int _op_dds_take(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 */
        __pyx_r = dds_read(__pyx_v_rd, __pyx_v_buf, __pyx_v_maxs, __pyx_v_si, __pyx_v_mask);
        goto __pyx_L3_return;
      }

      /* "dds.pyx":2496
 * 
 * cdef int _op_dds_read(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_read(rd, buf, maxs, si, mask)
 * 
 */
      /*finally:*/ {
        __pyx_L3_return: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L0;
        }
      }
  }

  /* "dds.pyx":2495
 * ctypedef int (*_ReadOp)(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond)
 * 
 * cdef int _op_dds_read(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_read(rd, buf, maxs, si, mask)
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2499
 *         return dds_read(rd, buf, maxs, si, mask)
 * 
 * cdef int _op_dds_take(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_take(rd, buf, maxs, si, mask)
 */

static int __pyx_f_3dds__op_dds_take(dds_entity_t __pyx_v_rd, void **__pyx_v_buf, uint32_t __pyx_v_maxs, dds_sample_info_t *__pyx_v_si, uint32_t __pyx_v_mask, CYTHON_UNUSED dds_instance_handle_t __pyx_v_handle, CYTHON_UNUSED dds_condition_t __pyx_v_cond) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_op_dds_take", 0);

  /* "dds.pyx":2500
 * 
 * cdef int _op_dds_take(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_take(rd, buf, maxs, si, mask)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2501
 * cdef int _op_dds_take(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:
 *         return dds_take(rd, buf, maxs, si, mask)             # <<<<<<<<<<<<<<
 * 
 * cdef int _op_dds_read_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 */
        __pyx_r = dds_take(__pyx_v_rd, __pyx_v_buf, __pyx_v_maxs, __pyx_v_si, __pyx_v_mask);
        goto __pyx_L3_return;
      }

      /* "dds.pyx":2500
 * 
 * cdef int _op_dds_take(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_take(rd, buf, maxs, si, mask)
 * 
 */
      /*finally:*/ {
        __pyx_L3_return: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L0;
        }
      }
  }

  /* "dds.pyx":2499
 *         return dds_read(rd, buf, maxs, si, mask)
 * 
 * cdef int _op_dds_take(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_take(rd, buf, maxs, si, mask)
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2503
 *         return dds_take(rd, buf, maxs, si, mask)
 * 
 * cdef int _op_dds_read_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_read_cond(rd, buf, maxs, si, cond)
 */

static int __pyx_f_3dds__op_dds_read_cond(dds_entity_t __pyx_v_rd, void **__pyx_v_buf, uint32_t __pyx_v_maxs, dds_sample_info_t *__pyx_v_si, CYTHON_UNUSED uint32_t __pyx_v_mask, CYTHON_UNUSED dds_instance_handle_t __pyx_v_handle, dds_condition_t __pyx_v_cond) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_op_dds_read_cond", 0);

  /* "dds.pyx":2504
 * 
 * cdef int _op_dds_read_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_read_cond(rd, buf, maxs, si, cond)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2505
 * cdef int _op_dds_read_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:
 *         return dds_read_cond(rd, buf, maxs, si, cond)             # <<<<<<<<<<<<<<
 * 
 * cdef int _op_dds_take_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 */
        __pyx_r = dds_read_cond(__pyx_v_rd, __pyx_v_buf, __pyx_v_maxs, __pyx_v_si, __pyx_v_cond);
        goto __pyx_L3_return;
      }

      /* "dds.pyx":2504
 * 
 * cdef int _op_dds_read_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_read_cond(rd, buf, maxs, si, cond)
 * 
 */
      /*finally:*/ {
        __pyx_L3_return: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L0;
        }
      }
  }

  /* "dds.pyx":2503
 *         return dds_take(rd, buf, maxs, si, mask)
 * 
 * cdef int _op_dds_read_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_read_cond(rd, buf, maxs, si, cond)
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2507
 *         return dds_read_cond(rd, buf, maxs, si, cond)
 * 
 * cdef int _op_dds_take_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_take_cond(rd, buf, maxs, si, cond)
 */

static int __pyx_f_3dds__op_dds_take_cond(dds_entity_t __pyx_v_rd, void **__pyx_v_buf, uint32_t __pyx_v_maxs, dds_sample_info_t *__pyx_v_si, CYTHON_UNUSED uint32_t __pyx_v_mask, CYTHON_UNUSED dds_instance_handle_t __pyx_v_handle, dds_condition_t __pyx_v_cond) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_op_dds_take_cond", 0);

  /* "dds.pyx":2508
 * 
 * cdef int _op_dds_take_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_take_cond(rd, buf, maxs, si, cond)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2509
 * cdef int _op_dds_take_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:
 *         return dds_take_cond(rd, buf, maxs, si, cond)             # <<<<<<<<<<<<<<
 * 
 * cdef int _op_dds_read_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 */
        __pyx_r = dds_take_cond(__pyx_v_rd, __pyx_v_buf, __pyx_v_maxs, __pyx_v_si, __pyx_v_cond);
        goto __pyx_L3_return;
      }

      /* "dds.pyx":2508
 * 
 * cdef int _op_dds_take_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_take_cond(rd, buf, maxs, si, cond)
 * 
 */
      /*finally:*/ {
        __pyx_L3_return: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L0;
        }
      }
  }

  /* "dds.pyx":2507
 *         return dds_read_cond(rd, buf, maxs, si, cond)
 * 
 * cdef int _op_dds_take_cond(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_take_cond(rd, buf, maxs, si, cond)
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2511
 *         return dds_take_cond(rd, buf, maxs, si, cond)
 * 
 * cdef int _op_dds_read_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_read_instance(rd, buf, maxs, si, handle, mask)
 */

static int __pyx_f_3dds__op_dds_read_instance(dds_entity_t __pyx_v_rd, void **__pyx_v_buf, uint32_t __pyx_v_maxs, dds_sample_info_t *__pyx_v_si, uint32_t __pyx_v_mask, dds_instance_handle_t __pyx_v_handle, CYTHON_UNUSED dds_condition_t __pyx_v_cond) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_op_dds_read_instance", 0);

  /* "dds.pyx":2512
 * 
 * cdef int _op_dds_read_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_read_instance(rd, buf, maxs, si, handle, mask)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2513
 * cdef int _op_dds_read_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:
 *         return dds_read_instance(rd, buf, maxs, si, handle, mask)             # <<<<<<<<<<<<<<
 * 
 * cdef int _op_dds_take_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 */
        __pyx_r = dds_read_instance(__pyx_v_rd, __pyx_v_buf, __pyx_v_maxs, __pyx_v_si, __pyx_v_handle, __pyx_v_mask);
        goto __pyx_L3_return;
      }

      /* "dds.pyx":2512
 * 
 * cdef int _op_dds_read_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_read_instance(rd, buf, maxs, si, handle, mask)
 * 
 */
      /*finally:*/ {
        __pyx_L3_return: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L0;
        }
      }
  }

  /* "dds.pyx":2511
 *         return dds_take_cond(rd, buf, maxs, si, cond)
 * 
 * cdef int _op_dds_read_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_read_instance(rd, buf, maxs, si, handle, mask)
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2515
 *         return dds_read_instance(rd, buf, maxs, si, handle, mask)
 * 
 * cdef int _op_dds_take_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_take_instance(rd, buf, maxs, si, handle, mask)
 */

static int __pyx_f_3dds__op_dds_take_instance(dds_entity_t __pyx_v_rd, void **__pyx_v_buf, uint32_t __pyx_v_maxs, dds_sample_info_t *__pyx_v_si, uint32_t __pyx_v_mask, dds_instance_handle_t __pyx_v_handle, CYTHON_UNUSED dds_condition_t __pyx_v_cond) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_op_dds_take_instance", 0);

  /* "dds.pyx":2516
 * 
 * cdef int _op_dds_take_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_take_instance(rd, buf, maxs, si, handle, mask)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2517
 * cdef int _op_dds_take_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:
 *         return dds_take_instance(rd, buf, maxs, si, handle, mask)             # <<<<<<<<<<<<<<
 * 
 * cdef _set_sample_info(object si, dds_sample_info_t values):
 */
        __pyx_r = dds_take_instance(__pyx_v_rd, __pyx_v_buf, __pyx_v_maxs, __pyx_v_si, __pyx_v_handle, __pyx_v_mask);
        goto __pyx_L3_return;
      }

      /* "dds.pyx":2516
 * 
 * cdef int _op_dds_take_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         return dds_take_instance(rd, buf, maxs, si, handle, mask)
 * 
 */
      /*finally:*/ {
        __pyx_L3_return: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L0;
        }
      }
  }

  /* "dds.pyx":2515
 *         return dds_read_instance(rd, buf, maxs, si, handle, mask)
 * 
 * cdef int _op_dds_take_instance(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         return dds_take_instance(rd, buf, maxs, si, handle, mask)
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2519
 *         return dds_take_instance(rd, buf, maxs, si, handle, mask)
 * 
 * cdef _set_sample_info(object si, dds_sample_info_t values):             # <<<<<<<<<<<<<<
 *     si.sample_state = values.sample_state
 *     si.view_state  = values. view_state
 */

static PyObject *__pyx_f_3dds__set_sample_info(PyObject *__pyx_v_si, dds_sample_info_t __pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_set_sample_info", 0);

  /* "dds.pyx":2520
 * 
 * cdef _set_sample_info(object si, dds_sample_info_t values):
 *     si.sample_state = values.sample_state             # <<<<<<<<<<<<<<
 *     si.view_state  = values. view_state
 *     si.instance_state = values.instance_state
 */
  __pyx_t_1 = __Pyx_PyInt_From_dds_sample_state_t(__pyx_v_values.sample_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_sample_state, __pyx_t_1) < 0) __PYX_ERR(0, 2520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2521
 * cdef _set_sample_info(object si, dds_sample_info_t values):
 *     si.sample_state = values.sample_state
 *     si.view_state  = values. view_state             # <<<<<<<<<<<<<<
 *     si.instance_state = values.instance_state
 *     si.valid_data = values.valid_data
 */
  __pyx_t_1 = __Pyx_PyInt_From_dds_view_state_t(__pyx_v_values.view_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_view_state, __pyx_t_1) < 0) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2522
 *     si.sample_state = values.sample_state
 *     si.view_state  = values. view_state
 *     si.instance_state = values.instance_state             # <<<<<<<<<<<<<<
 *     si.valid_data = values.valid_data
 *     si.source_timestamp = values.source_timestamp
 */
  __pyx_t_1 = __Pyx_PyInt_From_dds_instance_state_t(__pyx_v_values.instance_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_instance_state, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2523
 *     si.view_state  = values. view_state
 *     si.instance_state = values.instance_state
 *     si.valid_data = values.valid_data             # <<<<<<<<<<<<<<
 *     si.source_timestamp = values.source_timestamp
 *     si.instance_handle = values.instance_handle
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_values.valid_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_valid_data, __pyx_t_1) < 0) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2524
 *     si.instance_state = values.instance_state
 *     si.valid_data = values.valid_data
 *     si.source_timestamp = values.source_timestamp             # <<<<<<<<<<<<<<
 *     si.instance_handle = values.instance_handle
 *     si.publication_handle = values.publication_handle
 */
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_values.source_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_source_timestamp, __pyx_t_1) < 0) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2525
 *     si.valid_data = values.valid_data
 *     si.source_timestamp = values.source_timestamp
 *     si.instance_handle = values.instance_handle             # <<<<<<<<<<<<<<
 *     si.publication_handle = values.publication_handle
 *     si.disposed_generation_count = values.disposed_generation_count
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_values.instance_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_instance_handle, __pyx_t_1) < 0) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2526
 *     si.source_timestamp = values.source_timestamp
 *     si.instance_handle = values.instance_handle
 *     si.publication_handle = values.publication_handle             # <<<<<<<<<<<<<<
 *     si.disposed_generation_count = values.disposed_generation_count
 *     si.no_writers_generation_count = values.no_writers_generation_count
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_values.publication_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_publication_handle, __pyx_t_1) < 0) __PYX_ERR(0, 2526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2527
 *     si.instance_handle = values.instance_handle
 *     si.publication_handle = values.publication_handle
 *     si.disposed_generation_count = values.disposed_generation_count             # <<<<<<<<<<<<<<
 *     si.no_writers_generation_count = values.no_writers_generation_count
 *     si.sample_rank = values.sample_rank
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_values.disposed_generation_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_disposed_generation_count, __pyx_t_1) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2528
 *     si.publication_handle = values.publication_handle
 *     si.disposed_generation_count = values.disposed_generation_count
 *     si.no_writers_generation_count = values.no_writers_generation_count             # <<<<<<<<<<<<<<
 *     si.sample_rank = values.sample_rank
 *     si.generation_rank = values.generation_rank
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_values.no_writers_generation_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_no_writers_generation_count, __pyx_t_1) < 0) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2529
 *     si.disposed_generation_count = values.disposed_generation_count
 *     si.no_writers_generation_count = values.no_writers_generation_count
 *     si.sample_rank = values.sample_rank             # <<<<<<<<<<<<<<
 *     si.generation_rank = values.generation_rank
 *     si.absolute_generation_rank = values.absolute_generation_rank
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_values.sample_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_sample_rank, __pyx_t_1) < 0) __PYX_ERR(0, 2529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2530
 *     si.no_writers_generation_count = values.no_writers_generation_count
 *     si.sample_rank = values.sample_rank
 *     si.generation_rank = values.generation_rank             # <<<<<<<<<<<<<<
 *     si.absolute_generation_rank = values.absolute_generation_rank
 *     si.reception_timestamp = values.reception_timestamp
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_values.generation_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_generation_rank, __pyx_t_1) < 0) __PYX_ERR(0, 2530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2531
 *     si.sample_rank = values.sample_rank
 *     si.generation_rank = values.generation_rank
 *     si.absolute_generation_rank = values.absolute_generation_rank             # <<<<<<<<<<<<<<
 *     si.reception_timestamp = values.reception_timestamp
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_values.absolute_generation_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_absolute_generation_rank, __pyx_t_1) < 0) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2532
 *     si.generation_rank = values.generation_rank
 *     si.absolute_generation_rank = values.absolute_generation_rank
 *     si.reception_timestamp = values.reception_timestamp             # <<<<<<<<<<<<<<
 * 
 * cdef list _do_read_op(TypeSupport ts, dds_entity_t rd, _ReadOp op, uint32_t n, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_values.reception_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_si, __pyx_n_s_reception_timestamp, __pyx_t_1) < 0) __PYX_ERR(0, 2532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2519
 *         return dds_take_instance(rd, buf, maxs, si, handle, mask)
 * 
 * cdef _set_sample_info(object si, dds_sample_info_t values):             # <<<<<<<<<<<<<<
 *     si.sample_state = values.sample_state
 *     si.view_state  = values. view_state
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds._set_sample_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2534
 *     si.reception_timestamp = values.reception_timestamp
 * 
 * cdef list _do_read_op(TypeSupport ts, dds_entity_t rd, _ReadOp op, uint32_t n, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     cdef dds.dds_sample_info_t *info = <dds.dds_sample_info_t*>malloc(n * sizeof(dds.dds_sample_info_t))
 *     cdef char **samples = <char**>malloc(n * sizeof(char*))
 */

static PyObject *__pyx_f_3dds__do_read_op(struct __pyx_obj_3dds_TypeSupport *__pyx_v_ts, dds_entity_t __pyx_v_rd, __pyx_t_3dds__ReadOp __pyx_v_op, uint32_t __pyx_v_n, uint32_t __pyx_v_mask, dds_instance_handle_t __pyx_v_handle, dds_condition_t __pyx_v_cond) {
  dds_sample_info_t *__pyx_v_info;
  char **__pyx_v_samples;
  int __pyx_v_nr;
  PyObject *__pyx_v_data = NULL;
  int __pyx_v_i;
  PyObject *__pyx_v_si = NULL;
  PyObject *__pyx_v_sp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  char const *__pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  char const *__pyx_t_21;
  __Pyx_RefNannySetupContext("_do_read_op", 0);

  /* "dds.pyx":2535
 * 
 * cdef list _do_read_op(TypeSupport ts, dds_entity_t rd, _ReadOp op, uint32_t n, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     cdef dds.dds_sample_info_t *info = <dds.dds_sample_info_t*>malloc(n * sizeof(dds.dds_sample_info_t))             # <<<<<<<<<<<<<<
 *     cdef char **samples = <char**>malloc(n * sizeof(char*))
 *     samples[0] = NULL
 */
  __pyx_v_info = ((dds_sample_info_t *)malloc((__pyx_v_n * (sizeof(dds_sample_info_t)))));

  /* "dds.pyx":2536
 * cdef list _do_read_op(TypeSupport ts, dds_entity_t rd, _ReadOp op, uint32_t n, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):
 *     cdef dds.dds_sample_info_t *info = <dds.dds_sample_info_t*>malloc(n * sizeof(dds.dds_sample_info_t))
 *     cdef char **samples = <char**>malloc(n * sizeof(char*))             # <<<<<<<<<<<<<<
 *     samples[0] = NULL
 *     try:
 */
  __pyx_v_samples = ((char **)malloc((__pyx_v_n * (sizeof(char *)))));

  /* "dds.pyx":2537
 *     cdef dds.dds_sample_info_t *info = <dds.dds_sample_info_t*>malloc(n * sizeof(dds.dds_sample_info_t))
 *     cdef char **samples = <char**>malloc(n * sizeof(char*))
 *     samples[0] = NULL             # <<<<<<<<<<<<<<
 *     try:
 *         nr = op(rd, <void **>samples, n, info, mask, handle, cond)
 */
  (__pyx_v_samples[0]) = NULL;

  /* "dds.pyx":2538
 *     cdef char **samples = <char**>malloc(n * sizeof(char*))
 *     samples[0] = NULL
 *     try:             # <<<<<<<<<<<<<<
 *         nr = op(rd, <void **>samples, n, info, mask, handle, cond)
 *         if nr < 0:
 */
  /*try:*/ {

    /* "dds.pyx":2539
 *     samples[0] = NULL
 *     try:
 *         nr = op(rd, <void **>samples, n, info, mask, handle, cond)             # <<<<<<<<<<<<<<
 *         if nr < 0:
 *             raise DDSException('DDS read/take operation failed', nr)
 */
    __pyx_v_nr = __pyx_v_op(__pyx_v_rd, ((void **)__pyx_v_samples), __pyx_v_n, __pyx_v_info, __pyx_v_mask, __pyx_v_handle, __pyx_v_cond);

    /* "dds.pyx":2540
 *     try:
 *         nr = op(rd, <void **>samples, n, info, mask, handle, cond)
 *         if nr < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('DDS read/take operation failed', nr)
 * 
 */
    __pyx_t_1 = ((__pyx_v_nr < 0) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "dds.pyx":2541
 *         nr = op(rd, <void **>samples, n, info, mask, handle, cond)
 *         if nr < 0:
 *             raise DDSException('DDS read/take operation failed', nr)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2541, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2541, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_DDS_read_take_operation_failed, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2541, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_DDS_read_take_operation_failed, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2541, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2541, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_INCREF(__pyx_kp_s_DDS_read_take_operation_failed);
        __Pyx_GIVEREF(__pyx_kp_s_DDS_read_take_operation_failed);
        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_DDS_read_take_operation_failed);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2541, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 2541, __pyx_L4_error)

      /* "dds.pyx":2540
 *     try:
 *         nr = op(rd, <void **>samples, n, info, mask, handle, cond)
 *         if nr < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('DDS read/take operation failed', nr)
 * 
 */
    }

    /* "dds.pyx":2543
 *             raise DDSException('DDS read/take operation failed', nr)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             data = []
 *             for i in range(nr):
 */
    /*try:*/ {

      /* "dds.pyx":2544
 * 
 *         try:
 *             data = []             # <<<<<<<<<<<<<<
 *             for i in range(nr):
 *                 si = SampleInfo()
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_data = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "dds.pyx":2545
 *         try:
 *             data = []
 *             for i in range(nr):             # <<<<<<<<<<<<<<
 *                 si = SampleInfo()
 *                 _set_sample_info(si, info[i])
 */
      __pyx_t_6 = __pyx_v_nr;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_i = __pyx_t_9;

        /* "dds.pyx":2546
 *             data = []
 *             for i in range(nr):
 *                 si = SampleInfo()             # <<<<<<<<<<<<<<
 *                 _set_sample_info(si, info[i])
 *                 sp = ts._deserialize(samples[i][:ts.size])
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SampleInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2546, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_si, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "dds.pyx":2547
 *             for i in range(nr):
 *                 si = SampleInfo()
 *                 _set_sample_info(si, info[i])             # <<<<<<<<<<<<<<
 *                 sp = ts._deserialize(samples[i][:ts.size])
 *                 data.append(_Sample(sp, si))
 */
        __pyx_t_2 = __pyx_f_3dds__set_sample_info(__pyx_v_si, (__pyx_v_info[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2547, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "dds.pyx":2548
 *                 si = SampleInfo()
 *                 _set_sample_info(si, info[i])
 *                 sp = ts._deserialize(samples[i][:ts.size])             # <<<<<<<<<<<<<<
 *                 data.append(_Sample(sp, si))
 *         finally:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ts), __pyx_n_s_deserialize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2548, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ts), __pyx_n_s_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2548, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = (__pyx_t_7 == Py_None);
        if (__pyx_t_1) {
          __pyx_t_10 = PY_SSIZE_T_MAX;
        } else {
          __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2548, __pyx_L8_error)
          __pyx_t_10 = __pyx_t_11;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyBytes_FromStringAndSize((__pyx_v_samples[__pyx_v_i]) + 0, __pyx_t_10 - 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2548, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2548, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_sp, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "dds.pyx":2549
 *                 _set_sample_info(si, info[i])
 *                 sp = ts._deserialize(samples[i][:ts.size])
 *                 data.append(_Sample(sp, si))             # <<<<<<<<<<<<<<
 *         finally:
 *             if nr > 0:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Sample); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2549, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = NULL;
        __pyx_t_12 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_sp, __pyx_v_si};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2549, __pyx_L8_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_sp, __pyx_v_si};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2549, __pyx_L8_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2549, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_7) {
            __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
          }
          __Pyx_INCREF(__pyx_v_sp);
          __Pyx_GIVEREF(__pyx_v_sp);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_12, __pyx_v_sp);
          __Pyx_INCREF(__pyx_v_si);
          __Pyx_GIVEREF(__pyx_v_si);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_12, __pyx_v_si);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2549, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_data, __pyx_t_2); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2549, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }

    /* "dds.pyx":2551
 *                 data.append(_Sample(sp, si))
 *         finally:
 *             if nr > 0:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 */
    /*finally:*/ {
      /*normal exit:*/{
        __pyx_t_1 = ((__pyx_v_nr > 0) != 0);
        if (__pyx_t_1) {

          /* "dds.pyx":2552
 *         finally:
 *             if nr > 0:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 *     finally:
 */
          {
              #ifdef WITH_THREAD
              PyThreadState *_save;
              Py_UNBLOCK_THREADS
              __Pyx_FastGIL_Remember();
              #endif
              /*try:*/ {

                /* "dds.pyx":2553
 *             if nr > 0:
 *                 with nogil:
 *                     dds.dds_return_loan(rd, <void **>samples, n)             # <<<<<<<<<<<<<<
 *     finally:
 *         free(samples)
 */
                dds_return_loan(__pyx_v_rd, ((void **)__pyx_v_samples), __pyx_v_n);
              }

              /* "dds.pyx":2552
 *         finally:
 *             if nr > 0:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 *     finally:
 */
              /*finally:*/ {
                /*normal exit:*/{
                  #ifdef WITH_THREAD
                  __Pyx_FastGIL_Forget();
                  Py_BLOCK_THREADS
                  #endif
                  goto __pyx_L15;
                }
                __pyx_L15:;
              }
          }

          /* "dds.pyx":2551
 *                 data.append(_Sample(sp, si))
 *         finally:
 *             if nr > 0:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 */
        }
        goto __pyx_L9;
      }
      __pyx_L8_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
        __Pyx_XGOTREF(__pyx_t_15);
        __Pyx_XGOTREF(__pyx_t_16);
        __Pyx_XGOTREF(__pyx_t_17);
        __Pyx_XGOTREF(__pyx_t_18);
        __Pyx_XGOTREF(__pyx_t_19);
        __Pyx_XGOTREF(__pyx_t_20);
        __pyx_t_6 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
        {
          __pyx_t_1 = ((__pyx_v_nr > 0) != 0);
          if (__pyx_t_1) {

            /* "dds.pyx":2552
 *         finally:
 *             if nr > 0:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 *     finally:
 */
            {
                #ifdef WITH_THREAD
                PyThreadState *_save;
                Py_UNBLOCK_THREADS
                __Pyx_FastGIL_Remember();
                #endif
                /*try:*/ {

                  /* "dds.pyx":2553
 *             if nr > 0:
 *                 with nogil:
 *                     dds.dds_return_loan(rd, <void **>samples, n)             # <<<<<<<<<<<<<<
 *     finally:
 *         free(samples)
 */
                  dds_return_loan(__pyx_v_rd, ((void **)__pyx_v_samples), __pyx_v_n);
                }

                /* "dds.pyx":2552
 *         finally:
 *             if nr > 0:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 *     finally:
 */
                /*finally:*/ {
                  /*normal exit:*/{
                    #ifdef WITH_THREAD
                    __Pyx_FastGIL_Forget();
                    Py_BLOCK_THREADS
                    #endif
                    goto __pyx_L21;
                  }
                  __pyx_L21:;
                }
            }

            /* "dds.pyx":2551
 *                 data.append(_Sample(sp, si))
 *         finally:
 *             if nr > 0:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 */
          }
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
        }
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
        __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
        __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_14;
        goto __pyx_L4_error;
      }
      __pyx_L9:;
    }
  }

  /* "dds.pyx":2555
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 *     finally:
 *         free(samples)             # <<<<<<<<<<<<<<
 *         free(info)
 * 
 */
  /*finally:*/ {
    /*normal exit:*/{
      free(__pyx_v_samples);

      /* "dds.pyx":2556
 *     finally:
 *         free(samples)
 *         free(info)             # <<<<<<<<<<<<<<
 * 
 *     return data
 */
      free(__pyx_v_info);
      goto __pyx_L5;
    }
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_8 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
      {

        /* "dds.pyx":2555
 *                     dds.dds_return_loan(rd, <void **>samples, n)
 *     finally:
 *         free(samples)             # <<<<<<<<<<<<<<
 *         free(info)
 * 
 */
        free(__pyx_v_samples);

        /* "dds.pyx":2556
 *     finally:
 *         free(samples)
 *         free(info)             # <<<<<<<<<<<<<<
 * 
 *     return data
 */
        free(__pyx_v_info);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
      }
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ErrRestore(__pyx_t_20, __pyx_t_19, __pyx_t_18);
      __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_21;
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "dds.pyx":2558
 *         free(info)
 * 
 *     return data             # <<<<<<<<<<<<<<
 * 
 * # The DataReader wrapper
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "dds.pyx":2534
 *     si.reception_timestamp = values.reception_timestamp
 * 
 * cdef list _do_read_op(TypeSupport ts, dds_entity_t rd, _ReadOp op, uint32_t n, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond):             # <<<<<<<<<<<<<<
 *     cdef dds.dds_sample_info_t *info = <dds.dds_sample_info_t*>malloc(n * sizeof(dds.dds_sample_info_t))
 *     cdef char **samples = <char**>malloc(n * sizeof(char*))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds._do_read_op", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_si);
  __Pyx_XDECREF(__pyx_v_sp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2569
 *     cdef object _topic
 * 
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos=None, listener = None):             # <<<<<<<<<<<<<<
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Subscriber):
 */

/* Python wrapper */
static int __pyx_pw_3dds_10DataReader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_10DataReader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Entity *__pyx_v_entity = 0;
  struct __pyx_obj_3dds_Topic *__pyx_v_topic = 0;
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = 0;
  PyObject *__pyx_v_listener = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_entity,&__pyx_n_s_topic,&__pyx_n_s_qos,&__pyx_n_s_listener,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = (PyObject *)((struct __pyx_obj_3dds_Qos *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_entity)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_topic)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, 1); __PYX_ERR(0, 2569, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qos);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2569, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_entity = ((struct __pyx_obj_3dds_Entity *)values[0]);
    __pyx_v_topic = ((struct __pyx_obj_3dds_Topic *)values[1]);
    __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)values[2]);
    __pyx_v_listener = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2569, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entity), __pyx_ptype_3dds_Entity, 1, "entity", 0))) __PYX_ERR(0, 2569, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_Topic, 1, "topic", 0))) __PYX_ERR(0, 2569, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos, 1, "qos", 0))) __PYX_ERR(0, 2569, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_10DataReader___cinit__(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_entity, __pyx_v_topic, __pyx_v_qos, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_10DataReader___cinit__(struct __pyx_obj_3dds_DataReader *__pyx_v_self, struct __pyx_obj_3dds_Entity *__pyx_v_entity, struct __pyx_obj_3dds_Topic *__pyx_v_topic, struct __pyx_obj_3dds_Qos *__pyx_v_qos, PyObject *__pyx_v_listener) {
  dds_qos_t *__pyx_v__c_qos;
  dds_readerlistener_t *__pyx_v__c_listener;
  int __pyx_v_r;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":2570
 * 
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos=None, listener = None):
 *         entity._check_handle()             # <<<<<<<<<<<<<<
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Subscriber):
 *             raise DDSException('Bad parameter')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_entity), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2571
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos=None, listener = None):
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Subscriber):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_entity), __pyx_ptype_3dds_DomainParticipant); 
  __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(((PyObject *)__pyx_v_entity), __pyx_ptype_3dds_Subscriber); 
  __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2572
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Subscriber):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(topic, Topic):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2572, __pyx_L1_error)

    /* "dds.pyx":2571
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos=None, listener = None):
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Subscriber):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2574
 *             raise DDSException('Bad parameter')
 * 
 *         if not isinstance(topic, Topic):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_4 = __Pyx_TypeCheck(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_Topic); 
  __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":2575
 * 
 *         if not isinstance(topic, Topic):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(topic, FoundTopic):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2575, __pyx_L1_error)

    /* "dds.pyx":2574
 *             raise DDSException('Bad parameter')
 * 
 *         if not isinstance(topic, Topic):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2577
 *             raise DDSException('Bad parameter')
 * 
 *         if isinstance(topic, FoundTopic):             # <<<<<<<<<<<<<<
 *             raise DDSException('Cannot create directly data reader from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')
 * 
 */
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_topic), __pyx_ptype_3dds_FoundTopic); 
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2578
 * 
 *         if isinstance(topic, FoundTopic):
 *             raise DDSException('Cannot create directly data reader from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')             # <<<<<<<<<<<<<<
 * 
 *         if qos and not isinstance(qos, Qos):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Cannot_create_directly_data_read) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Cannot_create_directly_data_read);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2578, __pyx_L1_error)

    /* "dds.pyx":2577
 *             raise DDSException('Bad parameter')
 * 
 *         if isinstance(topic, FoundTopic):             # <<<<<<<<<<<<<<
 *             raise DDSException('Cannot create directly data reader from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')
 * 
 */
  }

  /* "dds.pyx":2580
 *             raise DDSException('Cannot create directly data reader from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2580, __pyx_L1_error)
  if (__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_qos), __pyx_ptype_3dds_Qos); 
  __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
  __pyx_t_4 = __pyx_t_6;
  __pyx_L9_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2581
 * 
 *         if qos and not isinstance(qos, Qos):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if listener and not isinstance(listener, Listener):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2581, __pyx_L1_error)

    /* "dds.pyx":2580
 *             raise DDSException('Cannot create directly data reader from FoundTopic. Use ddsutil.get_dds_classes_for_found_topic()')
 * 
 *         if qos and not isinstance(qos, Qos):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2583
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2583, __pyx_L1_error)
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L12_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_listener, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L12_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2584
 * 
 *         if listener and not isinstance(listener, Listener):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2584, __pyx_L1_error)

    /* "dds.pyx":2583
 *             raise DDSException('Bad parameter')
 * 
 *         if listener and not isinstance(listener, Listener):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":2586
 *             raise DDSException('Bad parameter')
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL             # <<<<<<<<<<<<<<
 *         if qos:
 *             _c_qos = qos.handle()
 */
  __pyx_v__c_qos = NULL;

  /* "dds.pyx":2587
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_qos)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2587, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":2588
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:
 *             _c_qos = qos.handle()             # <<<<<<<<<<<<<<
 * 
 *         self.parent = entity
 */
    __pyx_v__c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

    /* "dds.pyx":2587
 * 
 *         cdef dds.dds_qos_t *_c_qos = NULL
 *         if qos:             # <<<<<<<<<<<<<<
 *             _c_qos = qos.handle()
 * 
 */
  }

  /* "dds.pyx":2590
 *             _c_qos = qos.handle()
 * 
 *         self.parent = entity             # <<<<<<<<<<<<<<
 *         self._topic = topic
 *         self._typesupport = topic._typesupport
 */
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent, ((PyObject *)__pyx_v_entity)) < 0) __PYX_ERR(0, 2590, __pyx_L1_error)

  /* "dds.pyx":2591
 * 
 *         self.parent = entity
 *         self._topic = topic             # <<<<<<<<<<<<<<
 *         self._typesupport = topic._typesupport
 *         self._listener = listener
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_topic));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_topic));
  __Pyx_GOTREF(__pyx_v_self->_topic);
  __Pyx_DECREF(__pyx_v_self->_topic);
  __pyx_v_self->_topic = ((PyObject *)__pyx_v_topic);

  /* "dds.pyx":2592
 *         self.parent = entity
 *         self._topic = topic
 *         self._typesupport = topic._typesupport             # <<<<<<<<<<<<<<
 *         self._listener = listener
 * 
 */
  __pyx_t_1 = __pyx_v_topic->_typesupport;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_typesupport);
  __Pyx_DECREF(__pyx_v_self->_typesupport);
  __pyx_v_self->_typesupport = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2593
 *         self._topic = topic
 *         self._typesupport = topic._typesupport
 *         self._listener = listener             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_readerlistener_t *_c_listener = NULL
 */
  __Pyx_INCREF(__pyx_v_listener);
  __Pyx_GIVEREF(__pyx_v_listener);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._listener);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._listener);
  __pyx_v_self->__pyx_base._listener = __pyx_v_listener;

  /* "dds.pyx":2595
 *         self._listener = listener
 * 
 *         cdef dds_readerlistener_t *_c_listener = NULL             # <<<<<<<<<<<<<<
 *         if listener:
 *             _c_listener = &reader_listener
 */
  __pyx_v__c_listener = NULL;

  /* "dds.pyx":2596
 * 
 *         cdef dds_readerlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &reader_listener
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2596, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":2597
 *         cdef dds_readerlistener_t *_c_listener = NULL
 *         if listener:
 *             _c_listener = &reader_listener             # <<<<<<<<<<<<<<
 * 
 *         # enabling a listener requires three steps, done as a indivisible action:
 */
    __pyx_v__c_listener = (&__pyx_v_3dds_reader_listener);

    /* "dds.pyx":2596
 * 
 *         cdef dds_readerlistener_t *_c_listener = NULL
 *         if listener:             # <<<<<<<<<<<<<<
 *             _c_listener = &reader_listener
 * 
 */
  }

  /* "dds.pyx":2604
 *         #   3) _set_status_for_listener
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_reader_create(entity._c_handle, &self._c_handle, topic._c_handle, _c_qos, _c_listener) #need_gil             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to create data reader', r)
 */
  __pyx_v_r = dds_reader_create(__pyx_v_entity->_c_handle, (&__pyx_v_self->__pyx_base._c_handle), __pyx_v_topic->__pyx_base._c_handle, __pyx_v__c_qos, __pyx_v__c_listener);

  /* "dds.pyx":2605
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_reader_create(entity._c_handle, &self._c_handle, topic._c_handle, _c_qos, _c_listener) #need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create data reader', r)
 *         _entity_register_add(self)
 */
  __pyx_t_4 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2606
 *         r = dds.dds_reader_create(entity._c_handle, &self._c_handle, topic._c_handle, _c_qos, _c_listener) #need_gil
 *         if r < 0:
 *             raise DDSException('Failed to create data reader', r)             # <<<<<<<<<<<<<<
 *         _entity_register_add(self)
 *         if listener:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_data_reader, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2606, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_create_data_reader, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2606, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_create_data_reader);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_create_data_reader);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Failed_to_create_data_reader);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2606, __pyx_L1_error)

    /* "dds.pyx":2605
 *         # The easiest way is to NOT release the GIL during these.
 *         r = dds.dds_reader_create(entity._c_handle, &self._c_handle, topic._c_handle, _c_qos, _c_listener) #need_gil
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create data reader', r)
 *         _entity_register_add(self)
 */
  }

  /* "dds.pyx":2607
 *         if r < 0:
 *             raise DDSException('Failed to create data reader', r)
 *         _entity_register_add(self)             # <<<<<<<<<<<<<<
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)
 */
  __pyx_t_1 = __pyx_f_3dds__entity_register_add(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2608
 *             raise DDSException('Failed to create data reader', r)
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_listener); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2608, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "dds.pyx":2609
 *         _entity_register_add(self)
 *         if listener:
 *             _set_status_for_listener(self._c_handle, listener)             # <<<<<<<<<<<<<<
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)
 */
    __pyx_t_1 = __pyx_f_3dds__set_status_for_listener(__pyx_v_self->__pyx_base._c_handle, __pyx_v_listener); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "dds.pyx":2608
 *             raise DDSException('Failed to create data reader', r)
 *         _entity_register_add(self)
 *         if listener:             # <<<<<<<<<<<<<<
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 */
  }

  /* "dds.pyx":2611
 *             _set_status_for_listener(self._c_handle, listener)
 *         # let any triggered listeners run by yielding to other threads
 *         time.sleep(0)             # <<<<<<<<<<<<<<
 * 
 *     def read(self, n=1, masks=DDSMaskUtil.all_samples()):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_2, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2569
 *     cdef object _topic
 * 
 *     def __cinit__(self, Entity entity, Topic topic, Qos qos=None, listener = None):             # <<<<<<<<<<<<<<
 *         entity._check_handle()
 *         if not isinstance(entity, DomainParticipant) and not isinstance(entity, Subscriber):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.DataReader.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2613
 *         time.sleep(0)
 * 
 *     def read(self, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''read(n=1, masks=DDSMaskUtil.all_samples())
 *         Read samples
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_3read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_2read[] = "read(n=1, masks=DDSMaskUtil.all_samples())\n        Read samples\n\n        :type n: int\n        :param n: number of samples to read\n\n        :type masks: list\n        :param masks: list of DDS statuses\n\n        :rtype: list\n        :return: list of sample data and sample info tuple\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_3read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_masks = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_masks,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = __pyx_k__21;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_masks);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 2613, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_masks = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2613, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataReader_2read(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_n, __pyx_v_masks);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_2read(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_masks) {
  PyObject *__pyx_v_mask = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  uint32_t __pyx_t_7;
  uint32_t __pyx_t_8;
  __Pyx_RefNannySetupContext("read", 0);

  /* "dds.pyx":2626
 *         :return: list of sample data and sample info tuple
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2627
 *         '''
 *         self._check_handle()
 *         mask = masks[0].value             # <<<<<<<<<<<<<<
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_mask = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "dds.pyx":2628
 *         self._check_handle()
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):             # <<<<<<<<<<<<<<
 *             mask = mask | masks[i].value
 * 
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_masks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2628, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "dds.pyx":2629
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value             # <<<<<<<<<<<<<<
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read, n, mask, 0, <void*>0)
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_masks, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Or(__pyx_v_mask, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "dds.pyx":2631
 *             mask = mask | masks[i].value
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read, n, mask, 0, <void*>0)             # <<<<<<<<<<<<<<
 * 
 *     def take(self, n=1, masks=DDSMaskUtil.all_samples()):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_self->_typesupport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_typesupport, __pyx_ptype_3dds_TypeSupport))))) __PYX_ERR(0, 2631, __pyx_L1_error)
  __pyx_t_2 = __pyx_v_self->_typesupport;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_v_n); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2631, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_As_uint32_t(__pyx_v_mask); if (unlikely((__pyx_t_8 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2631, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_3dds__do_read_op(((struct __pyx_obj_3dds_TypeSupport *)__pyx_t_2), ((struct __pyx_vtabstruct_3dds_DataReader *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)), __pyx_f_3dds__op_dds_read, __pyx_t_7, __pyx_t_8, 0, ((void *)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2613
 *         time.sleep(0)
 * 
 *     def read(self, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''read(n=1, masks=DDSMaskUtil.all_samples())
 *         Read samples
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataReader.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2633
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read, n, mask, 0, <void*>0)
 * 
 *     def take(self, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''take(n=1, masks=DDSMaskUtil.all_samples())
 *         Take samples
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_5take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_4take[] = "take(n=1, masks=DDSMaskUtil.all_samples())\n        Take samples\n\n        :type n: int\n        :param n: number of samples to take\n\n        :type masks: list\n        :param masks: list of DDS statuses\n\n        :rtype: list\n        :return: list of sample data and sample info tuple\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_5take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_masks = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_masks,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)__pyx_int_1);
    values[1] = __pyx_k__22;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_masks);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take") < 0)) __PYX_ERR(0, 2633, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_masks = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2633, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataReader_4take(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_n, __pyx_v_masks);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_4take(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_masks) {
  PyObject *__pyx_v_mask = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  uint32_t __pyx_t_7;
  uint32_t __pyx_t_8;
  __Pyx_RefNannySetupContext("take", 0);

  /* "dds.pyx":2646
 *         :return: list of sample data and sample info tuple
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2647
 *         '''
 *         self._check_handle()
 *         mask = masks[0].value             # <<<<<<<<<<<<<<
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_mask = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "dds.pyx":2648
 *         self._check_handle()
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):             # <<<<<<<<<<<<<<
 *             mask = mask | masks[i].value
 * 
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_masks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2648, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "dds.pyx":2649
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value             # <<<<<<<<<<<<<<
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take, n, mask, 0, <void*>0)
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_masks, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Or(__pyx_v_mask, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "dds.pyx":2651
 *             mask = mask | masks[i].value
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take, n, mask, 0, <void*>0)             # <<<<<<<<<<<<<<
 * 
 *     def read_cond(self, Condition condition, int n=1):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_self->_typesupport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_typesupport, __pyx_ptype_3dds_TypeSupport))))) __PYX_ERR(0, 2651, __pyx_L1_error)
  __pyx_t_2 = __pyx_v_self->_typesupport;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_v_n); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2651, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_As_uint32_t(__pyx_v_mask); if (unlikely((__pyx_t_8 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2651, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_3dds__do_read_op(((struct __pyx_obj_3dds_TypeSupport *)__pyx_t_2), ((struct __pyx_vtabstruct_3dds_DataReader *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)), __pyx_f_3dds__op_dds_take, __pyx_t_7, __pyx_t_8, 0, ((void *)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2633
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read, n, mask, 0, <void*>0)
 * 
 *     def take(self, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''take(n=1, masks=DDSMaskUtil.all_samples())
 *         Take samples
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataReader.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2653
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take, n, mask, 0, <void*>0)
 * 
 *     def read_cond(self, Condition condition, int n=1):             # <<<<<<<<<<<<<<
 *         '''read_cond(condition, n=1)
 *         Read samples matching a condition
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_7read_cond(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_6read_cond[] = "read_cond(condition, n=1)\n        Read samples matching a condition\n\n        :type n: int\n        :param n: number of samples to read\n\n        :type condition: dds.Condition\n        :param condition: a ReadCondition or QueryCondition\n\n        :rtype: list\n        :return: list of sample data and sample info tuple\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_7read_cond(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Condition *__pyx_v_condition = 0;
  int __pyx_v_n;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_cond (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_condition,&__pyx_n_s_n,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_condition)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_cond") < 0)) __PYX_ERR(0, 2653, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_condition = ((struct __pyx_obj_3dds_Condition *)values[0]);
    if (values[1]) {
      __pyx_v_n = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2653, __pyx_L3_error)
    } else {
      __pyx_v_n = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_cond", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2653, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.read_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_condition), __pyx_ptype_3dds_Condition, 1, "condition", 0))) __PYX_ERR(0, 2653, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_10DataReader_6read_cond(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_condition, __pyx_v_n);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_6read_cond(struct __pyx_obj_3dds_DataReader *__pyx_v_self, struct __pyx_obj_3dds_Condition *__pyx_v_condition, int __pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("read_cond", 0);

  /* "dds.pyx":2666
 *         :return: list of sample data and sample info tuple
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         if not isinstance(condition, ReadCondition) and not isinstance(condition, QueryCondition):
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2667
 *         '''
 *         self._check_handle()
 *         if not isinstance(condition, ReadCondition) and not isinstance(condition, QueryCondition):             # <<<<<<<<<<<<<<
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')
 * 
 */
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_condition), __pyx_ptype_3dds_ReadCondition); 
  __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(((PyObject *)__pyx_v_condition), __pyx_ptype_3dds_QueryCondition); 
  __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2668
 *         self._check_handle()
 *         if not isinstance(condition, ReadCondition) and not isinstance(condition, QueryCondition):
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')             # <<<<<<<<<<<<<<
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read_cond, n, 0, 0, condition._c_handle)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Argument_1_is_not_of_type_dds_Re) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Argument_1_is_not_of_type_dds_Re);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2668, __pyx_L1_error)

    /* "dds.pyx":2667
 *         '''
 *         self._check_handle()
 *         if not isinstance(condition, ReadCondition) and not isinstance(condition, QueryCondition):             # <<<<<<<<<<<<<<
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')
 * 
 */
  }

  /* "dds.pyx":2670
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read_cond, n, 0, 0, condition._c_handle)             # <<<<<<<<<<<<<<
 * 
 *     def take_cond(self, Condition condition, n=1):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_self->_typesupport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_typesupport, __pyx_ptype_3dds_TypeSupport))))) __PYX_ERR(0, 2670, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_self->_typesupport;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_3dds__do_read_op(((struct __pyx_obj_3dds_TypeSupport *)__pyx_t_1), ((struct __pyx_vtabstruct_3dds_DataReader *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)), __pyx_f_3dds__op_dds_read_cond, __pyx_v_n, 0, 0, __pyx_v_condition->_c_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2653
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take, n, mask, 0, <void*>0)
 * 
 *     def read_cond(self, Condition condition, int n=1):             # <<<<<<<<<<<<<<
 *         '''read_cond(condition, n=1)
 *         Read samples matching a condition
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataReader.read_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2672
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read_cond, n, 0, 0, condition._c_handle)
 * 
 *     def take_cond(self, Condition condition, n=1):             # <<<<<<<<<<<<<<
 *         '''take_cond(condition, n=1)
 *         Take samples matching a condition
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_9take_cond(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_8take_cond[] = "take_cond(condition, n=1)\n        Take samples matching a condition\n\n        :type n: int\n        :param n: number of samples to read\n\n        :type condition: dds.ReadCondition\n        :param condition: a read or status condition\n\n        :rtype: list\n        :return: list of sample data and sample info tuple\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_9take_cond(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Condition *__pyx_v_condition = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_cond (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_condition,&__pyx_n_s_n,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_condition)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_cond") < 0)) __PYX_ERR(0, 2672, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_condition = ((struct __pyx_obj_3dds_Condition *)values[0]);
    __pyx_v_n = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_cond", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2672, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.take_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_condition), __pyx_ptype_3dds_Condition, 1, "condition", 0))) __PYX_ERR(0, 2672, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_10DataReader_8take_cond(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_condition, __pyx_v_n);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_8take_cond(struct __pyx_obj_3dds_DataReader *__pyx_v_self, struct __pyx_obj_3dds_Condition *__pyx_v_condition, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  uint32_t __pyx_t_7;
  __Pyx_RefNannySetupContext("take_cond", 0);

  /* "dds.pyx":2685
 *         :return: list of sample data and sample info tuple
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         if not isinstance(condition, ReadCondition) and not isinstance(condition, QueryCondition):
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2686
 *         '''
 *         self._check_handle()
 *         if not isinstance(condition, ReadCondition) and not isinstance(condition, QueryCondition):             # <<<<<<<<<<<<<<
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')
 * 
 */
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_condition), __pyx_ptype_3dds_ReadCondition); 
  __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(((PyObject *)__pyx_v_condition), __pyx_ptype_3dds_QueryCondition); 
  __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2687
 *         self._check_handle()
 *         if not isinstance(condition, ReadCondition) and not isinstance(condition, QueryCondition):
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')             # <<<<<<<<<<<<<<
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_cond, n, 0, 0, condition._c_handle)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Argument_1_is_not_of_type_dds_Re) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Argument_1_is_not_of_type_dds_Re);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2687, __pyx_L1_error)

    /* "dds.pyx":2686
 *         '''
 *         self._check_handle()
 *         if not isinstance(condition, ReadCondition) and not isinstance(condition, QueryCondition):             # <<<<<<<<<<<<<<
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')
 * 
 */
  }

  /* "dds.pyx":2689
 *             raise DDSException('Argument 1 is not of type dds.ReadCondition or dds.QueryCondition')
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_cond, n, 0, 0, condition._c_handle)             # <<<<<<<<<<<<<<
 * 
 *     def take_instance(self, handle, n=1, masks=DDSMaskUtil.all_samples()):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_self->_typesupport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_typesupport, __pyx_ptype_3dds_TypeSupport))))) __PYX_ERR(0, 2689, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_self->_typesupport;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_v_n); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2689, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_3dds__do_read_op(((struct __pyx_obj_3dds_TypeSupport *)__pyx_t_1), ((struct __pyx_vtabstruct_3dds_DataReader *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)), __pyx_f_3dds__op_dds_take_cond, __pyx_t_7, 0, 0, __pyx_v_condition->_c_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2672
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read_cond, n, 0, 0, condition._c_handle)
 * 
 *     def take_cond(self, Condition condition, n=1):             # <<<<<<<<<<<<<<
 *         '''take_cond(condition, n=1)
 *         Take samples matching a condition
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataReader.take_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2691
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_cond, n, 0, 0, condition._c_handle)
 * 
 *     def take_instance(self, handle, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''take_instance(n=1, masks=DDSMaskUtil.all_samples())
 *         Take samples for a given instance handle
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_11take_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_10take_instance[] = "take_instance(n=1, masks=DDSMaskUtil.all_samples())\n        Take samples for a given instance handle\n\n        :type handle: int\n        :param handle: the instance handle to use\n\n        :type n: int\n        :param n: number of samples to take\n\n        :type masks: list\n        :param masks: list of DDS statuses\n\n        :rtype: list\n        :return: list of sample data and sample info tuple\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_11take_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_handle = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_masks = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_instance (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_2,&__pyx_n_s_n,&__pyx_n_s_masks,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_int_1);
    values[2] = __pyx_k__23;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_masks);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_instance") < 0)) __PYX_ERR(0, 2691, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_handle = values[0];
    __pyx_v_n = values[1];
    __pyx_v_masks = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_instance", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2691, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.take_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataReader_10take_instance(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_handle, __pyx_v_n, __pyx_v_masks);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_10take_instance(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_n, PyObject *__pyx_v_masks) {
  PyObject *__pyx_v_mask = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  uint32_t __pyx_t_7;
  uint32_t __pyx_t_8;
  dds_instance_handle_t __pyx_t_9;
  __Pyx_RefNannySetupContext("take_instance", 0);

  /* "dds.pyx":2707
 *         :return: list of sample data and sample info tuple
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2708
 *         '''
 *         self._check_handle()
 *         mask = masks[0].value             # <<<<<<<<<<<<<<
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_mask = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "dds.pyx":2709
 *         self._check_handle()
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):             # <<<<<<<<<<<<<<
 *             mask = mask | masks[i].value
 * 
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_masks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2709, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "dds.pyx":2710
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value             # <<<<<<<<<<<<<<
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_instance, n, mask, handle, <void*>0)
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_masks, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Or(__pyx_v_mask, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "dds.pyx":2712
 *             mask = mask | masks[i].value
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_instance, n, mask, handle, <void*>0)             # <<<<<<<<<<<<<<
 * 
 *     def read_instance(self, handle, n=1, masks=DDSMaskUtil.all_samples()):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_self->_typesupport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_typesupport, __pyx_ptype_3dds_TypeSupport))))) __PYX_ERR(0, 2712, __pyx_L1_error)
  __pyx_t_2 = __pyx_v_self->_typesupport;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_v_n); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2712, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_As_uint32_t(__pyx_v_mask); if (unlikely((__pyx_t_8 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2712, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyInt_As_uint64_t(__pyx_v_handle); if (unlikely((__pyx_t_9 == ((dds_instance_handle_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2712, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_3dds__do_read_op(((struct __pyx_obj_3dds_TypeSupport *)__pyx_t_2), ((struct __pyx_vtabstruct_3dds_DataReader *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)), __pyx_f_3dds__op_dds_take_instance, __pyx_t_7, __pyx_t_8, __pyx_t_9, ((void *)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2691
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_cond, n, 0, 0, condition._c_handle)
 * 
 *     def take_instance(self, handle, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''take_instance(n=1, masks=DDSMaskUtil.all_samples())
 *         Take samples for a given instance handle
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataReader.take_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2714
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_instance, n, mask, handle, <void*>0)
 * 
 *     def read_instance(self, handle, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''read_instance(n=1, masks=DDSMaskUtil.all_samples())
 *         Read samples for a given instance handle
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_13read_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_12read_instance[] = "read_instance(n=1, masks=DDSMaskUtil.all_samples())\n        Read samples for a given instance handle\n\n        :type handle: int\n        :param handle: the instance handle to use\n\n        :type n: int\n        :param n: number of samples to take\n\n        :type masks: list\n        :param masks: list of DDS statuses\n\n        :rtype: list\n        :return: list of sample data and sample info tuple\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_13read_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_handle = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_masks = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_instance (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_2,&__pyx_n_s_n,&__pyx_n_s_masks,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_int_1);
    values[2] = __pyx_k__24;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_masks);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_instance") < 0)) __PYX_ERR(0, 2714, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_handle = values[0];
    __pyx_v_n = values[1];
    __pyx_v_masks = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_instance", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2714, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.read_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataReader_12read_instance(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_handle, __pyx_v_n, __pyx_v_masks);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_12read_instance(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_n, PyObject *__pyx_v_masks) {
  PyObject *__pyx_v_mask = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  uint32_t __pyx_t_7;
  uint32_t __pyx_t_8;
  dds_instance_handle_t __pyx_t_9;
  __Pyx_RefNannySetupContext("read_instance", 0);

  /* "dds.pyx":2730
 *         :return: list of sample data and sample info tuple
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2731
 *         '''
 *         self._check_handle()
 *         mask = masks[0].value             # <<<<<<<<<<<<<<
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_mask = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "dds.pyx":2732
 *         self._check_handle()
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):             # <<<<<<<<<<<<<<
 *             mask = mask | masks[i].value
 * 
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_masks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2732, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "dds.pyx":2733
 *         mask = masks[0].value
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value             # <<<<<<<<<<<<<<
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read_instance, n, mask, handle, <void*>0)
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_masks, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Or(__pyx_v_mask, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_mask, __pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "dds.pyx":2735
 *             mask = mask | masks[i].value
 * 
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read_instance, n, mask, handle, <void*>0)             # <<<<<<<<<<<<<<
 * 
 *     def wait_for_historical_data(self, timeout = None):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_self->_typesupport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_typesupport, __pyx_ptype_3dds_TypeSupport))))) __PYX_ERR(0, 2735, __pyx_L1_error)
  __pyx_t_2 = __pyx_v_self->_typesupport;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_v_n); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2735, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_As_uint32_t(__pyx_v_mask); if (unlikely((__pyx_t_8 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2735, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyInt_As_uint64_t(__pyx_v_handle); if (unlikely((__pyx_t_9 == ((dds_instance_handle_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2735, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_3dds__do_read_op(((struct __pyx_obj_3dds_TypeSupport *)__pyx_t_2), ((struct __pyx_vtabstruct_3dds_DataReader *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self)), __pyx_f_3dds__op_dds_read_instance, __pyx_t_7, __pyx_t_8, __pyx_t_9, ((void *)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2714
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_instance, n, mask, handle, <void*>0)
 * 
 *     def read_instance(self, handle, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''read_instance(n=1, masks=DDSMaskUtil.all_samples())
 *         Read samples for a given instance handle
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataReader.read_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2737
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read_instance, n, mask, handle, <void*>0)
 * 
 *     def wait_for_historical_data(self, timeout = None):             # <<<<<<<<<<<<<<
 *         '''
 *         wait_for_historical_data(timeout = None)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_15wait_for_historical_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_14wait_for_historical_data[] = "\n        wait_for_historical_data(timeout = None)\n\n        Wait for data reader to receive historical data, up to timeout duration\n\n        :type timeout: DDSDuration\n        :param timeout: timeout in seconds(default: infinity)\n\n        :rtype: boolean\n        :return: False if timeout exipred; True otherwise\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_15wait_for_historical_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_timeout = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wait_for_historical_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_for_historical_data") < 0)) __PYX_ERR(0, 2737, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_timeout = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wait_for_historical_data", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2737, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.wait_for_historical_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataReader_14wait_for_historical_data(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_14wait_for_historical_data(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_timeout) {
  dds_duration_t __pyx_v__c_timeout;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  dds_duration_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("wait_for_historical_data", 0);
  __Pyx_INCREF(__pyx_v_timeout);

  /* "dds.pyx":2749
 *         :return: False if timeout exipred; True otherwise
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         if not timeout:
 *             timeout = DDSDuration.infinity()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2750
 *         '''
 *         self._check_handle()
 *         if not timeout:             # <<<<<<<<<<<<<<
 *             timeout = DDSDuration.infinity()
 *         cdef dds_duration_t _c_timeout = timeout.value
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_timeout); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2750, __pyx_L1_error)
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":2751
 *         self._check_handle()
 *         if not timeout:
 *             timeout = DDSDuration.infinity()             # <<<<<<<<<<<<<<
 *         cdef dds_duration_t _c_timeout = timeout.value
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_infinity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "dds.pyx":2750
 *         '''
 *         self._check_handle()
 *         if not timeout:             # <<<<<<<<<<<<<<
 *             timeout = DDSDuration.infinity()
 *         cdef dds_duration_t _c_timeout = timeout.value
 */
  }

  /* "dds.pyx":2752
 *         if not timeout:
 *             timeout = DDSDuration.infinity()
 *         cdef dds_duration_t _c_timeout = timeout.value             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_6 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v__c_timeout = __pyx_t_6;

  /* "dds.pyx":2754
 *         cdef dds_duration_t _c_timeout = timeout.value
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_reader_wait_for_historical_data(self._c_handle, _c_timeout)
 *         if dds.dds_err_no(r) == dds.DDS_RETCODE_OK: #gil_ok
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2755
 * 
 *         with nogil:
 *             r = dds.dds_reader_wait_for_historical_data(self._c_handle, _c_timeout)             # <<<<<<<<<<<<<<
 *         if dds.dds_err_no(r) == dds.DDS_RETCODE_OK: #gil_ok
 *             return True
 */
        __pyx_v_r = dds_reader_wait_for_historical_data(__pyx_v_self->__pyx_base._c_handle, __pyx_v__c_timeout);
      }

      /* "dds.pyx":2754
 *         cdef dds_duration_t _c_timeout = timeout.value
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_reader_wait_for_historical_data(self._c_handle, _c_timeout)
 *         if dds.dds_err_no(r) == dds.DDS_RETCODE_OK: #gil_ok
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "dds.pyx":2756
 *         with nogil:
 *             r = dds.dds_reader_wait_for_historical_data(self._c_handle, _c_timeout)
 *         if dds.dds_err_no(r) == dds.DDS_RETCODE_OK: #gil_ok             # <<<<<<<<<<<<<<
 *             return True
 *         elif dds.dds_err_no(r) == dds.DDS_RETCODE_TIMEOUT: #gil_ok
 */
  __pyx_t_5 = ((dds_err_no(__pyx_v_r) == DDS_RETCODE_OK) != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":2757
 *             r = dds.dds_reader_wait_for_historical_data(self._c_handle, _c_timeout)
 *         if dds.dds_err_no(r) == dds.DDS_RETCODE_OK: #gil_ok
 *             return True             # <<<<<<<<<<<<<<
 *         elif dds.dds_err_no(r) == dds.DDS_RETCODE_TIMEOUT: #gil_ok
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "dds.pyx":2756
 *         with nogil:
 *             r = dds.dds_reader_wait_for_historical_data(self._c_handle, _c_timeout)
 *         if dds.dds_err_no(r) == dds.DDS_RETCODE_OK: #gil_ok             # <<<<<<<<<<<<<<
 *             return True
 *         elif dds.dds_err_no(r) == dds.DDS_RETCODE_TIMEOUT: #gil_ok
 */
  }

  /* "dds.pyx":2758
 *         if dds.dds_err_no(r) == dds.DDS_RETCODE_OK: #gil_ok
 *             return True
 *         elif dds.dds_err_no(r) == dds.DDS_RETCODE_TIMEOUT: #gil_ok             # <<<<<<<<<<<<<<
 *             return False
 *         else:
 */
  __pyx_t_5 = ((dds_err_no(__pyx_v_r) == DDS_RETCODE_TIMEOUT) != 0);
  if (likely(__pyx_t_5)) {

    /* "dds.pyx":2759
 *             return True
 *         elif dds.dds_err_no(r) == dds.DDS_RETCODE_TIMEOUT: #gil_ok
 *             return False             # <<<<<<<<<<<<<<
 *         else:
 *             raise DDSException("Wait for historical data failed", r)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "dds.pyx":2758
 *         if dds.dds_err_no(r) == dds.DDS_RETCODE_OK: #gil_ok
 *             return True
 *         elif dds.dds_err_no(r) == dds.DDS_RETCODE_TIMEOUT: #gil_ok             # <<<<<<<<<<<<<<
 *             return False
 *         else:
 */
  }

  /* "dds.pyx":2761
 *             return False
 *         else:
 *             raise DDSException("Wait for historical data failed", r)             # <<<<<<<<<<<<<<
 * 
 *     def subscription_matched_status(self):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Wait_for_historical_data_failed, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Wait_for_historical_data_failed, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Wait_for_historical_data_failed);
      __Pyx_GIVEREF(__pyx_kp_s_Wait_for_historical_data_failed);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Wait_for_historical_data_failed);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2761, __pyx_L1_error)
  }

  /* "dds.pyx":2737
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read_instance, n, mask, handle, <void*>0)
 * 
 *     def wait_for_historical_data(self, timeout = None):             # <<<<<<<<<<<<<<
 *         '''
 *         wait_for_historical_data(timeout = None)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.DataReader.wait_for_historical_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_timeout);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2763
 *             raise DDSException("Wait for historical data failed", r)
 * 
 *     def subscription_matched_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the SubscriptionMatchedStatus of the reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_17subscription_matched_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataReader_16subscription_matched_status[] = "\n        Return the SubscriptionMatchedStatus of the reader\n\n        SubscriptionMatchedStatus has fields:\n            total_count,\n            total_count_change,\n            current_count,\n            current_count_change,\n            last_publication_handle\n\n        :rtype: dds.SubscriptionMatchedStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_17subscription_matched_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("subscription_matched_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_16subscription_matched_status(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_16subscription_matched_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self) {
  dds_subscription_matched_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("subscription_matched_status", 0);

  /* "dds.pyx":2776
 *         :rtype: dds.SubscriptionMatchedStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_subscription_matched_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2778
 *         self._check_handle()
 *         cdef dds_subscription_matched_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_subscription_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2779
 *         cdef dds_subscription_matched_status_t c_status
 *         with nogil:
 *             ret = dds_get_subscription_matched_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 */
        __pyx_v_ret = dds_get_subscription_matched_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2778
 *         self._check_handle()
 *         cdef dds_subscription_matched_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_subscription_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2780
 *         with nogil:
 *             ret = dds_get_subscription_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 *         status = SubscriptionMatchedStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2781
 *             ret = dds_get_subscription_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)             # <<<<<<<<<<<<<<
 *         status = SubscriptionMatchedStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_subscription, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_subscription, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_subscription);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_subscription);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_subscription);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2781, __pyx_L1_error)

    /* "dds.pyx":2780
 *         with nogil:
 *             ret = dds_get_subscription_matched_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 *         status = SubscriptionMatchedStatus(
 */
  }

  /* "dds.pyx":2782
 *         if ret < 0:
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 *         status = SubscriptionMatchedStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SubscriptionMatchedStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2783
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 *         status = SubscriptionMatchedStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change,
 *             c_status.current_count,
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2784
 *         status = SubscriptionMatchedStatus(
 *             c_status.total_count,
 *             c_status.total_count_change,             # <<<<<<<<<<<<<<
 *             c_status.current_count,
 *             c_status.current_count_change,
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2785
 *             c_status.total_count,
 *             c_status.total_count_change,
 *             c_status.current_count,             # <<<<<<<<<<<<<<
 *             c_status.current_count_change,
 *             c_status.last_publication_handle)
 */
  __pyx_t_5 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.current_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":2786
 *             c_status.total_count_change,
 *             c_status.current_count,
 *             c_status.current_count_change,             # <<<<<<<<<<<<<<
 *             c_status.last_publication_handle)
 *         return status
 */
  __pyx_t_8 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.current_count_change); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "dds.pyx":2787
 *             c_status.current_count,
 *             c_status.current_count_change,
 *             c_status.last_publication_handle)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __pyx_t_9 = __Pyx_PyInt_From_uint64_t(__pyx_v_c_status.last_publication_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_8, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2782, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_8, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2782, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_6, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_6, __pyx_t_9);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2788
 *             c_status.current_count_change,
 *             c_status.last_publication_handle)
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def liveliness_changed_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2763
 *             raise DDSException("Wait for historical data failed", r)
 * 
 *     def subscription_matched_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the SubscriptionMatchedStatus of the reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("dds.DataReader.subscription_matched_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2790
 *         return status
 * 
 *     def liveliness_changed_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the LivelinessChangedStatus of the reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_19liveliness_changed_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataReader_18liveliness_changed_status[] = "\n        Return the LivelinessChangedStatus of the reader\n\n        LivelinessChangedStatus has fields:\n            alive_count,\n            not_alive_count,\n            alive_count_change,\n            not_alive_count_change,\n            last_publication_handle\n\n        :rtype: dds.LivelinessChangedStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_19liveliness_changed_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("liveliness_changed_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_18liveliness_changed_status(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_18liveliness_changed_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self) {
  dds_liveliness_changed_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("liveliness_changed_status", 0);

  /* "dds.pyx":2803
 *         :rtype: dds.LivelinessChangedStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_liveliness_changed_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2805
 *         self._check_handle()
 *         cdef dds_liveliness_changed_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_liveliness_changed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2806
 *         cdef dds_liveliness_changed_status_t c_status
 *         with nogil:
 *             ret = dds_get_liveliness_changed_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 */
        __pyx_v_ret = dds_get_liveliness_changed_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2805
 *         self._check_handle()
 *         cdef dds_liveliness_changed_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_liveliness_changed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2807
 *         with nogil:
 *             ret = dds_get_liveliness_changed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 *         status = LivelinessChangedStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2808
 *             ret = dds_get_liveliness_changed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)             # <<<<<<<<<<<<<<
 *         status = LivelinessChangedStatus(
 *             c_status.alive_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_subscription, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2808, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_subscription, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2808, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_subscription);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_subscription);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_subscription);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2808, __pyx_L1_error)

    /* "dds.pyx":2807
 *         with nogil:
 *             ret = dds_get_liveliness_changed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 *         status = LivelinessChangedStatus(
 */
  }

  /* "dds.pyx":2809
 *         if ret < 0:
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 *         status = LivelinessChangedStatus(             # <<<<<<<<<<<<<<
 *             c_status.alive_count,
 *             c_status.not_alive_count,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LivelinessChangedStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2810
 *             raise DDSException('Failure retrieving subscription_matched_status', ret)
 *         status = LivelinessChangedStatus(
 *             c_status.alive_count,             # <<<<<<<<<<<<<<
 *             c_status.not_alive_count,
 *             c_status.alive_count_change,
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.alive_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2811
 *         status = LivelinessChangedStatus(
 *             c_status.alive_count,
 *             c_status.not_alive_count,             # <<<<<<<<<<<<<<
 *             c_status.alive_count_change,
 *             c_status.not_alive_count_change,
 */
  __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.not_alive_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2812
 *             c_status.alive_count,
 *             c_status.not_alive_count,
 *             c_status.alive_count_change,             # <<<<<<<<<<<<<<
 *             c_status.not_alive_count_change,
 *             c_status.last_publication_handle)
 */
  __pyx_t_5 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.alive_count_change); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":2813
 *             c_status.not_alive_count,
 *             c_status.alive_count_change,
 *             c_status.not_alive_count_change,             # <<<<<<<<<<<<<<
 *             c_status.last_publication_handle)
 *         return status
 */
  __pyx_t_8 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.not_alive_count_change); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "dds.pyx":2814
 *             c_status.alive_count_change,
 *             c_status.not_alive_count_change,
 *             c_status.last_publication_handle)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __pyx_t_9 = __Pyx_PyInt_From_uint64_t(__pyx_v_c_status.last_publication_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_8, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2809, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_8, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2809, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_6, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_6, __pyx_t_9);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2815
 *             c_status.not_alive_count_change,
 *             c_status.last_publication_handle)
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def requested_deadline_missed_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2790
 *         return status
 * 
 *     def liveliness_changed_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the LivelinessChangedStatus of the reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("dds.DataReader.liveliness_changed_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2817
 *         return status
 * 
 *     def requested_deadline_missed_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the RequestedDeadlineMissedStatus of the reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_21requested_deadline_missed_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataReader_20requested_deadline_missed_status[] = "\n        Return the RequestedDeadlineMissedStatus of the reader\n\n        RequestedDeadlineMissedStatus has fields:\n            total_count,\n            total_count_change,\n            last_instance_handle\n\n        :rtype: dds.RequestedDeadlineMissedStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_21requested_deadline_missed_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("requested_deadline_missed_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_20requested_deadline_missed_status(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_20requested_deadline_missed_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self) {
  dds_requested_deadline_missed_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("requested_deadline_missed_status", 0);

  /* "dds.pyx":2828
 *         :rtype: dds.RequestedDeadlineMissedStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_requested_deadline_missed_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2830
 *         self._check_handle()
 *         cdef dds_requested_deadline_missed_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_requested_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2831
 *         cdef dds_requested_deadline_missed_status_t c_status
 *         with nogil:
 *             ret = dds_get_requested_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving requested_deadline_missed_status', ret)
 */
        __pyx_v_ret = dds_get_requested_deadline_missed_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2830
 *         self._check_handle()
 *         cdef dds_requested_deadline_missed_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_requested_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2832
 *         with nogil:
 *             ret = dds_get_requested_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving requested_deadline_missed_status', ret)
 *         status = RequestedDeadlineMissedStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2833
 *             ret = dds_get_requested_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving requested_deadline_missed_status', ret)             # <<<<<<<<<<<<<<
 *         status = RequestedDeadlineMissedStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_requested_dea, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2833, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_requested_dea, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2833, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2833, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_requested_dea);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_requested_dea);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_requested_dea);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2833, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2833, __pyx_L1_error)

    /* "dds.pyx":2832
 *         with nogil:
 *             ret = dds_get_requested_deadline_missed_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving requested_deadline_missed_status', ret)
 *         status = RequestedDeadlineMissedStatus(
 */
  }

  /* "dds.pyx":2834
 *         if ret < 0:
 *             raise DDSException('Failure retrieving requested_deadline_missed_status', ret)
 *         status = RequestedDeadlineMissedStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RequestedDeadlineMissedStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2835
 *             raise DDSException('Failure retrieving requested_deadline_missed_status', ret)
 *         status = RequestedDeadlineMissedStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change,
 *             c_status.last_instance_handle)
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2836
 *         status = RequestedDeadlineMissedStatus(
 *             c_status.total_count,
 *             c_status.total_count_change,             # <<<<<<<<<<<<<<
 *             c_status.last_instance_handle)
 *         return status
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2837
 *             c_status.total_count,
 *             c_status.total_count_change,
 *             c_status.last_instance_handle)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_c_status.last_instance_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2834, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2834, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_6, __pyx_t_5);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2838
 *             c_status.total_count_change,
 *             c_status.last_instance_handle)
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def requested_incompatible_qos_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2817
 *         return status
 * 
 *     def requested_deadline_missed_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the RequestedDeadlineMissedStatus of the reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.DataReader.requested_deadline_missed_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2840
 *         return status
 * 
 *     def requested_incompatible_qos_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the RequestedIncompatibleQosStatus of the reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_23requested_incompatible_qos_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataReader_22requested_incompatible_qos_status[] = "\n        Return the RequestedIncompatibleQosStatus of the reader\n\n        RequestedIncompatibleQosStatus has fields:\n            total_count,\n            total_count_change,\n            last_policy_id\n\n        :rtype: dds.RequestedIncompatibleQosStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_23requested_incompatible_qos_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("requested_incompatible_qos_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_22requested_incompatible_qos_status(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_22requested_incompatible_qos_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self) {
  dds_requested_incompatible_qos_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("requested_incompatible_qos_status", 0);

  /* "dds.pyx":2851
 *         :rtype: dds.RequestedIncompatibleQosStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_requested_incompatible_qos_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2853
 *         self._check_handle()
 *         cdef dds_requested_incompatible_qos_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_requested_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2854
 *         cdef dds_requested_incompatible_qos_status_t c_status
 *         with nogil:
 *             ret = dds_get_requested_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving requested_incompatible_qos_status', ret)
 */
        __pyx_v_ret = dds_get_requested_incompatible_qos_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2853
 *         self._check_handle()
 *         cdef dds_requested_incompatible_qos_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_requested_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2855
 *         with nogil:
 *             ret = dds_get_requested_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving requested_incompatible_qos_status', ret)
 *         status = RequestedIncompatibleQosStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2856
 *             ret = dds_get_requested_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving requested_incompatible_qos_status', ret)             # <<<<<<<<<<<<<<
 *         status = RequestedIncompatibleQosStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_requested_inc, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_requested_inc, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_requested_inc);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_requested_inc);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_requested_inc);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2856, __pyx_L1_error)

    /* "dds.pyx":2855
 *         with nogil:
 *             ret = dds_get_requested_incompatible_qos_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving requested_incompatible_qos_status', ret)
 *         status = RequestedIncompatibleQosStatus(
 */
  }

  /* "dds.pyx":2857
 *         if ret < 0:
 *             raise DDSException('Failure retrieving requested_incompatible_qos_status', ret)
 *         status = RequestedIncompatibleQosStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RequestedIncompatibleQosStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2858
 *             raise DDSException('Failure retrieving requested_incompatible_qos_status', ret)
 *         status = RequestedIncompatibleQosStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change,
 *             QosPolicyId(c_status.last_policy_id))
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2859
 *         status = RequestedIncompatibleQosStatus(
 *             c_status.total_count,
 *             c_status.total_count_change,             # <<<<<<<<<<<<<<
 *             QosPolicyId(c_status.last_policy_id))
 *         return status
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2860
 *             c_status.total_count,
 *             c_status.total_count_change,
 *             QosPolicyId(c_status.last_policy_id))             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_QosPolicyId); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.last_policy_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_6, __pyx_t_5);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2861
 *             c_status.total_count_change,
 *             QosPolicyId(c_status.last_policy_id))
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def sample_rejected_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2840
 *         return status
 * 
 *     def requested_incompatible_qos_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the RequestedIncompatibleQosStatus of the reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("dds.DataReader.requested_incompatible_qos_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2863
 *         return status
 * 
 *     def sample_rejected_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the SampleRejectedStatus of the reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_25sample_rejected_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataReader_24sample_rejected_status[] = "\n        Return the SampleRejectedStatus of the reader\n\n        SampleRejectedStatus has fields:\n            total_count,\n            total_count_change,\n            last_reason,\n            last_instance_handle\n\n        :rtype: dds.SampleRejectedStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_25sample_rejected_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sample_rejected_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_24sample_rejected_status(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_24sample_rejected_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self) {
  dds_sample_rejected_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("sample_rejected_status", 0);

  /* "dds.pyx":2875
 *         :rtype: dds.SampleRejectedStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_sample_rejected_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2877
 *         self._check_handle()
 *         cdef dds_sample_rejected_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_sample_rejected_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2878
 *         cdef dds_sample_rejected_status_t c_status
 *         with nogil:
 *             ret = dds_get_sample_rejected_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving sample_rejected_status', ret)
 */
        __pyx_v_ret = dds_get_sample_rejected_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2877
 *         self._check_handle()
 *         cdef dds_sample_rejected_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_sample_rejected_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2879
 *         with nogil:
 *             ret = dds_get_sample_rejected_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving sample_rejected_status', ret)
 *         status = SampleRejectedStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2880
 *             ret = dds_get_sample_rejected_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving sample_rejected_status', ret)             # <<<<<<<<<<<<<<
 *         status = SampleRejectedStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_sample_reject, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_sample_reject, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_sample_reject);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_sample_reject);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_sample_reject);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2880, __pyx_L1_error)

    /* "dds.pyx":2879
 *         with nogil:
 *             ret = dds_get_sample_rejected_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving sample_rejected_status', ret)
 *         status = SampleRejectedStatus(
 */
  }

  /* "dds.pyx":2881
 *         if ret < 0:
 *             raise DDSException('Failure retrieving sample_rejected_status', ret)
 *         status = SampleRejectedStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SampleRejectedStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2882
 *             raise DDSException('Failure retrieving sample_rejected_status', ret)
 *         status = SampleRejectedStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change,
 *             DDSSampleRejectedStatusKind(c_status.last_reason),
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2883
 *         status = SampleRejectedStatus(
 *             c_status.total_count,
 *             c_status.total_count_change,             # <<<<<<<<<<<<<<
 *             DDSSampleRejectedStatusKind(c_status.last_reason),
 *             c_status.last_instance_handle)
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2884
 *             c_status.total_count,
 *             c_status.total_count_change,
 *             DDSSampleRejectedStatusKind(c_status.last_reason),             # <<<<<<<<<<<<<<
 *             c_status.last_instance_handle)
 *         return status
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_DDSSampleRejectedStatusKind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyInt_From_dds_sample_rejected_status_kind(__pyx_v_c_status.last_reason); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "dds.pyx":2885
 *             c_status.total_count_change,
 *             DDSSampleRejectedStatusKind(c_status.last_reason),
 *             c_status.last_instance_handle)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __pyx_t_8 = __Pyx_PyInt_From_uint64_t(__pyx_v_c_status.last_instance_handle); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2881, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2881, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_6, __pyx_t_8);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2886
 *             DDSSampleRejectedStatusKind(c_status.last_reason),
 *             c_status.last_instance_handle)
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def sample_lost_status(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2863
 *         return status
 * 
 *     def sample_rejected_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the SampleRejectedStatus of the reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("dds.DataReader.sample_rejected_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2888
 *         return status
 * 
 *     def sample_lost_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the SampleLostStatus of the reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_27sample_lost_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_10DataReader_26sample_lost_status[] = "\n        Return the SampleLostStatus of the reader\n\n        SampleLostStatus has fields:\n            total_count,\n            total_count_change\n\n        :rtype: dds.SampleLostStatus\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_27sample_lost_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sample_lost_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_26sample_lost_status(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_26sample_lost_status(struct __pyx_obj_3dds_DataReader *__pyx_v_self) {
  dds_sample_lost_status_t __pyx_v_c_status;
  int __pyx_v_ret;
  PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("sample_lost_status", 0);

  /* "dds.pyx":2898
 *         :rtype: dds.SampleLostStatus
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_sample_lost_status_t c_status
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2900
 *         self._check_handle()
 *         cdef dds_sample_lost_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_sample_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2901
 *         cdef dds_sample_lost_status_t c_status
 *         with nogil:
 *             ret = dds_get_sample_lost_status(<dds_entity_t>self._c_handle, &c_status)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *             raise DDSException('Failure retrieving sample_lost_status', ret)
 */
        __pyx_v_ret = dds_get_sample_lost_status(((dds_entity_t)__pyx_v_self->__pyx_base._c_handle), (&__pyx_v_c_status));
      }

      /* "dds.pyx":2900
 *         self._check_handle()
 *         cdef dds_sample_lost_status_t c_status
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = dds_get_sample_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2902
 *         with nogil:
 *             ret = dds_get_sample_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving sample_lost_status', ret)
 *         status = SampleLostStatus(
 */
  __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":2903
 *             ret = dds_get_sample_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:
 *             raise DDSException('Failure retrieving sample_lost_status', ret)             # <<<<<<<<<<<<<<
 *         status = SampleLostStatus(
 *             c_status.total_count,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_sample_lost_s, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2903, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failure_retrieving_sample_lost_s, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2903, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failure_retrieving_sample_lost_s);
      __Pyx_GIVEREF(__pyx_kp_s_Failure_retrieving_sample_lost_s);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failure_retrieving_sample_lost_s);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2903, __pyx_L1_error)

    /* "dds.pyx":2902
 *         with nogil:
 *             ret = dds_get_sample_lost_status(<dds_entity_t>self._c_handle, &c_status)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failure retrieving sample_lost_status', ret)
 *         status = SampleLostStatus(
 */
  }

  /* "dds.pyx":2904
 *         if ret < 0:
 *             raise DDSException('Failure retrieving sample_lost_status', ret)
 *         status = SampleLostStatus(             # <<<<<<<<<<<<<<
 *             c_status.total_count,
 *             c_status.total_count_change)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SampleLostStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":2905
 *             raise DDSException('Failure retrieving sample_lost_status', ret)
 *         status = SampleLostStatus(
 *             c_status.total_count,             # <<<<<<<<<<<<<<
 *             c_status.total_count_change)
 *         return status
 */
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_c_status.total_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "dds.pyx":2906
 *         status = SampleLostStatus(
 *             c_status.total_count,
 *             c_status.total_count_change)             # <<<<<<<<<<<<<<
 *         return status
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_c_status.total_count_change); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2904, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2904, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_status = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":2907
 *             c_status.total_count,
 *             c_status.total_count_change)
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     def create_readcondition(self, masks=DDSMaskUtil.all_samples()):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_status);
  __pyx_r = __pyx_v_status;
  goto __pyx_L0;

  /* "dds.pyx":2888
 *         return status
 * 
 *     def sample_lost_status(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return the SampleLostStatus of the reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.DataReader.sample_lost_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2909
 *         return status
 * 
 *     def create_readcondition(self, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''
 *         Create a read condition for the data reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_29create_readcondition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_28create_readcondition[] = "\n        Create a read condition for the data reader\n\n        :type masks: list\n        :param mask: a list of dds.DDSStateKind values\n        :rtype: dds.ReadCondition\n        :return: a read condition object\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_29create_readcondition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_masks = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_readcondition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_masks,0};
    PyObject* values[1] = {0};
    values[0] = __pyx_k__25;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_masks);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_readcondition") < 0)) __PYX_ERR(0, 2909, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_masks = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_readcondition", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2909, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.create_readcondition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataReader_28create_readcondition(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_masks);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_28create_readcondition(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_masks) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("create_readcondition", 0);

  /* "dds.pyx":2918
 *         :return: a read condition object
 *         '''
 *         return ReadCondition(self, masks)             # <<<<<<<<<<<<<<
 * 
 *     def create_querycondition(self, masks=DDSMaskUtil.all_samples(), expression = '', parameters=[]):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_masks);
  __Pyx_GIVEREF(__pyx_v_masks);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_masks);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_ReadCondition), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2909
 *         return status
 * 
 *     def create_readcondition(self, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''
 *         Create a read condition for the data reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.DataReader.create_readcondition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2920
 *         return ReadCondition(self, masks)
 * 
 *     def create_querycondition(self, masks=DDSMaskUtil.all_samples(), expression = '', parameters=[]):             # <<<<<<<<<<<<<<
 *         '''
 *         Create a query condition for the data reader
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_31create_querycondition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_10DataReader_30create_querycondition[] = "\n        Create a query condition for the data reader\n\n        :type masks: list\n        :param masks: a list of dds.DDSStateKind values\n        :type expression: str\n        :param expression: a SQL where expression\n        :type parameters: list\n        :param parameters: a list of str objects, representing SQL expression parameters\n        :rtype: dds.QueryCondition\n        :return: a query condition object\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_31create_querycondition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_masks = 0;
  PyObject *__pyx_v_expression = 0;
  PyObject *__pyx_v_parameters = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_querycondition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_masks,&__pyx_n_s_expression,&__pyx_n_s_parameters,0};
    PyObject* values[3] = {0,0,0};
    values[0] = __pyx_k__26;
    values[1] = ((PyObject *)__pyx_kp_s_);
    values[2] = __pyx_k__27;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_masks);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_expression);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parameters);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_querycondition") < 0)) __PYX_ERR(0, 2920, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_masks = values[0];
    __pyx_v_expression = values[1];
    __pyx_v_parameters = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_querycondition", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2920, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DataReader.create_querycondition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_10DataReader_30create_querycondition(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), __pyx_v_masks, __pyx_v_expression, __pyx_v_parameters);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_30create_querycondition(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_masks, PyObject *__pyx_v_expression, PyObject *__pyx_v_parameters) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("create_querycondition", 0);

  /* "dds.pyx":2933
 *         :return: a query condition object
 *         '''
 *         return QueryCondition(self, masks, expression, parameters)             # <<<<<<<<<<<<<<
 * 
 *     def lookup_instance(self, data):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_masks);
  __Pyx_GIVEREF(__pyx_v_masks);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_masks);
  __Pyx_INCREF(__pyx_v_expression);
  __Pyx_GIVEREF(__pyx_v_expression);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_expression);
  __Pyx_INCREF(__pyx_v_parameters);
  __Pyx_GIVEREF(__pyx_v_parameters);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_parameters);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_QueryCondition), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "dds.pyx":2920
 *         return ReadCondition(self, masks)
 * 
 *     def create_querycondition(self, masks=DDSMaskUtil.all_samples(), expression = '', parameters=[]):             # <<<<<<<<<<<<<<
 *         '''
 *         Create a query condition for the data reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.DataReader.create_querycondition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2935
 *         return QueryCondition(self, masks, expression, parameters)
 * 
 *     def lookup_instance(self, data):             # <<<<<<<<<<<<<<
 *         '''
 *         Lookup the registered handle for the given data values
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_33lookup_instance(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static char __pyx_doc_3dds_10DataReader_32lookup_instance[] = "\n        Lookup the registered handle for the given data values\n\n        :param data: a data object\n        :type data: object\n        :return: the instance handle or None\n        :rtype: int\n        ";
static PyObject *__pyx_pw_3dds_10DataReader_33lookup_instance(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup_instance (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_32lookup_instance(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_32lookup_instance(struct __pyx_obj_3dds_DataReader *__pyx_v_self, PyObject *__pyx_v_data) {
  char *__pyx_v_p;
  PyObject *__pyx_v_b = NULL;
  dds_instance_handle_t __pyx_v_h;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("lookup_instance", 0);

  /* "dds.pyx":2944
 *         :rtype: int
 *         '''
 *         self._check_handle()             # <<<<<<<<<<<<<<
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":2945
 *         '''
 *         self._check_handle()
 *         cdef char *p = NULL             # <<<<<<<<<<<<<<
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 */
  __pyx_v_p = NULL;

  /* "dds.pyx":2946
 *         self._check_handle()
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]             # <<<<<<<<<<<<<<
 *         p = <bytes>b
 *         with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_serialize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_typesupport, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "dds.pyx":2947
 *         cdef char *p = NULL
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b             # <<<<<<<<<<<<<<
 *         with nogil:
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 */
  if (unlikely(__pyx_v_b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2947, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2947, __pyx_L1_error)
  __pyx_v_p = __pyx_t_4;

  /* "dds.pyx":2948
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":2949
 *         p = <bytes>b
 *         with nogil:
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)             # <<<<<<<<<<<<<<
 *         if h == 0:
 *             return None
 */
        __pyx_v_h = dds_instance_lookup(__pyx_v_self->__pyx_base._c_handle, ((void const *)__pyx_v_p));
      }

      /* "dds.pyx":2948
 *         b = self._typesupport._serialize(data)[:self._typesupport.size]
 *         p = <bytes>b
 *         with nogil:             # <<<<<<<<<<<<<<
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":2950
 *         with nogil:
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
 */
  __pyx_t_5 = ((__pyx_v_h == 0) != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":2951
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:
 *             return None             # <<<<<<<<<<<<<<
 *         else:
 *             return h
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "dds.pyx":2950
 *         with nogil:
 *             h = dds.dds_instance_lookup(self._c_handle, <const void *>p)
 *         if h == 0:             # <<<<<<<<<<<<<<
 *             return None
 *         else:
 */
  }

  /* "dds.pyx":2953
 *             return None
 *         else:
 *             return h             # <<<<<<<<<<<<<<
 * 
 * # FIXME: cannot implement. dds_instance_get_key blows up
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_h); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "dds.pyx":2935
 *         return QueryCondition(self, masks, expression, parameters)
 * 
 *     def lookup_instance(self, data):             # <<<<<<<<<<<<<<
 *         '''
 *         Lookup the registered handle for the given data values
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("dds.DataReader.lookup_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_10DataReader_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_34__reduce_cython__(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DataReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DataReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_10DataReader_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_10DataReader_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_10DataReader_36__setstate_cython__(((struct __pyx_obj_3dds_DataReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_10DataReader_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_DataReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.DataReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2995
 *     cdef dds_condition_t _c_handle
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._c_handle = NULL
 * 
 */

/* Python wrapper */
static int __pyx_pw_3dds_9Condition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_9Condition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_3dds_9Condition___cinit__(((struct __pyx_obj_3dds_Condition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_9Condition___cinit__(struct __pyx_obj_3dds_Condition *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":2996
 * 
 *     def __cinit__(self):
 *         self._c_handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_c_handle = NULL;

  /* "dds.pyx":2995
 *     cdef dds_condition_t _c_handle
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._c_handle = NULL
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":2998
 *         self._c_handle = NULL
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle is not NULL:
 *             with nogil:
 */

/* Python wrapper */
static void __pyx_pw_3dds_9Condition_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3dds_9Condition_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3dds_9Condition_2__dealloc__(((struct __pyx_obj_3dds_Condition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3dds_9Condition_2__dealloc__(struct __pyx_obj_3dds_Condition *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "dds.pyx":2999
 * 
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 dds_condition_delete(self._c_handle)
 */
  __pyx_t_1 = ((__pyx_v_self->_c_handle != NULL) != 0);
  if (__pyx_t_1) {

    /* "dds.pyx":3000
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 dds_condition_delete(self._c_handle)
 *         self._c_handle = NULL
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "dds.pyx":3001
 *         if self._c_handle is not NULL:
 *             with nogil:
 *                 dds_condition_delete(self._c_handle)             # <<<<<<<<<<<<<<
 *         self._c_handle = NULL
 * 
 */
          dds_condition_delete(__pyx_v_self->_c_handle);
        }

        /* "dds.pyx":3000
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 dds_condition_delete(self._c_handle)
 *         self._c_handle = NULL
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L6;
          }
          __pyx_L6:;
        }
    }

    /* "dds.pyx":2999
 * 
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 dds_condition_delete(self._c_handle)
 */
  }

  /* "dds.pyx":3002
 *             with nogil:
 *                 dds_condition_delete(self._c_handle)
 *         self._c_handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     cdef set_handle(self, dds_condition_t handle):
 */
  __pyx_v_self->_c_handle = NULL;

  /* "dds.pyx":2998
 *         self._c_handle = NULL
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle is not NULL:
 *             with nogil:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "dds.pyx":3004
 *         self._c_handle = NULL
 * 
 *     cdef set_handle(self, dds_condition_t handle):             # <<<<<<<<<<<<<<
 *         self._c_handle = handle
 * 
 */

static PyObject *__pyx_f_3dds_9Condition_set_handle(struct __pyx_obj_3dds_Condition *__pyx_v_self, dds_condition_t __pyx_v_handle) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_handle", 0);

  /* "dds.pyx":3005
 * 
 *     cdef set_handle(self, dds_condition_t handle):
 *         self._c_handle = handle             # <<<<<<<<<<<<<<
 * 
 *     cdef dds_condition_t get_handle(self):
 */
  __pyx_v_self->_c_handle = __pyx_v_handle;

  /* "dds.pyx":3004
 *         self._c_handle = NULL
 * 
 *     cdef set_handle(self, dds_condition_t handle):             # <<<<<<<<<<<<<<
 *         self._c_handle = handle
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3007
 *         self._c_handle = handle
 * 
 *     cdef dds_condition_t get_handle(self):             # <<<<<<<<<<<<<<
 *         return self._c_handle
 * 
 */

static dds_condition_t __pyx_f_3dds_9Condition_get_handle(struct __pyx_obj_3dds_Condition *__pyx_v_self) {
  dds_condition_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_handle", 0);

  /* "dds.pyx":3008
 * 
 *     cdef dds_condition_t get_handle(self):
 *         return self._c_handle             # <<<<<<<<<<<<<<
 * 
 *     def triggered(self):
 */
  __pyx_r = __pyx_v_self->_c_handle;
  goto __pyx_L0;

  /* "dds.pyx":3007
 *         self._c_handle = handle
 * 
 *     cdef dds_condition_t get_handle(self):             # <<<<<<<<<<<<<<
 *         return self._c_handle
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3010
 *         return self._c_handle
 * 
 *     def triggered(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle != NULL:
 *             return dds.dds_condition_triggered(self._c_handle) #gil_ok
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9Condition_5triggered(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_9Condition_5triggered(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triggered (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_9Condition_4triggered(((struct __pyx_obj_3dds_Condition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9Condition_4triggered(struct __pyx_obj_3dds_Condition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("triggered", 0);

  /* "dds.pyx":3011
 * 
 *     def triggered(self):
 *         if self._c_handle != NULL:             # <<<<<<<<<<<<<<
 *             return dds.dds_condition_triggered(self._c_handle) #gil_ok
 *         return False
 */
  __pyx_t_1 = ((__pyx_v_self->_c_handle != NULL) != 0);
  if (__pyx_t_1) {

    /* "dds.pyx":3012
 *     def triggered(self):
 *         if self._c_handle != NULL:
 *             return dds.dds_condition_triggered(self._c_handle) #gil_ok             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(dds_condition_triggered(__pyx_v_self->_c_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "dds.pyx":3011
 * 
 *     def triggered(self):
 *         if self._c_handle != NULL:             # <<<<<<<<<<<<<<
 *             return dds.dds_condition_triggered(self._c_handle) #gil_ok
 *         return False
 */
  }

  /* "dds.pyx":3013
 *         if self._c_handle != NULL:
 *             return dds.dds_condition_triggered(self._c_handle) #gil_ok
 *         return False             # <<<<<<<<<<<<<<
 * 
 * # The StatusCondition wrapper
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "dds.pyx":3010
 *         return self._c_handle
 * 
 *     def triggered(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle != NULL:
 *             return dds.dds_condition_triggered(self._c_handle) #gil_ok
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds.Condition.triggered", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9Condition_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_9Condition_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_9Condition_6__reduce_cython__(((struct __pyx_obj_3dds_Condition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9Condition_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Condition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Condition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_9Condition_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_9Condition_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_9Condition_8__setstate_cython__(((struct __pyx_obj_3dds_Condition *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_9Condition_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_Condition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.Condition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3026
 *     cdef object _masks
 * 
 *     def __cinit__(self, Entity entity):             # <<<<<<<<<<<<<<
 *         self._entity = entity
 *         cdef dds_entity_t c_entity = entity.handle()
 */

/* Python wrapper */
static int __pyx_pw_3dds_15StatusCondition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_15StatusCondition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_Entity *__pyx_v_entity = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_entity,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_entity)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3026, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_entity = ((struct __pyx_obj_3dds_Entity *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3026, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.StatusCondition.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entity), __pyx_ptype_3dds_Entity, 1, "entity", 0))) __PYX_ERR(0, 3026, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_15StatusCondition___cinit__(((struct __pyx_obj_3dds_StatusCondition *)__pyx_v_self), __pyx_v_entity);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_15StatusCondition___cinit__(struct __pyx_obj_3dds_StatusCondition *__pyx_v_self, struct __pyx_obj_3dds_Entity *__pyx_v_entity) {
  dds_entity_t __pyx_v_c_entity;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":3027
 * 
 *     def __cinit__(self, Entity entity):
 *         self._entity = entity             # <<<<<<<<<<<<<<
 *         cdef dds_entity_t c_entity = entity.handle()
 *         with nogil:
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_entity));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_entity));
  __Pyx_GOTREF(__pyx_v_self->_entity);
  __Pyx_DECREF(__pyx_v_self->_entity);
  __pyx_v_self->_entity = ((PyObject *)__pyx_v_entity);

  /* "dds.pyx":3028
 *     def __cinit__(self, Entity entity):
 *         self._entity = entity
 *         cdef dds_entity_t c_entity = entity.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self._c_handle = dds_statuscondition_get(c_entity)
 */
  __pyx_v_c_entity = ((struct __pyx_vtabstruct_3dds_Entity *)__pyx_v_entity->__pyx_vtab)->handle(__pyx_v_entity);

  /* "dds.pyx":3029
 *         self._entity = entity
 *         cdef dds_entity_t c_entity = entity.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._c_handle = dds_statuscondition_get(c_entity)
 *         if self._c_handle is NULL:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3030
 *         cdef dds_entity_t c_entity = entity.handle()
 *         with nogil:
 *             self._c_handle = dds_statuscondition_get(c_entity)             # <<<<<<<<<<<<<<
 *         if self._c_handle is NULL:
 *             raise DDSException('Failed to create status condition')
 */
        __pyx_v_self->__pyx_base._c_handle = dds_statuscondition_get(__pyx_v_c_entity);
      }

      /* "dds.pyx":3029
 *         self._entity = entity
 *         cdef dds_entity_t c_entity = entity.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._c_handle = dds_statuscondition_get(c_entity)
 *         if self._c_handle is NULL:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3031
 *         with nogil:
 *             self._c_handle = dds_statuscondition_get(c_entity)
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create status condition')
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->__pyx_base._c_handle == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "dds.pyx":3032
 *             self._c_handle = dds_statuscondition_get(c_entity)
 *         if self._c_handle is NULL:
 *             raise DDSException('Failed to create status condition')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Failed_to_create_status_conditio) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Failed_to_create_status_conditio);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3032, __pyx_L1_error)

    /* "dds.pyx":3031
 *         with nogil:
 *             self._c_handle = dds_statuscondition_get(c_entity)
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create status condition')
 * 
 */
  }

  /* "dds.pyx":3026
 *     cdef object _masks
 * 
 *     def __cinit__(self, Entity entity):             # <<<<<<<<<<<<<<
 *         self._entity = entity
 *         cdef dds_entity_t c_entity = entity.handle()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.StatusCondition.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3035
 * 
 *     @property
 *     def entity(self):             # <<<<<<<<<<<<<<
 *         return self._entity
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_15StatusCondition_6entity_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3dds_15StatusCondition_6entity_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_15StatusCondition_6entity___get__(((struct __pyx_obj_3dds_StatusCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_15StatusCondition_6entity___get__(struct __pyx_obj_3dds_StatusCondition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "dds.pyx":3036
 *     @property
 *     def entity(self):
 *         return self._entity             # <<<<<<<<<<<<<<
 * 
 *     def enable_status(self, masks):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_entity);
  __pyx_r = __pyx_v_self->_entity;
  goto __pyx_L0;

  /* "dds.pyx":3035
 * 
 *     @property
 *     def entity(self):             # <<<<<<<<<<<<<<
 *         return self._entity
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3038
 *         return self._entity
 * 
 *     def enable_status(self, masks):             # <<<<<<<<<<<<<<
 * 
 *         self._masks = masks
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_15StatusCondition_3enable_status(PyObject *__pyx_v_self, PyObject *__pyx_v_masks); /*proto*/
static PyObject *__pyx_pw_3dds_15StatusCondition_3enable_status(PyObject *__pyx_v_self, PyObject *__pyx_v_masks) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enable_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_15StatusCondition_2enable_status(((struct __pyx_obj_3dds_StatusCondition *)__pyx_v_self), ((PyObject *)__pyx_v_masks));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_15StatusCondition_2enable_status(struct __pyx_obj_3dds_StatusCondition *__pyx_v_self, PyObject *__pyx_v_masks) {
  uint32_t __pyx_v_mask;
  Py_ssize_t __pyx_v_i;
  dds_entity_t __pyx_v_entity_handle;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  uint32_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("enable_status", 0);

  /* "dds.pyx":3040
 *     def enable_status(self, masks):
 * 
 *         self._masks = masks             # <<<<<<<<<<<<<<
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):
 */
  __Pyx_INCREF(__pyx_v_masks);
  __Pyx_GIVEREF(__pyx_v_masks);
  __Pyx_GOTREF(__pyx_v_self->_masks);
  __Pyx_DECREF(__pyx_v_self->_masks);
  __pyx_v_self->_masks = __pyx_v_masks;

  /* "dds.pyx":3041
 * 
 *         self._masks = masks
 *         cdef uint32_t mask = masks[0].value             # <<<<<<<<<<<<<<
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_mask = __pyx_t_3;

  /* "dds.pyx":3042
 *         self._masks = masks
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):             # <<<<<<<<<<<<<<
 *             mask = mask | masks[i].value
 * 
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_masks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3042, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "dds.pyx":3043
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_entity_t entity_handle = (<Entity>self._entity).get_handle()
 */
    __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Or(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3043, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_mask = __pyx_t_3;
  }

  /* "dds.pyx":3045
 *             mask = mask | masks[i].value
 * 
 *         cdef dds_entity_t entity_handle = (<Entity>self._entity).get_handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_status_set_enabled(entity_handle, mask)
 */
  __pyx_v_entity_handle = ((struct __pyx_vtabstruct_3dds_Entity *)((struct __pyx_obj_3dds_Entity *)__pyx_v_self->_entity)->__pyx_vtab)->get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_self->_entity));

  /* "dds.pyx":3046
 * 
 *         cdef dds_entity_t entity_handle = (<Entity>self._entity).get_handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_status_set_enabled(entity_handle, mask)
 *         if r < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3047
 *         cdef dds_entity_t entity_handle = (<Entity>self._entity).get_handle()
 *         with nogil:
 *             r = dds.dds_status_set_enabled(entity_handle, mask)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to attach condition', r)
 */
        __pyx_v_r = dds_status_set_enabled(__pyx_v_entity_handle, __pyx_v_mask);
      }

      /* "dds.pyx":3046
 * 
 *         cdef dds_entity_t entity_handle = (<Entity>self._entity).get_handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_status_set_enabled(entity_handle, mask)
 *         if r < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "dds.pyx":3048
 *         with nogil:
 *             r = dds.dds_status_set_enabled(entity_handle, mask)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to attach condition', r)
 * 
 */
  __pyx_t_8 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_8)) {

    /* "dds.pyx":3049
 *             r = dds.dds_status_set_enabled(entity_handle, mask)
 *         if r < 0:
 *             raise DDSException('Failed to attach condition', r)             # <<<<<<<<<<<<<<
 * 
 *     def get_enabled_status(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_s_Failed_to_attach_condition, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_s_Failed_to_attach_condition, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_attach_condition);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_attach_condition);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_s_Failed_to_attach_condition);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3049, __pyx_L1_error)

    /* "dds.pyx":3048
 *         with nogil:
 *             r = dds.dds_status_set_enabled(entity_handle, mask)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to attach condition', r)
 * 
 */
  }

  /* "dds.pyx":3038
 *         return self._entity
 * 
 *     def enable_status(self, masks):             # <<<<<<<<<<<<<<
 * 
 *         self._masks = masks
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("dds.StatusCondition.enable_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3051
 *             raise DDSException('Failed to attach condition', r)
 * 
 *     def get_enabled_status(self):             # <<<<<<<<<<<<<<
 *         return self._masks
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_15StatusCondition_5get_enabled_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_15StatusCondition_5get_enabled_status(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_enabled_status (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_15StatusCondition_4get_enabled_status(((struct __pyx_obj_3dds_StatusCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_15StatusCondition_4get_enabled_status(struct __pyx_obj_3dds_StatusCondition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_enabled_status", 0);

  /* "dds.pyx":3052
 * 
 *     def get_enabled_status(self):
 *         return self._masks             # <<<<<<<<<<<<<<
 * 
 * # The GuardCondition wrapper
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_masks);
  __pyx_r = __pyx_v_self->_masks;
  goto __pyx_L0;

  /* "dds.pyx":3051
 *             raise DDSException('Failed to attach condition', r)
 * 
 *     def get_enabled_status(self):             # <<<<<<<<<<<<<<
 *         return self._masks
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_15StatusCondition_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_15StatusCondition_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_15StatusCondition_6__reduce_cython__(((struct __pyx_obj_3dds_StatusCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_15StatusCondition_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_StatusCondition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.StatusCondition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_15StatusCondition_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_15StatusCondition_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_15StatusCondition_8__setstate_cython__(((struct __pyx_obj_3dds_StatusCondition *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_15StatusCondition_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_StatusCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.StatusCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3059
 *     Guard condition
 *     '''
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._c_handle = dds_guardcondition_create() #gil_ok
 *         if self._c_handle is NULL:
 */

/* Python wrapper */
static int __pyx_pw_3dds_14GuardCondition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_14GuardCondition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_3dds_14GuardCondition___cinit__(((struct __pyx_obj_3dds_GuardCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_14GuardCondition___cinit__(struct __pyx_obj_3dds_GuardCondition *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":3060
 *     '''
 *     def __cinit__(self):
 *         self._c_handle = dds_guardcondition_create() #gil_ok             # <<<<<<<<<<<<<<
 *         if self._c_handle is NULL:
 *             raise DDSException('Failed to create guard condition')
 */
  __pyx_v_self->__pyx_base._c_handle = dds_guardcondition_create();

  /* "dds.pyx":3061
 *     def __cinit__(self):
 *         self._c_handle = dds_guardcondition_create() #gil_ok
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create guard condition')
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->__pyx_base._c_handle == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "dds.pyx":3062
 *         self._c_handle = dds_guardcondition_create() #gil_ok
 *         if self._c_handle is NULL:
 *             raise DDSException('Failed to create guard condition')             # <<<<<<<<<<<<<<
 * 
 *     def trigger(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Failed_to_create_guard_condition) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Failed_to_create_guard_condition);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3062, __pyx_L1_error)

    /* "dds.pyx":3061
 *     def __cinit__(self):
 *         self._c_handle = dds_guardcondition_create() #gil_ok
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create guard condition')
 * 
 */
  }

  /* "dds.pyx":3059
 *     Guard condition
 *     '''
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._c_handle = dds_guardcondition_create() #gil_ok
 *         if self._c_handle is NULL:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.GuardCondition.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3064
 *             raise DDSException('Failed to create guard condition')
 * 
 *     def trigger(self):             # <<<<<<<<<<<<<<
 *         ''' Trigger guard condition
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_14GuardCondition_3trigger(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_14GuardCondition_2trigger[] = " Trigger guard condition\n        ";
static PyObject *__pyx_pw_3dds_14GuardCondition_3trigger(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trigger (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_14GuardCondition_2trigger(((struct __pyx_obj_3dds_GuardCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_14GuardCondition_2trigger(struct __pyx_obj_3dds_GuardCondition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trigger", 0);

  /* "dds.pyx":3067
 *         ''' Trigger guard condition
 *         '''
 *         with nogil:             # <<<<<<<<<<<<<<
 *             dds_guard_trigger(self._c_handle)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3068
 *         '''
 *         with nogil:
 *             dds_guard_trigger(self._c_handle)             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
        dds_guard_trigger(__pyx_v_self->__pyx_base._c_handle);
      }

      /* "dds.pyx":3067
 *         ''' Trigger guard condition
 *         '''
 *         with nogil:             # <<<<<<<<<<<<<<
 *             dds_guard_trigger(self._c_handle)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3064
 *             raise DDSException('Failed to create guard condition')
 * 
 *     def trigger(self):             # <<<<<<<<<<<<<<
 *         ''' Trigger guard condition
 *         '''
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3070
 *             dds_guard_trigger(self._c_handle)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         ''' Reset guard condition
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_14GuardCondition_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_14GuardCondition_4reset[] = " Reset guard condition\n        ";
static PyObject *__pyx_pw_3dds_14GuardCondition_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_14GuardCondition_4reset(((struct __pyx_obj_3dds_GuardCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_14GuardCondition_4reset(struct __pyx_obj_3dds_GuardCondition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset", 0);

  /* "dds.pyx":3073
 *         ''' Reset guard condition
 *         '''
 *         with nogil:             # <<<<<<<<<<<<<<
 *             dds_guard_reset (self._c_handle)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3074
 *         '''
 *         with nogil:
 *             dds_guard_reset (self._c_handle)             # <<<<<<<<<<<<<<
 * 
 * # The ReadCondition wrapper
 */
        dds_guard_reset(__pyx_v_self->__pyx_base._c_handle);
      }

      /* "dds.pyx":3073
 *         ''' Reset guard condition
 *         '''
 *         with nogil:             # <<<<<<<<<<<<<<
 *             dds_guard_reset (self._c_handle)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3070
 *             dds_guard_trigger(self._c_handle)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         ''' Reset guard condition
 *         '''
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_14GuardCondition_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_14GuardCondition_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_14GuardCondition_6__reduce_cython__(((struct __pyx_obj_3dds_GuardCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_14GuardCondition_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_GuardCondition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.GuardCondition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_14GuardCondition_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_14GuardCondition_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_14GuardCondition_8__setstate_cython__(((struct __pyx_obj_3dds_GuardCondition *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_14GuardCondition_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_GuardCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.GuardCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3090
 *     cdef object _reader
 * 
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):
 */

/* Python wrapper */
static int __pyx_pw_3dds_13ReadCondition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_13ReadCondition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_DataReader *__pyx_v_reader = 0;
  PyObject *__pyx_v_masks = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reader,&__pyx_n_s_masks,0};
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k__36;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_masks);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3090, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_reader = ((struct __pyx_obj_3dds_DataReader *)values[0]);
    __pyx_v_masks = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3090, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.ReadCondition.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reader), __pyx_ptype_3dds_DataReader, 1, "reader", 0))) __PYX_ERR(0, 3090, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_13ReadCondition___cinit__(((struct __pyx_obj_3dds_ReadCondition *)__pyx_v_self), __pyx_v_reader, __pyx_v_masks);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_13ReadCondition___cinit__(struct __pyx_obj_3dds_ReadCondition *__pyx_v_self, struct __pyx_obj_3dds_DataReader *__pyx_v_reader, PyObject *__pyx_v_masks) {
  uint32_t __pyx_v_mask;
  Py_ssize_t __pyx_v_i;
  dds_entity_t __pyx_v_c_entity;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  uint32_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":3091
 * 
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples()):
 *         cdef uint32_t mask = masks[0].value             # <<<<<<<<<<<<<<
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3091, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_mask = __pyx_t_3;

  /* "dds.pyx":3092
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples()):
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):             # <<<<<<<<<<<<<<
 *             mask = mask | masks[i].value
 * 
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_masks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3092, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "dds.pyx":3093
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value             # <<<<<<<<<<<<<<
 * 
 *         self._reader = reader
 */
    __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Or(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3093, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_mask = __pyx_t_3;
  }

  /* "dds.pyx":3095
 *             mask = mask | masks[i].value
 * 
 *         self._reader = reader             # <<<<<<<<<<<<<<
 *         cdef dds_entity_t c_entity = reader.get_handle()
 *         with nogil:
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_reader));
  __Pyx_GOTREF(__pyx_v_self->_reader);
  __Pyx_DECREF(__pyx_v_self->_reader);
  __pyx_v_self->_reader = ((PyObject *)__pyx_v_reader);

  /* "dds.pyx":3096
 * 
 *         self._reader = reader
 *         cdef dds_entity_t c_entity = reader.get_handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self._c_handle = dds_readcondition_create(c_entity, mask)
 */
  __pyx_v_c_entity = ((struct __pyx_vtabstruct_3dds_DataReader *)__pyx_v_reader->__pyx_base.__pyx_vtab)->__pyx_base.get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_reader));

  /* "dds.pyx":3097
 *         self._reader = reader
 *         cdef dds_entity_t c_entity = reader.get_handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._c_handle = dds_readcondition_create(c_entity, mask)
 *         if self._c_handle is NULL:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3098
 *         cdef dds_entity_t c_entity = reader.get_handle()
 *         with nogil:
 *             self._c_handle = dds_readcondition_create(c_entity, mask)             # <<<<<<<<<<<<<<
 *         if self._c_handle is NULL:
 *             raise DDSException('Failed to create read condition')
 */
        __pyx_v_self->__pyx_base._c_handle = dds_readcondition_create(__pyx_v_c_entity, __pyx_v_mask);
      }

      /* "dds.pyx":3097
 *         self._reader = reader
 *         cdef dds_entity_t c_entity = reader.get_handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._c_handle = dds_readcondition_create(c_entity, mask)
 *         if self._c_handle is NULL:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "dds.pyx":3099
 *         with nogil:
 *             self._c_handle = dds_readcondition_create(c_entity, mask)
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create read condition')
 * 
 */
  __pyx_t_8 = ((__pyx_v_self->__pyx_base._c_handle == NULL) != 0);
  if (unlikely(__pyx_t_8)) {

    /* "dds.pyx":3100
 *             self._c_handle = dds_readcondition_create(c_entity, mask)
 *         if self._c_handle is NULL:
 *             raise DDSException('Failed to create read condition')             # <<<<<<<<<<<<<<
 * 
 * # The QueryCondition wrapper
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_kp_s_Failed_to_create_read_condition) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_Failed_to_create_read_condition);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3100, __pyx_L1_error)

    /* "dds.pyx":3099
 *         with nogil:
 *             self._c_handle = dds_readcondition_create(c_entity, mask)
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create read condition')
 * 
 */
  }

  /* "dds.pyx":3090
 *     cdef object _reader
 * 
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds.ReadCondition.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_13ReadCondition_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_13ReadCondition_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_13ReadCondition_2__reduce_cython__(((struct __pyx_obj_3dds_ReadCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_13ReadCondition_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_ReadCondition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.ReadCondition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_13ReadCondition_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_13ReadCondition_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_13ReadCondition_4__setstate_cython__(((struct __pyx_obj_3dds_ReadCondition *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_13ReadCondition_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_ReadCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.ReadCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3122
 *     cdef object _reader
 * 
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples(), expression = '', parameters=[]):             # <<<<<<<<<<<<<<
 *         self._reader = reader
 * 
 */

/* Python wrapper */
static int __pyx_pw_3dds_14QueryCondition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_14QueryCondition_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3dds_DataReader *__pyx_v_reader = 0;
  PyObject *__pyx_v_masks = 0;
  PyObject *__pyx_v_expression = 0;
  PyObject *__pyx_v_parameters = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reader,&__pyx_n_s_masks,&__pyx_n_s_expression,&__pyx_n_s_parameters,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = __pyx_k__39;
    values[2] = ((PyObject *)__pyx_kp_s_);
    values[3] = __pyx_k__40;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_masks);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_expression);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parameters);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3122, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_reader = ((struct __pyx_obj_3dds_DataReader *)values[0]);
    __pyx_v_masks = values[1];
    __pyx_v_expression = values[2];
    __pyx_v_parameters = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3122, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.QueryCondition.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reader), __pyx_ptype_3dds_DataReader, 1, "reader", 0))) __PYX_ERR(0, 3122, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_14QueryCondition___cinit__(((struct __pyx_obj_3dds_QueryCondition *)__pyx_v_self), __pyx_v_reader, __pyx_v_masks, __pyx_v_expression, __pyx_v_parameters);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_14QueryCondition___cinit__(struct __pyx_obj_3dds_QueryCondition *__pyx_v_self, struct __pyx_obj_3dds_DataReader *__pyx_v_reader, PyObject *__pyx_v_masks, PyObject *__pyx_v_expression, PyObject *__pyx_v_parameters) {
  uint32_t __pyx_v_mask;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_p = NULL;
  uint32_t __pyx_v_numpar;
  char **__pyx_v__c_parameters;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_expression_bytes = NULL;
  char *__pyx_v_c_expression;
  dds_entity_t __pyx_v_c_entity;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  uint32_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  uint32_t __pyx_t_12;
  char *__pyx_t_13;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":3123
 * 
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples(), expression = '', parameters=[]):
 *         self._reader = reader             # <<<<<<<<<<<<<<
 * 
 *         cdef uint32_t mask = masks[0].value
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_reader));
  __Pyx_GOTREF(__pyx_v_self->_reader);
  __Pyx_DECREF(__pyx_v_self->_reader);
  __pyx_v_self->_reader = ((PyObject *)__pyx_v_reader);

  /* "dds.pyx":3125
 *         self._reader = reader
 * 
 *         cdef uint32_t mask = masks[0].value             # <<<<<<<<<<<<<<
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_mask = __pyx_t_3;

  /* "dds.pyx":3126
 * 
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):             # <<<<<<<<<<<<<<
 *             mask = mask | masks[i].value
 * 
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_masks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3126, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "dds.pyx":3127
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):
 *             mask = mask | masks[i].value             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(expression, str):
 */
    __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_masks, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Or(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3127, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_mask = __pyx_t_3;
  }

  /* "dds.pyx":3129
 *             mask = mask | masks[i].value
 * 
 *         if not isinstance(expression, str):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_8 = PyString_Check(__pyx_v_expression); 
  __pyx_t_9 = ((!(__pyx_t_8 != 0)) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "dds.pyx":3130
 * 
 *         if not isinstance(expression, str):
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         for p in parameters:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3130, __pyx_L1_error)

    /* "dds.pyx":3129
 *             mask = mask | masks[i].value
 * 
 *         if not isinstance(expression, str):             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":3132
 *             raise DDSException('Bad parameter')
 * 
 *         for p in parameters:             # <<<<<<<<<<<<<<
 *             if not isinstance(p, str):
 *                 raise DDSException('Bad parameter')
 */
  if (likely(PyList_CheckExact(__pyx_v_parameters)) || PyTuple_CheckExact(__pyx_v_parameters)) {
    __pyx_t_1 = __pyx_v_parameters; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_parameters); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3132, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3132, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3132, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3132, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3132, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_10(__pyx_t_1);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3132, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "dds.pyx":3133
 * 
 *         for p in parameters:
 *             if not isinstance(p, str):             # <<<<<<<<<<<<<<
 *                 raise DDSException('Bad parameter')
 * 
 */
    __pyx_t_9 = PyString_Check(__pyx_v_p); 
    __pyx_t_8 = ((!(__pyx_t_9 != 0)) != 0);
    if (unlikely(__pyx_t_8)) {

      /* "dds.pyx":3134
 *         for p in parameters:
 *             if not isinstance(p, str):
 *                 raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         cdef uint32_t numpar = <uint32_t>len(parameters)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Bad_parameter);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 3134, __pyx_L1_error)

      /* "dds.pyx":3133
 * 
 *         for p in parameters:
 *             if not isinstance(p, str):             # <<<<<<<<<<<<<<
 *                 raise DDSException('Bad parameter')
 * 
 */
    }

    /* "dds.pyx":3132
 *             raise DDSException('Bad parameter')
 * 
 *         for p in parameters:             # <<<<<<<<<<<<<<
 *             if not isinstance(p, str):
 *                 raise DDSException('Bad parameter')
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":3136
 *                 raise DDSException('Bad parameter')
 * 
 *         cdef uint32_t numpar = <uint32_t>len(parameters)             # <<<<<<<<<<<<<<
 *         cdef char **_c_parameters = NULL;
 *         if numpar > 0:
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_parameters); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3136, __pyx_L1_error)
  __pyx_v_numpar = ((uint32_t)__pyx_t_4);

  /* "dds.pyx":3137
 * 
 *         cdef uint32_t numpar = <uint32_t>len(parameters)
 *         cdef char **_c_parameters = NULL;             # <<<<<<<<<<<<<<
 *         if numpar > 0:
 *             _c_parameters = <char **>PyMem_Malloc(numpar * sizeof(char *))
 */
  __pyx_v__c_parameters = NULL;

  /* "dds.pyx":3138
 *         cdef uint32_t numpar = <uint32_t>len(parameters)
 *         cdef char **_c_parameters = NULL;
 *         if numpar > 0:             # <<<<<<<<<<<<<<
 *             _c_parameters = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *             if _c_parameters is NULL:
 */
  __pyx_t_8 = ((__pyx_v_numpar > 0) != 0);
  if (__pyx_t_8) {

    /* "dds.pyx":3139
 *         cdef char **_c_parameters = NULL;
 *         if numpar > 0:
 *             _c_parameters = <char **>PyMem_Malloc(numpar * sizeof(char *))             # <<<<<<<<<<<<<<
 *             if _c_parameters is NULL:
 *                 raise DDSException()
 */
    __pyx_v__c_parameters = ((char **)PyMem_Malloc((__pyx_v_numpar * (sizeof(char *)))));

    /* "dds.pyx":3140
 *         if numpar > 0:
 *             _c_parameters = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *             if _c_parameters is NULL:             # <<<<<<<<<<<<<<
 *                 raise DDSException()
 *             for i in range(numpar):
 */
    __pyx_t_8 = ((__pyx_v__c_parameters == NULL) != 0);
    if (unlikely(__pyx_t_8)) {

      /* "dds.pyx":3141
 *             _c_parameters = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *             if _c_parameters is NULL:
 *                 raise DDSException()             # <<<<<<<<<<<<<<
 *             for i in range(numpar):
 *                 s = parameters[i].encode()
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 3141, __pyx_L1_error)

      /* "dds.pyx":3140
 *         if numpar > 0:
 *             _c_parameters = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *             if _c_parameters is NULL:             # <<<<<<<<<<<<<<
 *                 raise DDSException()
 *             for i in range(numpar):
 */
    }

    /* "dds.pyx":3142
 *             if _c_parameters is NULL:
 *                 raise DDSException()
 *             for i in range(numpar):             # <<<<<<<<<<<<<<
 *                 s = parameters[i].encode()
 *                 _c_parameters[i] = s
 */
    __pyx_t_3 = __pyx_v_numpar;
    __pyx_t_12 = __pyx_t_3;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_12; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "dds.pyx":3143
 *                 raise DDSException()
 *             for i in range(numpar):
 *                 s = parameters[i].encode()             # <<<<<<<<<<<<<<
 *                 _c_parameters[i] = s
 *         expression_bytes = expression.encode('ISO-8859-1')
 */
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_parameters, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "dds.pyx":3144
 *             for i in range(numpar):
 *                 s = parameters[i].encode()
 *                 _c_parameters[i] = s             # <<<<<<<<<<<<<<
 *         expression_bytes = expression.encode('ISO-8859-1')
 *         cdef char *c_expression = expression_bytes
 */
      __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 3144, __pyx_L1_error)
      (__pyx_v__c_parameters[__pyx_v_i]) = __pyx_t_13;
    }

    /* "dds.pyx":3138
 *         cdef uint32_t numpar = <uint32_t>len(parameters)
 *         cdef char **_c_parameters = NULL;
 *         if numpar > 0:             # <<<<<<<<<<<<<<
 *             _c_parameters = <char **>PyMem_Malloc(numpar * sizeof(char *))
 *             if _c_parameters is NULL:
 */
  }

  /* "dds.pyx":3145
 *                 s = parameters[i].encode()
 *                 _c_parameters[i] = s
 *         expression_bytes = expression.encode('ISO-8859-1')             # <<<<<<<<<<<<<<
 *         cdef char *c_expression = expression_bytes
 *         cdef dds_entity_t c_entity = reader.get_handle()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expression, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_kp_s_ISO_8859_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_ISO_8859_1);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_expression_bytes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":3146
 *                 _c_parameters[i] = s
 *         expression_bytes = expression.encode('ISO-8859-1')
 *         cdef char *c_expression = expression_bytes             # <<<<<<<<<<<<<<
 *         cdef dds_entity_t c_entity = reader.get_handle()
 *         with nogil:
 */
  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_expression_bytes); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 3146, __pyx_L1_error)
  __pyx_v_c_expression = __pyx_t_13;

  /* "dds.pyx":3147
 *         expression_bytes = expression.encode('ISO-8859-1')
 *         cdef char *c_expression = expression_bytes
 *         cdef dds_entity_t c_entity = reader.get_handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             self._c_handle = dds_querycondition_create_sql(c_entity, mask, c_expression, <const char **>_c_parameters, numpar)
 */
  __pyx_v_c_entity = ((struct __pyx_vtabstruct_3dds_DataReader *)__pyx_v_reader->__pyx_base.__pyx_vtab)->__pyx_base.get_handle(((struct __pyx_obj_3dds_Entity *)__pyx_v_reader));

  /* "dds.pyx":3148
 *         cdef char *c_expression = expression_bytes
 *         cdef dds_entity_t c_entity = reader.get_handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._c_handle = dds_querycondition_create_sql(c_entity, mask, c_expression, <const char **>_c_parameters, numpar)
 *         PyMem_Free(_c_parameters)
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3149
 *         cdef dds_entity_t c_entity = reader.get_handle()
 *         with nogil:
 *             self._c_handle = dds_querycondition_create_sql(c_entity, mask, c_expression, <const char **>_c_parameters, numpar)             # <<<<<<<<<<<<<<
 *         PyMem_Free(_c_parameters)
 *         if self._c_handle is NULL:
 */
        __pyx_v_self->__pyx_base._c_handle = dds_querycondition_create_sql(__pyx_v_c_entity, __pyx_v_mask, __pyx_v_c_expression, ((char const **)__pyx_v__c_parameters), __pyx_v_numpar);
      }

      /* "dds.pyx":3148
 *         cdef char *c_expression = expression_bytes
 *         cdef dds_entity_t c_entity = reader.get_handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             self._c_handle = dds_querycondition_create_sql(c_entity, mask, c_expression, <const char **>_c_parameters, numpar)
 *         PyMem_Free(_c_parameters)
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L15;
        }
        __pyx_L15:;
      }
  }

  /* "dds.pyx":3150
 *         with nogil:
 *             self._c_handle = dds_querycondition_create_sql(c_entity, mask, c_expression, <const char **>_c_parameters, numpar)
 *         PyMem_Free(_c_parameters)             # <<<<<<<<<<<<<<
 *         if self._c_handle is NULL:
 *             raise DDSException('Failed to create query condition')
 */
  PyMem_Free(__pyx_v__c_parameters);

  /* "dds.pyx":3151
 *             self._c_handle = dds_querycondition_create_sql(c_entity, mask, c_expression, <const char **>_c_parameters, numpar)
 *         PyMem_Free(_c_parameters)
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create query condition')
 * 
 */
  __pyx_t_8 = ((__pyx_v_self->__pyx_base._c_handle == NULL) != 0);
  if (unlikely(__pyx_t_8)) {

    /* "dds.pyx":3152
 *         PyMem_Free(_c_parameters)
 *         if self._c_handle is NULL:
 *             raise DDSException('Failed to create query condition')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_kp_s_Failed_to_create_query_condition) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Failed_to_create_query_condition);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3152, __pyx_L1_error)

    /* "dds.pyx":3151
 *             self._c_handle = dds_querycondition_create_sql(c_entity, mask, c_expression, <const char **>_c_parameters, numpar)
 *         PyMem_Free(_c_parameters)
 *         if self._c_handle is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to create query condition')
 * 
 */
  }

  /* "dds.pyx":3122
 *     cdef object _reader
 * 
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples(), expression = '', parameters=[]):             # <<<<<<<<<<<<<<
 *         self._reader = reader
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("dds.QueryCondition.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_expression_bytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_14QueryCondition_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_14QueryCondition_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_14QueryCondition_2__reduce_cython__(((struct __pyx_obj_3dds_QueryCondition *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_14QueryCondition_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_QueryCondition *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.QueryCondition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_14QueryCondition_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_14QueryCondition_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_14QueryCondition_4__setstate_cython__(((struct __pyx_obj_3dds_QueryCondition *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_14QueryCondition_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_QueryCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.QueryCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3163
 *     cdef object _conditions
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._c_handle = dds_waitset_create() # gil_ok
 *         self._conditions = {}
 */

/* Python wrapper */
static int __pyx_pw_3dds_7WaitSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_7WaitSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_3dds_7WaitSet___cinit__(((struct __pyx_obj_3dds_WaitSet *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_7WaitSet___cinit__(struct __pyx_obj_3dds_WaitSet *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":3164
 * 
 *     def __cinit__(self):
 *         self._c_handle = dds_waitset_create() # gil_ok             # <<<<<<<<<<<<<<
 *         self._conditions = {}
 * 
 */
  __pyx_v_self->_c_handle = dds_waitset_create();

  /* "dds.pyx":3165
 *     def __cinit__(self):
 *         self._c_handle = dds_waitset_create() # gil_ok
 *         self._conditions = {}             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_conditions);
  __Pyx_DECREF(__pyx_v_self->_conditions);
  __pyx_v_self->_conditions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":3163
 *     cdef object _conditions
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._c_handle = dds_waitset_create() # gil_ok
 *         self._conditions = {}
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.WaitSet.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3167
 *         self._conditions = {}
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle is not NULL:
 *             dds_waitset_delete(self._c_handle) # gil_ok
 */

/* Python wrapper */
static void __pyx_pw_3dds_7WaitSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3dds_7WaitSet_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3dds_7WaitSet_2__dealloc__(((struct __pyx_obj_3dds_WaitSet *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3dds_7WaitSet_2__dealloc__(struct __pyx_obj_3dds_WaitSet *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "dds.pyx":3168
 * 
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:             # <<<<<<<<<<<<<<
 *             dds_waitset_delete(self._c_handle) # gil_ok
 *         self._c_handle = NULL
 */
  __pyx_t_1 = ((__pyx_v_self->_c_handle != NULL) != 0);
  if (__pyx_t_1) {

    /* "dds.pyx":3169
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:
 *             dds_waitset_delete(self._c_handle) # gil_ok             # <<<<<<<<<<<<<<
 *         self._c_handle = NULL
 * 
 */
    (void)(dds_waitset_delete(__pyx_v_self->_c_handle));

    /* "dds.pyx":3168
 * 
 *     def __dealloc__(self):
 *         if self._c_handle is not NULL:             # <<<<<<<<<<<<<<
 *             dds_waitset_delete(self._c_handle) # gil_ok
 *         self._c_handle = NULL
 */
  }

  /* "dds.pyx":3170
 *         if self._c_handle is not NULL:
 *             dds_waitset_delete(self._c_handle) # gil_ok
 *         self._c_handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     def get_conditions(self):
 */
  __pyx_v_self->_c_handle = NULL;

  /* "dds.pyx":3167
 *         self._conditions = {}
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._c_handle is not NULL:
 *             dds_waitset_delete(self._c_handle) # gil_ok
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "dds.pyx":3172
 *         self._c_handle = NULL
 * 
 *     def get_conditions(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return conditions
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_7WaitSet_5get_conditions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_7WaitSet_4get_conditions[] = "\n        Return conditions\n        ";
static PyObject *__pyx_pw_3dds_7WaitSet_5get_conditions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_conditions (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_7WaitSet_4get_conditions(((struct __pyx_obj_3dds_WaitSet *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_7WaitSet_4get_conditions(struct __pyx_obj_3dds_WaitSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_conditions", 0);

  /* "dds.pyx":3176
 *         Return conditions
 *         '''
 *         return self._conditions             # <<<<<<<<<<<<<<
 * 
 *     def attach(self, Condition cond):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_conditions);
  __pyx_r = __pyx_v_self->_conditions;
  goto __pyx_L0;

  /* "dds.pyx":3172
 *         self._c_handle = NULL
 * 
 *     def get_conditions(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Return conditions
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3178
 *         return self._conditions
 * 
 *     def attach(self, Condition cond):             # <<<<<<<<<<<<<<
 *         '''attach(Condition cond)
 *         Attach condition
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_7WaitSet_7attach(PyObject *__pyx_v_self, PyObject *__pyx_v_cond); /*proto*/
static char __pyx_doc_3dds_7WaitSet_6attach[] = "attach(Condition cond)\n        Attach condition\n        :type cond: Condition\n        :param cond: condition to attach\n        ";
static PyObject *__pyx_pw_3dds_7WaitSet_7attach(PyObject *__pyx_v_self, PyObject *__pyx_v_cond) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("attach (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cond), __pyx_ptype_3dds_Condition, 1, "cond", 0))) __PYX_ERR(0, 3178, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_7WaitSet_6attach(((struct __pyx_obj_3dds_WaitSet *)__pyx_v_self), ((struct __pyx_obj_3dds_Condition *)__pyx_v_cond));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_7WaitSet_6attach(struct __pyx_obj_3dds_WaitSet *__pyx_v_self, struct __pyx_obj_3dds_Condition *__pyx_v_cond) {
  intptr_t __pyx_v_key;
  dds_waitset_t __pyx_v_c_ws;
  dds_condition_t __pyx_v_c_cond;
  dds_attach_t __pyx_v_c_attach;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  dds_waitset_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("attach", 0);

  /* "dds.pyx":3184
 *         :param cond: condition to attach
 *         '''
 *         key = <intptr_t>cond.get_handle()             # <<<<<<<<<<<<<<
 *         if key is 0:
 *             raise DDSException('Bad parameter')
 */
  __pyx_v_key = ((intptr_t)((struct __pyx_vtabstruct_3dds_Condition *)__pyx_v_cond->__pyx_vtab)->get_handle(__pyx_v_cond));

  /* "dds.pyx":3185
 *         '''
 *         key = <intptr_t>cond.get_handle()
 *         if key is 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 *         if key in self._conditions:
 */
  __pyx_t_1 = ((__pyx_v_key == 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "dds.pyx":3186
 *         key = <intptr_t>cond.get_handle()
 *         if key is 0:
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 *         if key in self._conditions:
 *             return
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3186, __pyx_L1_error)

    /* "dds.pyx":3185
 *         '''
 *         key = <intptr_t>cond.get_handle()
 *         if key is 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 *         if key in self._conditions:
 */
  }

  /* "dds.pyx":3187
 *         if key is 0:
 *             raise DDSException('Bad parameter')
 *         if key in self._conditions:             # <<<<<<<<<<<<<<
 *             return
 *         cdef dds_waitset_t c_ws = self._c_handle
 */
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_v_self->_conditions, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__pyx_t_1 != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":3188
 *             raise DDSException('Bad parameter')
 *         if key in self._conditions:
 *             return             # <<<<<<<<<<<<<<
 *         cdef dds_waitset_t c_ws = self._c_handle
 *         cdef dds_condition_t c_cond = cond.get_handle()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "dds.pyx":3187
 *         if key is 0:
 *             raise DDSException('Bad parameter')
 *         if key in self._conditions:             # <<<<<<<<<<<<<<
 *             return
 *         cdef dds_waitset_t c_ws = self._c_handle
 */
  }

  /* "dds.pyx":3189
 *         if key in self._conditions:
 *             return
 *         cdef dds_waitset_t c_ws = self._c_handle             # <<<<<<<<<<<<<<
 *         cdef dds_condition_t c_cond = cond.get_handle()
 *         cdef dds_attach_t c_attach = c_cond
 */
  __pyx_t_6 = __pyx_v_self->_c_handle;
  __pyx_v_c_ws = __pyx_t_6;

  /* "dds.pyx":3190
 *             return
 *         cdef dds_waitset_t c_ws = self._c_handle
 *         cdef dds_condition_t c_cond = cond.get_handle()             # <<<<<<<<<<<<<<
 *         cdef dds_attach_t c_attach = c_cond
 *         with nogil:
 */
  __pyx_v_c_cond = ((struct __pyx_vtabstruct_3dds_Condition *)__pyx_v_cond->__pyx_vtab)->get_handle(__pyx_v_cond);

  /* "dds.pyx":3191
 *         cdef dds_waitset_t c_ws = self._c_handle
 *         cdef dds_condition_t c_cond = cond.get_handle()
 *         cdef dds_attach_t c_attach = c_cond             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds_waitset_attach(c_ws, c_cond, c_attach)
 */
  __pyx_v_c_attach = __pyx_v_c_cond;

  /* "dds.pyx":3192
 *         cdef dds_condition_t c_cond = cond.get_handle()
 *         cdef dds_attach_t c_attach = c_cond
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds_waitset_attach(c_ws, c_cond, c_attach)
 *         if r < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3193
 *         cdef dds_attach_t c_attach = c_cond
 *         with nogil:
 *             r = dds_waitset_attach(c_ws, c_cond, c_attach)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to attach condition', r)
 */
        __pyx_v_r = dds_waitset_attach(__pyx_v_c_ws, __pyx_v_c_cond, __pyx_v_c_attach);
      }

      /* "dds.pyx":3192
 *         cdef dds_condition_t c_cond = cond.get_handle()
 *         cdef dds_attach_t c_attach = c_cond
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds_waitset_attach(c_ws, c_cond, c_attach)
 *         if r < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "dds.pyx":3194
 *         with nogil:
 *             r = dds_waitset_attach(c_ws, c_cond, c_attach)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to attach condition', r)
 *         self._conditions[key] = cond
 */
  __pyx_t_5 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":3195
 *             r = dds_waitset_attach(c_ws, c_cond, c_attach)
 *         if r < 0:
 *             raise DDSException('Failed to attach condition', r)             # <<<<<<<<<<<<<<
 *         self._conditions[key] = cond
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_attach_condition, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3195, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Failed_to_attach_condition, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3195, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_attach_condition);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_attach_condition);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Failed_to_attach_condition);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3195, __pyx_L1_error)

    /* "dds.pyx":3194
 *         with nogil:
 *             r = dds_waitset_attach(c_ws, c_cond, c_attach)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to attach condition', r)
 *         self._conditions[key] = cond
 */
  }

  /* "dds.pyx":3196
 *         if r < 0:
 *             raise DDSException('Failed to attach condition', r)
 *         self._conditions[key] = cond             # <<<<<<<<<<<<<<
 * 
 *     def detach(self, Condition cond):
 */
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self->_conditions, __pyx_v_key, ((PyObject *)__pyx_v_cond), intptr_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(0, 3196, __pyx_L1_error)

  /* "dds.pyx":3178
 *         return self._conditions
 * 
 *     def attach(self, Condition cond):             # <<<<<<<<<<<<<<
 *         '''attach(Condition cond)
 *         Attach condition
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.WaitSet.attach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3198
 *         self._conditions[key] = cond
 * 
 *     def detach(self, Condition cond):             # <<<<<<<<<<<<<<
 *         '''detach(Condition cond)
 *         Detach condition
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_7WaitSet_9detach(PyObject *__pyx_v_self, PyObject *__pyx_v_cond); /*proto*/
static char __pyx_doc_3dds_7WaitSet_8detach[] = "detach(Condition cond)\n        Detach condition\n\n        :type cond: Condition\n        :param cond: condition to detach\n        ";
static PyObject *__pyx_pw_3dds_7WaitSet_9detach(PyObject *__pyx_v_self, PyObject *__pyx_v_cond) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("detach (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cond), __pyx_ptype_3dds_Condition, 1, "cond", 0))) __PYX_ERR(0, 3198, __pyx_L1_error)
  __pyx_r = __pyx_pf_3dds_7WaitSet_8detach(((struct __pyx_obj_3dds_WaitSet *)__pyx_v_self), ((struct __pyx_obj_3dds_Condition *)__pyx_v_cond));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_7WaitSet_8detach(struct __pyx_obj_3dds_WaitSet *__pyx_v_self, struct __pyx_obj_3dds_Condition *__pyx_v_cond) {
  intptr_t __pyx_v_key;
  dds_condition_t __pyx_v_c_cond;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("detach", 0);

  /* "dds.pyx":3206
 *         '''
 * 
 *         key = <intptr_t>cond.get_handle()             # <<<<<<<<<<<<<<
 *         if key is 0:
 *             raise DDSException('Bad parameter')
 */
  __pyx_v_key = ((intptr_t)((struct __pyx_vtabstruct_3dds_Condition *)__pyx_v_cond->__pyx_vtab)->get_handle(__pyx_v_cond));

  /* "dds.pyx":3207
 * 
 *         key = <intptr_t>cond.get_handle()
 *         if key is 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  __pyx_t_1 = ((__pyx_v_key == 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "dds.pyx":3208
 *         key = <intptr_t>cond.get_handle()
 *         if key is 0:
 *             raise DDSException('Bad parameter')             # <<<<<<<<<<<<<<
 * 
 *         if key not in self._conditions:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Bad_parameter) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Bad_parameter);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3208, __pyx_L1_error)

    /* "dds.pyx":3207
 * 
 *         key = <intptr_t>cond.get_handle()
 *         if key is 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Bad parameter')
 * 
 */
  }

  /* "dds.pyx":3210
 *             raise DDSException('Bad parameter')
 * 
 *         if key not in self._conditions:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_v_self->_conditions, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__pyx_t_1 != 0);
  if (__pyx_t_5) {

    /* "dds.pyx":3211
 * 
 *         if key not in self._conditions:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_condition_t c_cond = cond.get_handle()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "dds.pyx":3210
 *             raise DDSException('Bad parameter')
 * 
 *         if key not in self._conditions:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "dds.pyx":3213
 *             return
 * 
 *         cdef dds_condition_t c_cond = cond.get_handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds_waitset_detach(self._c_handle, c_cond)
 */
  __pyx_v_c_cond = ((struct __pyx_vtabstruct_3dds_Condition *)__pyx_v_cond->__pyx_vtab)->get_handle(__pyx_v_cond);

  /* "dds.pyx":3214
 * 
 *         cdef dds_condition_t c_cond = cond.get_handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds_waitset_detach(self._c_handle, c_cond)
 *         if r < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3215
 *         cdef dds_condition_t c_cond = cond.get_handle()
 *         with nogil:
 *             r = dds_waitset_detach(self._c_handle, c_cond)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException('Failed to attach condition', r)
 */
        __pyx_v_r = dds_waitset_detach(__pyx_v_self->_c_handle, __pyx_v_c_cond);
      }

      /* "dds.pyx":3214
 * 
 *         cdef dds_condition_t c_cond = cond.get_handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds_waitset_detach(self._c_handle, c_cond)
 *         if r < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "dds.pyx":3216
 *         with nogil:
 *             r = dds_waitset_detach(self._c_handle, c_cond)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to attach condition', r)
 * 
 */
  __pyx_t_5 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":3217
 *             r = dds_waitset_detach(self._c_handle, c_cond)
 *         if r < 0:
 *             raise DDSException('Failed to attach condition', r)             # <<<<<<<<<<<<<<
 * 
 *         del self._conditions[key]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Failed_to_attach_condition, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3217, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Failed_to_attach_condition, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3217, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_attach_condition);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_attach_condition);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_Failed_to_attach_condition);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3217, __pyx_L1_error)

    /* "dds.pyx":3216
 *         with nogil:
 *             r = dds_waitset_detach(self._c_handle, c_cond)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException('Failed to attach condition', r)
 * 
 */
  }

  /* "dds.pyx":3219
 *             raise DDSException('Failed to attach condition', r)
 * 
 *         del self._conditions[key]             # <<<<<<<<<<<<<<
 * 
 *     def wait(self, timeout = DDSDuration.infinity()):
 */
  if (unlikely(__Pyx_DelItemInt(__pyx_v_self->_conditions, __pyx_v_key, intptr_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(0, 3219, __pyx_L1_error)

  /* "dds.pyx":3198
 *         self._conditions[key] = cond
 * 
 *     def detach(self, Condition cond):             # <<<<<<<<<<<<<<
 *         '''detach(Condition cond)
 *         Detach condition
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.WaitSet.detach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3221
 *         del self._conditions[key]
 * 
 *     def wait(self, timeout = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         '''wait(timeout = DDSDuration.infinity())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_7WaitSet_11wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_3dds_7WaitSet_10wait[] = "wait(timeout = DDSDuration.infinity())\n\n        Wait for any of the conditions attached to the waitset to be triggered\n\n        :type timeout: DDSDuration\n        :param timeout: timeout in seconds(default: infinity)\n\n        :rtype: list\n        :return: list of :class:`.Condition` objects that were triggered. list is empty if timeout expired\n        ";
static PyObject *__pyx_pw_3dds_7WaitSet_11wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_timeout = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wait (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
    PyObject* values[1] = {0};
    values[0] = __pyx_k__43;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait") < 0)) __PYX_ERR(0, 3221, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_timeout = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wait", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3221, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.WaitSet.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_7WaitSet_10wait(((struct __pyx_obj_3dds_WaitSet *)__pyx_v_self), __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_7WaitSet_10wait(struct __pyx_obj_3dds_WaitSet *__pyx_v_self, PyObject *__pyx_v_timeout) {
  PyObject *__pyx_v_conditions = NULL;
  dds_duration_t __pyx_v__c_timeout;
  dds_attach_t *__pyx_v__c_conditions;
  size_t __pyx_v_condlen;
  int __pyx_v_r;
  int __pyx_v_i;
  intptr_t __pyx_v_key;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  dds_duration_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("wait", 0);

  /* "dds.pyx":3233
 *         '''
 * 
 *         conditions = []             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_duration_t _c_timeout = timeout.value
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_conditions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":3235
 *         conditions = []
 * 
 *         cdef dds_duration_t _c_timeout = timeout.value             # <<<<<<<<<<<<<<
 * 
 *         cdef dds_attach_t *_c_conditions = < dds_attach_t *>malloc(len(self._conditions) * sizeof(dds_attach_t))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((dds_duration_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v__c_timeout = __pyx_t_2;

  /* "dds.pyx":3237
 *         cdef dds_duration_t _c_timeout = timeout.value
 * 
 *         cdef dds_attach_t *_c_conditions = < dds_attach_t *>malloc(len(self._conditions) * sizeof(dds_attach_t))             # <<<<<<<<<<<<<<
 *         if _c_conditions is NULL:
 *             raise DDSException("No condition attached")
 */
  __pyx_t_1 = __pyx_v_self->_conditions;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v__c_conditions = ((dds_attach_t *)malloc((__pyx_t_3 * (sizeof(dds_attach_t)))));

  /* "dds.pyx":3238
 * 
 *         cdef dds_attach_t *_c_conditions = < dds_attach_t *>malloc(len(self._conditions) * sizeof(dds_attach_t))
 *         if _c_conditions is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException("No condition attached")
 * 
 */
  __pyx_t_4 = ((__pyx_v__c_conditions == NULL) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":3239
 *         cdef dds_attach_t *_c_conditions = < dds_attach_t *>malloc(len(self._conditions) * sizeof(dds_attach_t))
 *         if _c_conditions is NULL:
 *             raise DDSException("No condition attached")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t condlen = len(self._conditions)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_s_No_condition_attached) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_No_condition_attached);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3239, __pyx_L1_error)

    /* "dds.pyx":3238
 * 
 *         cdef dds_attach_t *_c_conditions = < dds_attach_t *>malloc(len(self._conditions) * sizeof(dds_attach_t))
 *         if _c_conditions is NULL:             # <<<<<<<<<<<<<<
 *             raise DDSException("No condition attached")
 * 
 */
  }

  /* "dds.pyx":3241
 *             raise DDSException("No condition attached")
 * 
 *         cdef size_t condlen = len(self._conditions)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds_waitset_wait(self._c_handle, _c_conditions, condlen, _c_timeout)
 */
  __pyx_t_1 = __pyx_v_self->_conditions;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_condlen = __pyx_t_3;

  /* "dds.pyx":3242
 * 
 *         cdef size_t condlen = len(self._conditions)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds_waitset_wait(self._c_handle, _c_conditions, condlen, _c_timeout)
 *         if r < 0:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3243
 *         cdef size_t condlen = len(self._conditions)
 *         with nogil:
 *             r = dds_waitset_wait(self._c_handle, _c_conditions, condlen, _c_timeout)             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             raise DDSException("Wait failed", r)
 */
        __pyx_v_r = dds_waitset_wait(__pyx_v_self->_c_handle, __pyx_v__c_conditions, __pyx_v_condlen, __pyx_v__c_timeout);
      }

      /* "dds.pyx":3242
 * 
 *         cdef size_t condlen = len(self._conditions)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds_waitset_wait(self._c_handle, _c_conditions, condlen, _c_timeout)
 *         if r < 0:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "dds.pyx":3244
 *         with nogil:
 *             r = dds_waitset_wait(self._c_handle, _c_conditions, condlen, _c_timeout)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException("Wait failed", r)
 * 
 */
  __pyx_t_4 = ((__pyx_v_r < 0) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "dds.pyx":3245
 *             r = dds_waitset_wait(self._c_handle, _c_conditions, condlen, _c_timeout)
 *         if r < 0:
 *             raise DDSException("Wait failed", r)             # <<<<<<<<<<<<<<
 * 
 *         if r > 0:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Wait_failed, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3245, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_Wait_failed, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3245, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Wait_failed);
      __Pyx_GIVEREF(__pyx_kp_s_Wait_failed);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_s_Wait_failed);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3245, __pyx_L1_error)

    /* "dds.pyx":3244
 *         with nogil:
 *             r = dds_waitset_wait(self._c_handle, _c_conditions, condlen, _c_timeout)
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             raise DDSException("Wait failed", r)
 * 
 */
  }

  /* "dds.pyx":3247
 *             raise DDSException("Wait failed", r)
 * 
 *         if r > 0:             # <<<<<<<<<<<<<<
 *             for i in range(r):
 *                 key = <intptr_t>_c_conditions[i]
 */
  __pyx_t_4 = ((__pyx_v_r > 0) != 0);
  if (__pyx_t_4) {

    /* "dds.pyx":3248
 * 
 *         if r > 0:
 *             for i in range(r):             # <<<<<<<<<<<<<<
 *                 key = <intptr_t>_c_conditions[i]
 *                 conditions.append(self._conditions[key])
 */
    __pyx_t_8 = __pyx_v_r;
    __pyx_t_10 = __pyx_t_8;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "dds.pyx":3249
 *         if r > 0:
 *             for i in range(r):
 *                 key = <intptr_t>_c_conditions[i]             # <<<<<<<<<<<<<<
 *                 conditions.append(self._conditions[key])
 *         return conditions
 */
      __pyx_v_key = ((intptr_t)(__pyx_v__c_conditions[__pyx_v_i]));

      /* "dds.pyx":3250
 *             for i in range(r):
 *                 key = <intptr_t>_c_conditions[i]
 *                 conditions.append(self._conditions[key])             # <<<<<<<<<<<<<<
 *         return conditions
 * 
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->_conditions, __pyx_v_key, intptr_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_conditions, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3250, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "dds.pyx":3247
 *             raise DDSException("Wait failed", r)
 * 
 *         if r > 0:             # <<<<<<<<<<<<<<
 *             for i in range(r):
 *                 key = <intptr_t>_c_conditions[i]
 */
  }

  /* "dds.pyx":3251
 *                 key = <intptr_t>_c_conditions[i]
 *                 conditions.append(self._conditions[key])
 *         return conditions             # <<<<<<<<<<<<<<
 * 
 * cdef class QosProvider:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_conditions);
  __pyx_r = __pyx_v_conditions;
  goto __pyx_L0;

  /* "dds.pyx":3221
 *         del self._conditions[key]
 * 
 *     def wait(self, timeout = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         '''wait(timeout = DDSDuration.infinity())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("dds.WaitSet.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_conditions);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_7WaitSet_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_7WaitSet_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_7WaitSet_12__reduce_cython__(((struct __pyx_obj_3dds_WaitSet *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_7WaitSet_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_WaitSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.WaitSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_7WaitSet_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_7WaitSet_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_7WaitSet_14__setstate_cython__(((struct __pyx_obj_3dds_WaitSet *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_7WaitSet_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_WaitSet *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.WaitSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3267
 * 
 *     # The init function takes a list of QosPolicies
 *     def __cinit__(self, uri, profile):             # <<<<<<<<<<<<<<
 *         uri_bytes = uri.encode('ISO-8859-1')
 *         profile_bytes = profile.encode('ISO-8859.1')
 */

/* Python wrapper */
static int __pyx_pw_3dds_11QosProvider_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3dds_11QosProvider_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_uri = 0;
  PyObject *__pyx_v_profile = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_uri,&__pyx_n_s_profile,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uri)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_profile)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 3267, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3267, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_uri = values[0];
    __pyx_v_profile = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3267, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.QosProvider.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_11QosProvider___cinit__(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self), __pyx_v_uri, __pyx_v_profile);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3dds_11QosProvider___cinit__(struct __pyx_obj_3dds_QosProvider *__pyx_v_self, PyObject *__pyx_v_uri, PyObject *__pyx_v_profile) {
  PyObject *__pyx_v_uri_bytes = NULL;
  PyObject *__pyx_v_profile_bytes = NULL;
  char *__pyx_v_c_uri;
  char *__pyx_v_c_profile;
  int __pyx_v_r;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "dds.pyx":3268
 *     # The init function takes a list of QosPolicies
 *     def __cinit__(self, uri, profile):
 *         uri_bytes = uri.encode('ISO-8859-1')             # <<<<<<<<<<<<<<
 *         profile_bytes = profile.encode('ISO-8859.1')
 *         cdef char *c_uri = uri_bytes
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_uri, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_ISO_8859_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_ISO_8859_1);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_uri_bytes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":3269
 *     def __cinit__(self, uri, profile):
 *         uri_bytes = uri.encode('ISO-8859-1')
 *         profile_bytes = profile.encode('ISO-8859.1')             # <<<<<<<<<<<<<<
 *         cdef char *c_uri = uri_bytes
 *         cdef char *c_profile = profile_bytes
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_profile, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_ISO_8859_1_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_ISO_8859_1_3);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_profile_bytes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "dds.pyx":3270
 *         uri_bytes = uri.encode('ISO-8859-1')
 *         profile_bytes = profile.encode('ISO-8859.1')
 *         cdef char *c_uri = uri_bytes             # <<<<<<<<<<<<<<
 *         cdef char *c_profile = profile_bytes
 *         with nogil:
 */
  __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_uri_bytes); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 3270, __pyx_L1_error)
  __pyx_v_c_uri = __pyx_t_4;

  /* "dds.pyx":3271
 *         profile_bytes = profile.encode('ISO-8859.1')
 *         cdef char *c_uri = uri_bytes
 *         cdef char *c_profile = profile_bytes             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_qosprovider_create(&self._qp, c_uri, c_profile)
 */
  __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_profile_bytes); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 3271, __pyx_L1_error)
  __pyx_v_c_profile = __pyx_t_4;

  /* "dds.pyx":3272
 *         cdef char *c_uri = uri_bytes
 *         cdef char *c_profile = profile_bytes
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_create(&self._qp, c_uri, c_profile)
 *         if r != dds.DDS_RETCODE_OK:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3273
 *         cdef char *c_profile = profile_bytes
 *         with nogil:
 *             r = dds.dds_qosprovider_create(&self._qp, c_uri, c_profile)             # <<<<<<<<<<<<<<
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Qos provider failed", r)
 */
        __pyx_v_r = dds_qosprovider_create((&__pyx_v_self->_qp), __pyx_v_c_uri, __pyx_v_c_profile);
      }

      /* "dds.pyx":3272
 *         cdef char *c_uri = uri_bytes
 *         cdef char *c_profile = profile_bytes
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_create(&self._qp, c_uri, c_profile)
 *         if r != dds.DDS_RETCODE_OK:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3274
 *         with nogil:
 *             r = dds.dds_qosprovider_create(&self._qp, c_uri, c_profile)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Qos provider failed", r)
 * 
 */
  __pyx_t_5 = ((__pyx_v_r != DDS_RETCODE_OK) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "dds.pyx":3275
 *             r = dds.dds_qosprovider_create(&self._qp, c_uri, c_profile)
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Qos provider failed", r)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Qos_provider_failed, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_Qos_provider_failed, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3275, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Qos_provider_failed);
      __Pyx_GIVEREF(__pyx_kp_s_Qos_provider_failed);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_Qos_provider_failed);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3275, __pyx_L1_error)

    /* "dds.pyx":3274
 *         with nogil:
 *             r = dds.dds_qosprovider_create(&self._qp, c_uri, c_profile)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Qos provider failed", r)
 * 
 */
  }

  /* "dds.pyx":3267
 * 
 *     # The init function takes a list of QosPolicies
 *     def __cinit__(self, uri, profile):             # <<<<<<<<<<<<<<
 *         uri_bytes = uri.encode('ISO-8859-1')
 *         profile_bytes = profile.encode('ISO-8859.1')
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.QosProvider.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_uri_bytes);
  __Pyx_XDECREF(__pyx_v_profile_bytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3277
 *             raise DDSException("Qos provider failed", r)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._qp is not NULL:
 *             dds.dds_free(self._qp) #gil_ok
 */

/* Python wrapper */
static void __pyx_pw_3dds_11QosProvider_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3dds_11QosProvider_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3dds_11QosProvider_2__dealloc__(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3dds_11QosProvider_2__dealloc__(struct __pyx_obj_3dds_QosProvider *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "dds.pyx":3278
 * 
 *     def __dealloc__(self):
 *         if self._qp is not NULL:             # <<<<<<<<<<<<<<
 *             dds.dds_free(self._qp) #gil_ok
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->_qp != NULL) != 0);
  if (__pyx_t_1) {

    /* "dds.pyx":3279
 *     def __dealloc__(self):
 *         if self._qp is not NULL:
 *             dds.dds_free(self._qp) #gil_ok             # <<<<<<<<<<<<<<
 * 
 *     def get_participant_qos(self):
 */
    dds_free(__pyx_v_self->_qp);

    /* "dds.pyx":3278
 * 
 *     def __dealloc__(self):
 *         if self._qp is not NULL:             # <<<<<<<<<<<<<<
 *             dds.dds_free(self._qp) #gil_ok
 * 
 */
  }

  /* "dds.pyx":3277
 *             raise DDSException("Qos provider failed", r)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._qp is not NULL:
 *             dds.dds_free(self._qp) #gil_ok
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "dds.pyx":3281
 *             dds.dds_free(self._qp) #gil_ok
 * 
 *     def get_participant_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create participant QoS
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11QosProvider_5get_participant_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11QosProvider_4get_participant_qos[] = "\n        Create participant QoS\n\n        :rtype: Qos\n        ";
static PyObject *__pyx_pw_3dds_11QosProvider_5get_participant_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_participant_qos (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11QosProvider_4get_participant_qos(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11QosProvider_4get_participant_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = NULL;
  dds_qos_t *__pyx_v_c_qos;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("get_participant_qos", 0);

  /* "dds.pyx":3287
 *         :rtype: Qos
 *         '''
 *         qos = Qos()             # <<<<<<<<<<<<<<
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3dds_Qos)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":3288
 *         '''
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_qosprovider_get_participant_qos(self._qp, c_qos, NULL)
 */
  __pyx_v_c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

  /* "dds.pyx":3289
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_participant_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3290
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 *             r = dds.dds_qosprovider_get_participant_qos(self._qp, c_qos, NULL)             # <<<<<<<<<<<<<<
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get participant QoS", r)
 */
        __pyx_v_r = dds_qosprovider_get_participant_qos(__pyx_v_self->_qp, __pyx_v_c_qos, NULL);
      }

      /* "dds.pyx":3289
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_participant_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3291
 *         with nogil:
 *             r = dds.dds_qosprovider_get_participant_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get participant QoS", r)
 *         return qos
 */
  __pyx_t_2 = ((__pyx_v_r != DDS_RETCODE_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":3292
 *             r = dds.dds_qosprovider_get_participant_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get participant QoS", r)             # <<<<<<<<<<<<<<
 *         return qos
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_participant_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3292, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_participant_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3292, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3292, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_get_participant_QoS);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_get_participant_QoS);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failed_to_get_participant_QoS);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3292, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3292, __pyx_L1_error)

    /* "dds.pyx":3291
 *         with nogil:
 *             r = dds.dds_qosprovider_get_participant_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get participant QoS", r)
 *         return qos
 */
  }

  /* "dds.pyx":3293
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get participant QoS", r)
 *         return qos             # <<<<<<<<<<<<<<
 * 
 *     def get_topic_qos(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __pyx_r = ((PyObject *)__pyx_v_qos);
  goto __pyx_L0;

  /* "dds.pyx":3281
 *             dds.dds_free(self._qp) #gil_ok
 * 
 *     def get_participant_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create participant QoS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds.QosProvider.get_participant_qos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_qos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3295
 *         return qos
 * 
 *     def get_topic_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create topic QoS
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11QosProvider_7get_topic_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11QosProvider_6get_topic_qos[] = "\n        Create topic QoS\n\n        :rtype: Qos\n        ";
static PyObject *__pyx_pw_3dds_11QosProvider_7get_topic_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_topic_qos (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11QosProvider_6get_topic_qos(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11QosProvider_6get_topic_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = NULL;
  dds_qos_t *__pyx_v_c_qos;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("get_topic_qos", 0);

  /* "dds.pyx":3301
 *         :rtype: Qos
 *         '''
 *         qos = Qos()             # <<<<<<<<<<<<<<
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3dds_Qos)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":3302
 *         '''
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_qosprovider_get_topic_qos(self._qp, c_qos, NULL)
 */
  __pyx_v_c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

  /* "dds.pyx":3303
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_topic_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3304
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 *             r = dds.dds_qosprovider_get_topic_qos(self._qp, c_qos, NULL)             # <<<<<<<<<<<<<<
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get topic QoS", r)
 */
        __pyx_v_r = dds_qosprovider_get_topic_qos(__pyx_v_self->_qp, __pyx_v_c_qos, NULL);
      }

      /* "dds.pyx":3303
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_topic_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3305
 *         with nogil:
 *             r = dds.dds_qosprovider_get_topic_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get topic QoS", r)
 *         return qos
 */
  __pyx_t_2 = ((__pyx_v_r != DDS_RETCODE_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":3306
 *             r = dds.dds_qosprovider_get_topic_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get topic QoS", r)             # <<<<<<<<<<<<<<
 *         return qos
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_topic_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3306, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_topic_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3306, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_get_topic_QoS);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_get_topic_QoS);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failed_to_get_topic_QoS);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3306, __pyx_L1_error)

    /* "dds.pyx":3305
 *         with nogil:
 *             r = dds.dds_qosprovider_get_topic_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get topic QoS", r)
 *         return qos
 */
  }

  /* "dds.pyx":3307
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get topic QoS", r)
 *         return qos             # <<<<<<<<<<<<<<
 * 
 *     def get_publisher_qos(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __pyx_r = ((PyObject *)__pyx_v_qos);
  goto __pyx_L0;

  /* "dds.pyx":3295
 *         return qos
 * 
 *     def get_topic_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create topic QoS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds.QosProvider.get_topic_qos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_qos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3309
 *         return qos
 * 
 *     def get_publisher_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create publisher QoS
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11QosProvider_9get_publisher_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11QosProvider_8get_publisher_qos[] = "\n        Create publisher QoS\n\n        :rtype: Qos\n        ";
static PyObject *__pyx_pw_3dds_11QosProvider_9get_publisher_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_publisher_qos (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11QosProvider_8get_publisher_qos(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11QosProvider_8get_publisher_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = NULL;
  dds_qos_t *__pyx_v_c_qos;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("get_publisher_qos", 0);

  /* "dds.pyx":3315
 *         :rtype: Qos
 *         '''
 *         qos = Qos()             # <<<<<<<<<<<<<<
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3dds_Qos)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":3316
 *         '''
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_qosprovider_get_publisher_qos(self._qp, c_qos, NULL)
 */
  __pyx_v_c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

  /* "dds.pyx":3317
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_publisher_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3318
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 *             r = dds.dds_qosprovider_get_publisher_qos(self._qp, c_qos, NULL)             # <<<<<<<<<<<<<<
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get publisher QoS", r)
 */
        __pyx_v_r = dds_qosprovider_get_publisher_qos(__pyx_v_self->_qp, __pyx_v_c_qos, NULL);
      }

      /* "dds.pyx":3317
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_publisher_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3319
 *         with nogil:
 *             r = dds.dds_qosprovider_get_publisher_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get publisher QoS", r)
 *         return qos
 */
  __pyx_t_2 = ((__pyx_v_r != DDS_RETCODE_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":3320
 *             r = dds.dds_qosprovider_get_publisher_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get publisher QoS", r)             # <<<<<<<<<<<<<<
 *         return qos
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_publisher_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_publisher_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_get_publisher_QoS);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_get_publisher_QoS);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failed_to_get_publisher_QoS);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3320, __pyx_L1_error)

    /* "dds.pyx":3319
 *         with nogil:
 *             r = dds.dds_qosprovider_get_publisher_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get publisher QoS", r)
 *         return qos
 */
  }

  /* "dds.pyx":3321
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get publisher QoS", r)
 *         return qos             # <<<<<<<<<<<<<<
 * 
 *     def get_subscriber_qos(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __pyx_r = ((PyObject *)__pyx_v_qos);
  goto __pyx_L0;

  /* "dds.pyx":3309
 *         return qos
 * 
 *     def get_publisher_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create publisher QoS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds.QosProvider.get_publisher_qos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_qos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3323
 *         return qos
 * 
 *     def get_subscriber_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create subscriber QoS
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11QosProvider_11get_subscriber_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11QosProvider_10get_subscriber_qos[] = "\n        Create subscriber QoS\n\n        :rtype: Qos\n        ";
static PyObject *__pyx_pw_3dds_11QosProvider_11get_subscriber_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_subscriber_qos (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11QosProvider_10get_subscriber_qos(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11QosProvider_10get_subscriber_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = NULL;
  dds_qos_t *__pyx_v_c_qos;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("get_subscriber_qos", 0);

  /* "dds.pyx":3329
 *         :rtype: Qos
 *         '''
 *         qos = Qos()             # <<<<<<<<<<<<<<
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3dds_Qos)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":3330
 *         '''
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_qosprovider_get_subscriber_qos(self._qp, c_qos, NULL)
 */
  __pyx_v_c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

  /* "dds.pyx":3331
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_subscriber_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3332
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 *             r = dds.dds_qosprovider_get_subscriber_qos(self._qp, c_qos, NULL)             # <<<<<<<<<<<<<<
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get subscriber QoS", r)
 */
        __pyx_v_r = dds_qosprovider_get_subscriber_qos(__pyx_v_self->_qp, __pyx_v_c_qos, NULL);
      }

      /* "dds.pyx":3331
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_subscriber_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3333
 *         with nogil:
 *             r = dds.dds_qosprovider_get_subscriber_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get subscriber QoS", r)
 *         return qos
 */
  __pyx_t_2 = ((__pyx_v_r != DDS_RETCODE_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":3334
 *             r = dds.dds_qosprovider_get_subscriber_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get subscriber QoS", r)             # <<<<<<<<<<<<<<
 *         return qos
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_subscriber_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3334, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_subscriber_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3334, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_get_subscriber_QoS);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_get_subscriber_QoS);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failed_to_get_subscriber_QoS);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3334, __pyx_L1_error)

    /* "dds.pyx":3333
 *         with nogil:
 *             r = dds.dds_qosprovider_get_subscriber_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get subscriber QoS", r)
 *         return qos
 */
  }

  /* "dds.pyx":3335
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get subscriber QoS", r)
 *         return qos             # <<<<<<<<<<<<<<
 * 
 *     def get_writer_qos(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __pyx_r = ((PyObject *)__pyx_v_qos);
  goto __pyx_L0;

  /* "dds.pyx":3323
 *         return qos
 * 
 *     def get_subscriber_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create subscriber QoS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds.QosProvider.get_subscriber_qos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_qos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3337
 *         return qos
 * 
 *     def get_writer_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create writer QoS
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11QosProvider_13get_writer_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11QosProvider_12get_writer_qos[] = "\n        Create writer QoS\n\n        :rtype: Qos\n        ";
static PyObject *__pyx_pw_3dds_11QosProvider_13get_writer_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_writer_qos (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11QosProvider_12get_writer_qos(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11QosProvider_12get_writer_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = NULL;
  dds_qos_t *__pyx_v_c_qos;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("get_writer_qos", 0);

  /* "dds.pyx":3343
 *         :rtype: Qos
 *         '''
 *         qos = Qos()             # <<<<<<<<<<<<<<
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3dds_Qos)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":3344
 *         '''
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_qosprovider_get_writer_qos(self._qp, c_qos, NULL)
 */
  __pyx_v_c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

  /* "dds.pyx":3345
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_writer_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3346
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 *             r = dds.dds_qosprovider_get_writer_qos(self._qp, c_qos, NULL)             # <<<<<<<<<<<<<<
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get writer QoS", r)
 */
        __pyx_v_r = dds_qosprovider_get_writer_qos(__pyx_v_self->_qp, __pyx_v_c_qos, NULL);
      }

      /* "dds.pyx":3345
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_writer_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3347
 *         with nogil:
 *             r = dds.dds_qosprovider_get_writer_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get writer QoS", r)
 *         return qos
 */
  __pyx_t_2 = ((__pyx_v_r != DDS_RETCODE_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":3348
 *             r = dds.dds_qosprovider_get_writer_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get writer QoS", r)             # <<<<<<<<<<<<<<
 *         return qos
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_writer_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3348, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_writer_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3348, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_get_writer_QoS);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_get_writer_QoS);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failed_to_get_writer_QoS);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3348, __pyx_L1_error)

    /* "dds.pyx":3347
 *         with nogil:
 *             r = dds.dds_qosprovider_get_writer_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get writer QoS", r)
 *         return qos
 */
  }

  /* "dds.pyx":3349
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get writer QoS", r)
 *         return qos             # <<<<<<<<<<<<<<
 * 
 *     def get_reader_qos(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __pyx_r = ((PyObject *)__pyx_v_qos);
  goto __pyx_L0;

  /* "dds.pyx":3337
 *         return qos
 * 
 *     def get_writer_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create writer QoS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds.QosProvider.get_writer_qos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_qos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3351
 *         return qos
 * 
 *     def get_reader_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create reader QoS
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11QosProvider_15get_reader_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_3dds_11QosProvider_14get_reader_qos[] = "\n        Create reader QoS\n\n        :rtype: Qos\n        ";
static PyObject *__pyx_pw_3dds_11QosProvider_15get_reader_qos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_reader_qos (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11QosProvider_14get_reader_qos(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11QosProvider_14get_reader_qos(struct __pyx_obj_3dds_QosProvider *__pyx_v_self) {
  struct __pyx_obj_3dds_Qos *__pyx_v_qos = NULL;
  dds_qos_t *__pyx_v_c_qos;
  int __pyx_v_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("get_reader_qos", 0);

  /* "dds.pyx":3357
 *         :rtype: Qos
 *         '''
 *         qos = Qos()             # <<<<<<<<<<<<<<
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3dds_Qos)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_qos = ((struct __pyx_obj_3dds_Qos *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "dds.pyx":3358
 *         '''
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()             # <<<<<<<<<<<<<<
 *         with nogil:
 *             r = dds.dds_qosprovider_get_reader_qos(self._qp, c_qos, NULL)
 */
  __pyx_v_c_qos = ((struct __pyx_vtabstruct_3dds_Qos *)__pyx_v_qos->__pyx_vtab)->handle(__pyx_v_qos);

  /* "dds.pyx":3359
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_reader_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "dds.pyx":3360
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:
 *             r = dds.dds_qosprovider_get_reader_qos(self._qp, c_qos, NULL)             # <<<<<<<<<<<<<<
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get reader QoS", r)
 */
        __pyx_v_r = dds_qosprovider_get_reader_qos(__pyx_v_self->_qp, __pyx_v_c_qos, NULL);
      }

      /* "dds.pyx":3359
 *         qos = Qos()
 *         cdef dds_qos_t *c_qos = qos.handle()
 *         with nogil:             # <<<<<<<<<<<<<<
 *             r = dds.dds_qosprovider_get_reader_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "dds.pyx":3361
 *         with nogil:
 *             r = dds.dds_qosprovider_get_reader_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get reader QoS", r)
 *         return qos
 */
  __pyx_t_2 = ((__pyx_v_r != DDS_RETCODE_OK) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "dds.pyx":3362
 *             r = dds.dds_qosprovider_get_reader_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get reader QoS", r)             # <<<<<<<<<<<<<<
 *         return qos
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_reader_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_s_Failed_to_get_reader_QoS, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3362, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_s_Failed_to_get_reader_QoS);
      __Pyx_GIVEREF(__pyx_kp_s_Failed_to_get_reader_QoS);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_Failed_to_get_reader_QoS);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3362, __pyx_L1_error)

    /* "dds.pyx":3361
 *         with nogil:
 *             r = dds.dds_qosprovider_get_reader_qos(self._qp, c_qos, NULL)
 *         if r != dds.DDS_RETCODE_OK:             # <<<<<<<<<<<<<<
 *             raise DDSException("Failed to get reader QoS", r)
 *         return qos
 */
  }

  /* "dds.pyx":3363
 *         if r != dds.DDS_RETCODE_OK:
 *             raise DDSException("Failed to get reader QoS", r)
 *         return qos             # <<<<<<<<<<<<<<
 * 
 * def QosProfile(uri, profile):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_qos));
  __pyx_r = ((PyObject *)__pyx_v_qos);
  goto __pyx_L0;

  /* "dds.pyx":3351
 *         return qos
 * 
 *     def get_reader_qos(self):             # <<<<<<<<<<<<<<
 *         '''
 *         Create reader QoS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("dds.QosProvider.get_reader_qos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_qos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11QosProvider_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_11QosProvider_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11QosProvider_16__reduce_cython__(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11QosProvider_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_QosProvider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.QosProvider.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_11QosProvider_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_11QosProvider_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_11QosProvider_18__setstate_cython__(((struct __pyx_obj_3dds_QosProvider *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_11QosProvider_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3dds_QosProvider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds.QosProvider.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3365
 *         return qos
 * 
 * def QosProfile(uri, profile):             # <<<<<<<<<<<<<<
 *     from warnings import warn
 *     warn('The class name QosProfile is deprecated. Use class QosProvider instead.' \
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_1QosProfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_1QosProfile = {"QosProfile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_1QosProfile, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_1QosProfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_uri = 0;
  PyObject *__pyx_v_profile = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("QosProfile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_uri,&__pyx_n_s_profile,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uri)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_profile)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("QosProfile", 1, 2, 2, 1); __PYX_ERR(0, 3365, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "QosProfile") < 0)) __PYX_ERR(0, 3365, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_uri = values[0];
    __pyx_v_profile = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("QosProfile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3365, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.QosProfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_QosProfile(__pyx_self, __pyx_v_uri, __pyx_v_profile);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_QosProfile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_uri, PyObject *__pyx_v_profile) {
  PyObject *__pyx_v_warn = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("QosProfile", 0);

  /* "dds.pyx":3366
 * 
 * def QosProfile(uri, profile):
 *     from warnings import warn             # <<<<<<<<<<<<<<
 *     warn('The class name QosProfile is deprecated. Use class QosProvider instead.' \
 *      + ' QosProfile will be removed in a future release.')
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_warn);
  __Pyx_GIVEREF(__pyx_n_s_warn);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_warn);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_warnings, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_warn = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":3368
 *     from warnings import warn
 *     warn('The class name QosProfile is deprecated. Use class QosProvider instead.' \
 *      + ' QosProfile will be removed in a future release.')             # <<<<<<<<<<<<<<
 *     return QosProvider(uri, profile)
 * 
 */
  __pyx_t_1 = PyNumber_Add(__pyx_kp_s_The_class_name_QosProfile_is_dep, __pyx_kp_s_QosProfile_will_be_removed_in_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_warn);
  __pyx_t_3 = __pyx_v_warn; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":3369
 *     warn('The class name QosProfile is deprecated. Use class QosProvider instead.' \
 *      + ' QosProfile will be removed in a future release.')
 *     return QosProvider(uri, profile)             # <<<<<<<<<<<<<<
 * 
 * class DDSException(Exception):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_uri);
  __Pyx_GIVEREF(__pyx_v_uri);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_uri);
  __Pyx_INCREF(__pyx_v_profile);
  __Pyx_GIVEREF(__pyx_v_profile);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_profile);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3dds_QosProvider), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "dds.pyx":3365
 *         return qos
 * 
 * def QosProfile(uri, profile):             # <<<<<<<<<<<<<<
 *     from warnings import warn
 *     warn('The class name QosProfile is deprecated. Use class QosProvider instead.' \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("dds.QosProfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_warn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3375
 *     DDS exception
 *     '''
 *     def __init__(self, message = '', code = 0):             # <<<<<<<<<<<<<<
 *         msg = message
 *         if code != 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_12DDSException_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_12DDSException_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_12DDSException_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_12DDSException_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_message = 0;
  PyObject *__pyx_v_code = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_code,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_s_));
    values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_code);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3375, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_message = values[1];
    __pyx_v_code = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3375, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.DDSException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_12DDSException___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_code);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_12DDSException___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_code) {
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "dds.pyx":3376
 *     '''
 *     def __init__(self, message = '', code = 0):
 *         msg = message             # <<<<<<<<<<<<<<
 *         if code != 0:
 *             msg = message + "  Return code: " + dds.dds_err_str(code).decode('ISO-8859-1') #gil_ok
 */
  __Pyx_INCREF(__pyx_v_message);
  __pyx_v_msg = __pyx_v_message;

  /* "dds.pyx":3377
 *     def __init__(self, message = '', code = 0):
 *         msg = message
 *         if code != 0:             # <<<<<<<<<<<<<<
 *             msg = message + "  Return code: " + dds.dds_err_str(code).decode('ISO-8859-1') #gil_ok
 *         super(DDSException, self).__init__(msg)
 */
  __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_code, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "dds.pyx":3378
 *         msg = message
 *         if code != 0:
 *             msg = message + "  Return code: " + dds.dds_err_str(code).decode('ISO-8859-1') #gil_ok             # <<<<<<<<<<<<<<
 *         super(DDSException, self).__init__(msg)
 * 
 */
    __pyx_t_1 = PyNumber_Add(__pyx_v_message, __pyx_kp_s_Return_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_code); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3378, __pyx_L1_error)
    __pyx_t_4 = dds_err_str(__pyx_t_3);
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "dds.pyx":3377
 *     def __init__(self, message = '', code = 0):
 *         msg = message
 *         if code != 0:             # <<<<<<<<<<<<<<
 *             msg = message + "  Return code: " + dds.dds_err_str(code).decode('ISO-8859-1') #gil_ok
 *         super(DDSException, self).__init__(msg)
 */
  }

  /* "dds.pyx":3379
 *         if code != 0:
 *             msg = message + "  Return code: " + dds.dds_err_str(code).decode('ISO-8859-1') #gil_ok
 *         super(DDSException, self).__init__(msg)             # <<<<<<<<<<<<<<
 * 
 * cdef class _SerializationHelper:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_msg) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_msg);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":3375
 *     DDS exception
 *     '''
 *     def __init__(self, message = '', code = 0):             # <<<<<<<<<<<<<<
 *         msg = message
 *         if code != 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("dds.DDSException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3384
 * 
 *     @staticmethod
 *     def bytes_to_ptr(str):             # <<<<<<<<<<<<<<
 *         cdef char *s = <bytes>str
 *         cdef long long addr = <long long> s
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_20_SerializationHelper_1bytes_to_ptr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_20_SerializationHelper_1bytes_to_ptr = {"bytes_to_ptr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_20_SerializationHelper_1bytes_to_ptr, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_20_SerializationHelper_1bytes_to_ptr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_str = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bytes_to_ptr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_str,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_str)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bytes_to_ptr") < 0)) __PYX_ERR(0, 3384, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_str = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bytes_to_ptr", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3384, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds._SerializationHelper.bytes_to_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_20_SerializationHelper_bytes_to_ptr(__pyx_v_str);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_20_SerializationHelper_bytes_to_ptr(PyObject *__pyx_v_str) {
  char *__pyx_v_s;
  PY_LONG_LONG __pyx_v_addr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("bytes_to_ptr", 0);

  /* "dds.pyx":3385
 *     @staticmethod
 *     def bytes_to_ptr(str):
 *         cdef char *s = <bytes>str             # <<<<<<<<<<<<<<
 *         cdef long long addr = <long long> s
 *         return addr
 */
  if (unlikely(__pyx_v_str == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 3385, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_str); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 3385, __pyx_L1_error)
  __pyx_v_s = __pyx_t_1;

  /* "dds.pyx":3386
 *     def bytes_to_ptr(str):
 *         cdef char *s = <bytes>str
 *         cdef long long addr = <long long> s             # <<<<<<<<<<<<<<
 *         return addr
 * 
 */
  __pyx_v_addr = ((PY_LONG_LONG)__pyx_v_s);

  /* "dds.pyx":3387
 *         cdef char *s = <bytes>str
 *         cdef long long addr = <long long> s
 *         return addr             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_addr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "dds.pyx":3384
 * 
 *     @staticmethod
 *     def bytes_to_ptr(str):             # <<<<<<<<<<<<<<
 *         cdef char *s = <bytes>str
 *         cdef long long addr = <long long> s
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds._SerializationHelper.bytes_to_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "dds.pyx":3390
 * 
 *     @staticmethod
 *     def ptr_to_bytes(ptr, size = 0):             # <<<<<<<<<<<<<<
 *         cdef long long addr = ptr
 *         cdef char *s = <char *>addr
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_20_SerializationHelper_3ptr_to_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_20_SerializationHelper_3ptr_to_bytes = {"ptr_to_bytes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_20_SerializationHelper_3ptr_to_bytes, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_20_SerializationHelper_3ptr_to_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ptr = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ptr_to_bytes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ptr_to_bytes") < 0)) __PYX_ERR(0, 3390, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ptr = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ptr_to_bytes", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3390, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds._SerializationHelper.ptr_to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_20_SerializationHelper_2ptr_to_bytes(__pyx_v_ptr, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_20_SerializationHelper_2ptr_to_bytes(PyObject *__pyx_v_ptr, PyObject *__pyx_v_size) {
  PY_LONG_LONG __pyx_v_addr;
  char *__pyx_v_s;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  __Pyx_RefNannySetupContext("ptr_to_bytes", 0);

  /* "dds.pyx":3391
 *     @staticmethod
 *     def ptr_to_bytes(ptr, size = 0):
 *         cdef long long addr = ptr             # <<<<<<<<<<<<<<
 *         cdef char *s = <char *>addr
 *         if size != 0:
 */
  __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_ptr); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3391, __pyx_L1_error)
  __pyx_v_addr = __pyx_t_1;

  /* "dds.pyx":3392
 *     def ptr_to_bytes(ptr, size = 0):
 *         cdef long long addr = ptr
 *         cdef char *s = <char *>addr             # <<<<<<<<<<<<<<
 *         if size != 0:
 *             return s[:size]
 */
  __pyx_v_s = ((char *)__pyx_v_addr);

  /* "dds.pyx":3393
 *         cdef long long addr = ptr
 *         cdef char *s = <char *>addr
 *         if size != 0:             # <<<<<<<<<<<<<<
 *             return s[:size]
 *         return s
 */
  __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_v_size, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "dds.pyx":3394
 *         cdef char *s = <char *>addr
 *         if size != 0:
 *             return s[:size]             # <<<<<<<<<<<<<<
 *         return s
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_size);
    __pyx_t_2 = __pyx_v_size;
    __pyx_t_3 = (__pyx_t_2 == Py_None);
    if (__pyx_t_3) {
      __pyx_t_4 = PY_SSIZE_T_MAX;
    } else {
      __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3394, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_5;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s + 0, __pyx_t_4 - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "dds.pyx":3393
 *         cdef long long addr = ptr
 *         cdef char *s = <char *>addr
 *         if size != 0:             # <<<<<<<<<<<<<<
 *             return s[:size]
 *         return s
 */
  }

  /* "dds.pyx":3395
 *         if size != 0:
 *             return s[:size]
 *         return s             # <<<<<<<<<<<<<<
 * 
 * # When finding built-in topics to register locally, the packing format must be generated with
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "dds.pyx":3390
 * 
 *     @staticmethod
 *     def ptr_to_bytes(ptr, size = 0):             # <<<<<<<<<<<<<<
 *         cdef long long addr = ptr
 *         cdef char *s = <char *>addr
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("dds._SerializationHelper.ptr_to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_20_SerializationHelper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3dds_20_SerializationHelper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_20_SerializationHelper_4__reduce_cython__(((struct __pyx_obj_3dds__SerializationHelper *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_20_SerializationHelper_4__reduce_cython__(struct __pyx_obj_3dds__SerializationHelper *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_state = __pyx_empty_tuple;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__SerializationHel); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__SerializationHelper__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle__SerializationHel); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("dds._SerializationHelper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__SerializationHelper__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_20_SerializationHelper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3dds_20_SerializationHelper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3dds_20_SerializationHelper_6__setstate_cython__(((struct __pyx_obj_3dds__SerializationHelper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_20_SerializationHelper_6__setstate_cython__(struct __pyx_obj_3dds__SerializationHelper *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__SerializationHelper__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_3dds___pyx_unpickle__SerializationHelper__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__SerializationHelper, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__SerializationHelper__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("dds._SerializationHelper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TypeSupport(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_3__pyx_unpickle_TypeSupport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_3__pyx_unpickle_TypeSupport = {"__pyx_unpickle_TypeSupport", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_3__pyx_unpickle_TypeSupport, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_3__pyx_unpickle_TypeSupport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeSupport (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypeSupport", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypeSupport", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TypeSupport") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypeSupport", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.__pyx_unpickle_TypeSupport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_2__pyx_unpickle_TypeSupport(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_2__pyx_unpickle_TypeSupport(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeSupport", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 *     __pyx_result = TypeSupport.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TypeSupport.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 *     __pyx_result = TypeSupport.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeSupport__set_state(<TypeSupport> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_3dds_TypeSupport), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 *     __pyx_result = TypeSupport.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypeSupport__set_state(<TypeSupport> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = TypeSupport.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeSupport__set_state(<TypeSupport> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeSupport__set_state(TypeSupport __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_3dds___pyx_unpickle_TypeSupport__set_state(((struct __pyx_obj_3dds_TypeSupport *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 *     __pyx_result = TypeSupport.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypeSupport__set_state(<TypeSupport> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeSupport__set_state(<TypeSupport> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TypeSupport__set_state(TypeSupport __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypeSupport(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("dds.__pyx_unpickle_TypeSupport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TypeSupport__set_state(<TypeSupport> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeSupport__set_state(TypeSupport __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_3dds___pyx_unpickle_TypeSupport__set_state(struct __pyx_obj_3dds_TypeSupport *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeSupport__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeSupport__set_state(TypeSupport __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypeSupport__set_state(TypeSupport __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeSupport__set_state(TypeSupport __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TypeSupport__set_state(<TypeSupport> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeSupport__set_state(TypeSupport __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.__pyx_unpickle_TypeSupport__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__SerializationHelper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_3dds_5__pyx_unpickle__SerializationHelper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3dds_5__pyx_unpickle__SerializationHelper = {"__pyx_unpickle__SerializationHelper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_5__pyx_unpickle__SerializationHelper, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3dds_5__pyx_unpickle__SerializationHelper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__SerializationHelper (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__SerializationHelper", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__SerializationHelper", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__SerializationHelper") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__SerializationHelper", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("dds.__pyx_unpickle__SerializationHelper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3dds_4__pyx_unpickle__SerializationHelper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3dds_4__pyx_unpickle__SerializationHelper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("__pyx_unpickle__SerializationHelper", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 *     __pyx_result = _SerializationHelper.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _SerializationHelper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 *     __pyx_result = _SerializationHelper.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__SerializationHelper__set_state(<_SerializationHelper> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_3dds__SerializationHelper), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 *     __pyx_result = _SerializationHelper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__SerializationHelper__set_state(<_SerializationHelper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _SerializationHelper.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__SerializationHelper__set_state(<_SerializationHelper> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__SerializationHelper__set_state(_SerializationHelper __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_3dds___pyx_unpickle__SerializationHelper__set_state(((struct __pyx_obj_3dds__SerializationHelper *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 *     __pyx_result = _SerializationHelper.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__SerializationHelper__set_state(<_SerializationHelper> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__SerializationHelper__set_state(<_SerializationHelper> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__SerializationHelper__set_state(_SerializationHelper __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__SerializationHelper(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("dds.__pyx_unpickle__SerializationHelper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__SerializationHelper__set_state(<_SerializationHelper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__SerializationHelper__set_state(_SerializationHelper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_3dds___pyx_unpickle__SerializationHelper__set_state(struct __pyx_obj_3dds__SerializationHelper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle__SerializationHelper__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__SerializationHelper__set_state(_SerializationHelper __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__SerializationHelper__set_state(_SerializationHelper __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__SerializationHelper__set_state(_SerializationHelper __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__SerializationHelper__set_state(<_SerializationHelper> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__SerializationHelper__set_state(_SerializationHelper __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("dds.__pyx_unpickle__SerializationHelper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_3dds_Qos __pyx_vtable_3dds_Qos;

static PyObject *__pyx_tp_new_3dds_Qos(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_Qos *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_Qos *)o);
  p->__pyx_vtab = __pyx_vtabptr_3dds_Qos;
  p->_policies = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_3Qos_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_Qos(PyObject *o) {
  struct __pyx_obj_3dds_Qos *p = (struct __pyx_obj_3dds_Qos *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_3dds_3Qos_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_policies);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_3dds_Qos(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_Qos *p = (struct __pyx_obj_3dds_Qos *)o;
  if (p->_policies) {
    e = (*v)(p->_policies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_Qos(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_Qos *p = (struct __pyx_obj_3dds_Qos *)o;
  tmp = ((PyObject*)p->_policies);
  p->_policies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_Qos[] = {
  {"set_policies", (PyCFunction)__pyx_pw_3dds_3Qos_5set_policies, METH_O, __pyx_doc_3dds_3Qos_4set_policies},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_3Qos_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_3Qos_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_Qos = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.Qos", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_Qos), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_Qos, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    QoS class\n\n    :type policies: list\n    :param policies: list of QoS policies\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_Qos, /*tp_traverse*/
  __pyx_tp_clear_3dds_Qos, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_Qos, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_Qos, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_Entity __pyx_vtable_3dds_Entity;

static PyObject *__pyx_tp_new_3dds_Entity(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3dds_Entity *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_Entity *)o);
  p->__pyx_vtab = __pyx_vtabptr_3dds_Entity;
  p->_parent = Py_None; Py_INCREF(Py_None);
  p->_listener = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_6Entity_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_Entity(PyObject *o) {
  struct __pyx_obj_3dds_Entity *p = (struct __pyx_obj_3dds_Entity *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_3dds_6Entity_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_parent);
  Py_CLEAR(p->_listener);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_3dds_Entity(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_Entity *p = (struct __pyx_obj_3dds_Entity *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  if (p->_listener) {
    e = (*v)(p->_listener, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_Entity(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_Entity *p = (struct __pyx_obj_3dds_Entity *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_listener);
  p->_listener = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_3dds_6Entity_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_6Entity_6parent_1__get__(o);
}

static int __pyx_setprop_3dds_6Entity_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_3dds_6Entity_6parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_3dds_6Entity_listener(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_6Entity_8listener_1__get__(o);
}

static int __pyx_setprop_3dds_6Entity_listener(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_3dds_6Entity_8listener_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_3dds_Entity[] = {
  {"close", (PyCFunction)__pyx_pw_3dds_6Entity_5close, METH_NOARGS, __pyx_doc_3dds_6Entity_4close},
  {"_check_handle", (PyCFunction)__pyx_pw_3dds_6Entity_7_check_handle, METH_NOARGS, 0},
  {"get_statuscondition", (PyCFunction)__pyx_pw_3dds_6Entity_9get_statuscondition, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_6Entity_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_6Entity_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3dds_Entity[] = {
  {(char *)"parent", __pyx_getprop_3dds_6Entity_parent, __pyx_setprop_3dds_6Entity_parent, (char *)" Parent entity\n        ", 0},
  {(char *)"listener", __pyx_getprop_3dds_6Entity_listener, __pyx_setprop_3dds_6Entity_listener, (char *)" Listener\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_Entity = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.Entity", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_Entity), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_Entity, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Abstract base entity class\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_Entity, /*tp_traverse*/
  __pyx_tp_clear_3dds_Entity, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_Entity, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3dds_Entity, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_Entity, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_DomainParticipant __pyx_vtable_3dds_DomainParticipant;

static PyObject *__pyx_tp_new_3dds_DomainParticipant(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_DomainParticipant *p;
  PyObject *o = __pyx_tp_new_3dds_Entity(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_DomainParticipant *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Entity*)__pyx_vtabptr_3dds_DomainParticipant;
  p->_publishers = Py_None; Py_INCREF(Py_None);
  p->_subscribers = Py_None; Py_INCREF(Py_None);
  p->_writers = Py_None; Py_INCREF(Py_None);
  p->_readers = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_17DomainParticipant_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_DomainParticipant(PyObject *o) {
  struct __pyx_obj_3dds_DomainParticipant *p = (struct __pyx_obj_3dds_DomainParticipant *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_publishers);
  Py_CLEAR(p->_subscribers);
  Py_CLEAR(p->_writers);
  Py_CLEAR(p->_readers);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Entity(o);
}

static int __pyx_tp_traverse_3dds_DomainParticipant(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_DomainParticipant *p = (struct __pyx_obj_3dds_DomainParticipant *)o;
  e = __pyx_tp_traverse_3dds_Entity(o, v, a); if (e) return e;
  if (p->_publishers) {
    e = (*v)(p->_publishers, a); if (e) return e;
  }
  if (p->_subscribers) {
    e = (*v)(p->_subscribers, a); if (e) return e;
  }
  if (p->_writers) {
    e = (*v)(p->_writers, a); if (e) return e;
  }
  if (p->_readers) {
    e = (*v)(p->_readers, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_DomainParticipant(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_DomainParticipant *p = (struct __pyx_obj_3dds_DomainParticipant *)o;
  __pyx_tp_clear_3dds_Entity(o);
  tmp = ((PyObject*)p->_publishers);
  p->_publishers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_subscribers);
  p->_subscribers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_writers);
  p->_writers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_readers);
  p->_readers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_DomainParticipant[] = {
  {"create_publisher", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_17DomainParticipant_3create_publisher, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_17DomainParticipant_2create_publisher},
  {"create_datawriter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_17DomainParticipant_5create_datawriter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_17DomainParticipant_4create_datawriter},
  {"create_subscriber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_17DomainParticipant_7create_subscriber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_17DomainParticipant_6create_subscriber},
  {"create_datareader", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_17DomainParticipant_9create_datareader, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_17DomainParticipant_8create_datareader},
  {"find_topic", (PyCFunction)__pyx_pw_3dds_17DomainParticipant_11find_topic, METH_O, __pyx_doc_3dds_17DomainParticipant_10find_topic},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_17DomainParticipant_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_17DomainParticipant_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_DomainParticipant = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.DomainParticipant", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_DomainParticipant), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_DomainParticipant, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Domain participant class\n\n    :type qos: Qos\n    :param qos: Participant QoS. Default: None\n\n    :type listener: Listener\n    :param listener: Participant listener Default: None\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_DomainParticipant, /*tp_traverse*/
  __pyx_tp_clear_3dds_DomainParticipant, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_DomainParticipant, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_DomainParticipant, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_3dds_TypeSupport(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3dds_TypeSupport(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3dds_11TypeSupport_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_11TypeSupport_6handle_1__get__(o);
}

static PyObject *__pyx_getprop_3dds_11TypeSupport_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_11TypeSupport_4size_1__get__(o);
}

static PyMethodDef __pyx_methods_3dds_TypeSupport[] = {
  {"_serialize", (PyCFunction)__pyx_pw_3dds_11TypeSupport_3_serialize, METH_O, __pyx_doc_3dds_11TypeSupport_2_serialize},
  {"_deserialize", (PyCFunction)__pyx_pw_3dds_11TypeSupport_5_deserialize, METH_O, __pyx_doc_3dds_11TypeSupport_4_deserialize},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_11TypeSupport_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_11TypeSupport_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3dds_TypeSupport[] = {
  {(char *)"handle", __pyx_getprop_3dds_11TypeSupport_handle, 0, (char *)"C handle\n        ", 0},
  {(char *)"size", __pyx_getprop_3dds_11TypeSupport_size, 0, (char *)"Data size\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_TypeSupport = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.TypeSupport", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_TypeSupport), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_TypeSupport, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    It is used to generate a dds_topic_descriptor from the\n    provided typename, keys and XML type specification.\n    The size attribute is need to allocate memory when\n    the topic data is deserialized.\n    For the serialization and deserialization the struct\n    module is used\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_TypeSupport, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3dds_TypeSupport, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3dds_11TypeSupport_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_TypeSupport, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_Topic __pyx_vtable_3dds_Topic;

static PyObject *__pyx_tp_new_3dds_Topic(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_Topic *p;
  PyObject *o = __pyx_tp_new_3dds_Entity(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_Topic *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Entity*)__pyx_vtabptr_3dds_Topic;
  p->_typesupport = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_3dds_Topic(PyObject *o) {
  struct __pyx_obj_3dds_Topic *p = (struct __pyx_obj_3dds_Topic *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_typesupport);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Entity(o);
}

static int __pyx_tp_traverse_3dds_Topic(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_Topic *p = (struct __pyx_obj_3dds_Topic *)o;
  e = __pyx_tp_traverse_3dds_Entity(o, v, a); if (e) return e;
  if (p->_typesupport) {
    e = (*v)(p->_typesupport, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_Topic(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_Topic *p = (struct __pyx_obj_3dds_Topic *)o;
  __pyx_tp_clear_3dds_Entity(o);
  tmp = ((PyObject*)p->_typesupport);
  p->_typesupport = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_3dds_5Topic_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_5Topic_4name_1__get__(o);
}

static PyObject *__pyx_getprop_3dds_5Topic_type_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_5Topic_9type_name_1__get__(o);
}

static PyObject *__pyx_getprop_3dds_5Topic_metadescriptor(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_5Topic_14metadescriptor_1__get__(o);
}

static PyObject *__pyx_getprop_3dds_5Topic_keylist(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_5Topic_7keylist_1__get__(o);
}

static PyObject *__pyx_getprop_3dds_5Topic_qos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_5Topic_3qos_1__get__(o);
}

static PyMethodDef __pyx_methods_3dds_Topic[] = {
  {"inconsistent_topic_status", (PyCFunction)__pyx_pw_3dds_5Topic_3inconsistent_topic_status, METH_NOARGS, __pyx_doc_3dds_5Topic_2inconsistent_topic_status},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_5Topic_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_5Topic_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3dds_Topic[] = {
  {(char *)"name", __pyx_getprop_3dds_5Topic_name, 0, (char *)"\n        The topic name, as registered in the DDS domain\n\n        :rtype: str\n        ", 0},
  {(char *)"type_name", __pyx_getprop_3dds_5Topic_type_name, 0, (char *)"\n        The fully qualified name of the topic data type (in IDL format)\n\n        :rtype: str\n        ", 0},
  {(char *)"metadescriptor", __pyx_getprop_3dds_5Topic_metadescriptor, 0, (char *)"\n        The XML meta-descriptor of the topic\n\n        :rtype: str\n        ", 0},
  {(char *)"keylist", __pyx_getprop_3dds_5Topic_keylist, 0, (char *)"\n        The possibly empty list of topic key fields, separated by commas.\n\n        :rtype: str\n        ", 0},
  {(char *)"qos", __pyx_getprop_3dds_5Topic_qos, 0, (char *)"\n        Return the QoS policy for the entity\n\n        :rtype: dds.Qos\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_Topic = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.Topic", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_Topic), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_Topic, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Topic class\n\n    :type dp: DomainParticipant\n    :param dp: Domain participant\n\n    :type name: string\n    :param name: Topic name\n\n    :type qos: Qos\n    :param qos: Topic QoS (default: None)\n\n    :type listener: Listener\n    :param listener: Topic listener (default: None)\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_Topic, /*tp_traverse*/
  __pyx_tp_clear_3dds_Topic, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_Topic, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3dds_Topic, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3dds_5Topic_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_Topic, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_FoundTopic __pyx_vtable_3dds_FoundTopic;

static PyObject *__pyx_tp_new_3dds_FoundTopic(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_FoundTopic *p;
  PyObject *o = __pyx_tp_new_3dds_Topic(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_FoundTopic *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Entity*)__pyx_vtabptr_3dds_FoundTopic;
  return o;
}

static PyMethodDef __pyx_methods_3dds_FoundTopic[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_10FoundTopic_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_10FoundTopic_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_FoundTopic = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.FoundTopic", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_FoundTopic), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_Topic, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    FoundTopic class\n\n    A topic entity obtained via DomainParticipant.find_topic. Because of limitations\n    in the underlying C99 APIs, a FoundTopic cannot be used directly to create\n    data readers or data writers.\n\n    Use the method ddutil.get_dds_classes_from_found_topic()\n    dynamically create Python classes for the topic.\n\n    Use the method register_topic on the return value of get_dds_classes_for_found_topic()\n    to register a local topic that can be used for creating data readers and data writers.\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_Topic, /*tp_traverse*/
  __pyx_tp_clear_3dds_Topic, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_FoundTopic, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3dds_10FoundTopic_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_FoundTopic, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_Publisher __pyx_vtable_3dds_Publisher;

static PyObject *__pyx_tp_new_3dds_Publisher(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_Publisher *p;
  PyObject *o = __pyx_tp_new_3dds_Entity(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_Publisher *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Entity*)__pyx_vtabptr_3dds_Publisher;
  p->_writers = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_9Publisher_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_Publisher(PyObject *o) {
  struct __pyx_obj_3dds_Publisher *p = (struct __pyx_obj_3dds_Publisher *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_writers);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Entity(o);
}

static int __pyx_tp_traverse_3dds_Publisher(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_Publisher *p = (struct __pyx_obj_3dds_Publisher *)o;
  e = __pyx_tp_traverse_3dds_Entity(o, v, a); if (e) return e;
  if (p->_writers) {
    e = (*v)(p->_writers, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_Publisher(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_Publisher *p = (struct __pyx_obj_3dds_Publisher *)o;
  __pyx_tp_clear_3dds_Entity(o);
  tmp = ((PyObject*)p->_writers);
  p->_writers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_Publisher[] = {
  {"create_datawriter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_9Publisher_3create_datawriter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_9Publisher_2create_datawriter},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_9Publisher_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_9Publisher_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_Publisher = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.Publisher", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_Publisher), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_Publisher, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Publisher class\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_Publisher, /*tp_traverse*/
  __pyx_tp_clear_3dds_Publisher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_Publisher, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_Publisher, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_Subscriber __pyx_vtable_3dds_Subscriber;

static PyObject *__pyx_tp_new_3dds_Subscriber(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_Subscriber *p;
  PyObject *o = __pyx_tp_new_3dds_Entity(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_Subscriber *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Entity*)__pyx_vtabptr_3dds_Subscriber;
  p->_readers = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_10Subscriber_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_Subscriber(PyObject *o) {
  struct __pyx_obj_3dds_Subscriber *p = (struct __pyx_obj_3dds_Subscriber *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_readers);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Entity(o);
}

static int __pyx_tp_traverse_3dds_Subscriber(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_Subscriber *p = (struct __pyx_obj_3dds_Subscriber *)o;
  e = __pyx_tp_traverse_3dds_Entity(o, v, a); if (e) return e;
  if (p->_readers) {
    e = (*v)(p->_readers, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_Subscriber(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_Subscriber *p = (struct __pyx_obj_3dds_Subscriber *)o;
  __pyx_tp_clear_3dds_Entity(o);
  tmp = ((PyObject*)p->_readers);
  p->_readers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_Subscriber[] = {
  {"create_datareader", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10Subscriber_3create_datareader, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10Subscriber_2create_datareader},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_10Subscriber_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_10Subscriber_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_Subscriber = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.Subscriber", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_Subscriber), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_Subscriber, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Subscriber class\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_Subscriber, /*tp_traverse*/
  __pyx_tp_clear_3dds_Subscriber, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_Subscriber, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_Subscriber, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_DataWriter __pyx_vtable_3dds_DataWriter;

static PyObject *__pyx_tp_new_3dds_DataWriter(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_DataWriter *p;
  PyObject *o = __pyx_tp_new_3dds_Entity(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_DataWriter *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Entity*)__pyx_vtabptr_3dds_DataWriter;
  p->_typesupport = Py_None; Py_INCREF(Py_None);
  p->_topic = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_10DataWriter_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_DataWriter(PyObject *o) {
  struct __pyx_obj_3dds_DataWriter *p = (struct __pyx_obj_3dds_DataWriter *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_typesupport);
  Py_CLEAR(p->_topic);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Entity(o);
}

static int __pyx_tp_traverse_3dds_DataWriter(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_DataWriter *p = (struct __pyx_obj_3dds_DataWriter *)o;
  e = __pyx_tp_traverse_3dds_Entity(o, v, a); if (e) return e;
  if (p->_typesupport) {
    e = (*v)(p->_typesupport, a); if (e) return e;
  }
  if (p->_topic) {
    e = (*v)(p->_topic, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_DataWriter(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_DataWriter *p = (struct __pyx_obj_3dds_DataWriter *)o;
  __pyx_tp_clear_3dds_Entity(o);
  tmp = ((PyObject*)p->_typesupport);
  p->_typesupport = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_topic);
  p->_topic = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_DataWriter[] = {
  {"write", (PyCFunction)__pyx_pw_3dds_10DataWriter_3write, METH_O, __pyx_doc_3dds_10DataWriter_2write},
  {"write_ts", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataWriter_5write_ts, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataWriter_4write_ts},
  {"dispose_instance", (PyCFunction)__pyx_pw_3dds_10DataWriter_7dispose_instance, METH_O, __pyx_doc_3dds_10DataWriter_6dispose_instance},
  {"dispose_instance_ts", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataWriter_9dispose_instance_ts, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataWriter_8dispose_instance_ts},
  {"publication_matched_status", (PyCFunction)__pyx_pw_3dds_10DataWriter_11publication_matched_status, METH_NOARGS, __pyx_doc_3dds_10DataWriter_10publication_matched_status},
  {"liveliness_lost_status", (PyCFunction)__pyx_pw_3dds_10DataWriter_13liveliness_lost_status, METH_NOARGS, __pyx_doc_3dds_10DataWriter_12liveliness_lost_status},
  {"offered_deadline_missed_status", (PyCFunction)__pyx_pw_3dds_10DataWriter_15offered_deadline_missed_status, METH_NOARGS, __pyx_doc_3dds_10DataWriter_14offered_deadline_missed_status},
  {"offered_incompatible_qos_status", (PyCFunction)__pyx_pw_3dds_10DataWriter_17offered_incompatible_qos_status, METH_NOARGS, __pyx_doc_3dds_10DataWriter_16offered_incompatible_qos_status},
  {"register_instance", (PyCFunction)__pyx_pw_3dds_10DataWriter_19register_instance, METH_O, __pyx_doc_3dds_10DataWriter_18register_instance},
  {"unregister_instance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataWriter_21unregister_instance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataWriter_20unregister_instance},
  {"lookup_instance", (PyCFunction)__pyx_pw_3dds_10DataWriter_23lookup_instance, METH_O, __pyx_doc_3dds_10DataWriter_22lookup_instance},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_10DataWriter_25__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_10DataWriter_27__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_DataWriter = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.DataWriter", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_DataWriter), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_DataWriter, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    DataWriter class\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_DataWriter, /*tp_traverse*/
  __pyx_tp_clear_3dds_DataWriter, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_DataWriter, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_DataWriter, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_DataReader __pyx_vtable_3dds_DataReader;

static PyObject *__pyx_tp_new_3dds_DataReader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_DataReader *p;
  PyObject *o = __pyx_tp_new_3dds_Entity(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_DataReader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Entity*)__pyx_vtabptr_3dds_DataReader;
  p->_typesupport = Py_None; Py_INCREF(Py_None);
  p->_topic = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_10DataReader_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_DataReader(PyObject *o) {
  struct __pyx_obj_3dds_DataReader *p = (struct __pyx_obj_3dds_DataReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_typesupport);
  Py_CLEAR(p->_topic);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Entity(o);
}

static int __pyx_tp_traverse_3dds_DataReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_DataReader *p = (struct __pyx_obj_3dds_DataReader *)o;
  e = __pyx_tp_traverse_3dds_Entity(o, v, a); if (e) return e;
  if (p->_typesupport) {
    e = (*v)(p->_typesupport, a); if (e) return e;
  }
  if (p->_topic) {
    e = (*v)(p->_topic, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_DataReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_DataReader *p = (struct __pyx_obj_3dds_DataReader *)o;
  __pyx_tp_clear_3dds_Entity(o);
  tmp = ((PyObject*)p->_typesupport);
  p->_typesupport = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_topic);
  p->_topic = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_DataReader[] = {
  {"read", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_3read, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_2read},
  {"take", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_5take, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_4take},
  {"read_cond", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_7read_cond, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_6read_cond},
  {"take_cond", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_9take_cond, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_8take_cond},
  {"take_instance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_11take_instance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_10take_instance},
  {"read_instance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_13read_instance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_12read_instance},
  {"wait_for_historical_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_15wait_for_historical_data, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_14wait_for_historical_data},
  {"subscription_matched_status", (PyCFunction)__pyx_pw_3dds_10DataReader_17subscription_matched_status, METH_NOARGS, __pyx_doc_3dds_10DataReader_16subscription_matched_status},
  {"liveliness_changed_status", (PyCFunction)__pyx_pw_3dds_10DataReader_19liveliness_changed_status, METH_NOARGS, __pyx_doc_3dds_10DataReader_18liveliness_changed_status},
  {"requested_deadline_missed_status", (PyCFunction)__pyx_pw_3dds_10DataReader_21requested_deadline_missed_status, METH_NOARGS, __pyx_doc_3dds_10DataReader_20requested_deadline_missed_status},
  {"requested_incompatible_qos_status", (PyCFunction)__pyx_pw_3dds_10DataReader_23requested_incompatible_qos_status, METH_NOARGS, __pyx_doc_3dds_10DataReader_22requested_incompatible_qos_status},
  {"sample_rejected_status", (PyCFunction)__pyx_pw_3dds_10DataReader_25sample_rejected_status, METH_NOARGS, __pyx_doc_3dds_10DataReader_24sample_rejected_status},
  {"sample_lost_status", (PyCFunction)__pyx_pw_3dds_10DataReader_27sample_lost_status, METH_NOARGS, __pyx_doc_3dds_10DataReader_26sample_lost_status},
  {"create_readcondition", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_29create_readcondition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_28create_readcondition},
  {"create_querycondition", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_10DataReader_31create_querycondition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_10DataReader_30create_querycondition},
  {"lookup_instance", (PyCFunction)__pyx_pw_3dds_10DataReader_33lookup_instance, METH_O, __pyx_doc_3dds_10DataReader_32lookup_instance},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_10DataReader_35__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_10DataReader_37__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_DataReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.DataReader", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_DataReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_DataReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    DataReader class\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_DataReader, /*tp_traverse*/
  __pyx_tp_clear_3dds_DataReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_DataReader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_DataReader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_Condition __pyx_vtable_3dds_Condition;

static PyObject *__pyx_tp_new_3dds_Condition(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3dds_Condition *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_Condition *)o);
  p->__pyx_vtab = __pyx_vtabptr_3dds_Condition;
  if (unlikely(__pyx_pw_3dds_9Condition_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_Condition(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_3dds_9Condition_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_3dds_Condition[] = {
  {"triggered", (PyCFunction)__pyx_pw_3dds_9Condition_5triggered, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_9Condition_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_9Condition_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_Condition = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.Condition", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_Condition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_Condition, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Abstract condition class\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_Condition, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_Condition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_StatusCondition __pyx_vtable_3dds_StatusCondition;

static PyObject *__pyx_tp_new_3dds_StatusCondition(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_StatusCondition *p;
  PyObject *o = __pyx_tp_new_3dds_Condition(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_StatusCondition *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Condition*)__pyx_vtabptr_3dds_StatusCondition;
  p->_entity = Py_None; Py_INCREF(Py_None);
  p->_masks = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_15StatusCondition_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_StatusCondition(PyObject *o) {
  struct __pyx_obj_3dds_StatusCondition *p = (struct __pyx_obj_3dds_StatusCondition *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_entity);
  Py_CLEAR(p->_masks);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Condition(o);
}

static int __pyx_tp_traverse_3dds_StatusCondition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_StatusCondition *p = (struct __pyx_obj_3dds_StatusCondition *)o;
  e = ((likely(__pyx_ptype_3dds_Condition)) ? ((__pyx_ptype_3dds_Condition->tp_traverse) ? __pyx_ptype_3dds_Condition->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_3dds_StatusCondition)); if (e) return e;
  if (p->_entity) {
    e = (*v)(p->_entity, a); if (e) return e;
  }
  if (p->_masks) {
    e = (*v)(p->_masks, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_StatusCondition(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_StatusCondition *p = (struct __pyx_obj_3dds_StatusCondition *)o;
  if (likely(__pyx_ptype_3dds_Condition)) { if (__pyx_ptype_3dds_Condition->tp_clear) __pyx_ptype_3dds_Condition->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_3dds_StatusCondition);
  tmp = ((PyObject*)p->_entity);
  p->_entity = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_masks);
  p->_masks = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_3dds_15StatusCondition_entity(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3dds_15StatusCondition_6entity_1__get__(o);
}

static PyMethodDef __pyx_methods_3dds_StatusCondition[] = {
  {"enable_status", (PyCFunction)__pyx_pw_3dds_15StatusCondition_3enable_status, METH_O, 0},
  {"get_enabled_status", (PyCFunction)__pyx_pw_3dds_15StatusCondition_5get_enabled_status, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_15StatusCondition_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_15StatusCondition_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3dds_StatusCondition[] = {
  {(char *)"entity", __pyx_getprop_3dds_15StatusCondition_entity, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_StatusCondition = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.StatusCondition", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_StatusCondition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_StatusCondition, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Status condition\n\n    :type entity: Entity\n    :param entity: Source entity\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_StatusCondition, /*tp_traverse*/
  __pyx_tp_clear_3dds_StatusCondition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_StatusCondition, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3dds_StatusCondition, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_StatusCondition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_GuardCondition __pyx_vtable_3dds_GuardCondition;

static PyObject *__pyx_tp_new_3dds_GuardCondition(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_GuardCondition *p;
  PyObject *o = __pyx_tp_new_3dds_Condition(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_GuardCondition *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Condition*)__pyx_vtabptr_3dds_GuardCondition;
  if (unlikely(__pyx_pw_3dds_14GuardCondition_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_3dds_GuardCondition[] = {
  {"trigger", (PyCFunction)__pyx_pw_3dds_14GuardCondition_3trigger, METH_NOARGS, __pyx_doc_3dds_14GuardCondition_2trigger},
  {"reset", (PyCFunction)__pyx_pw_3dds_14GuardCondition_5reset, METH_NOARGS, __pyx_doc_3dds_14GuardCondition_4reset},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_14GuardCondition_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_14GuardCondition_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_GuardCondition = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.GuardCondition", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_GuardCondition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_Condition, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Guard condition\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_GuardCondition, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_GuardCondition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_ReadCondition __pyx_vtable_3dds_ReadCondition;

static PyObject *__pyx_tp_new_3dds_ReadCondition(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_ReadCondition *p;
  PyObject *o = __pyx_tp_new_3dds_Condition(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_ReadCondition *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Condition*)__pyx_vtabptr_3dds_ReadCondition;
  p->_reader = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_13ReadCondition_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_ReadCondition(PyObject *o) {
  struct __pyx_obj_3dds_ReadCondition *p = (struct __pyx_obj_3dds_ReadCondition *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_reader);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Condition(o);
}

static int __pyx_tp_traverse_3dds_ReadCondition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_ReadCondition *p = (struct __pyx_obj_3dds_ReadCondition *)o;
  e = ((likely(__pyx_ptype_3dds_Condition)) ? ((__pyx_ptype_3dds_Condition->tp_traverse) ? __pyx_ptype_3dds_Condition->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_3dds_ReadCondition)); if (e) return e;
  if (p->_reader) {
    e = (*v)(p->_reader, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_ReadCondition(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_ReadCondition *p = (struct __pyx_obj_3dds_ReadCondition *)o;
  if (likely(__pyx_ptype_3dds_Condition)) { if (__pyx_ptype_3dds_Condition->tp_clear) __pyx_ptype_3dds_Condition->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_3dds_ReadCondition);
  tmp = ((PyObject*)p->_reader);
  p->_reader = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_ReadCondition[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_13ReadCondition_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_13ReadCondition_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_ReadCondition = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.ReadCondition", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_ReadCondition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_ReadCondition, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Read condition\n\n    :type reader: DataReader\n    :param reader: Source DataReader\n\n    :type masks: list\n    :param masks: list of masks (default: :meth:`.DDSMaskUtil.all_samples()`\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_ReadCondition, /*tp_traverse*/
  __pyx_tp_clear_3dds_ReadCondition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_ReadCondition, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_ReadCondition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_3dds_QueryCondition __pyx_vtable_3dds_QueryCondition;

static PyObject *__pyx_tp_new_3dds_QueryCondition(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3dds_QueryCondition *p;
  PyObject *o = __pyx_tp_new_3dds_Condition(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_QueryCondition *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3dds_Condition*)__pyx_vtabptr_3dds_QueryCondition;
  p->_reader = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_14QueryCondition_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_QueryCondition(PyObject *o) {
  struct __pyx_obj_3dds_QueryCondition *p = (struct __pyx_obj_3dds_QueryCondition *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_reader);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_3dds_Condition(o);
}

static int __pyx_tp_traverse_3dds_QueryCondition(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_QueryCondition *p = (struct __pyx_obj_3dds_QueryCondition *)o;
  e = ((likely(__pyx_ptype_3dds_Condition)) ? ((__pyx_ptype_3dds_Condition->tp_traverse) ? __pyx_ptype_3dds_Condition->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_3dds_QueryCondition)); if (e) return e;
  if (p->_reader) {
    e = (*v)(p->_reader, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_QueryCondition(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_QueryCondition *p = (struct __pyx_obj_3dds_QueryCondition *)o;
  if (likely(__pyx_ptype_3dds_Condition)) { if (__pyx_ptype_3dds_Condition->tp_clear) __pyx_ptype_3dds_Condition->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_3dds_QueryCondition);
  tmp = ((PyObject*)p->_reader);
  p->_reader = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_QueryCondition[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_14QueryCondition_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_14QueryCondition_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_QueryCondition = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.QueryCondition", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_QueryCondition), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_QueryCondition, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Query condition\n\n    :type reader: DataReader\n    :param reader: Source DataReader\n\n    :type masks: list\n    :param masks: list of masks (default: :meth:`.DDSMaskUtil.all_samples()`\n\n    :type expression: string\n    :param expression: Expression\n\n    :type parameters: list\n    :param parameters: list of parameters in string\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_QueryCondition, /*tp_traverse*/
  __pyx_tp_clear_3dds_QueryCondition, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_QueryCondition, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_QueryCondition, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_3dds_WaitSet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3dds_WaitSet *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3dds_WaitSet *)o);
  p->_conditions = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_3dds_7WaitSet_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_WaitSet(PyObject *o) {
  struct __pyx_obj_3dds_WaitSet *p = (struct __pyx_obj_3dds_WaitSet *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_3dds_7WaitSet_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_conditions);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_3dds_WaitSet(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3dds_WaitSet *p = (struct __pyx_obj_3dds_WaitSet *)o;
  if (p->_conditions) {
    e = (*v)(p->_conditions, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3dds_WaitSet(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3dds_WaitSet *p = (struct __pyx_obj_3dds_WaitSet *)o;
  tmp = ((PyObject*)p->_conditions);
  p->_conditions = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_3dds_WaitSet[] = {
  {"get_conditions", (PyCFunction)__pyx_pw_3dds_7WaitSet_5get_conditions, METH_NOARGS, __pyx_doc_3dds_7WaitSet_4get_conditions},
  {"attach", (PyCFunction)__pyx_pw_3dds_7WaitSet_7attach, METH_O, __pyx_doc_3dds_7WaitSet_6attach},
  {"detach", (PyCFunction)__pyx_pw_3dds_7WaitSet_9detach, METH_O, __pyx_doc_3dds_7WaitSet_8detach},
  {"wait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_7WaitSet_11wait, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3dds_7WaitSet_10wait},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_7WaitSet_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_7WaitSet_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_WaitSet = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.WaitSet", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_WaitSet), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_WaitSet, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    WaitSet class\n    ", /*tp_doc*/
  __pyx_tp_traverse_3dds_WaitSet, /*tp_traverse*/
  __pyx_tp_clear_3dds_WaitSet, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_WaitSet, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_WaitSet, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_3dds_QosProvider(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_3dds_11QosProvider_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3dds_QosProvider(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_3dds_11QosProvider_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_3dds_QosProvider[] = {
  {"get_participant_qos", (PyCFunction)__pyx_pw_3dds_11QosProvider_5get_participant_qos, METH_NOARGS, __pyx_doc_3dds_11QosProvider_4get_participant_qos},
  {"get_topic_qos", (PyCFunction)__pyx_pw_3dds_11QosProvider_7get_topic_qos, METH_NOARGS, __pyx_doc_3dds_11QosProvider_6get_topic_qos},
  {"get_publisher_qos", (PyCFunction)__pyx_pw_3dds_11QosProvider_9get_publisher_qos, METH_NOARGS, __pyx_doc_3dds_11QosProvider_8get_publisher_qos},
  {"get_subscriber_qos", (PyCFunction)__pyx_pw_3dds_11QosProvider_11get_subscriber_qos, METH_NOARGS, __pyx_doc_3dds_11QosProvider_10get_subscriber_qos},
  {"get_writer_qos", (PyCFunction)__pyx_pw_3dds_11QosProvider_13get_writer_qos, METH_NOARGS, __pyx_doc_3dds_11QosProvider_12get_writer_qos},
  {"get_reader_qos", (PyCFunction)__pyx_pw_3dds_11QosProvider_15get_reader_qos, METH_NOARGS, __pyx_doc_3dds_11QosProvider_14get_reader_qos},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_11QosProvider_17__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_11QosProvider_19__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds_QosProvider = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds.QosProvider", /*tp_name*/
  sizeof(struct __pyx_obj_3dds_QosProvider), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds_QosProvider, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    QoS Provider class\n\n    :type uri: string\n    :param uri: uri to xml file\n\n    :type profile: string\n    :param profile: profile name\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds_QosProvider, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds_QosProvider, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_3dds__SerializationHelper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3dds__SerializationHelper(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_3dds__SerializationHelper[] = {
  {"bytes_to_ptr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_20_SerializationHelper_1bytes_to_ptr, METH_VARARGS|METH_KEYWORDS, 0},
  {"ptr_to_bytes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3dds_20_SerializationHelper_3ptr_to_bytes, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3dds_20_SerializationHelper_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3dds_20_SerializationHelper_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3dds__SerializationHelper = {
  PyVarObject_HEAD_INIT(0, 0)
  "dds._SerializationHelper", /*tp_name*/
  sizeof(struct __pyx_obj_3dds__SerializationHelper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3dds__SerializationHelper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3dds__SerializationHelper, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3dds__SerializationHelper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_dds(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_dds},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "dds",
    __pyx_k_DDS_Python_DCPS_API_class, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_n_s_ALIVE_INSTANCE_STATE, __pyx_k_ALIVE_INSTANCE_STATE, sizeof(__pyx_k_ALIVE_INSTANCE_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_ANY_INSTANCE_STATE, __pyx_k_ANY_INSTANCE_STATE, sizeof(__pyx_k_ANY_INSTANCE_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_ANY_SAMPLE_STATE, __pyx_k_ANY_SAMPLE_STATE, sizeof(__pyx_k_ANY_SAMPLE_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_ANY_STATE, __pyx_k_ANY_STATE, sizeof(__pyx_k_ANY_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_ANY_VIEW_STATE, __pyx_k_ANY_VIEW_STATE, sizeof(__pyx_k_ANY_VIEW_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_AUTOMATIC, __pyx_k_AUTOMATIC, sizeof(__pyx_k_AUTOMATIC), 0, 0, 1, 1},
  {&__pyx_kp_s_Abstract_Listener_class, __pyx_k_Abstract_Listener_class, sizeof(__pyx_k_Abstract_Listener_class), 0, 0, 1, 0},
  {&__pyx_kp_s_Abstract_QoS_policy_class_Users, __pyx_k_Abstract_QoS_policy_class_Users, sizeof(__pyx_k_Abstract_QoS_policy_class_Users), 0, 0, 1, 0},
  {&__pyx_kp_s_Argument_1_is_not_of_type_dds_Re, __pyx_k_Argument_1_is_not_of_type_dds_Re, sizeof(__pyx_k_Argument_1_is_not_of_type_dds_Re), 0, 0, 1, 0},
  {&__pyx_n_s_BEST_EFFORT, __pyx_k_BEST_EFFORT, sizeof(__pyx_k_BEST_EFFORT), 0, 0, 1, 1},
  {&__pyx_n_s_BY_RECEPTION_TIMESTAMP, __pyx_k_BY_RECEPTION_TIMESTAMP, sizeof(__pyx_k_BY_RECEPTION_TIMESTAMP), 0, 0, 1, 1},
  {&__pyx_n_s_BY_SOURCE_TIMESTAMP, __pyx_k_BY_SOURCE_TIMESTAMP, sizeof(__pyx_k_BY_SOURCE_TIMESTAMP), 0, 0, 1, 1},
  {&__pyx_kp_s_Bad_parameter, __pyx_k_Bad_parameter, sizeof(__pyx_k_Bad_parameter), 0, 0, 1, 0},
  {&__pyx_kp_s_Base_sample_info_class, __pyx_k_Base_sample_info_class, sizeof(__pyx_k_Base_sample_info_class), 0, 0, 1, 0},
  {&__pyx_n_s_CMDataReader, __pyx_k_CMDataReader, sizeof(__pyx_k_CMDataReader), 0, 0, 1, 1},
  {&__pyx_n_s_CMDataWriter, __pyx_k_CMDataWriter, sizeof(__pyx_k_CMDataWriter), 0, 0, 1, 1},
  {&__pyx_n_s_CMParticipant, __pyx_k_CMParticipant, sizeof(__pyx_k_CMParticipant), 0, 0, 1, 1},
  {&__pyx_n_s_CMPublisher, __pyx_k_CMPublisher, sizeof(__pyx_k_CMPublisher), 0, 0, 1, 1},
  {&__pyx_n_s_CMSubscriber, __pyx_k_CMSubscriber, sizeof(__pyx_k_CMSubscriber), 0, 0, 1, 1},
  {&__pyx_kp_s_Cannot_create_directly_data_read, __pyx_k_Cannot_create_directly_data_read, sizeof(__pyx_k_Cannot_create_directly_data_read), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_create_directly_data_writ, __pyx_k_Cannot_create_directly_data_writ, sizeof(__pyx_k_Cannot_create_directly_data_writ), 0, 0, 1, 0},
  {&__pyx_n_s_Condition, __pyx_k_Condition, sizeof(__pyx_k_Condition), 0, 0, 1, 1},
  {&__pyx_n_s_DATA_AVAILABLE, __pyx_k_DATA_AVAILABLE, sizeof(__pyx_k_DATA_AVAILABLE), 0, 0, 1, 1},
  {&__pyx_n_s_DATA_ON_READERS, __pyx_k_DATA_ON_READERS, sizeof(__pyx_k_DATA_ON_READERS), 0, 0, 1, 1},
  {&__pyx_n_s_DCPSParticipant, __pyx_k_DCPSParticipant, sizeof(__pyx_k_DCPSParticipant), 0, 0, 1, 1},
  {&__pyx_n_s_DCPSPublication, __pyx_k_DCPSPublication, sizeof(__pyx_k_DCPSPublication), 0, 0, 1, 1},
  {&__pyx_n_s_DCPSSubscription, __pyx_k_DCPSSubscription, sizeof(__pyx_k_DCPSSubscription), 0, 0, 1, 1},
  {&__pyx_n_s_DCPSTopic, __pyx_k_DCPSTopic, sizeof(__pyx_k_DCPSTopic), 0, 0, 1, 1},
  {&__pyx_n_s_DCPSType, __pyx_k_DCPSType, sizeof(__pyx_k_DCPSType), 0, 0, 1, 1},
  {&__pyx_n_s_DDSDestinationOrderKind, __pyx_k_DDSDestinationOrderKind, sizeof(__pyx_k_DDSDestinationOrderKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSDurabilityKind, __pyx_k_DDSDurabilityKind, sizeof(__pyx_k_DDSDurabilityKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSDuration, __pyx_k_DDSDuration, sizeof(__pyx_k_DDSDuration), 0, 0, 1, 1},
  {&__pyx_n_s_DDSDuration_infinity, __pyx_k_DDSDuration_infinity, sizeof(__pyx_k_DDSDuration_infinity), 0, 0, 1, 1},
  {&__pyx_n_s_DDSException, __pyx_k_DDSException, sizeof(__pyx_k_DDSException), 0, 0, 1, 1},
  {&__pyx_n_s_DDSException___init, __pyx_k_DDSException___init, sizeof(__pyx_k_DDSException___init), 0, 0, 1, 1},
  {&__pyx_n_s_DDSHistoryKind, __pyx_k_DDSHistoryKind, sizeof(__pyx_k_DDSHistoryKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSLivelinessKind, __pyx_k_DDSLivelinessKind, sizeof(__pyx_k_DDSLivelinessKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSMaskUtil, __pyx_k_DDSMaskUtil, sizeof(__pyx_k_DDSMaskUtil), 0, 0, 1, 1},
  {&__pyx_n_s_DDSMaskUtil_all_samples, __pyx_k_DDSMaskUtil_all_samples, sizeof(__pyx_k_DDSMaskUtil_all_samples), 0, 0, 1, 1},
  {&__pyx_n_s_DDSMaskUtil_new_instance_samples, __pyx_k_DDSMaskUtil_new_instance_samples, sizeof(__pyx_k_DDSMaskUtil_new_instance_samples), 0, 0, 1, 1},
  {&__pyx_n_s_DDSMaskUtil_new_samples, __pyx_k_DDSMaskUtil_new_samples, sizeof(__pyx_k_DDSMaskUtil_new_samples), 0, 0, 1, 1},
  {&__pyx_n_s_DDSMaskUtil_not_alive_instance_s, __pyx_k_DDSMaskUtil_not_alive_instance_s, sizeof(__pyx_k_DDSMaskUtil_not_alive_instance_s), 0, 0, 1, 1},
  {&__pyx_n_s_DDSMaskUtil_read_samples, __pyx_k_DDSMaskUtil_read_samples, sizeof(__pyx_k_DDSMaskUtil_read_samples), 0, 0, 1, 1},
  {&__pyx_n_s_DDSOwnershipKind, __pyx_k_DDSOwnershipKind, sizeof(__pyx_k_DDSOwnershipKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSPresentationAccessScopeKind, __pyx_k_DDSPresentationAccessScopeKind, sizeof(__pyx_k_DDSPresentationAccessScopeKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSReliabilityKind, __pyx_k_DDSReliabilityKind, sizeof(__pyx_k_DDSReliabilityKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSSampleRejectedStatusKind, __pyx_k_DDSSampleRejectedStatusKind, sizeof(__pyx_k_DDSSampleRejectedStatusKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSStateKind, __pyx_k_DDSStateKind, sizeof(__pyx_k_DDSStateKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSStatusKind, __pyx_k_DDSStatusKind, sizeof(__pyx_k_DDSStatusKind), 0, 0, 1, 1},
  {&__pyx_n_s_DDSTime, __pyx_k_DDSTime, sizeof(__pyx_k_DDSTime), 0, 0, 1, 1},
  {&__pyx_n_s_DDSTime___init, __pyx_k_DDSTime___init, sizeof(__pyx_k_DDSTime___init), 0, 0, 1, 1},
  {&__pyx_kp_s_DDS_CMDataReaderBuiltinTopicData, __pyx_k_DDS_CMDataReaderBuiltinTopicData, sizeof(__pyx_k_DDS_CMDataReaderBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_CMDataWriterBuiltinTopicData, __pyx_k_DDS_CMDataWriterBuiltinTopicData, sizeof(__pyx_k_DDS_CMDataWriterBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_CMParticipantBuiltinTopicDat, __pyx_k_DDS_CMParticipantBuiltinTopicDat, sizeof(__pyx_k_DDS_CMParticipantBuiltinTopicDat), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_CMPublisherBuiltinTopicData, __pyx_k_DDS_CMPublisherBuiltinTopicData, sizeof(__pyx_k_DDS_CMPublisherBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_CMSubscriberBuiltinTopicData, __pyx_k_DDS_CMSubscriberBuiltinTopicData, sizeof(__pyx_k_DDS_CMSubscriberBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_Duration_type_sec_long_para, __pyx_k_DDS_Duration_type_sec_long_para, sizeof(__pyx_k_DDS_Duration_type_sec_long_para), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_ParticipantBuiltinTopicData, __pyx_k_DDS_ParticipantBuiltinTopicData, sizeof(__pyx_k_DDS_ParticipantBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_PublicationBuiltinTopicData, __pyx_k_DDS_PublicationBuiltinTopicData, sizeof(__pyx_k_DDS_PublicationBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_SubscriptionBuiltinTopicData, __pyx_k_DDS_SubscriptionBuiltinTopicData, sizeof(__pyx_k_DDS_SubscriptionBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_Time_type_sec_long_param_se, __pyx_k_DDS_Time_type_sec_long_param_se, sizeof(__pyx_k_DDS_Time_type_sec_long_param_se), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_TopicBuiltinTopicData, __pyx_k_DDS_TopicBuiltinTopicData, sizeof(__pyx_k_DDS_TopicBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_TypeBuiltinTopicData, __pyx_k_DDS_TypeBuiltinTopicData, sizeof(__pyx_k_DDS_TypeBuiltinTopicData), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_exception, __pyx_k_DDS_exception, sizeof(__pyx_k_DDS_exception), 0, 0, 1, 0},
  {&__pyx_kp_s_DDS_read_take_operation_failed, __pyx_k_DDS_read_take_operation_failed, sizeof(__pyx_k_DDS_read_take_operation_failed), 0, 0, 1, 0},
  {&__pyx_n_s_DEADLINE_QOS_POLICY_ID, __pyx_k_DEADLINE_QOS_POLICY_ID, sizeof(__pyx_k_DEADLINE_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_DESTINATIONORDER_QOS_POLICY_ID, __pyx_k_DESTINATIONORDER_QOS_POLICY_ID, sizeof(__pyx_k_DESTINATIONORDER_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_DURABILITYSERVICE_QOS_POLICY_ID, __pyx_k_DURABILITYSERVICE_QOS_POLICY_ID, sizeof(__pyx_k_DURABILITYSERVICE_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_DURABILITY_QOS_POLICY_ID, __pyx_k_DURABILITY_QOS_POLICY_ID, sizeof(__pyx_k_DURABILITY_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_DataReader, __pyx_k_DataReader, sizeof(__pyx_k_DataReader), 0, 0, 1, 1},
  {&__pyx_n_s_DataWriter, __pyx_k_DataWriter, sizeof(__pyx_k_DataWriter), 0, 0, 1, 1},
  {&__pyx_n_s_DeadlineQosPolicy, __pyx_k_DeadlineQosPolicy, sizeof(__pyx_k_DeadlineQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_DeadlineQosPolicy___init, __pyx_k_DeadlineQosPolicy___init, sizeof(__pyx_k_DeadlineQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_DeadlineQosPolicy_deadline, __pyx_k_DeadlineQosPolicy_deadline, sizeof(__pyx_k_DeadlineQosPolicy_deadline), 0, 0, 1, 1},
  {&__pyx_kp_s_Deadline_QoS_Policy_type_deadli, __pyx_k_Deadline_QoS_Policy_type_deadli, sizeof(__pyx_k_Deadline_QoS_Policy_type_deadli), 0, 0, 1, 0},
  {&__pyx_n_s_DestinationOrderQosPolicy, __pyx_k_DestinationOrderQosPolicy, sizeof(__pyx_k_DestinationOrderQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_DestinationOrderQosPolicy___init, __pyx_k_DestinationOrderQosPolicy___init, sizeof(__pyx_k_DestinationOrderQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_kp_s_Destination_order_QoS_Policy_ty, __pyx_k_Destination_order_QoS_Policy_ty, sizeof(__pyx_k_Destination_order_QoS_Policy_ty), 0, 0, 1, 0},
  {&__pyx_n_s_DomainParticipant, __pyx_k_DomainParticipant, sizeof(__pyx_k_DomainParticipant), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityQosPolicy, __pyx_k_DurabilityQosPolicy, sizeof(__pyx_k_DurabilityQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityQosPolicy___init, __pyx_k_DurabilityQosPolicy___init, sizeof(__pyx_k_DurabilityQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityServiceQosPolicy, __pyx_k_DurabilityServiceQosPolicy, sizeof(__pyx_k_DurabilityServiceQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityServiceQosPolicy___ini, __pyx_k_DurabilityServiceQosPolicy___ini, sizeof(__pyx_k_DurabilityServiceQosPolicy___ini), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityServiceQosPolicy_histo, __pyx_k_DurabilityServiceQosPolicy_histo, sizeof(__pyx_k_DurabilityServiceQosPolicy_histo), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityServiceQosPolicy_histo_2, __pyx_k_DurabilityServiceQosPolicy_histo_2, sizeof(__pyx_k_DurabilityServiceQosPolicy_histo_2), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityServiceQosPolicy_max_i, __pyx_k_DurabilityServiceQosPolicy_max_i, sizeof(__pyx_k_DurabilityServiceQosPolicy_max_i), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityServiceQosPolicy_max_s, __pyx_k_DurabilityServiceQosPolicy_max_s, sizeof(__pyx_k_DurabilityServiceQosPolicy_max_s), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityServiceQosPolicy_max_s_2, __pyx_k_DurabilityServiceQosPolicy_max_s_2, sizeof(__pyx_k_DurabilityServiceQosPolicy_max_s_2), 0, 0, 1, 1},
  {&__pyx_n_s_DurabilityServiceQosPolicy_servi, __pyx_k_DurabilityServiceQosPolicy_servi, sizeof(__pyx_k_DurabilityServiceQosPolicy_servi), 0, 0, 1, 1},
  {&__pyx_kp_s_Durability_QoS_Policy_type_k_DD, __pyx_k_Durability_QoS_Policy_type_k_DD, sizeof(__pyx_k_Durability_QoS_Policy_type_k_DD), 0, 0, 1, 0},
  {&__pyx_kp_s_Durability_service_QoS_Policy_t, __pyx_k_Durability_service_QoS_Policy_t, sizeof(__pyx_k_Durability_service_QoS_Policy_t), 0, 0, 1, 0},
  {&__pyx_n_s_ENTITYFACTORY_QOS_POLICY_ID, __pyx_k_ENTITYFACTORY_QOS_POLICY_ID, sizeof(__pyx_k_ENTITYFACTORY_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_EXCLUSIVE, __pyx_k_EXCLUSIVE, sizeof(__pyx_k_EXCLUSIVE), 0, 0, 1, 1},
  {&__pyx_kp_s_Either_data_or_handle_must_be_pr, __pyx_k_Either_data_or_handle_must_be_pr, sizeof(__pyx_k_Either_data_or_handle_must_be_pr), 0, 0, 1, 0},
  {&__pyx_n_s_Entity, __pyx_k_Entity, sizeof(__pyx_k_Entity), 0, 0, 1, 1},
  {&__pyx_kp_s_Entity_is_already_closed, __pyx_k_Entity_is_already_closed, sizeof(__pyx_k_Entity_is_already_closed), 0, 0, 1, 0},
  {&__pyx_n_s_Enum, __pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 0, 1, 1},
  {&__pyx_kp_s_Enumeration_of_Qos_policy_kinds, __pyx_k_Enumeration_of_Qos_policy_kinds, sizeof(__pyx_k_Enumeration_of_Qos_policy_kinds), 0, 0, 1, 0},
  {&__pyx_kp_s_Error_setting_entity_status_for, __pyx_k_Error_setting_entity_status_for, sizeof(__pyx_k_Error_setting_entity_status_for), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_attach_condition, __pyx_k_Failed_to_attach_condition, sizeof(__pyx_k_Failed_to_attach_condition), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_data_reader, __pyx_k_Failed_to_create_data_reader, sizeof(__pyx_k_Failed_to_create_data_reader), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_data_writer, __pyx_k_Failed_to_create_data_writer, sizeof(__pyx_k_Failed_to_create_data_writer), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_guard_condition, __pyx_k_Failed_to_create_guard_condition, sizeof(__pyx_k_Failed_to_create_guard_condition), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_participant, __pyx_k_Failed_to_create_participant, sizeof(__pyx_k_Failed_to_create_participant), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_publisher, __pyx_k_Failed_to_create_publisher, sizeof(__pyx_k_Failed_to_create_publisher), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_query_condition, __pyx_k_Failed_to_create_query_condition, sizeof(__pyx_k_Failed_to_create_query_condition), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_read_condition, __pyx_k_Failed_to_create_read_condition, sizeof(__pyx_k_Failed_to_create_read_condition), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_status_conditio, __pyx_k_Failed_to_create_status_conditio, sizeof(__pyx_k_Failed_to_create_status_conditio), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_subscriber, __pyx_k_Failed_to_create_subscriber, sizeof(__pyx_k_Failed_to_create_subscriber), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_topic, __pyx_k_Failed_to_create_topic, sizeof(__pyx_k_Failed_to_create_topic), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_dispose_instance, __pyx_k_Failed_to_dispose_instance, sizeof(__pyx_k_Failed_to_dispose_instance), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_participant_QoS, __pyx_k_Failed_to_get_participant_QoS, sizeof(__pyx_k_Failed_to_get_participant_QoS), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_publisher_QoS, __pyx_k_Failed_to_get_publisher_QoS, sizeof(__pyx_k_Failed_to_get_publisher_QoS), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_reader_QoS, __pyx_k_Failed_to_get_reader_QoS, sizeof(__pyx_k_Failed_to_get_reader_QoS), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_subscriber_QoS, __pyx_k_Failed_to_get_subscriber_QoS, sizeof(__pyx_k_Failed_to_get_subscriber_QoS), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_topic_QoS, __pyx_k_Failed_to_get_topic_QoS, sizeof(__pyx_k_Failed_to_get_topic_QoS), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_writer_QoS, __pyx_k_Failed_to_get_writer_QoS, sizeof(__pyx_k_Failed_to_get_writer_QoS), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_write_data, __pyx_k_Failed_to_write_data, sizeof(__pyx_k_Failed_to_write_data), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_inconsistent, __pyx_k_Failure_retrieving_inconsistent, sizeof(__pyx_k_Failure_retrieving_inconsistent), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_liveliness_lo, __pyx_k_Failure_retrieving_liveliness_lo, sizeof(__pyx_k_Failure_retrieving_liveliness_lo), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_offered_deadl, __pyx_k_Failure_retrieving_offered_deadl, sizeof(__pyx_k_Failure_retrieving_offered_deadl), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_offered_incom, __pyx_k_Failure_retrieving_offered_incom, sizeof(__pyx_k_Failure_retrieving_offered_incom), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_publication_m, __pyx_k_Failure_retrieving_publication_m, sizeof(__pyx_k_Failure_retrieving_publication_m), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_requested_dea, __pyx_k_Failure_retrieving_requested_dea, sizeof(__pyx_k_Failure_retrieving_requested_dea), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_requested_inc, __pyx_k_Failure_retrieving_requested_inc, sizeof(__pyx_k_Failure_retrieving_requested_inc), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_sample_lost_s, __pyx_k_Failure_retrieving_sample_lost_s, sizeof(__pyx_k_Failure_retrieving_sample_lost_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_sample_reject, __pyx_k_Failure_retrieving_sample_reject, sizeof(__pyx_k_Failure_retrieving_sample_reject), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_retrieving_subscription, __pyx_k_Failure_retrieving_subscription, sizeof(__pyx_k_Failure_retrieving_subscription), 0, 0, 1, 0},
  {&__pyx_kp_s_Failure_unregistering_handle, __pyx_k_Failure_unregistering_handle, sizeof(__pyx_k_Failure_unregistering_handle), 0, 0, 1, 0},
  {&__pyx_n_s_FoundTopic, __pyx_k_FoundTopic, sizeof(__pyx_k_FoundTopic), 0, 0, 1, 1},
  {&__pyx_n_s_GROUP, __pyx_k_GROUP, sizeof(__pyx_k_GROUP), 0, 0, 1, 1},
  {&__pyx_n_s_GROUPDATA_QOS_POLICY_ID, __pyx_k_GROUPDATA_QOS_POLICY_ID, sizeof(__pyx_k_GROUPDATA_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_kp_s_Group_data_QoS_Policy_type_valu, __pyx_k_Group_data_QoS_Policy_type_valu, sizeof(__pyx_k_Group_data_QoS_Policy_type_valu), 0, 0, 1, 0},
  {&__pyx_n_s_GroupdataQosPolicy, __pyx_k_GroupdataQosPolicy, sizeof(__pyx_k_GroupdataQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_GroupdataQosPolicy___init, __pyx_k_GroupdataQosPolicy___init, sizeof(__pyx_k_GroupdataQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_GuardCondition, __pyx_k_GuardCondition, sizeof(__pyx_k_GuardCondition), 0, 0, 1, 1},
  {&__pyx_n_s_HISTORY_QOS_POLICY_ID, __pyx_k_HISTORY_QOS_POLICY_ID, sizeof(__pyx_k_HISTORY_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_HistoryQosPolicy, __pyx_k_HistoryQosPolicy, sizeof(__pyx_k_HistoryQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_HistoryQosPolicy___init, __pyx_k_HistoryQosPolicy___init, sizeof(__pyx_k_HistoryQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_HistoryQosPolicy_depth, __pyx_k_HistoryQosPolicy_depth, sizeof(__pyx_k_HistoryQosPolicy_depth), 0, 0, 1, 1},
  {&__pyx_kp_s_History_QoS_Policy_type_k_DDSHi, __pyx_k_History_QoS_Policy_type_k_DDSHi, sizeof(__pyx_k_History_QoS_Policy_type_k_DDSHi), 0, 0, 1, 0},
  {&__pyx_n_s_INCONSISTENT_TOPIC, __pyx_k_INCONSISTENT_TOPIC, sizeof(__pyx_k_INCONSISTENT_TOPIC), 0, 0, 1, 1},
  {&__pyx_n_s_INSTANCE, __pyx_k_INSTANCE, sizeof(__pyx_k_INSTANCE), 0, 0, 1, 1},
  {&__pyx_n_s_INVALID_QOS_POLICY_ID, __pyx_k_INVALID_QOS_POLICY_ID, sizeof(__pyx_k_INVALID_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_kp_s_ISO_8859_1, __pyx_k_ISO_8859_1, sizeof(__pyx_k_ISO_8859_1), 0, 0, 1, 0},
  {&__pyx_kp_s_ISO_8859_1_2, __pyx_k_ISO_8859_1_2, sizeof(__pyx_k_ISO_8859_1_2), 0, 0, 1, 0},
  {&__pyx_kp_s_ISO_8859_1_3, __pyx_k_ISO_8859_1_3, sizeof(__pyx_k_ISO_8859_1_3), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
  {&__pyx_n_s_InconsistentTopicStatus, __pyx_k_InconsistentTopicStatus, sizeof(__pyx_k_InconsistentTopicStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_InconsistentTopicStatus_total_c, __pyx_k_InconsistentTopicStatus_total_c, sizeof(__pyx_k_InconsistentTopicStatus_total_c), 0, 0, 1, 0},
  {&__pyx_n_s_KEEP_ALL, __pyx_k_KEEP_ALL, sizeof(__pyx_k_KEEP_ALL), 0, 0, 1, 1},
  {&__pyx_n_s_KEEP_LAST, __pyx_k_KEEP_LAST, sizeof(__pyx_k_KEEP_LAST), 0, 0, 1, 1},
  {&__pyx_n_s_LATENCYBUDGET_QOS_POLICY_ID, __pyx_k_LATENCYBUDGET_QOS_POLICY_ID, sizeof(__pyx_k_LATENCYBUDGET_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_LIFESPAN_QOS_POLICY_ID, __pyx_k_LIFESPAN_QOS_POLICY_ID, sizeof(__pyx_k_LIFESPAN_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_LIVELINESS_CHANGED, __pyx_k_LIVELINESS_CHANGED, sizeof(__pyx_k_LIVELINESS_CHANGED), 0, 0, 1, 1},
  {&__pyx_n_s_LIVELINESS_LOST, __pyx_k_LIVELINESS_LOST, sizeof(__pyx_k_LIVELINESS_LOST), 0, 0, 1, 1},
  {&__pyx_n_s_LIVELINESS_QOS_POLICY_ID, __pyx_k_LIVELINESS_QOS_POLICY_ID, sizeof(__pyx_k_LIVELINESS_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_LatencyBudgetQosPolicy, __pyx_k_LatencyBudgetQosPolicy, sizeof(__pyx_k_LatencyBudgetQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_LatencyBudgetQosPolicy___init, __pyx_k_LatencyBudgetQosPolicy___init, sizeof(__pyx_k_LatencyBudgetQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_LatencyBudgetQosPolicy_duration, __pyx_k_LatencyBudgetQosPolicy_duration, sizeof(__pyx_k_LatencyBudgetQosPolicy_duration), 0, 0, 1, 1},
  {&__pyx_kp_s_Latency_budget_QoS_Policy_type, __pyx_k_Latency_budget_QoS_Policy_type, sizeof(__pyx_k_Latency_budget_QoS_Policy_type), 0, 0, 1, 0},
  {&__pyx_n_s_LifespanQosPolicy, __pyx_k_LifespanQosPolicy, sizeof(__pyx_k_LifespanQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_LifespanQosPolicy___init, __pyx_k_LifespanQosPolicy___init, sizeof(__pyx_k_LifespanQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_LifespanQosPolicy_lifespan, __pyx_k_LifespanQosPolicy_lifespan, sizeof(__pyx_k_LifespanQosPolicy_lifespan), 0, 0, 1, 1},
  {&__pyx_kp_s_Lifespan_QoS_Policy_type_lifesp, __pyx_k_Lifespan_QoS_Policy_type_lifesp, sizeof(__pyx_k_Lifespan_QoS_Policy_type_lifesp), 0, 0, 1, 0},
  {&__pyx_n_s_Listener, __pyx_k_Listener, sizeof(__pyx_k_Listener), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_data_available, __pyx_k_Listener_on_data_available, sizeof(__pyx_k_Listener_on_data_available), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_data_on_readers, __pyx_k_Listener_on_data_on_readers, sizeof(__pyx_k_Listener_on_data_on_readers), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_inconsistent_topic, __pyx_k_Listener_on_inconsistent_topic, sizeof(__pyx_k_Listener_on_inconsistent_topic), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_liveliness_changed, __pyx_k_Listener_on_liveliness_changed, sizeof(__pyx_k_Listener_on_liveliness_changed), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_liveliness_lost, __pyx_k_Listener_on_liveliness_lost, sizeof(__pyx_k_Listener_on_liveliness_lost), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_offered_deadline_mis, __pyx_k_Listener_on_offered_deadline_mis, sizeof(__pyx_k_Listener_on_offered_deadline_mis), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_offered_incompatible, __pyx_k_Listener_on_offered_incompatible, sizeof(__pyx_k_Listener_on_offered_incompatible), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_publication_matched, __pyx_k_Listener_on_publication_matched, sizeof(__pyx_k_Listener_on_publication_matched), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_requested_deadline_m, __pyx_k_Listener_on_requested_deadline_m, sizeof(__pyx_k_Listener_on_requested_deadline_m), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_requested_incompatib, __pyx_k_Listener_on_requested_incompatib, sizeof(__pyx_k_Listener_on_requested_incompatib), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_sample_lost, __pyx_k_Listener_on_sample_lost, sizeof(__pyx_k_Listener_on_sample_lost), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_sample_rejected, __pyx_k_Listener_on_sample_rejected, sizeof(__pyx_k_Listener_on_sample_rejected), 0, 0, 1, 1},
  {&__pyx_n_s_Listener_on_subscription_matched, __pyx_k_Listener_on_subscription_matched, sizeof(__pyx_k_Listener_on_subscription_matched), 0, 0, 1, 1},
  {&__pyx_n_s_LivelinessChangedStatus, __pyx_k_LivelinessChangedStatus, sizeof(__pyx_k_LivelinessChangedStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_LivelinessChangedStatus_alive_c, __pyx_k_LivelinessChangedStatus_alive_c, sizeof(__pyx_k_LivelinessChangedStatus_alive_c), 0, 0, 1, 0},
  {&__pyx_n_s_LivelinessLostStatus, __pyx_k_LivelinessLostStatus, sizeof(__pyx_k_LivelinessLostStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_LivelinessLostStatus_total_coun, __pyx_k_LivelinessLostStatus_total_coun, sizeof(__pyx_k_LivelinessLostStatus_total_coun), 0, 0, 1, 0},
  {&__pyx_n_s_LivelinessQosPolicy, __pyx_k_LivelinessQosPolicy, sizeof(__pyx_k_LivelinessQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_LivelinessQosPolicy___init, __pyx_k_LivelinessQosPolicy___init, sizeof(__pyx_k_LivelinessQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_LivelinessQosPolicy_lease_durati, __pyx_k_LivelinessQosPolicy_lease_durati, sizeof(__pyx_k_LivelinessQosPolicy_lease_durati), 0, 0, 1, 1},
  {&__pyx_kp_s_Liveliness_QoS_Policy_type_kind, __pyx_k_Liveliness_QoS_Policy_type_kind, sizeof(__pyx_k_Liveliness_QoS_Policy_type_kind), 0, 0, 1, 0},
  {&__pyx_n_s_MANUAL_BY_PARTICIPANT, __pyx_k_MANUAL_BY_PARTICIPANT, sizeof(__pyx_k_MANUAL_BY_PARTICIPANT), 0, 0, 1, 1},
  {&__pyx_n_s_MANUAL_BY_TOPIC, __pyx_k_MANUAL_BY_TOPIC, sizeof(__pyx_k_MANUAL_BY_TOPIC), 0, 0, 1, 1},
  {&__pyx_kp_s_Mask_utility_Some_commonly_used, __pyx_k_Mask_utility_Some_commonly_used, sizeof(__pyx_k_Mask_utility_Some_commonly_used), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n, __pyx_k_MetaData_version_1_0_0_Module_n, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_10, __pyx_k_MetaData_version_1_0_0_Module_n_10, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_10), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_2, __pyx_k_MetaData_version_1_0_0_Module_n_2, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_2), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_3, __pyx_k_MetaData_version_1_0_0_Module_n_3, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_3), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_4, __pyx_k_MetaData_version_1_0_0_Module_n_4, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_4), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_5, __pyx_k_MetaData_version_1_0_0_Module_n_5, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_5), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_6, __pyx_k_MetaData_version_1_0_0_Module_n_6, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_6), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_7, __pyx_k_MetaData_version_1_0_0_Module_n_7, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_7), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_8, __pyx_k_MetaData_version_1_0_0_Module_n_8, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_8), 0, 0, 1, 0},
  {&__pyx_kp_s_MetaData_version_1_0_0_Module_n_9, __pyx_k_MetaData_version_1_0_0_Module_n_9, sizeof(__pyx_k_MetaData_version_1_0_0_Module_n_9), 0, 0, 1, 0},
  {&__pyx_n_s_NEW_VIEW_STATE, __pyx_k_NEW_VIEW_STATE, sizeof(__pyx_k_NEW_VIEW_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_NOT_ALIVE_DISPOSED_INSTANCE_STAT, __pyx_k_NOT_ALIVE_DISPOSED_INSTANCE_STAT, sizeof(__pyx_k_NOT_ALIVE_DISPOSED_INSTANCE_STAT), 0, 0, 1, 1},
  {&__pyx_n_s_NOT_ALIVE_NO_WRITERS_INSTANCE_ST, __pyx_k_NOT_ALIVE_NO_WRITERS_INSTANCE_ST, sizeof(__pyx_k_NOT_ALIVE_NO_WRITERS_INSTANCE_ST), 0, 0, 1, 1},
  {&__pyx_n_s_NOT_NEW_VIEW_STATE, __pyx_k_NOT_NEW_VIEW_STATE, sizeof(__pyx_k_NOT_NEW_VIEW_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_NOT_READ_SAMPLE_STATE, __pyx_k_NOT_READ_SAMPLE_STATE, sizeof(__pyx_k_NOT_READ_SAMPLE_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_NOT_REJECTED, __pyx_k_NOT_REJECTED, sizeof(__pyx_k_NOT_REJECTED), 0, 0, 1, 1},
  {&__pyx_kp_s_No_condition_attached, __pyx_k_No_condition_attached, sizeof(__pyx_k_No_condition_attached), 0, 0, 1, 0},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_OFFERED_DEADLINE_MISSED, __pyx_k_OFFERED_DEADLINE_MISSED, sizeof(__pyx_k_OFFERED_DEADLINE_MISSED), 0, 0, 1, 1},
  {&__pyx_n_s_OFFERED_INCOMPATIBLE_QOS, __pyx_k_OFFERED_INCOMPATIBLE_QOS, sizeof(__pyx_k_OFFERED_INCOMPATIBLE_QOS), 0, 0, 1, 1},
  {&__pyx_n_s_OWNERSHIPSTRENGTH_QOS_POLICY_ID, __pyx_k_OWNERSHIPSTRENGTH_QOS_POLICY_ID, sizeof(__pyx_k_OWNERSHIPSTRENGTH_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_OWNERSHIP_QOS_POLICY_ID, __pyx_k_OWNERSHIP_QOS_POLICY_ID, sizeof(__pyx_k_OWNERSHIP_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_OfferedDeadlineMissedStatus, __pyx_k_OfferedDeadlineMissedStatus, sizeof(__pyx_k_OfferedDeadlineMissedStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_OfferedDeadlineMissedStatus_tot, __pyx_k_OfferedDeadlineMissedStatus_tot, sizeof(__pyx_k_OfferedDeadlineMissedStatus_tot), 0, 0, 1, 0},
  {&__pyx_n_s_OfferedIncompatibleQosStatus, __pyx_k_OfferedIncompatibleQosStatus, sizeof(__pyx_k_OfferedIncompatibleQosStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_OfferedIncompatibleQosStatus_to, __pyx_k_OfferedIncompatibleQosStatus_to, sizeof(__pyx_k_OfferedIncompatibleQosStatus_to), 0, 0, 1, 0},
  {&__pyx_n_s_OwnershipQosPolicy, __pyx_k_OwnershipQosPolicy, sizeof(__pyx_k_OwnershipQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_OwnershipQosPolicy___init, __pyx_k_OwnershipQosPolicy___init, sizeof(__pyx_k_OwnershipQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_OwnershipStrengthQosPolicy, __pyx_k_OwnershipStrengthQosPolicy, sizeof(__pyx_k_OwnershipStrengthQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_OwnershipStrengthQosPolicy___ini, __pyx_k_OwnershipStrengthQosPolicy___ini, sizeof(__pyx_k_OwnershipStrengthQosPolicy___ini), 0, 0, 1, 1},
  {&__pyx_n_s_OwnershipStrengthQosPolicy_value, __pyx_k_OwnershipStrengthQosPolicy_value, sizeof(__pyx_k_OwnershipStrengthQosPolicy_value), 0, 0, 1, 1},
  {&__pyx_kp_s_Ownership_QoS_Policy_type_kind, __pyx_k_Ownership_QoS_Policy_type_kind, sizeof(__pyx_k_Ownership_QoS_Policy_type_kind), 0, 0, 1, 0},
  {&__pyx_kp_s_Ownership_strenth_QoS_Policy_ty, __pyx_k_Ownership_strenth_QoS_Policy_ty, sizeof(__pyx_k_Ownership_strenth_QoS_Policy_ty), 0, 0, 1, 0},
  {&__pyx_n_s_PARTITION_QOS_POLICY_ID, __pyx_k_PARTITION_QOS_POLICY_ID, sizeof(__pyx_k_PARTITION_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_PERSISTENT, __pyx_k_PERSISTENT, sizeof(__pyx_k_PERSISTENT), 0, 0, 1, 1},
  {&__pyx_n_s_PRESENTATION_QOS_POLICY_ID, __pyx_k_PRESENTATION_QOS_POLICY_ID, sizeof(__pyx_k_PRESENTATION_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_PUBLICATION_MATCHED, __pyx_k_PUBLICATION_MATCHED, sizeof(__pyx_k_PUBLICATION_MATCHED), 0, 0, 1, 1},
  {&__pyx_n_s_PartitionQosPolicy, __pyx_k_PartitionQosPolicy, sizeof(__pyx_k_PartitionQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_PartitionQosPolicy___init, __pyx_k_PartitionQosPolicy___init, sizeof(__pyx_k_PartitionQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_PartitionQosPolicy_ps, __pyx_k_PartitionQosPolicy_ps, sizeof(__pyx_k_PartitionQosPolicy_ps), 0, 0, 1, 1},
  {&__pyx_kp_s_Partition_QoS_Policy_type_ps_li, __pyx_k_Partition_QoS_Policy_type_ps_li, sizeof(__pyx_k_Partition_QoS_Policy_type_ps_li), 0, 0, 1, 0},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_PresentationQosPolicy, __pyx_k_PresentationQosPolicy, sizeof(__pyx_k_PresentationQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_PresentationQosPolicy___init, __pyx_k_PresentationQosPolicy___init, sizeof(__pyx_k_PresentationQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_PresentationQosPolicy_coherent_a, __pyx_k_PresentationQosPolicy_coherent_a, sizeof(__pyx_k_PresentationQosPolicy_coherent_a), 0, 0, 1, 1},
  {&__pyx_n_s_PresentationQosPolicy_ordered_ac, __pyx_k_PresentationQosPolicy_ordered_ac, sizeof(__pyx_k_PresentationQosPolicy_ordered_ac), 0, 0, 1, 1},
  {&__pyx_kp_s_Presentation_QoS_Policy_type_ki, __pyx_k_Presentation_QoS_Policy_type_ki, sizeof(__pyx_k_Presentation_QoS_Policy_type_ki), 0, 0, 1, 0},
  {&__pyx_n_s_PublicationMatchedStatus, __pyx_k_PublicationMatchedStatus, sizeof(__pyx_k_PublicationMatchedStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_PublicationMatchedStatus_total, __pyx_k_PublicationMatchedStatus_total, sizeof(__pyx_k_PublicationMatchedStatus_total), 0, 0, 1, 0},
  {&__pyx_n_s_Publisher, __pyx_k_Publisher, sizeof(__pyx_k_Publisher), 0, 0, 1, 1},
  {&__pyx_n_s_Qos, __pyx_k_Qos, sizeof(__pyx_k_Qos), 0, 0, 1, 1},
  {&__pyx_n_s_QosPolicy, __pyx_k_QosPolicy, sizeof(__pyx_k_QosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_QosPolicyId, __pyx_k_QosPolicyId, sizeof(__pyx_k_QosPolicyId), 0, 0, 1, 1},
  {&__pyx_n_s_QosPolicy___init, __pyx_k_QosPolicy___init, sizeof(__pyx_k_QosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_QosPolicy_id, __pyx_k_QosPolicy_id, sizeof(__pyx_k_QosPolicy_id), 0, 0, 1, 1},
  {&__pyx_n_s_QosPolicy_kind, __pyx_k_QosPolicy_kind, sizeof(__pyx_k_QosPolicy_kind), 0, 0, 1, 1},
  {&__pyx_n_s_QosProfile, __pyx_k_QosProfile, sizeof(__pyx_k_QosProfile), 0, 0, 1, 1},
  {&__pyx_kp_s_QosProfile_will_be_removed_in_a, __pyx_k_QosProfile_will_be_removed_in_a, sizeof(__pyx_k_QosProfile_will_be_removed_in_a), 0, 0, 1, 0},
  {&__pyx_n_s_QosProvider, __pyx_k_QosProvider, sizeof(__pyx_k_QosProvider), 0, 0, 1, 1},
  {&__pyx_kp_s_Qos_provider_failed, __pyx_k_Qos_provider_failed, sizeof(__pyx_k_Qos_provider_failed), 0, 0, 1, 0},
  {&__pyx_n_s_QueryCondition, __pyx_k_QueryCondition, sizeof(__pyx_k_QueryCondition), 0, 0, 1, 1},
  {&__pyx_n_s_READERDATALIFECYCLE_QOS_POLICY_I, __pyx_k_READERDATALIFECYCLE_QOS_POLICY_I, sizeof(__pyx_k_READERDATALIFECYCLE_QOS_POLICY_I), 0, 0, 1, 1},
  {&__pyx_n_s_READ_SAMPLE_STATE, __pyx_k_READ_SAMPLE_STATE, sizeof(__pyx_k_READ_SAMPLE_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_REJECTED_BY_INSTANCE_LIMIT, __pyx_k_REJECTED_BY_INSTANCE_LIMIT, sizeof(__pyx_k_REJECTED_BY_INSTANCE_LIMIT), 0, 0, 1, 1},
  {&__pyx_n_s_REJECTED_BY_SAMPLES_LIMIT, __pyx_k_REJECTED_BY_SAMPLES_LIMIT, sizeof(__pyx_k_REJECTED_BY_SAMPLES_LIMIT), 0, 0, 1, 1},
  {&__pyx_n_s_REJECTED_BY_SAMPLES_PER_INSTANCE, __pyx_k_REJECTED_BY_SAMPLES_PER_INSTANCE, sizeof(__pyx_k_REJECTED_BY_SAMPLES_PER_INSTANCE), 0, 0, 1, 1},
  {&__pyx_n_s_RELIABILITY_QOS_POLICY_ID, __pyx_k_RELIABILITY_QOS_POLICY_ID, sizeof(__pyx_k_RELIABILITY_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_RELIABLE, __pyx_k_RELIABLE, sizeof(__pyx_k_RELIABLE), 0, 0, 1, 1},
  {&__pyx_n_s_REQUESTED_DEADLINE_MISSED, __pyx_k_REQUESTED_DEADLINE_MISSED, sizeof(__pyx_k_REQUESTED_DEADLINE_MISSED), 0, 0, 1, 1},
  {&__pyx_n_s_REQUESTED_INCOMPATIBLE_QOS, __pyx_k_REQUESTED_INCOMPATIBLE_QOS, sizeof(__pyx_k_REQUESTED_INCOMPATIBLE_QOS), 0, 0, 1, 1},
  {&__pyx_n_s_RESOURCELIMITS_QOS_POLICY_ID, __pyx_k_RESOURCELIMITS_QOS_POLICY_ID, sizeof(__pyx_k_RESOURCELIMITS_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_ReadCondition, __pyx_k_ReadCondition, sizeof(__pyx_k_ReadCondition), 0, 0, 1, 1},
  {&__pyx_n_s_ReaderDataLifecycleQosPolicy, __pyx_k_ReaderDataLifecycleQosPolicy, sizeof(__pyx_k_ReaderDataLifecycleQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_ReaderDataLifecycleQosPolicy___i, __pyx_k_ReaderDataLifecycleQosPolicy___i, sizeof(__pyx_k_ReaderDataLifecycleQosPolicy___i), 0, 0, 1, 1},
  {&__pyx_n_s_ReaderDataLifecycleQosPolicy_aut, __pyx_k_ReaderDataLifecycleQosPolicy_aut, sizeof(__pyx_k_ReaderDataLifecycleQosPolicy_aut), 0, 0, 1, 1},
  {&__pyx_n_s_ReaderDataLifecycleQosPolicy_aut_2, __pyx_k_ReaderDataLifecycleQosPolicy_aut_2, sizeof(__pyx_k_ReaderDataLifecycleQosPolicy_aut_2), 0, 0, 1, 1},
  {&__pyx_kp_s_Reader_data_lifecycle_QoS_Polic, __pyx_k_Reader_data_lifecycle_QoS_Polic, sizeof(__pyx_k_Reader_data_lifecycle_QoS_Polic), 0, 0, 1, 0},
  {&__pyx_n_s_ReliabilityQosPolicy, __pyx_k_ReliabilityQosPolicy, sizeof(__pyx_k_ReliabilityQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_ReliabilityQosPolicy___init, __pyx_k_ReliabilityQosPolicy___init, sizeof(__pyx_k_ReliabilityQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_ReliabilityQosPolicy_max_blockin, __pyx_k_ReliabilityQosPolicy_max_blockin, sizeof(__pyx_k_ReliabilityQosPolicy_max_blockin), 0, 0, 1, 1},
  {&__pyx_kp_s_Reliability_QoS_Policy_type_kin, __pyx_k_Reliability_QoS_Policy_type_kin, sizeof(__pyx_k_Reliability_QoS_Policy_type_kin), 0, 0, 1, 0},
  {&__pyx_n_s_RequestedDeadlineMissedStatus, __pyx_k_RequestedDeadlineMissedStatus, sizeof(__pyx_k_RequestedDeadlineMissedStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_RequestedDeadlineMissedStatus_t, __pyx_k_RequestedDeadlineMissedStatus_t, sizeof(__pyx_k_RequestedDeadlineMissedStatus_t), 0, 0, 1, 0},
  {&__pyx_n_s_RequestedIncompatibleQosStatus, __pyx_k_RequestedIncompatibleQosStatus, sizeof(__pyx_k_RequestedIncompatibleQosStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_RequestedIncompatibleQosStatus_2, __pyx_k_RequestedIncompatibleQosStatus_2, sizeof(__pyx_k_RequestedIncompatibleQosStatus_2), 0, 0, 1, 0},
  {&__pyx_n_s_ResourceLimitsQosPolicy, __pyx_k_ResourceLimitsQosPolicy, sizeof(__pyx_k_ResourceLimitsQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_ResourceLimitsQosPolicy___init, __pyx_k_ResourceLimitsQosPolicy___init, sizeof(__pyx_k_ResourceLimitsQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_ResourceLimitsQosPolicy_max_inst, __pyx_k_ResourceLimitsQosPolicy_max_inst, sizeof(__pyx_k_ResourceLimitsQosPolicy_max_inst), 0, 0, 1, 1},
  {&__pyx_n_s_ResourceLimitsQosPolicy_max_samp, __pyx_k_ResourceLimitsQosPolicy_max_samp, sizeof(__pyx_k_ResourceLimitsQosPolicy_max_samp), 0, 0, 1, 1},
  {&__pyx_n_s_ResourceLimitsQosPolicy_max_samp_2, __pyx_k_ResourceLimitsQosPolicy_max_samp_2, sizeof(__pyx_k_ResourceLimitsQosPolicy_max_samp_2), 0, 0, 1, 1},
  {&__pyx_kp_s_Resource_limit_QoS_Policy_type, __pyx_k_Resource_limit_QoS_Policy_type, sizeof(__pyx_k_Resource_limit_QoS_Policy_type), 0, 0, 1, 0},
  {&__pyx_kp_s_Return_code, __pyx_k_Return_code, sizeof(__pyx_k_Return_code), 0, 0, 1, 0},
  {&__pyx_n_s_SAMPLE_LOST, __pyx_k_SAMPLE_LOST, sizeof(__pyx_k_SAMPLE_LOST), 0, 0, 1, 1},
  {&__pyx_n_s_SAMPLE_REJECTED, __pyx_k_SAMPLE_REJECTED, sizeof(__pyx_k_SAMPLE_REJECTED), 0, 0, 1, 1},
  {&__pyx_n_s_SHARED, __pyx_k_SHARED, sizeof(__pyx_k_SHARED), 0, 0, 1, 1},
  {&__pyx_n_s_SUBSCRIPTION_MATCHED, __pyx_k_SUBSCRIPTION_MATCHED, sizeof(__pyx_k_SUBSCRIPTION_MATCHED), 0, 0, 1, 1},
  {&__pyx_n_s_Sample, __pyx_k_Sample, sizeof(__pyx_k_Sample), 0, 0, 1, 1},
  {&__pyx_n_s_SampleInfo, __pyx_k_SampleInfo, sizeof(__pyx_k_SampleInfo), 0, 0, 1, 1},
  {&__pyx_n_s_SampleInfo___init, __pyx_k_SampleInfo___init, sizeof(__pyx_k_SampleInfo___init), 0, 0, 1, 1},
  {&__pyx_n_s_SampleLostStatus, __pyx_k_SampleLostStatus, sizeof(__pyx_k_SampleLostStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_SampleLostStatus_total_count_in, __pyx_k_SampleLostStatus_total_count_in, sizeof(__pyx_k_SampleLostStatus_total_count_in), 0, 0, 1, 0},
  {&__pyx_n_s_SampleRejectedStatus, __pyx_k_SampleRejectedStatus, sizeof(__pyx_k_SampleRejectedStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_SampleRejectedStatus_total_coun, __pyx_k_SampleRejectedStatus_total_coun, sizeof(__pyx_k_SampleRejectedStatus_total_coun), 0, 0, 1, 0},
  {&__pyx_n_s_SerializationHelper, __pyx_k_SerializationHelper, sizeof(__pyx_k_SerializationHelper), 0, 0, 1, 1},
  {&__pyx_n_s_StatusCondition, __pyx_k_StatusCondition, sizeof(__pyx_k_StatusCondition), 0, 0, 1, 1},
  {&__pyx_kp_s_Subclass_must_override_this_impl, __pyx_k_Subclass_must_override_this_impl, sizeof(__pyx_k_Subclass_must_override_this_impl), 0, 0, 1, 0},
  {&__pyx_n_s_Subscriber, __pyx_k_Subscriber, sizeof(__pyx_k_Subscriber), 0, 0, 1, 1},
  {&__pyx_n_s_SubscriptionMatchedStatus, __pyx_k_SubscriptionMatchedStatus, sizeof(__pyx_k_SubscriptionMatchedStatus), 0, 0, 1, 1},
  {&__pyx_kp_s_SubscriptionMatchedStatus_total, __pyx_k_SubscriptionMatchedStatus_total, sizeof(__pyx_k_SubscriptionMatchedStatus_total), 0, 0, 1, 0},
  {&__pyx_n_s_TIMEBASEDFILTER_QOS_POLICY_ID, __pyx_k_TIMEBASEDFILTER_QOS_POLICY_ID, sizeof(__pyx_k_TIMEBASEDFILTER_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_TOPIC, __pyx_k_TOPIC, sizeof(__pyx_k_TOPIC), 0, 0, 1, 1},
  {&__pyx_n_s_TOPICDATA_QOS_POLICY_ID, __pyx_k_TOPICDATA_QOS_POLICY_ID, sizeof(__pyx_k_TOPICDATA_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_TRANSIENT, __pyx_k_TRANSIENT, sizeof(__pyx_k_TRANSIENT), 0, 0, 1, 1},
  {&__pyx_n_s_TRANSIENT_LOCAL, __pyx_k_TRANSIENT_LOCAL, sizeof(__pyx_k_TRANSIENT_LOCAL), 0, 0, 1, 1},
  {&__pyx_n_s_TRANSPORTPRIORITY_QOS_POLICY_ID, __pyx_k_TRANSPORTPRIORITY_QOS_POLICY_ID, sizeof(__pyx_k_TRANSPORTPRIORITY_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_kp_s_The_class_name_QosProfile_is_dep, __pyx_k_The_class_name_QosProfile_is_dep, sizeof(__pyx_k_The_class_name_QosProfile_is_dep), 0, 0, 1, 0},
  {&__pyx_n_s_TimeBasedFilterQosPolicy, __pyx_k_TimeBasedFilterQosPolicy, sizeof(__pyx_k_TimeBasedFilterQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBasedFilterQosPolicy___init, __pyx_k_TimeBasedFilterQosPolicy___init, sizeof(__pyx_k_TimeBasedFilterQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_TimeBasedFilterQosPolicy_minimum, __pyx_k_TimeBasedFilterQosPolicy_minimum, sizeof(__pyx_k_TimeBasedFilterQosPolicy_minimum), 0, 0, 1, 1},
  {&__pyx_kp_s_Time_based_filter_QoS_Policy_ty, __pyx_k_Time_based_filter_QoS_Policy_ty, sizeof(__pyx_k_Time_based_filter_QoS_Policy_ty), 0, 0, 1, 0},
  {&__pyx_n_s_Topic, __pyx_k_Topic, sizeof(__pyx_k_Topic), 0, 0, 1, 1},
  {&__pyx_kp_s_Topic_data_QoS_Policy_type_valu, __pyx_k_Topic_data_QoS_Policy_type_valu, sizeof(__pyx_k_Topic_data_QoS_Policy_type_valu), 0, 0, 1, 0},
  {&__pyx_n_s_TopicdataQosPolicy, __pyx_k_TopicdataQosPolicy, sizeof(__pyx_k_TopicdataQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_TopicdataQosPolicy___init, __pyx_k_TopicdataQosPolicy___init, sizeof(__pyx_k_TopicdataQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_TransportPriorityQosPolicy, __pyx_k_TransportPriorityQosPolicy, sizeof(__pyx_k_TransportPriorityQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_TransportPriorityQosPolicy___ini, __pyx_k_TransportPriorityQosPolicy___ini, sizeof(__pyx_k_TransportPriorityQosPolicy___ini), 0, 0, 1, 1},
  {&__pyx_n_s_TransportPriorityQosPolicy_value, __pyx_k_TransportPriorityQosPolicy_value, sizeof(__pyx_k_TransportPriorityQosPolicy_value), 0, 0, 1, 1},
  {&__pyx_kp_s_Transport_priority_QoS_Policy_t, __pyx_k_Transport_priority_QoS_Policy_t, sizeof(__pyx_k_Transport_priority_QoS_Policy_t), 0, 0, 1, 0},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_TypeSupport, __pyx_k_TypeSupport, sizeof(__pyx_k_TypeSupport), 0, 0, 1, 1},
  {&__pyx_n_s_USERDATA_QOS_POLICY_ID, __pyx_k_USERDATA_QOS_POLICY_ID, sizeof(__pyx_k_USERDATA_QOS_POLICY_ID), 0, 0, 1, 1},
  {&__pyx_n_s_UserdataQosPolicy, __pyx_k_UserdataQosPolicy, sizeof(__pyx_k_UserdataQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_UserdataQosPolicy___init, __pyx_k_UserdataQosPolicy___init, sizeof(__pyx_k_UserdataQosPolicy___init), 0, 0, 1, 1},
  {&__pyx_n_s_UserdataQosPolicy_value, __pyx_k_UserdataQosPolicy_value, sizeof(__pyx_k_UserdataQosPolicy_value), 0, 0, 1, 1},
  {&__pyx_kp_s_Userdata_QoS_Policy_type_value, __pyx_k_Userdata_QoS_Policy_type_value, sizeof(__pyx_k_Userdata_QoS_Policy_type_value), 0, 0, 1, 0},
  {&__pyx_n_s_VOLATILE, __pyx_k_VOLATILE, sizeof(__pyx_k_VOLATILE), 0, 0, 1, 1},
  {&__pyx_n_s_WRITERDATALIFECYCLE_QOS_POLICY_I, __pyx_k_WRITERDATALIFECYCLE_QOS_POLICY_I, sizeof(__pyx_k_WRITERDATALIFECYCLE_QOS_POLICY_I), 0, 0, 1, 1},
  {&__pyx_n_s_WaitSet, __pyx_k_WaitSet, sizeof(__pyx_k_WaitSet), 0, 0, 1, 1},
  {&__pyx_kp_s_Wait_failed, __pyx_k_Wait_failed, sizeof(__pyx_k_Wait_failed), 0, 0, 1, 0},
  {&__pyx_kp_s_Wait_for_historical_data_failed, __pyx_k_Wait_for_historical_data_failed, sizeof(__pyx_k_Wait_for_historical_data_failed), 0, 0, 1, 0},
  {&__pyx_n_s_WriterDataLifecycleQosPolicy, __pyx_k_WriterDataLifecycleQosPolicy, sizeof(__pyx_k_WriterDataLifecycleQosPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_WriterDataLifecycleQosPolicy___i, __pyx_k_WriterDataLifecycleQosPolicy___i, sizeof(__pyx_k_WriterDataLifecycleQosPolicy___i), 0, 0, 1, 1},
  {&__pyx_n_s_WriterDataLifecycleQosPolicy_aut, __pyx_k_WriterDataLifecycleQosPolicy_aut, sizeof(__pyx_k_WriterDataLifecycleQosPolicy_aut), 0, 0, 1, 1},
  {&__pyx_kp_s_Writer_data_lifecycle_QoS_Polic, __pyx_k_Writer_data_lifecycle_QoS_Polic, sizeof(__pyx_k_Writer_data_lifecycle_QoS_Polic), 0, 0, 1, 0},
  {&__pyx_n_s_absolute_generation_rank, __pyx_k_absolute_generation_rank, sizeof(__pyx_k_absolute_generation_rank), 0, 0, 1, 1},
  {&__pyx_n_s_addr, __pyx_k_addr, sizeof(__pyx_k_addr), 0, 0, 1, 1},
  {&__pyx_n_s_alive_count, __pyx_k_alive_count, sizeof(__pyx_k_alive_count), 0, 0, 1, 1},
  {&__pyx_n_s_alive_count_change, __pyx_k_alive_count_change, sizeof(__pyx_k_alive_count_change), 0, 0, 1, 1},
  {&__pyx_n_s_all_samples, __pyx_k_all_samples, sizeof(__pyx_k_all_samples), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_autodispose_unregistered_instan, __pyx_k_autodispose_unregistered_instan, sizeof(__pyx_k_autodispose_unregistered_instan), 0, 0, 1, 1},
  {&__pyx_n_s_autodispose_unregistered_instanc, __pyx_k_autodispose_unregistered_instanc, sizeof(__pyx_k_autodispose_unregistered_instanc), 0, 0, 1, 1},
  {&__pyx_n_s_autopurge_disposed_samples_dela, __pyx_k_autopurge_disposed_samples_dela, sizeof(__pyx_k_autopurge_disposed_samples_dela), 0, 0, 1, 1},
  {&__pyx_n_s_autopurge_disposed_samples_delay, __pyx_k_autopurge_disposed_samples_delay, sizeof(__pyx_k_autopurge_disposed_samples_delay), 0, 0, 1, 1},
  {&__pyx_n_s_autopurge_nowriter_samples, __pyx_k_autopurge_nowriter_samples, sizeof(__pyx_k_autopurge_nowriter_samples), 0, 0, 1, 1},
  {&__pyx_n_s_autopurge_nowriter_samples_2, __pyx_k_autopurge_nowriter_samples_2, sizeof(__pyx_k_autopurge_nowriter_samples_2), 0, 0, 1, 1},
  {&__pyx_n_s_bytes_to_ptr, __pyx_k_bytes_to_ptr, sizeof(__pyx_k_bytes_to_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_check_handle, __pyx_k_check_handle, sizeof(__pyx_k_check_handle), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_n_s_coherent_access, __pyx_k_coherent_access, sizeof(__pyx_k_coherent_access), 0, 0, 1, 1},
  {&__pyx_n_s_coherent_access_2, __pyx_k_coherent_access_2, sizeof(__pyx_k_coherent_access_2), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_condition, __pyx_k_condition, sizeof(__pyx_k_condition), 0, 0, 1, 1},
  {&__pyx_n_s_current_count, __pyx_k_current_count, sizeof(__pyx_k_current_count), 0, 0, 1, 1},
  {&__pyx_n_s_current_count_change, __pyx_k_current_count_change, sizeof(__pyx_k_current_count_change), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_dds, __pyx_k_dds, sizeof(__pyx_k_dds), 0, 0, 1, 1},
  {&__pyx_kp_s_dds_pyx, __pyx_k_dds_pyx, sizeof(__pyx_k_dds_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_deadline, __pyx_k_deadline, sizeof(__pyx_k_deadline), 0, 0, 1, 1},
  {&__pyx_n_s_deadline_2, __pyx_k_deadline_2, sizeof(__pyx_k_deadline_2), 0, 0, 1, 1},
  {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
  {&__pyx_n_s_depth_2, __pyx_k_depth_2, sizeof(__pyx_k_depth_2), 0, 0, 1, 1},
  {&__pyx_n_s_deserialize, __pyx_k_deserialize, sizeof(__pyx_k_deserialize), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_did, __pyx_k_did, sizeof(__pyx_k_did), 0, 0, 1, 1},
  {&__pyx_n_s_disposed_generation_count, __pyx_k_disposed_generation_count, sizeof(__pyx_k_disposed_generation_count), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dp, __pyx_k_dp, sizeof(__pyx_k_dp), 0, 0, 1, 1},
  {&__pyx_n_s_duration, __pyx_k_duration, sizeof(__pyx_k_duration), 0, 0, 1, 1},
  {&__pyx_n_s_duration_2, __pyx_k_duration_2, sizeof(__pyx_k_duration_2), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_entity, __pyx_k_entity, sizeof(__pyx_k_entity), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_expression, __pyx_k_expression, sizeof(__pyx_k_expression), 0, 0, 1, 1},
  {&__pyx_n_s_generation_rank, __pyx_k_generation_rank, sizeof(__pyx_k_generation_rank), 0, 0, 1, 1},
  {&__pyx_n_s_getmembers, __pyx_k_getmembers, sizeof(__pyx_k_getmembers), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 0, 1, 1},
  {&__pyx_n_s_handle_2, __pyx_k_handle_2, sizeof(__pyx_k_handle_2), 0, 0, 1, 1},
  {&__pyx_n_s_history_depth, __pyx_k_history_depth, sizeof(__pyx_k_history_depth), 0, 0, 1, 1},
  {&__pyx_n_s_history_depth_2, __pyx_k_history_depth_2, sizeof(__pyx_k_history_depth_2), 0, 0, 1, 1},
  {&__pyx_n_s_history_kind, __pyx_k_history_kind, sizeof(__pyx_k_history_kind), 0, 0, 1, 1},
  {&__pyx_n_s_history_kind_2, __pyx_k_history_kind_2, sizeof(__pyx_k_history_kind_2), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_id_2, __pyx_k_id_2, sizeof(__pyx_k_id_2), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_infinity, __pyx_k_infinity, sizeof(__pyx_k_infinity), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1},
  {&__pyx_n_s_instance_handle, __pyx_k_instance_handle, sizeof(__pyx_k_instance_handle), 0, 0, 1, 1},
  {&__pyx_n_s_instance_state, __pyx_k_instance_state, sizeof(__pyx_k_instance_state), 0, 0, 1, 1},
  {&__pyx_n_s_isfunction, __pyx_k_isfunction, sizeof(__pyx_k_isfunction), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_kp_s_kernelModule_v_dataReaderCMInfo, __pyx_k_kernelModule_v_dataReaderCMInfo, sizeof(__pyx_k_kernelModule_v_dataReaderCMInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_dataWriterCMInfo, __pyx_k_kernelModule_v_dataWriterCMInfo, sizeof(__pyx_k_kernelModule_v_dataWriterCMInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_participantCMInfo, __pyx_k_kernelModule_v_participantCMInfo, sizeof(__pyx_k_kernelModule_v_participantCMInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_participantInfo, __pyx_k_kernelModule_v_participantInfo, sizeof(__pyx_k_kernelModule_v_participantInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_publicationInfo, __pyx_k_kernelModule_v_publicationInfo, sizeof(__pyx_k_kernelModule_v_publicationInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_publisherCMInfo, __pyx_k_kernelModule_v_publisherCMInfo, sizeof(__pyx_k_kernelModule_v_publisherCMInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_subscriberCMInfo, __pyx_k_kernelModule_v_subscriberCMInfo, sizeof(__pyx_k_kernelModule_v_subscriberCMInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_subscriptionInfo, __pyx_k_kernelModule_v_subscriptionInfo, sizeof(__pyx_k_kernelModule_v_subscriptionInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_topicInfo, __pyx_k_kernelModule_v_topicInfo, sizeof(__pyx_k_kernelModule_v_topicInfo), 0, 0, 1, 0},
  {&__pyx_kp_s_kernelModule_v_typeInfo, __pyx_k_kernelModule_v_typeInfo, sizeof(__pyx_k_kernelModule_v_typeInfo), 0, 0, 1, 0},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_keys_2, __pyx_k_keys_2, sizeof(__pyx_k_keys_2), 0, 0, 1, 1},
  {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1},
  {&__pyx_n_s_kind_2, __pyx_k_kind_2, sizeof(__pyx_k_kind_2), 0, 0, 1, 1},
  {&__pyx_n_s_last_instance_handle, __pyx_k_last_instance_handle, sizeof(__pyx_k_last_instance_handle), 0, 0, 1, 1},
  {&__pyx_n_s_last_policy_id, __pyx_k_last_policy_id, sizeof(__pyx_k_last_policy_id), 0, 0, 1, 1},
  {&__pyx_n_s_last_publication_handle, __pyx_k_last_publication_handle, sizeof(__pyx_k_last_publication_handle), 0, 0, 1, 1},
  {&__pyx_n_s_last_reason, __pyx_k_last_reason, sizeof(__pyx_k_last_reason), 0, 0, 1, 1},
  {&__pyx_n_s_last_subscription_handle, __pyx_k_last_subscription_handle, sizeof(__pyx_k_last_subscription_handle), 0, 0, 1, 1},
  {&__pyx_n_s_lease, __pyx_k_lease, sizeof(__pyx_k_lease), 0, 0, 1, 1},
  {&__pyx_n_s_lease_duration, __pyx_k_lease_duration, sizeof(__pyx_k_lease_duration), 0, 0, 1, 1},
  {&__pyx_n_s_lifespan, __pyx_k_lifespan, sizeof(__pyx_k_lifespan), 0, 0, 1, 1},
  {&__pyx_n_s_lifespan_2, __pyx_k_lifespan_2, sizeof(__pyx_k_lifespan_2), 0, 0, 1, 1},
  {&__pyx_n_s_listener, __pyx_k_listener, sizeof(__pyx_k_listener), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_masks, __pyx_k_masks, sizeof(__pyx_k_masks), 0, 0, 1, 1},
  {&__pyx_n_s_max_blocking_time, __pyx_k_max_blocking_time, sizeof(__pyx_k_max_blocking_time), 0, 0, 1, 1},
  {&__pyx_n_s_max_blocking_time_2, __pyx_k_max_blocking_time_2, sizeof(__pyx_k_max_blocking_time_2), 0, 0, 1, 1},
  {&__pyx_n_s_max_instances, __pyx_k_max_instances, sizeof(__pyx_k_max_instances), 0, 0, 1, 1},
  {&__pyx_n_s_max_instances_2, __pyx_k_max_instances_2, sizeof(__pyx_k_max_instances_2), 0, 0, 1, 1},
  {&__pyx_n_s_max_samples, __pyx_k_max_samples, sizeof(__pyx_k_max_samples), 0, 0, 1, 1},
  {&__pyx_n_s_max_samples_2, __pyx_k_max_samples_2, sizeof(__pyx_k_max_samples_2), 0, 0, 1, 1},
  {&__pyx_n_s_max_samples_per_instance, __pyx_k_max_samples_per_instance, sizeof(__pyx_k_max_samples_per_instance), 0, 0, 1, 1},
  {&__pyx_n_s_max_samples_per_instance_2, __pyx_k_max_samples_per_instance_2, sizeof(__pyx_k_max_samples_per_instance_2), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_method_to_status, __pyx_k_method_to_status, sizeof(__pyx_k_method_to_status), 0, 0, 1, 1},
  {&__pyx_n_s_minimum_separation, __pyx_k_minimum_separation, sizeof(__pyx_k_minimum_separation), 0, 0, 1, 1},
  {&__pyx_n_s_minimum_separation_2, __pyx_k_minimum_separation_2, sizeof(__pyx_k_minimum_separation_2), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_name_3, __pyx_k_name_3, sizeof(__pyx_k_name_3), 0, 0, 1, 1},
  {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1},
  {&__pyx_n_s_nanosec, __pyx_k_nanosec, sizeof(__pyx_k_nanosec), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_new_instance_samples, __pyx_k_new_instance_samples, sizeof(__pyx_k_new_instance_samples), 0, 0, 1, 1},
  {&__pyx_n_s_new_samples, __pyx_k_new_samples, sizeof(__pyx_k_new_samples), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_no_writers_generation_count, __pyx_k_no_writers_generation_count, sizeof(__pyx_k_no_writers_generation_count), 0, 0, 1, 1},
  {&__pyx_n_s_not_alive_count, __pyx_k_not_alive_count, sizeof(__pyx_k_not_alive_count), 0, 0, 1, 1},
  {&__pyx_n_s_not_alive_count_change, __pyx_k_not_alive_count_change, sizeof(__pyx_k_not_alive_count_change), 0, 0, 1, 1},
  {&__pyx_n_s_not_alive_instance_samples, __pyx_k_not_alive_instance_samples, sizeof(__pyx_k_not_alive_instance_samples), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_on_data_available, __pyx_k_on_data_available, sizeof(__pyx_k_on_data_available), 0, 0, 1, 1},
  {&__pyx_n_s_on_data_on_readers, __pyx_k_on_data_on_readers, sizeof(__pyx_k_on_data_on_readers), 0, 0, 1, 1},
  {&__pyx_n_s_on_inconsistent_topic, __pyx_k_on_inconsistent_topic, sizeof(__pyx_k_on_inconsistent_topic), 0, 0, 1, 1},
  {&__pyx_n_s_on_liveliness_changed, __pyx_k_on_liveliness_changed, sizeof(__pyx_k_on_liveliness_changed), 0, 0, 1, 1},
  {&__pyx_n_s_on_liveliness_lost, __pyx_k_on_liveliness_lost, sizeof(__pyx_k_on_liveliness_lost), 0, 0, 1, 1},
  {&__pyx_n_s_on_offered_deadline_missed, __pyx_k_on_offered_deadline_missed, sizeof(__pyx_k_on_offered_deadline_missed), 0, 0, 1, 1},
  {&__pyx_n_s_on_offered_incompatible_qos, __pyx_k_on_offered_incompatible_qos, sizeof(__pyx_k_on_offered_incompatible_qos), 0, 0, 1, 1},
  {&__pyx_n_s_on_publication_matched, __pyx_k_on_publication_matched, sizeof(__pyx_k_on_publication_matched), 0, 0, 1, 1},
  {&__pyx_n_s_on_requested_deadline_missed, __pyx_k_on_requested_deadline_missed, sizeof(__pyx_k_on_requested_deadline_missed), 0, 0, 1, 1},
  {&__pyx_n_s_on_requested_incompatible_qos, __pyx_k_on_requested_incompatible_qos, sizeof(__pyx_k_on_requested_incompatible_qos), 0, 0, 1, 1},
  {&__pyx_n_s_on_sample_lost, __pyx_k_on_sample_lost, sizeof(__pyx_k_on_sample_lost), 0, 0, 1, 1},
  {&__pyx_n_s_on_sample_rejected, __pyx_k_on_sample_rejected, sizeof(__pyx_k_on_sample_rejected), 0, 0, 1, 1},
  {&__pyx_n_s_on_subscription_matched, __pyx_k_on_subscription_matched, sizeof(__pyx_k_on_subscription_matched), 0, 0, 1, 1},
  {&__pyx_n_s_ordered_access, __pyx_k_ordered_access, sizeof(__pyx_k_ordered_access), 0, 0, 1, 1},
  {&__pyx_n_s_ordered_access_2, __pyx_k_ordered_access_2, sizeof(__pyx_k_ordered_access_2), 0, 0, 1, 1},
  {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1},
  {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_policies, __pyx_k_policies, sizeof(__pyx_k_policies), 0, 0, 1, 1},
  {&__pyx_n_s_predicate, __pyx_k_predicate, sizeof(__pyx_k_predicate), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_profile, __pyx_k_profile, sizeof(__pyx_k_profile), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_n_s_ps, __pyx_k_ps, sizeof(__pyx_k_ps), 0, 0, 1, 1},
  {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_ptr_to_bytes, __pyx_k_ptr_to_bytes, sizeof(__pyx_k_ptr_to_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_publication_handle, __pyx_k_publication_handle, sizeof(__pyx_k_publication_handle), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TypeSupport, __pyx_k_pyx_unpickle_TypeSupport, sizeof(__pyx_k_pyx_unpickle_TypeSupport), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__SerializationHel, __pyx_k_pyx_unpickle__SerializationHel, sizeof(__pyx_k_pyx_unpickle__SerializationHel), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qos, __pyx_k_qos, sizeof(__pyx_k_qos), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_read_samples, __pyx_k_read_samples, sizeof(__pyx_k_read_samples), 0, 0, 1, 1},
  {&__pyx_n_s_reader, __pyx_k_reader, sizeof(__pyx_k_reader), 0, 0, 1, 1},
  {&__pyx_n_s_reception_timestamp, __pyx_k_reception_timestamp, sizeof(__pyx_k_reception_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_n_s_sample_rank, __pyx_k_sample_rank, sizeof(__pyx_k_sample_rank), 0, 0, 1, 1},
  {&__pyx_n_s_sample_state, __pyx_k_sample_state, sizeof(__pyx_k_sample_state), 0, 0, 1, 1},
  {&__pyx_n_s_sec, __pyx_k_sec, sizeof(__pyx_k_sec), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_serialize, __pyx_k_serialize, sizeof(__pyx_k_serialize), 0, 0, 1, 1},
  {&__pyx_n_s_service_cleanup_delay, __pyx_k_service_cleanup_delay, sizeof(__pyx_k_service_cleanup_delay), 0, 0, 1, 1},
  {&__pyx_n_s_service_cleanup_delay_2, __pyx_k_service_cleanup_delay_2, sizeof(__pyx_k_service_cleanup_delay_2), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_size_2, __pyx_k_size_2, sizeof(__pyx_k_size_2), 0, 0, 1, 1},
  {&__pyx_n_s_sleep, __pyx_k_sleep, sizeof(__pyx_k_sleep), 0, 0, 1, 1},
  {&__pyx_n_s_source_timestamp, __pyx_k_source_timestamp, sizeof(__pyx_k_source_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {&__pyx_n_s_spec_2, __pyx_k_spec_2, sizeof(__pyx_k_spec_2), 0, 0, 1, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_subscriber, __pyx_k_subscriber, sizeof(__pyx_k_subscriber), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
  {&__pyx_n_s_timestamp, __pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_topic, __pyx_k_topic, sizeof(__pyx_k_topic), 0, 0, 1, 1},
  {&__pyx_n_s_total_count, __pyx_k_total_count, sizeof(__pyx_k_total_count), 0, 0, 1, 1},
  {&__pyx_n_s_total_count_change, __pyx_k_total_count_change, sizeof(__pyx_k_total_count_change), 0, 0, 1, 1},
  {&__pyx_n_s_ts, __pyx_k_ts, sizeof(__pyx_k_ts), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_uri, __pyx_k_uri, sizeof(__pyx_k_uri), 0, 0, 1, 1},
  {&__pyx_n_s_valid_data, __pyx_k_valid_data, sizeof(__pyx_k_valid_data), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 0, 1, 1},
  {&__pyx_n_s_view_state, __pyx_k_view_state, sizeof(__pyx_k_view_state), 0, 0, 1, 1},
  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 170, __pyx_L1_error)
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 233, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 851, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 1793, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 3379, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "dds.pyx":1793
 *         Serialize data
 *         '''
 *         raise NotImplementedError('Subclass must override this implementation')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Subclass_must_override_this_impl); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "dds.pyx":156
 *     :param nanosec: nanoseconds (default: 0)
 *     '''
 *     def __init__(self, sec = 1, nanosec = 0):             # <<<<<<<<<<<<<<
 *         self.value = (sec * 1000000000) + nanosec
 * 
 */
  __pyx_tuple__48 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_sec, __pyx_n_s_nanosec); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 156, __pyx_L1_error)
  __pyx_tuple__50 = PyTuple_Pack(2, ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "dds.pyx":171
 * 
 *     @staticmethod
 *     def infinity():             # <<<<<<<<<<<<<<
 *         ''' Return DDSDuration for infinity
 *         '''
 */
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_infinity, 171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 171, __pyx_L1_error)

  /* "dds.pyx":227
 *     Users should not instantiate this class.
 *     '''
 *     def __init__(self, i):             # <<<<<<<<<<<<<<
 *         '''__init__(i)
 *         '''
 */
  __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_i); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 227, __pyx_L1_error)

  /* "dds.pyx":234
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         '''
 *         An internal QoS Policy id
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_id_2, 234, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 234, __pyx_L1_error)

  /* "dds.pyx":242
 *     # The kind property provides the kind of a specific QosPolicy when applicable
 *     @property
 *     def kind(self):             # <<<<<<<<<<<<<<
 *         '''
 *         QoS Policy kind
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_kind_2, 242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 242, __pyx_L1_error)

  /* "dds.pyx":256
 *     '''
 * 
 *     def __init__(self, kind=DDSDurabilityKind.VOLATILE):             # <<<<<<<<<<<<<<
 *         '''__init__(k=DDSDurabilityKind.VOLATILE)
 *         '''
 */
  __pyx_tuple__58 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_kind_2); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 256, __pyx_L1_error)

  /* "dds.pyx":273
 *     :param depth: History depth (default: 1)
 *     '''
 *     def __init__(self, kind=DDSHistoryKind.KEEP_LAST, depth=1):             # <<<<<<<<<<<<<<
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 */
  __pyx_tuple__60 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_kind_2, __pyx_n_s_depth); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 273, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 273, __pyx_L1_error)

  /* "dds.pyx":281
 * 
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._depth
 * 
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_depth, 281, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 281, __pyx_L1_error)

  /* "dds.pyx":297
 *     :param max_samples_per_instance: maximum samples per instance (default: -1)
 *     '''
 *     def __init__(self, max_samples = DDS_LENGTH_UNLIMITED, max_instances = DDS_LENGTH_UNLIMITED, max_samples_per_instance = DDS_LENGTH_UNLIMITED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID)
 *         self._max_samples = max_samples
 */
  __pyx_tuple__64 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_max_samples, __pyx_n_s_max_instances, __pyx_n_s_max_samples_per_instance); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 297, __pyx_L1_error)

  /* "dds.pyx":304
 * 
 *     @property
 *     def max_samples(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples
 * 
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_max_samples, 304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 304, __pyx_L1_error)

  /* "dds.pyx":308
 * 
 *     @property
 *     def max_instances(self):             # <<<<<<<<<<<<<<
 *         return self._max_instances
 * 
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_max_instances, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 308, __pyx_L1_error)

  /* "dds.pyx":312
 * 
 *     @property
 *     def max_samples_per_instance(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples_per_instance
 * 
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_max_samples_per_instance, 312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 312, __pyx_L1_error)

  /* "dds.pyx":328
 *     :param ordered_access: Set ordered access (default: False)
 *     '''
 *     def __init__(self, kind=DDSPresentationAccessScopeKind.INSTANCE, coherent_access = False, ordered_access = False):             # <<<<<<<<<<<<<<
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 */
  __pyx_tuple__72 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_kind_2, __pyx_n_s_coherent_access, __pyx_n_s_ordered_access); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 328, __pyx_L1_error)

  /* "dds.pyx":337
 * 
 *     @property
 *     def coherent_access(self):             # <<<<<<<<<<<<<<
 *         return self._coherent_access
 * 
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_coherent_access, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 337, __pyx_L1_error)

  /* "dds.pyx":341
 * 
 *     @property
 *     def ordered_access(self):             # <<<<<<<<<<<<<<
 *         return self._ordered_access
 * 
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_ordered_access, 341, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 341, __pyx_L1_error)

  /* "dds.pyx":352
 * 
 *     '''
 *     def __init__(self, lifespan = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LIFESPAN_QOS_POLICY_ID)
 *         self._lifespan = lifespan.value
 */
  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_lifespan); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 352, __pyx_L1_error)

  /* "dds.pyx":357
 * 
 *     @property
 *     def lifespan(self):             # <<<<<<<<<<<<<<
 *         return self._lifespan
 * 
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_lifespan, 357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 357, __pyx_L1_error)

  /* "dds.pyx":368
 * 
 *     '''
 *     def __init__(self, deadline = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DEADLINE_QOS_POLICY_ID)
 *         self._deadline = deadline.value
 */
  __pyx_tuple__82 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_deadline); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 368, __pyx_L1_error)

  /* "dds.pyx":373
 * 
 *     @property
 *     def deadline(self):             # <<<<<<<<<<<<<<
 *         return self._deadline
 * 
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_deadline, 373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 373, __pyx_L1_error)

  /* "dds.pyx":384
 * 
 *     '''
 *     def __init__(self, duration = DDSDuration()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID)
 *         self._duration = duration.value
 */
  __pyx_tuple__86 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_duration); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 384, __pyx_L1_error)

  /* "dds.pyx":389
 * 
 *     @property
 *     def duration(self):             # <<<<<<<<<<<<<<
 *         return self._duration
 * 
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_duration, 389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 389, __pyx_L1_error)

  /* "dds.pyx":400
 * 
 *     '''
 *     def __init__(self, kind=DDSOwnershipKind.SHARED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIP_QOS_POLICY_ID)
 *         self._kind = kind
 */
  __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_kind_2); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 400, __pyx_L1_error)

  /* "dds.pyx":412
 * 
 *     '''
 *     def __init__(self, value = 0):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_tuple__92 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 412, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 412, __pyx_L1_error)
  __pyx_tuple__94 = PyTuple_Pack(1, ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "dds.pyx":417
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_value, 417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 417, __pyx_L1_error)

  /* "dds.pyx":431
 *     :param lease_duration: Lease duration (default: infinity)
 *     '''
 *     def __init__(self, kind=DDSLivelinessKind.AUTOMATIC, lease_duration=DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LIVELINESS_QOS_POLICY_ID)
 *         self._kind = kind
 */
  __pyx_tuple__97 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_kind_2, __pyx_n_s_lease_duration); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 431, __pyx_L1_error)

  /* "dds.pyx":437
 * 
 *     @property
 *     def lease_duration(self):             # <<<<<<<<<<<<<<
 *         return self._lease
 * 
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_lease_duration, 437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 437, __pyx_L1_error)

  /* "dds.pyx":448
 * 
 *     '''
 *     def __init__(self, minimum_separation = DDSDuration(0,0)):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID)
 *         self._minimum_separation = minimum_separation.value
 */
  __pyx_tuple__101 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_minimum_separation); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 448, __pyx_L1_error)
  __pyx_tuple__103 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "dds.pyx":453
 * 
 *     @property
 *     def minimum_separation(self):             # <<<<<<<<<<<<<<
 *         return self._minimum_separation
 * 
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_minimum_separation, 453, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 453, __pyx_L1_error)

  /* "dds.pyx":464
 * 
 *     '''
 *     def __init__(self, ps = []):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.PARTITION_QOS_POLICY_ID)
 *         self._names = ps
 */
  __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ps); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 464, __pyx_L1_error)

  /* "dds.pyx":469
 * 
 *     @property
 *     def ps(self):             # <<<<<<<<<<<<<<
 *         return self._names
 * 
 */
  __pyx_tuple__108 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_ps, 469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 469, __pyx_L1_error)

  /* "dds.pyx":482
 *     :param max_blocking_time: Max blocking time (default: 100 milliseconds)
 *     '''
 *     def __init__(self, kind=DDSReliabilityKind.BEST_EFFORT, max_blocking_time=DDSDuration(0,100000000)):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.RELIABILITY_QOS_POLICY_ID)
 *         self._kind = kind
 */
  __pyx_tuple__110 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_kind_2, __pyx_n_s_max_blocking_time); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 482, __pyx_L1_error)
  __pyx_tuple__112 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_100000000); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "dds.pyx":488
 * 
 *     @property
 *     def max_blocking_time(self):             # <<<<<<<<<<<<<<
 *         return self._max_blocking_time
 * 
 */
  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_max_blocking_time, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 488, __pyx_L1_error)

  /* "dds.pyx":499
 * 
 *     '''
 *     def __init__(self, value = 0):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_tuple__115 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 499, __pyx_L1_error)
  __pyx_tuple__117 = PyTuple_Pack(1, ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);

  /* "dds.pyx":504
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */
  __pyx_tuple__118 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_value, 504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 504, __pyx_L1_error)

  /* "dds.pyx":515
 * 
 *     '''
 *     def __init__(self, kind=DDSDestinationOrderKind.BY_RECEPTION_TIMESTAMP):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID)
 *         self._kind = kind
 */
  __pyx_tuple__120 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_kind_2); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 515, __pyx_L1_error)

  /* "dds.pyx":527
 * 
 *     '''
 *     def __init__(self, autodispose_unregistered_instances = True):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autodispose_unregistered_instances = autodispose_unregistered_instances
 */
  __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_autodispose_unregistered_instanc); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 527, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 527, __pyx_L1_error)
  __pyx_tuple__124 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "dds.pyx":532
 * 
 *     @property
 *     def autodispose_unregistered_instances(self):             # <<<<<<<<<<<<<<
 *         return self._autodispose_unregistered_instances
 * 
 */
  __pyx_tuple__125 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_autodispose_unregistered_instanc, 532, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 532, __pyx_L1_error)

  /* "dds.pyx":545
 *     :param autopurge_disposed_samples_delay: set autopurge_nowriter_samples (default: infinity)
 *     '''
 *     def __init__(self, autopurge_nowriter_samples = DDSDuration.infinity(), autopurge_disposed_samples_delay = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autopurge_nowriter_samples = autopurge_nowriter_samples.value
 */
  __pyx_tuple__127 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_autopurge_nowriter_samples, __pyx_n_s_autopurge_disposed_samples_delay); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 545, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 545, __pyx_L1_error)

  /* "dds.pyx":551
 * 
 *     @property
 *     def autopurge_nowriter_samples(self):             # <<<<<<<<<<<<<<
 *         return self._autopurge_nowriter_samples
 * 
 */
  __pyx_tuple__129 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_autopurge_nowriter_samples, 551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 551, __pyx_L1_error)

  /* "dds.pyx":555
 * 
 *     @property
 *     def autopurge_disposed_samples_delay(self):             # <<<<<<<<<<<<<<
 *         return self._autopurge_disposed_samples_delay
 * 
 */
  __pyx_tuple__131 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_autopurge_disposed_samples_delay, 555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 555, __pyx_L1_error)

  /* "dds.pyx":581
 * 
 *     '''
 *     def __init__(self, service_cleanup_delay = DDSDuration(0,0), history_kind = DDSHistoryKind.KEEP_LAST,             # <<<<<<<<<<<<<<
 *                  history_depth = 1, max_samples = DDS_LENGTH_UNLIMITED,
 *                  max_instances = DDS_LENGTH_UNLIMITED,
 */
  __pyx_tuple__133 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_service_cleanup_delay, __pyx_n_s_history_kind, __pyx_n_s_history_depth, __pyx_n_s_max_samples, __pyx_n_s_max_instances, __pyx_n_s_max_samples_per_instance); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 581, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 581, __pyx_L1_error)

  /* "dds.pyx":594
 * 
 *     @property
 *     def service_cleanup_delay(self):             # <<<<<<<<<<<<<<
 *         return self._service_cleanup_delay
 * 
 */
  __pyx_tuple__135 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_service_cleanup_delay, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 594, __pyx_L1_error)

  /* "dds.pyx":598
 * 
 *     @property
 *     def history_kind(self):             # <<<<<<<<<<<<<<
 *         return self._history_kind
 * 
 */
  __pyx_tuple__137 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_history_kind, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 598, __pyx_L1_error)

  /* "dds.pyx":602
 * 
 *     @property
 *     def history_depth(self):             # <<<<<<<<<<<<<<
 *         return self._history_depth
 * 
 */
  __pyx_tuple__139 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_history_depth, 602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 602, __pyx_L1_error)

  /* "dds.pyx":606
 * 
 *     @property
 *     def max_samples(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples
 * 
 */
  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_max_samples, 606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 606, __pyx_L1_error)

  /* "dds.pyx":610
 * 
 *     @property
 *     def max_instances(self):             # <<<<<<<<<<<<<<
 *         return self._max_instances
 * 
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_max_instances, 610, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 610, __pyx_L1_error)

  /* "dds.pyx":614
 * 
 *     @property
 *     def max_samples_per_instance(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples_per_instance
 * 
 */
  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_max_samples_per_instance, 614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 614, __pyx_L1_error)

  /* "dds.pyx":625
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.USERDATA_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 625, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 625, __pyx_L1_error)
  __pyx_tuple__149 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_)); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);

  /* "dds.pyx":630
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */
  __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_value, 630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 630, __pyx_L1_error)

  /* "dds.pyx":641
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TOPICDATA_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_tuple__152 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 641, __pyx_L1_error)
  __pyx_tuple__154 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_)); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "dds.pyx":653
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.GROUPDATA_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_tuple__155 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 653, __pyx_L1_error)
  __pyx_tuple__157 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_)); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);

  /* "dds.pyx":801
 *     '''
 *     @staticmethod
 *     def read_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 */
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_read_samples, 801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 801, __pyx_L1_error)

  /* "dds.pyx":811
 * 
 *     @staticmethod
 *     def new_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 */
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_new_samples, 811, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 811, __pyx_L1_error)

  /* "dds.pyx":821
 * 
 *     @staticmethod
 *     def all_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.ANY_STATE]
 */
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_all_samples, 821, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 821, __pyx_L1_error)

  /* "dds.pyx":831
 * 
 *     @staticmethod
 *     def new_instance_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.NEW_VIEW_STATE]
 */
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_new_instance_samples, 831, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 831, __pyx_L1_error)

  /* "dds.pyx":841
 * 
 *     @staticmethod
 *     def not_alive_instance_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.ANY_SAMPLE_STATE, DDSStateKind.ANY_VIEW_STATE, DDSStateKind.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE, DDSStateKind.NOT_ALIVE_DISPOSED_INSTANCE_STATE]
 */
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_not_alive_instance_samples, 841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 841, __pyx_L1_error)

  /* "dds.pyx":851
 * 
 * # Abstract listener
 * class Listener(object):             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract Listener class.
 */
  __pyx_tuple__163 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "dds.pyx":856
 *     '''
 * 
 *     def on_inconsistent_topic(self, topic, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A participant registered a topic inconsistent with a locally registered one.
 */
  __pyx_tuple__164 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_topic, __pyx_n_s_status); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_inconsistent_topic, 856, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 856, __pyx_L1_error)

  /* "dds.pyx":873
 *         pass
 * 
 *     def on_offered_deadline_missed(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A locally created data writer has failed to adhere it's DeadlinePolicy.
 */
  __pyx_tuple__166 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_writer, __pyx_n_s_status); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_offered_deadline_missed, 873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 873, __pyx_L1_error)

  /* "dds.pyx":886
 *         pass
 * 
 *     def on_offered_incompatible_qos(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data writer could not be matched with a data reader because of Qos incompatibilities
 */
  __pyx_tuple__168 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_writer, __pyx_n_s_status); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_offered_incompatible_qos, 886, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 886, __pyx_L1_error)

  /* "dds.pyx":899
 *         pass
 * 
 *     def on_liveliness_lost(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data writer has not met its committed LivelinessQosPolicy
 */
  __pyx_tuple__170 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_writer, __pyx_n_s_status); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_liveliness_lost, 899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 899, __pyx_L1_error)

  /* "dds.pyx":912
 *         pass
 * 
 *     def on_publication_matched(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The number of data readers matched to writer has changed.
 */
  __pyx_tuple__172 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_writer, __pyx_n_s_status); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_publication_matched, 912, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 912, __pyx_L1_error)

  /* "dds.pyx":925
 *         pass
 * 
 *     def on_requested_deadline_missed(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A reader's requested DeadlinePolicy was not met by it's matched writers.
 */
  __pyx_tuple__174 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_reader, __pyx_n_s_status); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_requested_deadline_missed, 925, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 925, __pyx_L1_error)

  /* "dds.pyx":938
 *         pass
 * 
 *     def on_requested_incompatible_qos(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data reader could not be matched with a data writer because of Qos incompatibilities
 */
  __pyx_tuple__176 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_reader, __pyx_n_s_status); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_requested_incompatible_qos, 938, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 938, __pyx_L1_error)

  /* "dds.pyx":951
 *         pass
 * 
 *     def on_sample_rejected(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The data reader did not receive samples because of the ResourceLimitsQosPolicy
 */
  __pyx_tuple__178 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_reader, __pyx_n_s_status); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_sample_rejected, 951, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 951, __pyx_L1_error)

  /* "dds.pyx":964
 *         pass
 * 
 *     def on_liveliness_changed(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''on_liveliness_changed(reader, status)
 *         A data reader has experienced a liveliness change in a match writer
 */
  __pyx_tuple__180 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_reader, __pyx_n_s_status); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_liveliness_changed, 964, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 964, __pyx_L1_error)

  /* "dds.pyx":977
 *         pass
 * 
 *     def on_data_available(self, reader):             # <<<<<<<<<<<<<<
 *         '''
 *         Data is available on the passed data reader.
 */
  __pyx_tuple__182 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_data_available, 977, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 977, __pyx_L1_error)

  /* "dds.pyx":988
 *         pass
 * 
 *     def on_subscription_matched(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The number of data writers matched to a reader has changed.
 */
  __pyx_tuple__184 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_reader, __pyx_n_s_status); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_subscription_matched, 988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 988, __pyx_L1_error)

  /* "dds.pyx":1001
 *         pass
 * 
 *     def on_sample_lost(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A sample for the data reader has been lost
 */
  __pyx_tuple__186 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_reader, __pyx_n_s_status); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_sample_lost, 1001, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 1001, __pyx_L1_error)

  /* "dds.pyx":1014
 *         pass
 * 
 *     def on_data_on_readers(self, subscriber):             # <<<<<<<<<<<<<<
 *         '''
 *         One or more data readers belonging to the subscriber have data available.
 */
  __pyx_tuple__188 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_subscriber); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_on_data_on_readers, 1014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 1014, __pyx_L1_error)

  /* "dds.pyx":2488
 *     Base sample info class
 *     '''
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 2488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 2488, __pyx_L1_error)

  /* "dds.pyx":3365
 *         return qos
 * 
 * def QosProfile(uri, profile):             # <<<<<<<<<<<<<<
 *     from warnings import warn
 *     warn('The class name QosProfile is deprecated. Use class QosProvider instead.' \
 */
  __pyx_tuple__192 = PyTuple_Pack(3, __pyx_n_s_uri, __pyx_n_s_profile, __pyx_n_s_warn); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 3365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_QosProfile, 3365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 3365, __pyx_L1_error)

  /* "dds.pyx":3375
 *     DDS exception
 *     '''
 *     def __init__(self, message = '', code = 0):             # <<<<<<<<<<<<<<
 *         msg = message
 *         if code != 0:
 */
  __pyx_tuple__194 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_code, __pyx_n_s_msg); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 3375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_init, 3375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 3375, __pyx_L1_error)
  __pyx_tuple__196 = PyTuple_Pack(2, ((PyObject*)__pyx_kp_s_), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 3375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);

  /* "dds.pyx":3384
 * 
 *     @staticmethod
 *     def bytes_to_ptr(str):             # <<<<<<<<<<<<<<
 *         cdef char *s = <bytes>str
 *         cdef long long addr = <long long> s
 */
  __pyx_tuple__197 = PyTuple_Pack(3, __pyx_n_s_str, __pyx_n_s_s, __pyx_n_s_addr); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_bytes_to_ptr, 3384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 3384, __pyx_L1_error)

  /* "dds.pyx":3390
 * 
 *     @staticmethod
 *     def ptr_to_bytes(ptr, size = 0):             # <<<<<<<<<<<<<<
 *         cdef long long addr = ptr
 *         cdef char *s = <char *>addr
 */
  __pyx_tuple__199 = PyTuple_Pack(4, __pyx_n_s_ptr, __pyx_n_s_size, __pyx_n_s_addr, __pyx_n_s_s); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 3390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dds_pyx, __pyx_n_s_ptr_to_bytes, 3390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 3390, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypeSupport(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__201 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TypeSupport, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__203 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__SerializationHel, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyString_Type_encode.type = (PyObject*)&PyString_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100000000 = PyInt_FromLong(100000000L); if (unlikely(!__pyx_int_100000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1000000000 = PyInt_FromLong(1000000000L); if (unlikely(!__pyx_int_1000000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_3dds__entity_register = Py_None; Py_INCREF(Py_None);
  __pyx_v_3dds__builtin_topics_descriptors = Py_None; Py_INCREF(Py_None);
  __pyx_v_3dds__builtin_topics_type_name_map = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_3dds_Qos = &__pyx_vtable_3dds_Qos;
  __pyx_vtable_3dds_Qos._apply_all = (PyObject *(*)(struct __pyx_obj_3dds_Qos *))__pyx_f_3dds_3Qos__apply_all;
  __pyx_vtable_3dds_Qos._apply_policy = (PyObject *(*)(struct __pyx_obj_3dds_Qos *, PyObject *))__pyx_f_3dds_3Qos__apply_policy;
  __pyx_vtable_3dds_Qos.handle = (dds_qos_t *(*)(struct __pyx_obj_3dds_Qos *))__pyx_f_3dds_3Qos_handle;
  if (PyType_Ready(&__pyx_type_3dds_Qos) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_Qos.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_Qos.tp_dictoffset && __pyx_type_3dds_Qos.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_Qos.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_Qos.tp_dict, __pyx_vtabptr_3dds_Qos) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Qos, (PyObject *)&__pyx_type_3dds_Qos) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_Qos) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
  __pyx_ptype_3dds_Qos = &__pyx_type_3dds_Qos;
  __pyx_vtabptr_3dds_Entity = &__pyx_vtable_3dds_Entity;
  __pyx_vtable_3dds_Entity.set_handle = (PyObject *(*)(struct __pyx_obj_3dds_Entity *, dds_entity_t))__pyx_f_3dds_6Entity_set_handle;
  __pyx_vtable_3dds_Entity.get_handle = (dds_entity_t (*)(struct __pyx_obj_3dds_Entity *))__pyx_f_3dds_6Entity_get_handle;
  __pyx_vtable_3dds_Entity.handle = (dds_entity_t (*)(struct __pyx_obj_3dds_Entity *))__pyx_f_3dds_6Entity_handle;
  if (PyType_Ready(&__pyx_type_3dds_Entity) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_Entity.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_Entity.tp_dictoffset && __pyx_type_3dds_Entity.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_Entity.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_Entity.tp_dict, __pyx_vtabptr_3dds_Entity) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Entity, (PyObject *)&__pyx_type_3dds_Entity) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_Entity) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
  __pyx_ptype_3dds_Entity = &__pyx_type_3dds_Entity;
  __pyx_vtabptr_3dds_DomainParticipant = &__pyx_vtable_3dds_DomainParticipant;
  __pyx_vtable_3dds_DomainParticipant.__pyx_base = *__pyx_vtabptr_3dds_Entity;
  __pyx_type_3dds_DomainParticipant.tp_base = __pyx_ptype_3dds_Entity;
  if (PyType_Ready(&__pyx_type_3dds_DomainParticipant) < 0) __PYX_ERR(0, 1615, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_DomainParticipant.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_DomainParticipant.tp_dictoffset && __pyx_type_3dds_DomainParticipant.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_DomainParticipant.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_DomainParticipant.tp_dict, __pyx_vtabptr_3dds_DomainParticipant) < 0) __PYX_ERR(0, 1615, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DomainParticipant, (PyObject *)&__pyx_type_3dds_DomainParticipant) < 0) __PYX_ERR(0, 1615, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_DomainParticipant) < 0) __PYX_ERR(0, 1615, __pyx_L1_error)
  __pyx_ptype_3dds_DomainParticipant = &__pyx_type_3dds_DomainParticipant;
  if (PyType_Ready(&__pyx_type_3dds_TypeSupport) < 0) __PYX_ERR(0, 1767, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_TypeSupport.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_TypeSupport.tp_dictoffset && __pyx_type_3dds_TypeSupport.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_TypeSupport.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TypeSupport, (PyObject *)&__pyx_type_3dds_TypeSupport) < 0) __PYX_ERR(0, 1767, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_TypeSupport) < 0) __PYX_ERR(0, 1767, __pyx_L1_error)
  __pyx_ptype_3dds_TypeSupport = &__pyx_type_3dds_TypeSupport;
  __pyx_vtabptr_3dds_Topic = &__pyx_vtable_3dds_Topic;
  __pyx_vtable_3dds_Topic.__pyx_base = *__pyx_vtabptr_3dds_Entity;
  __pyx_type_3dds_Topic.tp_base = __pyx_ptype_3dds_Entity;
  if (PyType_Ready(&__pyx_type_3dds_Topic) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_Topic.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_Topic.tp_dictoffset && __pyx_type_3dds_Topic.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_Topic.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_Topic.tp_dict, __pyx_vtabptr_3dds_Topic) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Topic, (PyObject *)&__pyx_type_3dds_Topic) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_Topic) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
  __pyx_ptype_3dds_Topic = &__pyx_type_3dds_Topic;
  __pyx_vtabptr_3dds_FoundTopic = &__pyx_vtable_3dds_FoundTopic;
  __pyx_vtable_3dds_FoundTopic.__pyx_base = *__pyx_vtabptr_3dds_Topic;
  __pyx_type_3dds_FoundTopic.tp_base = __pyx_ptype_3dds_Topic;
  if (PyType_Ready(&__pyx_type_3dds_FoundTopic) < 0) __PYX_ERR(0, 1997, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_FoundTopic.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_FoundTopic.tp_dictoffset && __pyx_type_3dds_FoundTopic.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_FoundTopic.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_FoundTopic.tp_dict, __pyx_vtabptr_3dds_FoundTopic) < 0) __PYX_ERR(0, 1997, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FoundTopic, (PyObject *)&__pyx_type_3dds_FoundTopic) < 0) __PYX_ERR(0, 1997, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_FoundTopic) < 0) __PYX_ERR(0, 1997, __pyx_L1_error)
  __pyx_ptype_3dds_FoundTopic = &__pyx_type_3dds_FoundTopic;
  __pyx_vtabptr_3dds_Publisher = &__pyx_vtable_3dds_Publisher;
  __pyx_vtable_3dds_Publisher.__pyx_base = *__pyx_vtabptr_3dds_Entity;
  __pyx_type_3dds_Publisher.tp_base = __pyx_ptype_3dds_Entity;
  if (PyType_Ready(&__pyx_type_3dds_Publisher) < 0) __PYX_ERR(0, 2030, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_Publisher.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_Publisher.tp_dictoffset && __pyx_type_3dds_Publisher.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_Publisher.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_Publisher.tp_dict, __pyx_vtabptr_3dds_Publisher) < 0) __PYX_ERR(0, 2030, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Publisher, (PyObject *)&__pyx_type_3dds_Publisher) < 0) __PYX_ERR(0, 2030, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_Publisher) < 0) __PYX_ERR(0, 2030, __pyx_L1_error)
  __pyx_ptype_3dds_Publisher = &__pyx_type_3dds_Publisher;
  __pyx_vtabptr_3dds_Subscriber = &__pyx_vtable_3dds_Subscriber;
  __pyx_vtable_3dds_Subscriber.__pyx_base = *__pyx_vtabptr_3dds_Entity;
  __pyx_type_3dds_Subscriber.tp_base = __pyx_ptype_3dds_Entity;
  if (PyType_Ready(&__pyx_type_3dds_Subscriber) < 0) __PYX_ERR(0, 2095, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_Subscriber.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_Subscriber.tp_dictoffset && __pyx_type_3dds_Subscriber.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_Subscriber.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_Subscriber.tp_dict, __pyx_vtabptr_3dds_Subscriber) < 0) __PYX_ERR(0, 2095, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Subscriber, (PyObject *)&__pyx_type_3dds_Subscriber) < 0) __PYX_ERR(0, 2095, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_Subscriber) < 0) __PYX_ERR(0, 2095, __pyx_L1_error)
  __pyx_ptype_3dds_Subscriber = &__pyx_type_3dds_Subscriber;
  __pyx_vtabptr_3dds_DataWriter = &__pyx_vtable_3dds_DataWriter;
  __pyx_vtable_3dds_DataWriter.__pyx_base = *__pyx_vtabptr_3dds_Entity;
  __pyx_type_3dds_DataWriter.tp_base = __pyx_ptype_3dds_Entity;
  if (PyType_Ready(&__pyx_type_3dds_DataWriter) < 0) __PYX_ERR(0, 2160, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_DataWriter.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_DataWriter.tp_dictoffset && __pyx_type_3dds_DataWriter.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_DataWriter.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_DataWriter.tp_dict, __pyx_vtabptr_3dds_DataWriter) < 0) __PYX_ERR(0, 2160, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DataWriter, (PyObject *)&__pyx_type_3dds_DataWriter) < 0) __PYX_ERR(0, 2160, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_DataWriter) < 0) __PYX_ERR(0, 2160, __pyx_L1_error)
  __pyx_ptype_3dds_DataWriter = &__pyx_type_3dds_DataWriter;
  __pyx_vtabptr_3dds_DataReader = &__pyx_vtable_3dds_DataReader;
  __pyx_vtable_3dds_DataReader.__pyx_base = *__pyx_vtabptr_3dds_Entity;
  __pyx_type_3dds_DataReader.tp_base = __pyx_ptype_3dds_Entity;
  if (PyType_Ready(&__pyx_type_3dds_DataReader) < 0) __PYX_ERR(0, 2561, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_DataReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_DataReader.tp_dictoffset && __pyx_type_3dds_DataReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_DataReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_DataReader.tp_dict, __pyx_vtabptr_3dds_DataReader) < 0) __PYX_ERR(0, 2561, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DataReader, (PyObject *)&__pyx_type_3dds_DataReader) < 0) __PYX_ERR(0, 2561, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_DataReader) < 0) __PYX_ERR(0, 2561, __pyx_L1_error)
  __pyx_ptype_3dds_DataReader = &__pyx_type_3dds_DataReader;
  __pyx_vtabptr_3dds_Condition = &__pyx_vtable_3dds_Condition;
  __pyx_vtable_3dds_Condition.set_handle = (PyObject *(*)(struct __pyx_obj_3dds_Condition *, dds_condition_t))__pyx_f_3dds_9Condition_set_handle;
  __pyx_vtable_3dds_Condition.get_handle = (dds_condition_t (*)(struct __pyx_obj_3dds_Condition *))__pyx_f_3dds_9Condition_get_handle;
  if (PyType_Ready(&__pyx_type_3dds_Condition) < 0) __PYX_ERR(0, 2989, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_Condition.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_Condition.tp_dictoffset && __pyx_type_3dds_Condition.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_Condition.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_Condition.tp_dict, __pyx_vtabptr_3dds_Condition) < 0) __PYX_ERR(0, 2989, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Condition, (PyObject *)&__pyx_type_3dds_Condition) < 0) __PYX_ERR(0, 2989, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_Condition) < 0) __PYX_ERR(0, 2989, __pyx_L1_error)
  __pyx_ptype_3dds_Condition = &__pyx_type_3dds_Condition;
  __pyx_vtabptr_3dds_StatusCondition = &__pyx_vtable_3dds_StatusCondition;
  __pyx_vtable_3dds_StatusCondition.__pyx_base = *__pyx_vtabptr_3dds_Condition;
  __pyx_type_3dds_StatusCondition.tp_base = __pyx_ptype_3dds_Condition;
  if (PyType_Ready(&__pyx_type_3dds_StatusCondition) < 0) __PYX_ERR(0, 3016, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_StatusCondition.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_StatusCondition.tp_dictoffset && __pyx_type_3dds_StatusCondition.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_StatusCondition.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_StatusCondition.tp_dict, __pyx_vtabptr_3dds_StatusCondition) < 0) __PYX_ERR(0, 3016, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StatusCondition, (PyObject *)&__pyx_type_3dds_StatusCondition) < 0) __PYX_ERR(0, 3016, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_StatusCondition) < 0) __PYX_ERR(0, 3016, __pyx_L1_error)
  __pyx_ptype_3dds_StatusCondition = &__pyx_type_3dds_StatusCondition;
  __pyx_vtabptr_3dds_GuardCondition = &__pyx_vtable_3dds_GuardCondition;
  __pyx_vtable_3dds_GuardCondition.__pyx_base = *__pyx_vtabptr_3dds_Condition;
  __pyx_type_3dds_GuardCondition.tp_base = __pyx_ptype_3dds_Condition;
  if (PyType_Ready(&__pyx_type_3dds_GuardCondition) < 0) __PYX_ERR(0, 3055, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_GuardCondition.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_GuardCondition.tp_dictoffset && __pyx_type_3dds_GuardCondition.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_GuardCondition.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_GuardCondition.tp_dict, __pyx_vtabptr_3dds_GuardCondition) < 0) __PYX_ERR(0, 3055, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GuardCondition, (PyObject *)&__pyx_type_3dds_GuardCondition) < 0) __PYX_ERR(0, 3055, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_GuardCondition) < 0) __PYX_ERR(0, 3055, __pyx_L1_error)
  __pyx_ptype_3dds_GuardCondition = &__pyx_type_3dds_GuardCondition;
  __pyx_vtabptr_3dds_ReadCondition = &__pyx_vtable_3dds_ReadCondition;
  __pyx_vtable_3dds_ReadCondition.__pyx_base = *__pyx_vtabptr_3dds_Condition;
  __pyx_type_3dds_ReadCondition.tp_base = __pyx_ptype_3dds_Condition;
  if (PyType_Ready(&__pyx_type_3dds_ReadCondition) < 0) __PYX_ERR(0, 3077, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_ReadCondition.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_ReadCondition.tp_dictoffset && __pyx_type_3dds_ReadCondition.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_ReadCondition.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_ReadCondition.tp_dict, __pyx_vtabptr_3dds_ReadCondition) < 0) __PYX_ERR(0, 3077, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ReadCondition, (PyObject *)&__pyx_type_3dds_ReadCondition) < 0) __PYX_ERR(0, 3077, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_ReadCondition) < 0) __PYX_ERR(0, 3077, __pyx_L1_error)
  __pyx_ptype_3dds_ReadCondition = &__pyx_type_3dds_ReadCondition;
  __pyx_vtabptr_3dds_QueryCondition = &__pyx_vtable_3dds_QueryCondition;
  __pyx_vtable_3dds_QueryCondition.__pyx_base = *__pyx_vtabptr_3dds_Condition;
  __pyx_type_3dds_QueryCondition.tp_base = __pyx_ptype_3dds_Condition;
  if (PyType_Ready(&__pyx_type_3dds_QueryCondition) < 0) __PYX_ERR(0, 3103, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_QueryCondition.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_QueryCondition.tp_dictoffset && __pyx_type_3dds_QueryCondition.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_QueryCondition.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3dds_QueryCondition.tp_dict, __pyx_vtabptr_3dds_QueryCondition) < 0) __PYX_ERR(0, 3103, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_QueryCondition, (PyObject *)&__pyx_type_3dds_QueryCondition) < 0) __PYX_ERR(0, 3103, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_QueryCondition) < 0) __PYX_ERR(0, 3103, __pyx_L1_error)
  __pyx_ptype_3dds_QueryCondition = &__pyx_type_3dds_QueryCondition;
  if (PyType_Ready(&__pyx_type_3dds_WaitSet) < 0) __PYX_ERR(0, 3156, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_WaitSet.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_WaitSet.tp_dictoffset && __pyx_type_3dds_WaitSet.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_WaitSet.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_WaitSet, (PyObject *)&__pyx_type_3dds_WaitSet) < 0) __PYX_ERR(0, 3156, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_WaitSet) < 0) __PYX_ERR(0, 3156, __pyx_L1_error)
  __pyx_ptype_3dds_WaitSet = &__pyx_type_3dds_WaitSet;
  if (PyType_Ready(&__pyx_type_3dds_QosProvider) < 0) __PYX_ERR(0, 3253, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds_QosProvider.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds_QosProvider.tp_dictoffset && __pyx_type_3dds_QosProvider.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds_QosProvider.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_QosProvider, (PyObject *)&__pyx_type_3dds_QosProvider) < 0) __PYX_ERR(0, 3253, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds_QosProvider) < 0) __PYX_ERR(0, 3253, __pyx_L1_error)
  __pyx_ptype_3dds_QosProvider = &__pyx_type_3dds_QosProvider;
  if (PyType_Ready(&__pyx_type_3dds__SerializationHelper) < 0) __PYX_ERR(0, 3381, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3dds__SerializationHelper.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3dds__SerializationHelper.tp_dictoffset && __pyx_type_3dds__SerializationHelper.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3dds__SerializationHelper.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SerializationHelper, (PyObject *)&__pyx_type_3dds__SerializationHelper) < 0) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3dds__SerializationHelper) < 0) __PYX_ERR(0, 3381, __pyx_L1_error)
  __pyx_ptype_3dds__SerializationHelper = &__pyx_type_3dds__SerializationHelper;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initdds(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initdds(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_dds(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_dds(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_dds(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'dds' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_dds(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("dds", __pyx_methods, __pyx_k_DDS_Python_DCPS_API_class, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_dds) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_3, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "dds")) {
      if (unlikely(PyDict_SetItemString(modules, "dds", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "dds.pyx":25
 * '''
 * cimport dds
 * from enum import Enum             # <<<<<<<<<<<<<<
 * from libc.stdlib cimport malloc, free
 * from libc.string cimport memset
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Enum);
  __Pyx_GIVEREF(__pyx_n_s_Enum);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Enum);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Enum, __pyx_t_1) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":30
 * from libc.stdint cimport intptr_t
 * from cpython.mem cimport PyMem_Malloc, PyMem_Realloc, PyMem_Free
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * import inspect
 * import time
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_namedtuple);
  __Pyx_GIVEREF(__pyx_n_s_namedtuple);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_namedtuple);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":31
 * from cpython.mem cimport PyMem_Malloc, PyMem_Realloc, PyMem_Free
 * from collections import namedtuple
 * import inspect             # <<<<<<<<<<<<<<
 * import time
 * 
 */
  __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, -1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":32
 * from collections import namedtuple
 * import inspect
 * import time             # <<<<<<<<<<<<<<
 * 
 * # Required to have listener's successfully call back into Python
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":35
 * 
 * # Required to have listener's successfully call back into Python
 * PyEval_InitThreads()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  PyEval_InitThreads();

  /* "dds.pyx":82
 * #############################################################################
 * ### Sample Info States
 * class DDSStateKind(Enum):             # <<<<<<<<<<<<<<
 *     READ_SAMPLE_STATE = 1
 *     NOT_READ_SAMPLE_STATE = 2
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DDSStateKind, __pyx_n_s_DDSStateKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":83
 * ### Sample Info States
 * class DDSStateKind(Enum):
 *     READ_SAMPLE_STATE = 1             # <<<<<<<<<<<<<<
 *     NOT_READ_SAMPLE_STATE = 2
 *     ANY_SAMPLE_STATE = READ_SAMPLE_STATE | NOT_READ_SAMPLE_STATE
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_READ_SAMPLE_STATE, __pyx_int_1) < 0) __PYX_ERR(0, 83, __pyx_L1_error)

  /* "dds.pyx":84
 * class DDSStateKind(Enum):
 *     READ_SAMPLE_STATE = 1
 *     NOT_READ_SAMPLE_STATE = 2             # <<<<<<<<<<<<<<
 *     ANY_SAMPLE_STATE = READ_SAMPLE_STATE | NOT_READ_SAMPLE_STATE
 *     NEW_VIEW_STATE = 4
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_READ_SAMPLE_STATE, __pyx_int_2) < 0) __PYX_ERR(0, 84, __pyx_L1_error)

  /* "dds.pyx":85
 *     READ_SAMPLE_STATE = 1
 *     NOT_READ_SAMPLE_STATE = 2
 *     ANY_SAMPLE_STATE = READ_SAMPLE_STATE | NOT_READ_SAMPLE_STATE             # <<<<<<<<<<<<<<
 *     NEW_VIEW_STATE = 4
 *     NOT_NEW_VIEW_STATE = 8
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_READ_SAMPLE_STATE);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_READ_SAMPLE_STATE);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_NOT_READ_SAMPLE_STATE);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NOT_READ_SAMPLE_STATE);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Or(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ANY_SAMPLE_STATE, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":86
 *     NOT_READ_SAMPLE_STATE = 2
 *     ANY_SAMPLE_STATE = READ_SAMPLE_STATE | NOT_READ_SAMPLE_STATE
 *     NEW_VIEW_STATE = 4             # <<<<<<<<<<<<<<
 *     NOT_NEW_VIEW_STATE = 8
 *     ANY_VIEW_STATE = NEW_VIEW_STATE | NOT_NEW_VIEW_STATE
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NEW_VIEW_STATE, __pyx_int_4) < 0) __PYX_ERR(0, 86, __pyx_L1_error)

  /* "dds.pyx":87
 *     ANY_SAMPLE_STATE = READ_SAMPLE_STATE | NOT_READ_SAMPLE_STATE
 *     NEW_VIEW_STATE = 4
 *     NOT_NEW_VIEW_STATE = 8             # <<<<<<<<<<<<<<
 *     ANY_VIEW_STATE = NEW_VIEW_STATE | NOT_NEW_VIEW_STATE
 *     ALIVE_INSTANCE_STATE = 16
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_NEW_VIEW_STATE, __pyx_int_8) < 0) __PYX_ERR(0, 87, __pyx_L1_error)

  /* "dds.pyx":88
 *     NEW_VIEW_STATE = 4
 *     NOT_NEW_VIEW_STATE = 8
 *     ANY_VIEW_STATE = NEW_VIEW_STATE | NOT_NEW_VIEW_STATE             # <<<<<<<<<<<<<<
 *     ALIVE_INSTANCE_STATE = 16
 *     NOT_ALIVE_DISPOSED_INSTANCE_STATE = 32
 */
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_NEW_VIEW_STATE);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NEW_VIEW_STATE);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_NOT_NEW_VIEW_STATE);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NOT_NEW_VIEW_STATE);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyNumber_Or(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ANY_VIEW_STATE, __pyx_t_4) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":89
 *     NOT_NEW_VIEW_STATE = 8
 *     ANY_VIEW_STATE = NEW_VIEW_STATE | NOT_NEW_VIEW_STATE
 *     ALIVE_INSTANCE_STATE = 16             # <<<<<<<<<<<<<<
 *     NOT_ALIVE_DISPOSED_INSTANCE_STATE = 32
 *     NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 64
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ALIVE_INSTANCE_STATE, __pyx_int_16) < 0) __PYX_ERR(0, 89, __pyx_L1_error)

  /* "dds.pyx":90
 *     ANY_VIEW_STATE = NEW_VIEW_STATE | NOT_NEW_VIEW_STATE
 *     ALIVE_INSTANCE_STATE = 16
 *     NOT_ALIVE_DISPOSED_INSTANCE_STATE = 32             # <<<<<<<<<<<<<<
 *     NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 64
 *     ANY_INSTANCE_STATE = ALIVE_INSTANCE_STATE | NOT_ALIVE_DISPOSED_INSTANCE_STATE | NOT_ALIVE_NO_WRITERS_INSTANCE_STATE
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_ALIVE_DISPOSED_INSTANCE_STAT, __pyx_int_32) < 0) __PYX_ERR(0, 90, __pyx_L1_error)

  /* "dds.pyx":91
 *     ALIVE_INSTANCE_STATE = 16
 *     NOT_ALIVE_DISPOSED_INSTANCE_STATE = 32
 *     NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 64             # <<<<<<<<<<<<<<
 *     ANY_INSTANCE_STATE = ALIVE_INSTANCE_STATE | NOT_ALIVE_DISPOSED_INSTANCE_STATE | NOT_ALIVE_NO_WRITERS_INSTANCE_STATE
 *     ANY_STATE = ANY_SAMPLE_STATE | ANY_VIEW_STATE | ANY_INSTANCE_STATE
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_ALIVE_NO_WRITERS_INSTANCE_ST, __pyx_int_64) < 0) __PYX_ERR(0, 91, __pyx_L1_error)

  /* "dds.pyx":92
 *     NOT_ALIVE_DISPOSED_INSTANCE_STATE = 32
 *     NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 64
 *     ANY_INSTANCE_STATE = ALIVE_INSTANCE_STATE | NOT_ALIVE_DISPOSED_INSTANCE_STATE | NOT_ALIVE_NO_WRITERS_INSTANCE_STATE             # <<<<<<<<<<<<<<
 *     ANY_STATE = ANY_SAMPLE_STATE | ANY_VIEW_STATE | ANY_INSTANCE_STATE
 * 
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_ALIVE_INSTANCE_STATE);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ALIVE_INSTANCE_STATE);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_NOT_ALIVE_DISPOSED_INSTANCE_STAT);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NOT_ALIVE_DISPOSED_INSTANCE_STAT);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Or(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_NOT_ALIVE_NO_WRITERS_INSTANCE_ST);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NOT_ALIVE_NO_WRITERS_INSTANCE_ST);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyNumber_Or(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ANY_INSTANCE_STATE, __pyx_t_4) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":93
 *     NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 64
 *     ANY_INSTANCE_STATE = ALIVE_INSTANCE_STATE | NOT_ALIVE_DISPOSED_INSTANCE_STATE | NOT_ALIVE_NO_WRITERS_INSTANCE_STATE
 *     ANY_STATE = ANY_SAMPLE_STATE | ANY_VIEW_STATE | ANY_INSTANCE_STATE             # <<<<<<<<<<<<<<
 * 
 * #############################################################################
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_ANY_SAMPLE_STATE);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ANY_SAMPLE_STATE);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_ANY_VIEW_STATE);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ANY_VIEW_STATE);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Or(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_ANY_INSTANCE_STATE);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ANY_INSTANCE_STATE);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyNumber_Or(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ANY_STATE, __pyx_t_4) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":82
 * #############################################################################
 * ### Sample Info States
 * class DDSStateKind(Enum):             # <<<<<<<<<<<<<<
 *     READ_SAMPLE_STATE = 1
 *     NOT_READ_SAMPLE_STATE = 2
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DDSStateKind, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSStateKind, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":97
 * #############################################################################
 * ### Communication status
 * class DDSStatusKind(Enum):             # <<<<<<<<<<<<<<
 *     INCONSISTENT_TOPIC         = dds.DDS_INCONSISTENT_TOPIC_STATUS
 *     OFFERED_DEADLINE_MISSED    = dds.DDS_OFFERED_DEADLINE_MISSED_STATUS
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DDSStatusKind, __pyx_n_s_DDSStatusKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":98
 * ### Communication status
 * class DDSStatusKind(Enum):
 *     INCONSISTENT_TOPIC         = dds.DDS_INCONSISTENT_TOPIC_STATUS             # <<<<<<<<<<<<<<
 *     OFFERED_DEADLINE_MISSED    = dds.DDS_OFFERED_DEADLINE_MISSED_STATUS
 *     REQUESTED_DEADLINE_MISSED  = dds.DDS_REQUESTED_DEADLINE_MISSED_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_INCONSISTENT_TOPIC_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INCONSISTENT_TOPIC, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":99
 * class DDSStatusKind(Enum):
 *     INCONSISTENT_TOPIC         = dds.DDS_INCONSISTENT_TOPIC_STATUS
 *     OFFERED_DEADLINE_MISSED    = dds.DDS_OFFERED_DEADLINE_MISSED_STATUS             # <<<<<<<<<<<<<<
 *     REQUESTED_DEADLINE_MISSED  = dds.DDS_REQUESTED_DEADLINE_MISSED_STATUS
 *     OFFERED_INCOMPATIBLE_QOS   = dds.DDS_OFFERED_INCOMPATIBLE_QOS_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_OFFERED_DEADLINE_MISSED_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_OFFERED_DEADLINE_MISSED, __pyx_t_4) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":100
 *     INCONSISTENT_TOPIC         = dds.DDS_INCONSISTENT_TOPIC_STATUS
 *     OFFERED_DEADLINE_MISSED    = dds.DDS_OFFERED_DEADLINE_MISSED_STATUS
 *     REQUESTED_DEADLINE_MISSED  = dds.DDS_REQUESTED_DEADLINE_MISSED_STATUS             # <<<<<<<<<<<<<<
 *     OFFERED_INCOMPATIBLE_QOS   = dds.DDS_OFFERED_INCOMPATIBLE_QOS_STATUS
 *     REQUESTED_INCOMPATIBLE_QOS = dds.DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_REQUESTED_DEADLINE_MISSED_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_REQUESTED_DEADLINE_MISSED, __pyx_t_4) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":101
 *     OFFERED_DEADLINE_MISSED    = dds.DDS_OFFERED_DEADLINE_MISSED_STATUS
 *     REQUESTED_DEADLINE_MISSED  = dds.DDS_REQUESTED_DEADLINE_MISSED_STATUS
 *     OFFERED_INCOMPATIBLE_QOS   = dds.DDS_OFFERED_INCOMPATIBLE_QOS_STATUS             # <<<<<<<<<<<<<<
 *     REQUESTED_INCOMPATIBLE_QOS = dds.DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS
 *     SAMPLE_LOST                = dds.DDS_SAMPLE_LOST_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_OFFERED_INCOMPATIBLE_QOS_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_OFFERED_INCOMPATIBLE_QOS, __pyx_t_4) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":102
 *     REQUESTED_DEADLINE_MISSED  = dds.DDS_REQUESTED_DEADLINE_MISSED_STATUS
 *     OFFERED_INCOMPATIBLE_QOS   = dds.DDS_OFFERED_INCOMPATIBLE_QOS_STATUS
 *     REQUESTED_INCOMPATIBLE_QOS = dds.DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS             # <<<<<<<<<<<<<<
 *     SAMPLE_LOST                = dds.DDS_SAMPLE_LOST_STATUS
 *     SAMPLE_REJECTED            = dds.DDS_SAMPLE_REJECTED_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_REQUESTED_INCOMPATIBLE_QOS, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":103
 *     OFFERED_INCOMPATIBLE_QOS   = dds.DDS_OFFERED_INCOMPATIBLE_QOS_STATUS
 *     REQUESTED_INCOMPATIBLE_QOS = dds.DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS
 *     SAMPLE_LOST                = dds.DDS_SAMPLE_LOST_STATUS             # <<<<<<<<<<<<<<
 *     SAMPLE_REJECTED            = dds.DDS_SAMPLE_REJECTED_STATUS
 *     DATA_ON_READERS            = dds.DDS_DATA_ON_READERS_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_SAMPLE_LOST_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SAMPLE_LOST, __pyx_t_4) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":104
 *     REQUESTED_INCOMPATIBLE_QOS = dds.DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS
 *     SAMPLE_LOST                = dds.DDS_SAMPLE_LOST_STATUS
 *     SAMPLE_REJECTED            = dds.DDS_SAMPLE_REJECTED_STATUS             # <<<<<<<<<<<<<<
 *     DATA_ON_READERS            = dds.DDS_DATA_ON_READERS_STATUS
 *     DATA_AVAILABLE             = dds.DDS_DATA_AVAILABLE_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_SAMPLE_REJECTED_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SAMPLE_REJECTED, __pyx_t_4) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":105
 *     SAMPLE_LOST                = dds.DDS_SAMPLE_LOST_STATUS
 *     SAMPLE_REJECTED            = dds.DDS_SAMPLE_REJECTED_STATUS
 *     DATA_ON_READERS            = dds.DDS_DATA_ON_READERS_STATUS             # <<<<<<<<<<<<<<
 *     DATA_AVAILABLE             = dds.DDS_DATA_AVAILABLE_STATUS
 *     LIVELINESS_LOST            = dds.dds.DDS_LIVELINESS_LOST_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_DATA_ON_READERS_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DATA_ON_READERS, __pyx_t_4) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":106
 *     SAMPLE_REJECTED            = dds.DDS_SAMPLE_REJECTED_STATUS
 *     DATA_ON_READERS            = dds.DDS_DATA_ON_READERS_STATUS
 *     DATA_AVAILABLE             = dds.DDS_DATA_AVAILABLE_STATUS             # <<<<<<<<<<<<<<
 *     LIVELINESS_LOST            = dds.dds.DDS_LIVELINESS_LOST_STATUS
 *     LIVELINESS_CHANGED         = dds.DDS_LIVELINESS_CHANGED_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_DATA_AVAILABLE_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DATA_AVAILABLE, __pyx_t_4) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":107
 *     DATA_ON_READERS            = dds.DDS_DATA_ON_READERS_STATUS
 *     DATA_AVAILABLE             = dds.DDS_DATA_AVAILABLE_STATUS
 *     LIVELINESS_LOST            = dds.dds.DDS_LIVELINESS_LOST_STATUS             # <<<<<<<<<<<<<<
 *     LIVELINESS_CHANGED         = dds.DDS_LIVELINESS_CHANGED_STATUS
 *     PUBLICATION_MATCHED        = dds.DDS_PUBLICATION_MATCHED_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_LIVELINESS_LOST_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_LIVELINESS_LOST, __pyx_t_4) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":108
 *     DATA_AVAILABLE             = dds.DDS_DATA_AVAILABLE_STATUS
 *     LIVELINESS_LOST            = dds.dds.DDS_LIVELINESS_LOST_STATUS
 *     LIVELINESS_CHANGED         = dds.DDS_LIVELINESS_CHANGED_STATUS             # <<<<<<<<<<<<<<
 *     PUBLICATION_MATCHED        = dds.DDS_PUBLICATION_MATCHED_STATUS
 *     SUBSCRIPTION_MATCHED       = dds.DDS_SUBSCRIPTION_MATCHED_STATUS
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_LIVELINESS_CHANGED_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_LIVELINESS_CHANGED, __pyx_t_4) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":109
 *     LIVELINESS_LOST            = dds.dds.DDS_LIVELINESS_LOST_STATUS
 *     LIVELINESS_CHANGED         = dds.DDS_LIVELINESS_CHANGED_STATUS
 *     PUBLICATION_MATCHED        = dds.DDS_PUBLICATION_MATCHED_STATUS             # <<<<<<<<<<<<<<
 *     SUBSCRIPTION_MATCHED       = dds.DDS_SUBSCRIPTION_MATCHED_STATUS
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_PUBLICATION_MATCHED_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_PUBLICATION_MATCHED, __pyx_t_4) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":110
 *     LIVELINESS_CHANGED         = dds.DDS_LIVELINESS_CHANGED_STATUS
 *     PUBLICATION_MATCHED        = dds.DDS_PUBLICATION_MATCHED_STATUS
 *     SUBSCRIPTION_MATCHED       = dds.DDS_SUBSCRIPTION_MATCHED_STATUS             # <<<<<<<<<<<<<<
 * 
 * #############################################################################
 */
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(DDS_SUBSCRIPTION_MATCHED_STATUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SUBSCRIPTION_MATCHED, __pyx_t_4) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":97
 * #############################################################################
 * ### Communication status
 * class DDSStatusKind(Enum):             # <<<<<<<<<<<<<<
 *     INCONSISTENT_TOPIC         = dds.DDS_INCONSISTENT_TOPIC_STATUS
 *     OFFERED_DEADLINE_MISSED    = dds.DDS_OFFERED_DEADLINE_MISSED_STATUS
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DDSStatusKind, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSStatusKind, __pyx_t_4) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":114
 * #############################################################################
 * ## QoS IDs
 * class QosPolicyId(Enum):             # <<<<<<<<<<<<<<
 *     '''
 *     Enumeration of Qos policy kinds
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_QosPolicyId, __pyx_n_s_QosPolicyId, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Enumeration_of_Qos_policy_kinds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":118
 *     Enumeration of Qos policy kinds
 *     '''
 *     INVALID_QOS_POLICY_ID = 0             # <<<<<<<<<<<<<<
 *     USERDATA_QOS_POLICY_ID = 1
 *     DURABILITY_QOS_POLICY_ID = 2
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INVALID_QOS_POLICY_ID, __pyx_int_0) < 0) __PYX_ERR(0, 118, __pyx_L1_error)

  /* "dds.pyx":119
 *     '''
 *     INVALID_QOS_POLICY_ID = 0
 *     USERDATA_QOS_POLICY_ID = 1             # <<<<<<<<<<<<<<
 *     DURABILITY_QOS_POLICY_ID = 2
 *     PRESENTATION_QOS_POLICY_ID = 3
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_USERDATA_QOS_POLICY_ID, __pyx_int_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)

  /* "dds.pyx":120
 *     INVALID_QOS_POLICY_ID = 0
 *     USERDATA_QOS_POLICY_ID = 1
 *     DURABILITY_QOS_POLICY_ID = 2             # <<<<<<<<<<<<<<
 *     PRESENTATION_QOS_POLICY_ID = 3
 *     DEADLINE_QOS_POLICY_ID = 4
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DURABILITY_QOS_POLICY_ID, __pyx_int_2) < 0) __PYX_ERR(0, 120, __pyx_L1_error)

  /* "dds.pyx":121
 *     USERDATA_QOS_POLICY_ID = 1
 *     DURABILITY_QOS_POLICY_ID = 2
 *     PRESENTATION_QOS_POLICY_ID = 3             # <<<<<<<<<<<<<<
 *     DEADLINE_QOS_POLICY_ID = 4
 *     LATENCYBUDGET_QOS_POLICY_ID = 5
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_PRESENTATION_QOS_POLICY_ID, __pyx_int_3) < 0) __PYX_ERR(0, 121, __pyx_L1_error)

  /* "dds.pyx":122
 *     DURABILITY_QOS_POLICY_ID = 2
 *     PRESENTATION_QOS_POLICY_ID = 3
 *     DEADLINE_QOS_POLICY_ID = 4             # <<<<<<<<<<<<<<
 *     LATENCYBUDGET_QOS_POLICY_ID = 5
 *     OWNERSHIP_QOS_POLICY_ID = 6
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DEADLINE_QOS_POLICY_ID, __pyx_int_4) < 0) __PYX_ERR(0, 122, __pyx_L1_error)

  /* "dds.pyx":123
 *     PRESENTATION_QOS_POLICY_ID = 3
 *     DEADLINE_QOS_POLICY_ID = 4
 *     LATENCYBUDGET_QOS_POLICY_ID = 5             # <<<<<<<<<<<<<<
 *     OWNERSHIP_QOS_POLICY_ID = 6
 *     OWNERSHIPSTRENGTH_QOS_POLICY_ID = 7
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_LATENCYBUDGET_QOS_POLICY_ID, __pyx_int_5) < 0) __PYX_ERR(0, 123, __pyx_L1_error)

  /* "dds.pyx":124
 *     DEADLINE_QOS_POLICY_ID = 4
 *     LATENCYBUDGET_QOS_POLICY_ID = 5
 *     OWNERSHIP_QOS_POLICY_ID = 6             # <<<<<<<<<<<<<<
 *     OWNERSHIPSTRENGTH_QOS_POLICY_ID = 7
 *     LIVELINESS_QOS_POLICY_ID = 8
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_OWNERSHIP_QOS_POLICY_ID, __pyx_int_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)

  /* "dds.pyx":125
 *     LATENCYBUDGET_QOS_POLICY_ID = 5
 *     OWNERSHIP_QOS_POLICY_ID = 6
 *     OWNERSHIPSTRENGTH_QOS_POLICY_ID = 7             # <<<<<<<<<<<<<<
 *     LIVELINESS_QOS_POLICY_ID = 8
 *     TIMEBASEDFILTER_QOS_POLICY_ID = 9
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_OWNERSHIPSTRENGTH_QOS_POLICY_ID, __pyx_int_7) < 0) __PYX_ERR(0, 125, __pyx_L1_error)

  /* "dds.pyx":126
 *     OWNERSHIP_QOS_POLICY_ID = 6
 *     OWNERSHIPSTRENGTH_QOS_POLICY_ID = 7
 *     LIVELINESS_QOS_POLICY_ID = 8             # <<<<<<<<<<<<<<
 *     TIMEBASEDFILTER_QOS_POLICY_ID = 9
 *     PARTITION_QOS_POLICY_ID = 10
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_LIVELINESS_QOS_POLICY_ID, __pyx_int_8) < 0) __PYX_ERR(0, 126, __pyx_L1_error)

  /* "dds.pyx":127
 *     OWNERSHIPSTRENGTH_QOS_POLICY_ID = 7
 *     LIVELINESS_QOS_POLICY_ID = 8
 *     TIMEBASEDFILTER_QOS_POLICY_ID = 9             # <<<<<<<<<<<<<<
 *     PARTITION_QOS_POLICY_ID = 10
 *     RELIABILITY_QOS_POLICY_ID = 11
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TIMEBASEDFILTER_QOS_POLICY_ID, __pyx_int_9) < 0) __PYX_ERR(0, 127, __pyx_L1_error)

  /* "dds.pyx":128
 *     LIVELINESS_QOS_POLICY_ID = 8
 *     TIMEBASEDFILTER_QOS_POLICY_ID = 9
 *     PARTITION_QOS_POLICY_ID = 10             # <<<<<<<<<<<<<<
 *     RELIABILITY_QOS_POLICY_ID = 11
 *     DESTINATIONORDER_QOS_POLICY_ID = 12
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_PARTITION_QOS_POLICY_ID, __pyx_int_10) < 0) __PYX_ERR(0, 128, __pyx_L1_error)

  /* "dds.pyx":129
 *     TIMEBASEDFILTER_QOS_POLICY_ID = 9
 *     PARTITION_QOS_POLICY_ID = 10
 *     RELIABILITY_QOS_POLICY_ID = 11             # <<<<<<<<<<<<<<
 *     DESTINATIONORDER_QOS_POLICY_ID = 12
 *     HISTORY_QOS_POLICY_ID = 13
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RELIABILITY_QOS_POLICY_ID, __pyx_int_11) < 0) __PYX_ERR(0, 129, __pyx_L1_error)

  /* "dds.pyx":130
 *     PARTITION_QOS_POLICY_ID = 10
 *     RELIABILITY_QOS_POLICY_ID = 11
 *     DESTINATIONORDER_QOS_POLICY_ID = 12             # <<<<<<<<<<<<<<
 *     HISTORY_QOS_POLICY_ID = 13
 *     RESOURCELIMITS_QOS_POLICY_ID = 14
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DESTINATIONORDER_QOS_POLICY_ID, __pyx_int_12) < 0) __PYX_ERR(0, 130, __pyx_L1_error)

  /* "dds.pyx":131
 *     RELIABILITY_QOS_POLICY_ID = 11
 *     DESTINATIONORDER_QOS_POLICY_ID = 12
 *     HISTORY_QOS_POLICY_ID = 13             # <<<<<<<<<<<<<<
 *     RESOURCELIMITS_QOS_POLICY_ID = 14
 *     ENTITYFACTORY_QOS_POLICY_ID = 15
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_HISTORY_QOS_POLICY_ID, __pyx_int_13) < 0) __PYX_ERR(0, 131, __pyx_L1_error)

  /* "dds.pyx":132
 *     DESTINATIONORDER_QOS_POLICY_ID = 12
 *     HISTORY_QOS_POLICY_ID = 13
 *     RESOURCELIMITS_QOS_POLICY_ID = 14             # <<<<<<<<<<<<<<
 *     ENTITYFACTORY_QOS_POLICY_ID = 15
 *     WRITERDATALIFECYCLE_QOS_POLICY_ID = 16
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RESOURCELIMITS_QOS_POLICY_ID, __pyx_int_14) < 0) __PYX_ERR(0, 132, __pyx_L1_error)

  /* "dds.pyx":133
 *     HISTORY_QOS_POLICY_ID = 13
 *     RESOURCELIMITS_QOS_POLICY_ID = 14
 *     ENTITYFACTORY_QOS_POLICY_ID = 15             # <<<<<<<<<<<<<<
 *     WRITERDATALIFECYCLE_QOS_POLICY_ID = 16
 *     READERDATALIFECYCLE_QOS_POLICY_ID = 17
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ENTITYFACTORY_QOS_POLICY_ID, __pyx_int_15) < 0) __PYX_ERR(0, 133, __pyx_L1_error)

  /* "dds.pyx":134
 *     RESOURCELIMITS_QOS_POLICY_ID = 14
 *     ENTITYFACTORY_QOS_POLICY_ID = 15
 *     WRITERDATALIFECYCLE_QOS_POLICY_ID = 16             # <<<<<<<<<<<<<<
 *     READERDATALIFECYCLE_QOS_POLICY_ID = 17
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WRITERDATALIFECYCLE_QOS_POLICY_I, __pyx_int_16) < 0) __PYX_ERR(0, 134, __pyx_L1_error)

  /* "dds.pyx":135
 *     ENTITYFACTORY_QOS_POLICY_ID = 15
 *     WRITERDATALIFECYCLE_QOS_POLICY_ID = 16
 *     READERDATALIFECYCLE_QOS_POLICY_ID = 17             # <<<<<<<<<<<<<<
 * 
 *     TOPICDATA_QOS_POLICY_ID = 18
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_READERDATALIFECYCLE_QOS_POLICY_I, __pyx_int_17) < 0) __PYX_ERR(0, 135, __pyx_L1_error)

  /* "dds.pyx":137
 *     READERDATALIFECYCLE_QOS_POLICY_ID = 17
 * 
 *     TOPICDATA_QOS_POLICY_ID = 18             # <<<<<<<<<<<<<<
 *     GROUPDATA_QOS_POLICY_ID = 19
 *     TRANSPORTPRIORITY_QOS_POLICY_ID = 20
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TOPICDATA_QOS_POLICY_ID, __pyx_int_18) < 0) __PYX_ERR(0, 137, __pyx_L1_error)

  /* "dds.pyx":138
 * 
 *     TOPICDATA_QOS_POLICY_ID = 18
 *     GROUPDATA_QOS_POLICY_ID = 19             # <<<<<<<<<<<<<<
 *     TRANSPORTPRIORITY_QOS_POLICY_ID = 20
 *     LIFESPAN_QOS_POLICY_ID = 21
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_GROUPDATA_QOS_POLICY_ID, __pyx_int_19) < 0) __PYX_ERR(0, 138, __pyx_L1_error)

  /* "dds.pyx":139
 *     TOPICDATA_QOS_POLICY_ID = 18
 *     GROUPDATA_QOS_POLICY_ID = 19
 *     TRANSPORTPRIORITY_QOS_POLICY_ID = 20             # <<<<<<<<<<<<<<
 *     LIFESPAN_QOS_POLICY_ID = 21
 *     DURABILITYSERVICE_QOS_POLICY_ID = 22
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TRANSPORTPRIORITY_QOS_POLICY_ID, __pyx_int_20) < 0) __PYX_ERR(0, 139, __pyx_L1_error)

  /* "dds.pyx":140
 *     GROUPDATA_QOS_POLICY_ID = 19
 *     TRANSPORTPRIORITY_QOS_POLICY_ID = 20
 *     LIFESPAN_QOS_POLICY_ID = 21             # <<<<<<<<<<<<<<
 *     DURABILITYSERVICE_QOS_POLICY_ID = 22
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_LIFESPAN_QOS_POLICY_ID, __pyx_int_21) < 0) __PYX_ERR(0, 140, __pyx_L1_error)

  /* "dds.pyx":141
 *     TRANSPORTPRIORITY_QOS_POLICY_ID = 20
 *     LIFESPAN_QOS_POLICY_ID = 21
 *     DURABILITYSERVICE_QOS_POLICY_ID = 22             # <<<<<<<<<<<<<<
 * 
 * #############################################################################
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DURABILITYSERVICE_QOS_POLICY_ID, __pyx_int_22) < 0) __PYX_ERR(0, 141, __pyx_L1_error)

  /* "dds.pyx":114
 * #############################################################################
 * ## QoS IDs
 * class QosPolicyId(Enum):             # <<<<<<<<<<<<<<
 *     '''
 *     Enumeration of Qos policy kinds
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_QosPolicyId, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_QosPolicyId, __pyx_t_4) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":146
 * #### QoS Kinds
 * 
 * class DDSTime:             # <<<<<<<<<<<<<<
 *     '''
 *     DDS Time
 */
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_DDSTime, __pyx_n_s_DDSTime, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_DDS_Time_type_sec_long_param_se); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":156
 *     :param nanosec: nanoseconds (default: 0)
 *     '''
 *     def __init__(self, sec = 1, nanosec = 0):             # <<<<<<<<<<<<<<
 *         self.value = (sec * 1000000000) + nanosec
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_7DDSTime_1__init__, 0, __pyx_n_s_DDSTime___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__50);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":146
 * #### QoS Kinds
 * 
 * class DDSTime:             # <<<<<<<<<<<<<<
 *     '''
 *     DDS Time
 */
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_DDSTime, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSTime, __pyx_t_1) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":159
 *         self.value = (sec * 1000000000) + nanosec
 * 
 * class DDSDuration(DDSTime):             # <<<<<<<<<<<<<<
 *     '''
 *     DDS Duration
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSTime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DDSDuration, __pyx_n_s_DDSDuration, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_DDS_Duration_type_sec_long_para); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":171
 * 
 *     @staticmethod
 *     def infinity():             # <<<<<<<<<<<<<<
 *         ''' Return DDSDuration for infinity
 *         '''
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_11DDSDuration_1infinity, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DDSDuration_infinity, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "dds.pyx":170
 *     '''
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def infinity():
 *         ''' Return DDSDuration for infinity
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_infinity, __pyx_t_5) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":159
 *         self.value = (sec * 1000000000) + nanosec
 * 
 * class DDSDuration(DDSTime):             # <<<<<<<<<<<<<<
 *     '''
 *     DDS Duration
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DDSDuration, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSDuration, __pyx_t_5) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":177
 * 
 * ### Durability
 * class DDSDurabilityKind(Enum):             # <<<<<<<<<<<<<<
 *     VOLATILE = 0
 *     TRANSIENT_LOCAL = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DDSDurabilityKind, __pyx_n_s_DDSDurabilityKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":178
 * ### Durability
 * class DDSDurabilityKind(Enum):
 *     VOLATILE = 0             # <<<<<<<<<<<<<<
 *     TRANSIENT_LOCAL = 1
 *     TRANSIENT = 2
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_VOLATILE, __pyx_int_0) < 0) __PYX_ERR(0, 178, __pyx_L1_error)

  /* "dds.pyx":179
 * class DDSDurabilityKind(Enum):
 *     VOLATILE = 0
 *     TRANSIENT_LOCAL = 1             # <<<<<<<<<<<<<<
 *     TRANSIENT = 2
 *     PERSISTENT = 3
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TRANSIENT_LOCAL, __pyx_int_1) < 0) __PYX_ERR(0, 179, __pyx_L1_error)

  /* "dds.pyx":180
 *     VOLATILE = 0
 *     TRANSIENT_LOCAL = 1
 *     TRANSIENT = 2             # <<<<<<<<<<<<<<
 *     PERSISTENT = 3
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TRANSIENT, __pyx_int_2) < 0) __PYX_ERR(0, 180, __pyx_L1_error)

  /* "dds.pyx":181
 *     TRANSIENT_LOCAL = 1
 *     TRANSIENT = 2
 *     PERSISTENT = 3             # <<<<<<<<<<<<<<
 * 
 * ### History
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_PERSISTENT, __pyx_int_3) < 0) __PYX_ERR(0, 181, __pyx_L1_error)

  /* "dds.pyx":177
 * 
 * ### Durability
 * class DDSDurabilityKind(Enum):             # <<<<<<<<<<<<<<
 *     VOLATILE = 0
 *     TRANSIENT_LOCAL = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DDSDurabilityKind, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSDurabilityKind, __pyx_t_5) < 0) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":184
 * 
 * ### History
 * class DDSHistoryKind(Enum):             # <<<<<<<<<<<<<<
 *     KEEP_LAST = 0
 *     KEEP_ALL = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DDSHistoryKind, __pyx_n_s_DDSHistoryKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":185
 * ### History
 * class DDSHistoryKind(Enum):
 *     KEEP_LAST = 0             # <<<<<<<<<<<<<<
 *     KEEP_ALL = 1
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_KEEP_LAST, __pyx_int_0) < 0) __PYX_ERR(0, 185, __pyx_L1_error)

  /* "dds.pyx":186
 * class DDSHistoryKind(Enum):
 *     KEEP_LAST = 0
 *     KEEP_ALL = 1             # <<<<<<<<<<<<<<
 * 
 * class DDSPresentationAccessScopeKind(Enum):
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_KEEP_ALL, __pyx_int_1) < 0) __PYX_ERR(0, 186, __pyx_L1_error)

  /* "dds.pyx":184
 * 
 * ### History
 * class DDSHistoryKind(Enum):             # <<<<<<<<<<<<<<
 *     KEEP_LAST = 0
 *     KEEP_ALL = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DDSHistoryKind, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSHistoryKind, __pyx_t_5) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":188
 *     KEEP_ALL = 1
 * 
 * class DDSPresentationAccessScopeKind(Enum):             # <<<<<<<<<<<<<<
 *     INSTANCE = 0
 *     TOPIC = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DDSPresentationAccessScopeKind, __pyx_n_s_DDSPresentationAccessScopeKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":189
 * 
 * class DDSPresentationAccessScopeKind(Enum):
 *     INSTANCE = 0             # <<<<<<<<<<<<<<
 *     TOPIC = 1
 *     GROUP = 2
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INSTANCE, __pyx_int_0) < 0) __PYX_ERR(0, 189, __pyx_L1_error)

  /* "dds.pyx":190
 * class DDSPresentationAccessScopeKind(Enum):
 *     INSTANCE = 0
 *     TOPIC = 1             # <<<<<<<<<<<<<<
 *     GROUP = 2
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TOPIC, __pyx_int_1) < 0) __PYX_ERR(0, 190, __pyx_L1_error)

  /* "dds.pyx":191
 *     INSTANCE = 0
 *     TOPIC = 1
 *     GROUP = 2             # <<<<<<<<<<<<<<
 * 
 * ### Ownership
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_GROUP, __pyx_int_2) < 0) __PYX_ERR(0, 191, __pyx_L1_error)

  /* "dds.pyx":188
 *     KEEP_ALL = 1
 * 
 * class DDSPresentationAccessScopeKind(Enum):             # <<<<<<<<<<<<<<
 *     INSTANCE = 0
 *     TOPIC = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DDSPresentationAccessScopeKind, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSPresentationAccessScopeKind, __pyx_t_5) < 0) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":194
 * 
 * ### Ownership
 * class DDSOwnershipKind(Enum):             # <<<<<<<<<<<<<<
 *     SHARED = 0
 *     EXCLUSIVE = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DDSOwnershipKind, __pyx_n_s_DDSOwnershipKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":195
 * ### Ownership
 * class DDSOwnershipKind(Enum):
 *     SHARED = 0             # <<<<<<<<<<<<<<
 *     EXCLUSIVE = 1
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SHARED, __pyx_int_0) < 0) __PYX_ERR(0, 195, __pyx_L1_error)

  /* "dds.pyx":196
 * class DDSOwnershipKind(Enum):
 *     SHARED = 0
 *     EXCLUSIVE = 1             # <<<<<<<<<<<<<<
 * 
 * ### Reliability
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_EXCLUSIVE, __pyx_int_1) < 0) __PYX_ERR(0, 196, __pyx_L1_error)

  /* "dds.pyx":194
 * 
 * ### Ownership
 * class DDSOwnershipKind(Enum):             # <<<<<<<<<<<<<<
 *     SHARED = 0
 *     EXCLUSIVE = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DDSOwnershipKind, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSOwnershipKind, __pyx_t_5) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":199
 * 
 * ### Reliability
 * class DDSReliabilityKind(Enum):             # <<<<<<<<<<<<<<
 *     BEST_EFFORT = 0
 *     RELIABLE = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DDSReliabilityKind, __pyx_n_s_DDSReliabilityKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":200
 * ### Reliability
 * class DDSReliabilityKind(Enum):
 *     BEST_EFFORT = 0             # <<<<<<<<<<<<<<
 *     RELIABLE = 1
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_BEST_EFFORT, __pyx_int_0) < 0) __PYX_ERR(0, 200, __pyx_L1_error)

  /* "dds.pyx":201
 * class DDSReliabilityKind(Enum):
 *     BEST_EFFORT = 0
 *     RELIABLE = 1             # <<<<<<<<<<<<<<
 * 
 * ### Dest Order
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RELIABLE, __pyx_int_1) < 0) __PYX_ERR(0, 201, __pyx_L1_error)

  /* "dds.pyx":199
 * 
 * ### Reliability
 * class DDSReliabilityKind(Enum):             # <<<<<<<<<<<<<<
 *     BEST_EFFORT = 0
 *     RELIABLE = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DDSReliabilityKind, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSReliabilityKind, __pyx_t_5) < 0) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":204
 * 
 * ### Dest Order
 * class DDSDestinationOrderKind(Enum):             # <<<<<<<<<<<<<<
 *     BY_RECEPTION_TIMESTAMP = 0
 *     BY_SOURCE_TIMESTAMP = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DDSDestinationOrderKind, __pyx_n_s_DDSDestinationOrderKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":205
 * ### Dest Order
 * class DDSDestinationOrderKind(Enum):
 *     BY_RECEPTION_TIMESTAMP = 0             # <<<<<<<<<<<<<<
 *     BY_SOURCE_TIMESTAMP = 1
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_BY_RECEPTION_TIMESTAMP, __pyx_int_0) < 0) __PYX_ERR(0, 205, __pyx_L1_error)

  /* "dds.pyx":206
 * class DDSDestinationOrderKind(Enum):
 *     BY_RECEPTION_TIMESTAMP = 0
 *     BY_SOURCE_TIMESTAMP = 1             # <<<<<<<<<<<<<<
 * 
 * ### Liveliness kind
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_BY_SOURCE_TIMESTAMP, __pyx_int_1) < 0) __PYX_ERR(0, 206, __pyx_L1_error)

  /* "dds.pyx":204
 * 
 * ### Dest Order
 * class DDSDestinationOrderKind(Enum):             # <<<<<<<<<<<<<<
 *     BY_RECEPTION_TIMESTAMP = 0
 *     BY_SOURCE_TIMESTAMP = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DDSDestinationOrderKind, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSDestinationOrderKind, __pyx_t_5) < 0) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":209
 * 
 * ### Liveliness kind
 * class DDSLivelinessKind(Enum):             # <<<<<<<<<<<<<<
 *     AUTOMATIC = 0
 *     MANUAL_BY_PARTICIPANT = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DDSLivelinessKind, __pyx_n_s_DDSLivelinessKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":210
 * ### Liveliness kind
 * class DDSLivelinessKind(Enum):
 *     AUTOMATIC = 0             # <<<<<<<<<<<<<<
 *     MANUAL_BY_PARTICIPANT = 1
 *     MANUAL_BY_TOPIC = 2
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_AUTOMATIC, __pyx_int_0) < 0) __PYX_ERR(0, 210, __pyx_L1_error)

  /* "dds.pyx":211
 * class DDSLivelinessKind(Enum):
 *     AUTOMATIC = 0
 *     MANUAL_BY_PARTICIPANT = 1             # <<<<<<<<<<<<<<
 *     MANUAL_BY_TOPIC = 2
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_MANUAL_BY_PARTICIPANT, __pyx_int_1) < 0) __PYX_ERR(0, 211, __pyx_L1_error)

  /* "dds.pyx":212
 *     AUTOMATIC = 0
 *     MANUAL_BY_PARTICIPANT = 1
 *     MANUAL_BY_TOPIC = 2             # <<<<<<<<<<<<<<
 * 
 * ### DDSSampleRejectedStatusKind
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_MANUAL_BY_TOPIC, __pyx_int_2) < 0) __PYX_ERR(0, 212, __pyx_L1_error)

  /* "dds.pyx":209
 * 
 * ### Liveliness kind
 * class DDSLivelinessKind(Enum):             # <<<<<<<<<<<<<<
 *     AUTOMATIC = 0
 *     MANUAL_BY_PARTICIPANT = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DDSLivelinessKind, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSLivelinessKind, __pyx_t_5) < 0) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":215
 * 
 * ### DDSSampleRejectedStatusKind
 * class DDSSampleRejectedStatusKind(Enum):             # <<<<<<<<<<<<<<
 *     NOT_REJECTED = 0
 *     REJECTED_BY_INSTANCE_LIMIT = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DDSSampleRejectedStatusKind, __pyx_n_s_DDSSampleRejectedStatusKind, (PyObject *) NULL, __pyx_n_s_dds, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":216
 * ### DDSSampleRejectedStatusKind
 * class DDSSampleRejectedStatusKind(Enum):
 *     NOT_REJECTED = 0             # <<<<<<<<<<<<<<
 *     REJECTED_BY_INSTANCE_LIMIT = 1
 *     REJECTED_BY_SAMPLES_LIMIT = 2
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_REJECTED, __pyx_int_0) < 0) __PYX_ERR(0, 216, __pyx_L1_error)

  /* "dds.pyx":217
 * class DDSSampleRejectedStatusKind(Enum):
 *     NOT_REJECTED = 0
 *     REJECTED_BY_INSTANCE_LIMIT = 1             # <<<<<<<<<<<<<<
 *     REJECTED_BY_SAMPLES_LIMIT = 2
 *     REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT = 3
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_REJECTED_BY_INSTANCE_LIMIT, __pyx_int_1) < 0) __PYX_ERR(0, 217, __pyx_L1_error)

  /* "dds.pyx":218
 *     NOT_REJECTED = 0
 *     REJECTED_BY_INSTANCE_LIMIT = 1
 *     REJECTED_BY_SAMPLES_LIMIT = 2             # <<<<<<<<<<<<<<
 *     REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT = 3
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_REJECTED_BY_SAMPLES_LIMIT, __pyx_int_2) < 0) __PYX_ERR(0, 218, __pyx_L1_error)

  /* "dds.pyx":219
 *     REJECTED_BY_INSTANCE_LIMIT = 1
 *     REJECTED_BY_SAMPLES_LIMIT = 2
 *     REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT = 3             # <<<<<<<<<<<<<<
 * 
 * # Basic Qos Policy class
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_REJECTED_BY_SAMPLES_PER_INSTANCE, __pyx_int_3) < 0) __PYX_ERR(0, 219, __pyx_L1_error)

  /* "dds.pyx":215
 * 
 * ### DDSSampleRejectedStatusKind
 * class DDSSampleRejectedStatusKind(Enum):             # <<<<<<<<<<<<<<
 *     NOT_REJECTED = 0
 *     REJECTED_BY_INSTANCE_LIMIT = 1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DDSSampleRejectedStatusKind, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSSampleRejectedStatusKind, __pyx_t_5) < 0) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":222
 * 
 * # Basic Qos Policy class
 * class QosPolicy():             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract QoS policy class.
 */
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_QosPolicy, __pyx_n_s_QosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Abstract_QoS_policy_class_Users); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "dds.pyx":227
 *     Users should not instantiate this class.
 *     '''
 *     def __init__(self, i):             # <<<<<<<<<<<<<<
 *         '''__init__(i)
 *         '''
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_9QosPolicy_1__init__, 0, __pyx_n_s_QosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":234
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         '''
 *         An internal QoS Policy id
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_9QosPolicy_3id, 0, __pyx_n_s_QosPolicy_id, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":233
 *         self._id = i
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         '''
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_id_2, __pyx_t_3) < 0) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":242
 *     # The kind property provides the kind of a specific QosPolicy when applicable
 *     @property
 *     def kind(self):             # <<<<<<<<<<<<<<
 *         '''
 *         QoS Policy kind
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_9QosPolicy_5kind, 0, __pyx_n_s_QosPolicy_kind, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":241
 * 
 *     # The kind property provides the kind of a specific QosPolicy when applicable
 *     @property             # <<<<<<<<<<<<<<
 *     def kind(self):
 *         '''
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_kind_2, __pyx_t_2) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":222
 * 
 * # Basic Qos Policy class
 * class QosPolicy():             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract QoS policy class.
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_QosPolicy, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_QosPolicy, __pyx_t_2) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":248
 *         return self._kind
 * 
 * class DurabilityQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Durability QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DurabilityQosPolicy, __pyx_n_s_DurabilityQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Durability_QoS_Policy_type_k_DD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":256
 *     '''
 * 
 *     def __init__(self, kind=DDSDurabilityKind.VOLATILE):             # <<<<<<<<<<<<<<
 *         '''__init__(k=DDSDurabilityKind.VOLATILE)
 *         '''
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_19DurabilityQosPolicy_1__init__, 0, __pyx_n_s_DurabilityQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DDSDurabilityKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_VOLATILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_5)->__pyx_arg_kind = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_3dds_6__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":248
 *         return self._kind
 * 
 * class DurabilityQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Durability QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DurabilityQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DurabilityQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":263
 * 
 * 
 * class HistoryQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     History QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_HistoryQosPolicy, __pyx_n_s_HistoryQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_History_QoS_Policy_type_k_DDSHi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":273
 *     :param depth: History depth (default: 1)
 *     '''
 *     def __init__(self, kind=DDSHistoryKind.KEEP_LAST, depth=1):             # <<<<<<<<<<<<<<
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_16HistoryQosPolicy_1__init__, 0, __pyx_n_s_HistoryQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DDSHistoryKind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_KEEP_LAST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_5)->__pyx_arg_kind = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_3dds_8__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":281
 * 
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._depth
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_16HistoryQosPolicy_3depth, 0, __pyx_n_s_HistoryQosPolicy_depth, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":280
 *         self._depth = depth
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def depth(self):
 *         return self._depth
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_depth, __pyx_t_4) < 0) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":263
 * 
 * 
 * class HistoryQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     History QoS Policy
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_HistoryQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HistoryQosPolicy, __pyx_t_4) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":284
 *         return self._depth
 * 
 * class ResourceLimitsQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Resource limit QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ResourceLimitsQosPolicy, __pyx_n_s_ResourceLimitsQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Resource_limit_QoS_Policy_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":297
 *     :param max_samples_per_instance: maximum samples per instance (default: -1)
 *     '''
 *     def __init__(self, max_samples = DDS_LENGTH_UNLIMITED, max_instances = DDS_LENGTH_UNLIMITED, max_samples_per_instance = DDS_LENGTH_UNLIMITED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.RESOURCELIMITS_QOS_POLICY_ID)
 *         self._max_samples = max_samples
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_23ResourceLimitsQosPolicy_1__init__, 0, __pyx_n_s_ResourceLimitsQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults2), 3)) __PYX_ERR(0, 297, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_From_int(DDS_LENGTH_UNLIMITED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_4)->__pyx_arg_max_samples = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_int(DDS_LENGTH_UNLIMITED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_4)->__pyx_arg_max_instances = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_int(DDS_LENGTH_UNLIMITED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_4)->__pyx_arg_max_samples_per_instance = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3dds_10__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":304
 * 
 *     @property
 *     def max_samples(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_23ResourceLimitsQosPolicy_3max_samples, 0, __pyx_n_s_ResourceLimitsQosPolicy_max_samp, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "dds.pyx":303
 *         self._max_samples_per_instance = max_samples_per_instance
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_samples(self):
 *         return self._max_samples
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_max_samples, __pyx_t_5) < 0) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":308
 * 
 *     @property
 *     def max_instances(self):             # <<<<<<<<<<<<<<
 *         return self._max_instances
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_23ResourceLimitsQosPolicy_5max_instances, 0, __pyx_n_s_ResourceLimitsQosPolicy_max_inst, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":307
 *         return self._max_samples
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_instances(self):
 *         return self._max_instances
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_max_instances, __pyx_t_4) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":312
 * 
 *     @property
 *     def max_samples_per_instance(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples_per_instance
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_23ResourceLimitsQosPolicy_7max_samples_per_instance, 0, __pyx_n_s_ResourceLimitsQosPolicy_max_samp_2, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "dds.pyx":311
 *         return self._max_instances
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_samples_per_instance(self):
 *         return self._max_samples_per_instance
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_max_samples_per_instance, __pyx_t_5) < 0) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":284
 *         return self._depth
 * 
 * class ResourceLimitsQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Resource limit QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ResourceLimitsQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ResourceLimitsQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":315
 *         return self._max_samples_per_instance
 * 
 * class PresentationQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Presentation QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PresentationQosPolicy, __pyx_n_s_PresentationQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Presentation_QoS_Policy_type_ki); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":328
 *     :param ordered_access: Set ordered access (default: False)
 *     '''
 *     def __init__(self, kind=DDSPresentationAccessScopeKind.INSTANCE, coherent_access = False, ordered_access = False):             # <<<<<<<<<<<<<<
 *         '''__init__(kind=DDSHistoryKind.KEEP_LAST, depth=1)
 *         '''
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_21PresentationQosPolicy_1__init__, 0, __pyx_n_s_PresentationQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults3), 1)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DDSPresentationAccessScopeKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_INSTANCE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_5)->__pyx_arg_kind = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_3dds_12__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":337
 * 
 *     @property
 *     def coherent_access(self):             # <<<<<<<<<<<<<<
 *         return self._coherent_access
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_21PresentationQosPolicy_3coherent_access, 0, __pyx_n_s_PresentationQosPolicy_coherent_a, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":336
 *         self._ordered_access = ordered_access
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def coherent_access(self):
 *         return self._coherent_access
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_coherent_access, __pyx_t_6) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":341
 * 
 *     @property
 *     def ordered_access(self):             # <<<<<<<<<<<<<<
 *         return self._ordered_access
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_21PresentationQosPolicy_5ordered_access, 0, __pyx_n_s_PresentationQosPolicy_ordered_ac, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "dds.pyx":340
 *         return self._coherent_access
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ordered_access(self):
 *         return self._ordered_access
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ordered_access, __pyx_t_5) < 0) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":315
 *         return self._max_samples_per_instance
 * 
 * class PresentationQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Presentation QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PresentationQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PresentationQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":344
 *         return self._ordered_access
 * 
 * class LifespanQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Lifespan QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_LifespanQosPolicy, __pyx_n_s_LifespanQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Lifespan_QoS_Policy_type_lifesp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":352
 * 
 *     '''
 *     def __init__(self, lifespan = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LIFESPAN_QOS_POLICY_ID)
 *         self._lifespan = lifespan.value
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_17LifespanQosPolicy_1__init__, 0, __pyx_n_s_LifespanQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults4), 1)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_t_5)->__pyx_arg_lifespan = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_3dds_14__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":357
 * 
 *     @property
 *     def lifespan(self):             # <<<<<<<<<<<<<<
 *         return self._lifespan
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_17LifespanQosPolicy_3lifespan, 0, __pyx_n_s_LifespanQosPolicy_lifespan, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":356
 *         self._lifespan = lifespan.value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def lifespan(self):
 *         return self._lifespan
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_lifespan, __pyx_t_6) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":344
 *         return self._ordered_access
 * 
 * class LifespanQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Lifespan QoS Policy
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_LifespanQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LifespanQosPolicy, __pyx_t_6) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":360
 *         return self._lifespan
 * 
 * class DeadlineQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Deadline QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DeadlineQosPolicy, __pyx_n_s_DeadlineQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Deadline_QoS_Policy_type_deadli); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":368
 * 
 *     '''
 *     def __init__(self, deadline = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DEADLINE_QOS_POLICY_ID)
 *         self._deadline = deadline.value
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_17DeadlineQosPolicy_1__init__, 0, __pyx_n_s_DeadlineQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults5), 1)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_t_6)->__pyx_arg_deadline = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_3dds_16__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":373
 * 
 *     @property
 *     def deadline(self):             # <<<<<<<<<<<<<<
 *         return self._deadline
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_17DeadlineQosPolicy_3deadline, 0, __pyx_n_s_DeadlineQosPolicy_deadline, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "dds.pyx":372
 *         self._deadline = deadline.value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def deadline(self):
 *         return self._deadline
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_deadline, __pyx_t_5) < 0) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":360
 *         return self._lifespan
 * 
 * class DeadlineQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Deadline QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DeadlineQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeadlineQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":376
 *         return self._deadline
 * 
 * class LatencyBudgetQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Latency budget QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_LatencyBudgetQosPolicy, __pyx_n_s_LatencyBudgetQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Latency_budget_QoS_Policy_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":384
 * 
 *     '''
 *     def __init__(self, duration = DDSDuration()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LATENCYBUDGET_QOS_POLICY_ID)
 *         self._duration = duration.value
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_22LatencyBudgetQosPolicy_1__init__, 0, __pyx_n_s_LatencyBudgetQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults6), 1)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_t_5)->__pyx_arg_duration = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_3dds_18__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":389
 * 
 *     @property
 *     def duration(self):             # <<<<<<<<<<<<<<
 *         return self._duration
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_22LatencyBudgetQosPolicy_3duration, 0, __pyx_n_s_LatencyBudgetQosPolicy_duration, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":388
 *         self._duration = duration.value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def duration(self):
 *         return self._duration
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_duration, __pyx_t_4) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":376
 *         return self._deadline
 * 
 * class LatencyBudgetQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Latency budget QoS Policy
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_LatencyBudgetQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LatencyBudgetQosPolicy, __pyx_t_4) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":392
 *         return self._duration
 * 
 * class OwnershipQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Ownership QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_OwnershipQosPolicy, __pyx_n_s_OwnershipQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Ownership_QoS_Policy_type_kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":400
 * 
 *     '''
 *     def __init__(self, kind=DDSOwnershipKind.SHARED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIP_QOS_POLICY_ID)
 *         self._kind = kind
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_18OwnershipQosPolicy_1__init__, 0, __pyx_n_s_OwnershipQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults7), 1)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSOwnershipKind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SHARED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_t_4)->__pyx_arg_kind = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3dds_20__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":392
 *         return self._duration
 * 
 * class OwnershipQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Ownership QoS Policy
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OwnershipQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OwnershipQosPolicy, __pyx_t_4) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":404
 *         self._kind = kind
 * 
 * class OwnershipStrengthQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Ownership strenth QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OwnershipStrengthQosPolicy, __pyx_n_s_OwnershipStrengthQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Ownership_strenth_QoS_Policy_ty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":412
 * 
 *     '''
 *     def __init__(self, value = 0):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.OWNERSHIPSTRENGTH_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26OwnershipStrengthQosPolicy_1__init__, 0, __pyx_n_s_OwnershipStrengthQosPolicy___ini, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__94);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":417
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26OwnershipStrengthQosPolicy_3value, 0, __pyx_n_s_OwnershipStrengthQosPolicy_value, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "dds.pyx":416
 *         self._value = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         return self._value
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_value, __pyx_t_6) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":404
 *         self._kind = kind
 * 
 * class OwnershipStrengthQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Ownership strenth QoS Policy
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OwnershipStrengthQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OwnershipStrengthQosPolicy, __pyx_t_6) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":421
 * 
 * 
 * class LivelinessQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Liveliness QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_LivelinessQosPolicy, __pyx_n_s_LivelinessQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Liveliness_QoS_Policy_type_kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":431
 *     :param lease_duration: Lease duration (default: infinity)
 *     '''
 *     def __init__(self, kind=DDSLivelinessKind.AUTOMATIC, lease_duration=DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.LIVELINESS_QOS_POLICY_ID)
 *         self._kind = kind
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_19LivelinessQosPolicy_1__init__, 0, __pyx_n_s_LivelinessQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults8), 2)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DDSLivelinessKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_AUTOMATIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_t_6)->__pyx_arg_kind = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_t_6)->__pyx_arg_lease_duration = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_3dds_22__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":437
 * 
 *     @property
 *     def lease_duration(self):             # <<<<<<<<<<<<<<
 *         return self._lease
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_19LivelinessQosPolicy_3lease_duration, 0, __pyx_n_s_LivelinessQosPolicy_lease_durati, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "dds.pyx":436
 *         self._lease = lease_duration.value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def lease_duration(self):
 *         return self._lease
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_lease_duration, __pyx_t_5) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":421
 * 
 * 
 * class LivelinessQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Liveliness QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LivelinessQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LivelinessQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":440
 *         return self._lease
 * 
 * class TimeBasedFilterQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Time based filter QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_TimeBasedFilterQosPolicy, __pyx_n_s_TimeBasedFilterQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Time_based_filter_QoS_Policy_ty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":448
 * 
 *     '''
 *     def __init__(self, minimum_separation = DDSDuration(0,0)):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TIMEBASEDFILTER_QOS_POLICY_ID)
 *         self._minimum_separation = minimum_separation.value
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_24TimeBasedFilterQosPolicy_1__init__, 0, __pyx_n_s_TimeBasedFilterQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults9), 1)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_t_5)->__pyx_arg_minimum_separation = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_3dds_24__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":453
 * 
 *     @property
 *     def minimum_separation(self):             # <<<<<<<<<<<<<<
 *         return self._minimum_separation
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_24TimeBasedFilterQosPolicy_3minimum_separation, 0, __pyx_n_s_TimeBasedFilterQosPolicy_minimum, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":452
 *         self._minimum_separation = minimum_separation.value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def minimum_separation(self):
 *         return self._minimum_separation
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_minimum_separation, __pyx_t_4) < 0) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":440
 *         return self._lease
 * 
 * class TimeBasedFilterQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Time based filter QoS Policy
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TimeBasedFilterQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimeBasedFilterQosPolicy, __pyx_t_4) < 0) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":456
 *         return self._minimum_separation
 * 
 * class PartitionQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Partition QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PartitionQosPolicy, __pyx_n_s_PartitionQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Partition_QoS_Policy_type_ps_li); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":464
 * 
 *     '''
 *     def __init__(self, ps = []):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.PARTITION_QOS_POLICY_ID)
 *         self._names = ps
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_18PartitionQosPolicy_1__init__, 0, __pyx_n_s_PartitionQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults10), 1)) __PYX_ERR(0, 464, __pyx_L1_error)
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_t_4)->__pyx_arg_ps = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3dds_26__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":469
 * 
 *     @property
 *     def ps(self):             # <<<<<<<<<<<<<<
 *         return self._names
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_18PartitionQosPolicy_3ps, 0, __pyx_n_s_PartitionQosPolicy_ps, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "dds.pyx":468
 *         self._names = ps
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ps(self):
 *         return self._names
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ps, __pyx_t_5) < 0) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":456
 *         return self._minimum_separation
 * 
 * class PartitionQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Partition QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PartitionQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PartitionQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":472
 *         return self._names
 * 
 * class ReliabilityQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Reliability QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ReliabilityQosPolicy, __pyx_n_s_ReliabilityQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Reliability_QoS_Policy_type_kin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":482
 *     :param max_blocking_time: Max blocking time (default: 100 milliseconds)
 *     '''
 *     def __init__(self, kind=DDSReliabilityKind.BEST_EFFORT, max_blocking_time=DDSDuration(0,100000000)):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.RELIABILITY_QOS_POLICY_ID)
 *         self._kind = kind
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_20ReliabilityQosPolicy_1__init__, 0, __pyx_n_s_ReliabilityQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults11), 2)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DDSReliabilityKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BEST_EFFORT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_t_5)->__pyx_arg_kind = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_t_5)->__pyx_arg_max_blocking_time = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_3dds_28__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":488
 * 
 *     @property
 *     def max_blocking_time(self):             # <<<<<<<<<<<<<<
 *         return self._max_blocking_time
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_20ReliabilityQosPolicy_3max_blocking_time, 0, __pyx_n_s_ReliabilityQosPolicy_max_blockin, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":487
 *         self._max_blocking_time = max_blocking_time.value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_blocking_time(self):
 *         return self._max_blocking_time
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_max_blocking_time, __pyx_t_4) < 0) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":472
 *         return self._names
 * 
 * class ReliabilityQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Reliability QoS Policy
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ReliabilityQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReliabilityQosPolicy, __pyx_t_4) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":491
 *         return self._max_blocking_time
 * 
 * class TransportPriorityQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Transport priority QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TransportPriorityQosPolicy, __pyx_n_s_TransportPriorityQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Transport_priority_QoS_Policy_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":499
 * 
 *     '''
 *     def __init__(self, value = 0):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TRANSPORTPRIORITY_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26TransportPriorityQosPolicy_1__init__, 0, __pyx_n_s_TransportPriorityQosPolicy___ini, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__117);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "dds.pyx":504
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26TransportPriorityQosPolicy_3value, 0, __pyx_n_s_TransportPriorityQosPolicy_value, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "dds.pyx":503
 *         self._value = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         return self._value
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_value, __pyx_t_5) < 0) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":491
 *         return self._max_blocking_time
 * 
 * class TransportPriorityQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Transport priority QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TransportPriorityQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TransportPriorityQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":507
 *         return self._value
 * 
 * class DestinationOrderQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Destination order QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DestinationOrderQosPolicy, __pyx_n_s_DestinationOrderQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Destination_order_QoS_Policy_ty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":515
 * 
 *     '''
 *     def __init__(self, kind=DDSDestinationOrderKind.BY_RECEPTION_TIMESTAMP):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DESTINATIONORDER_QOS_POLICY_ID)
 *         self._kind = kind
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_25DestinationOrderQosPolicy_1__init__, 0, __pyx_n_s_DestinationOrderQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults12), 1)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DDSDestinationOrderKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BY_RECEPTION_TIMESTAMP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_t_5)->__pyx_arg_kind = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_3dds_30__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":507
 *         return self._value
 * 
 * class DestinationOrderQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Destination order QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DestinationOrderQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DestinationOrderQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":519
 *         self._kind = kind
 * 
 * class WriterDataLifecycleQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Writer data lifecycle QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_WriterDataLifecycleQosPolicy, __pyx_n_s_WriterDataLifecycleQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Writer_data_lifecycle_QoS_Polic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":527
 * 
 *     '''
 *     def __init__(self, autodispose_unregistered_instances = True):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.WRITERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autodispose_unregistered_instances = autodispose_unregistered_instances
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_28WriterDataLifecycleQosPolicy_1__init__, 0, __pyx_n_s_WriterDataLifecycleQosPolicy___i, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__124);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":532
 * 
 *     @property
 *     def autodispose_unregistered_instances(self):             # <<<<<<<<<<<<<<
 *         return self._autodispose_unregistered_instances
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_28WriterDataLifecycleQosPolicy_3autodispose_unregistered_instances, 0, __pyx_n_s_WriterDataLifecycleQosPolicy_aut, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":531
 *         self._autodispose_unregistered_instances = autodispose_unregistered_instances
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def autodispose_unregistered_instances(self):
 *         return self._autodispose_unregistered_instances
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_autodispose_unregistered_instanc, __pyx_t_6) < 0) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":519
 *         self._kind = kind
 * 
 * class WriterDataLifecycleQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Writer data lifecycle QoS Policy
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_WriterDataLifecycleQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WriterDataLifecycleQosPolicy, __pyx_t_6) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":535
 *         return self._autodispose_unregistered_instances
 * 
 * class ReaderDataLifecycleQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Reader data lifecycle QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ReaderDataLifecycleQosPolicy, __pyx_n_s_ReaderDataLifecycleQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Reader_data_lifecycle_QoS_Polic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":545
 *     :param autopurge_disposed_samples_delay: set autopurge_nowriter_samples (default: infinity)
 *     '''
 *     def __init__(self, autopurge_nowriter_samples = DDSDuration.infinity(), autopurge_disposed_samples_delay = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.READERDATALIFECYCLE_QOS_POLICY_ID)
 *         self._autopurge_nowriter_samples = autopurge_nowriter_samples.value
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_28ReaderDataLifecycleQosPolicy_1__init__, 0, __pyx_n_s_ReaderDataLifecycleQosPolicy___i, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults13), 2)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_t_6)->__pyx_arg_autopurge_nowriter_samples = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_t_6)->__pyx_arg_autopurge_disposed_samples_delay = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_3dds_32__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":551
 * 
 *     @property
 *     def autopurge_nowriter_samples(self):             # <<<<<<<<<<<<<<
 *         return self._autopurge_nowriter_samples
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_28ReaderDataLifecycleQosPolicy_3autopurge_nowriter_samples, 0, __pyx_n_s_ReaderDataLifecycleQosPolicy_aut, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "dds.pyx":550
 *         self._autopurge_disposed_samples_delay = autopurge_disposed_samples_delay.value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def autopurge_nowriter_samples(self):
 *         return self._autopurge_nowriter_samples
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_autopurge_nowriter_samples, __pyx_t_5) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":555
 * 
 *     @property
 *     def autopurge_disposed_samples_delay(self):             # <<<<<<<<<<<<<<
 *         return self._autopurge_disposed_samples_delay
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_28ReaderDataLifecycleQosPolicy_5autopurge_disposed_samples_delay, 0, __pyx_n_s_ReaderDataLifecycleQosPolicy_aut_2, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":554
 *         return self._autopurge_nowriter_samples
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def autopurge_disposed_samples_delay(self):
 *         return self._autopurge_disposed_samples_delay
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_autopurge_disposed_samples_delay, __pyx_t_6) < 0) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":535
 *         return self._autodispose_unregistered_instances
 * 
 * class ReaderDataLifecycleQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Reader data lifecycle QoS Policy
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ReaderDataLifecycleQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReaderDataLifecycleQosPolicy, __pyx_t_6) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":558
 *         return self._autopurge_disposed_samples_delay
 * 
 * class DurabilityServiceQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Durability service QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DurabilityServiceQosPolicy, __pyx_n_s_DurabilityServiceQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Durability_service_QoS_Policy_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":581
 * 
 *     '''
 *     def __init__(self, service_cleanup_delay = DDSDuration(0,0), history_kind = DDSHistoryKind.KEEP_LAST,             # <<<<<<<<<<<<<<
 *                  history_depth = 1, max_samples = DDS_LENGTH_UNLIMITED,
 *                  max_instances = DDS_LENGTH_UNLIMITED,
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26DurabilityServiceQosPolicy_1__init__, 0, __pyx_n_s_DurabilityServiceQosPolicy___ini, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults14), 5)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_t_6)->__pyx_arg_service_cleanup_delay = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DDSHistoryKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_KEEP_LAST); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_t_6)->__pyx_arg_history_kind = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "dds.pyx":582
 *     '''
 *     def __init__(self, service_cleanup_delay = DDSDuration(0,0), history_kind = DDSHistoryKind.KEEP_LAST,
 *                  history_depth = 1, max_samples = DDS_LENGTH_UNLIMITED,             # <<<<<<<<<<<<<<
 *                  max_instances = DDS_LENGTH_UNLIMITED,
 *                  max_samples_per_instance = DDS_LENGTH_UNLIMITED):
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(DDS_LENGTH_UNLIMITED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_t_6)->__pyx_arg_max_samples = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "dds.pyx":583
 *     def __init__(self, service_cleanup_delay = DDSDuration(0,0), history_kind = DDSHistoryKind.KEEP_LAST,
 *                  history_depth = 1, max_samples = DDS_LENGTH_UNLIMITED,
 *                  max_instances = DDS_LENGTH_UNLIMITED,             # <<<<<<<<<<<<<<
 *                  max_samples_per_instance = DDS_LENGTH_UNLIMITED):
 *         QosPolicy.__init__(self, QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID)
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(DDS_LENGTH_UNLIMITED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_t_6)->__pyx_arg_max_instances = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "dds.pyx":584
 *                  history_depth = 1, max_samples = DDS_LENGTH_UNLIMITED,
 *                  max_instances = DDS_LENGTH_UNLIMITED,
 *                  max_samples_per_instance = DDS_LENGTH_UNLIMITED):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.DURABILITYSERVICE_QOS_POLICY_ID)
 *         self._service_cleanup_delay = service_cleanup_delay.value
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(DDS_LENGTH_UNLIMITED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_t_6)->__pyx_arg_max_samples_per_instance = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_3dds_34__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":594
 * 
 *     @property
 *     def service_cleanup_delay(self):             # <<<<<<<<<<<<<<
 *         return self._service_cleanup_delay
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26DurabilityServiceQosPolicy_3service_cleanup_delay, 0, __pyx_n_s_DurabilityServiceQosPolicy_servi, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "dds.pyx":593
 *         self._max_samples_per_instance = max_samples_per_instance
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def service_cleanup_delay(self):
 *         return self._service_cleanup_delay
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_service_cleanup_delay, __pyx_t_5) < 0) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":598
 * 
 *     @property
 *     def history_kind(self):             # <<<<<<<<<<<<<<
 *         return self._history_kind
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26DurabilityServiceQosPolicy_5history_kind, 0, __pyx_n_s_DurabilityServiceQosPolicy_histo, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":597
 *         return self._service_cleanup_delay
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def history_kind(self):
 *         return self._history_kind
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_history_kind, __pyx_t_6) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":602
 * 
 *     @property
 *     def history_depth(self):             # <<<<<<<<<<<<<<
 *         return self._history_depth
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26DurabilityServiceQosPolicy_7history_depth, 0, __pyx_n_s_DurabilityServiceQosPolicy_histo_2, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "dds.pyx":601
 *         return self._history_kind
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def history_depth(self):
 *         return self._history_depth
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_history_depth, __pyx_t_5) < 0) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":606
 * 
 *     @property
 *     def max_samples(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26DurabilityServiceQosPolicy_9max_samples, 0, __pyx_n_s_DurabilityServiceQosPolicy_max_s, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":605
 *         return self._history_depth
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_samples(self):
 *         return self._max_samples
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_max_samples, __pyx_t_6) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":610
 * 
 *     @property
 *     def max_instances(self):             # <<<<<<<<<<<<<<
 *         return self._max_instances
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26DurabilityServiceQosPolicy_11max_instances, 0, __pyx_n_s_DurabilityServiceQosPolicy_max_i, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "dds.pyx":609
 *         return self._max_samples
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_instances(self):
 *         return self._max_instances
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_max_instances, __pyx_t_5) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":614
 * 
 *     @property
 *     def max_samples_per_instance(self):             # <<<<<<<<<<<<<<
 *         return self._max_samples_per_instance
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_26DurabilityServiceQosPolicy_13max_samples_per_instance, 0, __pyx_n_s_DurabilityServiceQosPolicy_max_s_2, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "dds.pyx":613
 *         return self._max_instances
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_samples_per_instance(self):
 *         return self._max_samples_per_instance
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_max_samples_per_instance, __pyx_t_6) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":558
 *         return self._autopurge_disposed_samples_delay
 * 
 * class DurabilityServiceQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Durability service QoS Policy
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DurabilityServiceQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DurabilityServiceQosPolicy, __pyx_t_6) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":617
 *         return self._max_samples_per_instance
 * 
 * class UserdataQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Userdata QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_QosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_UserdataQosPolicy, __pyx_n_s_UserdataQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Userdata_QoS_Policy_type_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":625
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.USERDATA_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_17UserdataQosPolicy_1__init__, 0, __pyx_n_s_UserdataQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__149);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":630
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_17UserdataQosPolicy_3value, 0, __pyx_n_s_UserdataQosPolicy_value, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "dds.pyx":629
 *         self._value = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def value(self):
 *         return self._value
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_value, __pyx_t_5) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":617
 *         return self._max_samples_per_instance
 * 
 * class UserdataQosPolicy(QosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Userdata QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_UserdataQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UserdataQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":633
 *         return self._value
 * 
 * class TopicdataQosPolicy(UserdataQosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Topic data QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UserdataQosPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TopicdataQosPolicy, __pyx_n_s_TopicdataQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Topic_data_QoS_Policy_type_valu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":641
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.TOPICDATA_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_18TopicdataQosPolicy_1__init__, 0, __pyx_n_s_TopicdataQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__154);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":633
 *         return self._value
 * 
 * class TopicdataQosPolicy(UserdataQosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Topic data QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TopicdataQosPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TopicdataQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":645
 *         self._value = value
 * 
 * class GroupdataQosPolicy(UserdataQosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Group data QoS Policy
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UserdataQosPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_GroupdataQosPolicy, __pyx_n_s_GroupdataQosPolicy, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Group_data_QoS_Policy_type_valu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":653
 * 
 *     '''
 *     def __init__(self, value = ''):             # <<<<<<<<<<<<<<
 *         QosPolicy.__init__(self, QosPolicyId.GROUPDATA_QOS_POLICY_ID)
 *         self._value = value
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_18GroupdataQosPolicy_1__init__, 0, __pyx_n_s_GroupdataQosPolicy___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__157);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "dds.pyx":645
 *         self._value = value
 * 
 * class GroupdataQosPolicy(UserdataQosPolicy):             # <<<<<<<<<<<<<<
 *     '''
 *     Group data QoS Policy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_GroupdataQosPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GroupdataQosPolicy, __pyx_t_5) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":669
 * 
 *     # The init function takes a list of QosPolicies
 *     def __cinit__(self, policies=[]):             # <<<<<<<<<<<<<<
 *         self._c_qos = dds.dds_qos_create() #gil_ok
 *         self._policies = {}
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__2 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":794
 * 
 * # Functions to set the state mask
 * class DDSMaskUtil:             # <<<<<<<<<<<<<<
 *     '''
 *     Mask utility.
 */
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_DDSMaskUtil, __pyx_n_s_DDSMaskUtil, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Mask_utility_Some_commonly_used); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "dds.pyx":801
 *     '''
 *     @staticmethod
 *     def read_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_11DDSMaskUtil_1read_samples, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DDSMaskUtil_read_samples, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "dds.pyx":800
 *     See :class:`DDSStateKind` for list of available status
 *     '''
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def read_samples():
 *         '''
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read_samples, __pyx_t_3) < 0) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":811
 * 
 *     @staticmethod
 *     def new_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_11DDSMaskUtil_3new_samples, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DDSMaskUtil_new_samples, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":810
 *         return [DDSStateKind.READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def new_samples():
 *         '''
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_new_samples, __pyx_t_1) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":821
 * 
 *     @staticmethod
 *     def all_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.ANY_STATE]
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_11DDSMaskUtil_5all_samples, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DDSMaskUtil_all_samples, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "dds.pyx":820
 *         return [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.ANY_VIEW_STATE]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def all_samples():
 *         '''
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_all_samples, __pyx_t_3) < 0) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":831
 * 
 *     @staticmethod
 *     def new_instance_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.NEW_VIEW_STATE]
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_11DDSMaskUtil_7new_instance_samples, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DDSMaskUtil_new_instance_samples, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":830
 *         return [DDSStateKind.ANY_STATE]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def new_instance_samples():
 *         '''
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_new_instance_samples, __pyx_t_1) < 0) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":841
 * 
 *     @staticmethod
 *     def not_alive_instance_samples():             # <<<<<<<<<<<<<<
 *         '''
 *         [DDSStateKind.ANY_SAMPLE_STATE, DDSStateKind.ANY_VIEW_STATE, DDSStateKind.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE, DDSStateKind.NOT_ALIVE_DISPOSED_INSTANCE_STATE]
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_11DDSMaskUtil_9not_alive_instance_samples, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DDSMaskUtil_not_alive_instance_s, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "dds.pyx":840
 *         return [DDSStateKind.NOT_READ_SAMPLE_STATE, DDSStateKind.ALIVE_INSTANCE_STATE, DDSStateKind.NEW_VIEW_STATE]
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def not_alive_instance_samples():
 *         '''
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_not_alive_instance_samples, __pyx_t_3) < 0) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":794
 * 
 * # Functions to set the state mask
 * class DDSMaskUtil:             # <<<<<<<<<<<<<<
 *     '''
 *     Mask utility.
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_DDSMaskUtil, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSMaskUtil, __pyx_t_3) < 0) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":851
 * 
 * # Abstract listener
 * class Listener(object):             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract Listener class.
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__163); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__163, __pyx_n_s_Listener, __pyx_n_s_Listener, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Abstract_Listener_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":856
 *     '''
 * 
 *     def on_inconsistent_topic(self, topic, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A participant registered a topic inconsistent with a locally registered one.
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_1on_inconsistent_topic, 0, __pyx_n_s_Listener_on_inconsistent_topic, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_inconsistent_topic, __pyx_t_1) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":873
 *         pass
 * 
 *     def on_offered_deadline_missed(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A locally created data writer has failed to adhere it's DeadlinePolicy.
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_3on_offered_deadline_missed, 0, __pyx_n_s_Listener_on_offered_deadline_mis, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_offered_deadline_missed, __pyx_t_1) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":886
 *         pass
 * 
 *     def on_offered_incompatible_qos(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data writer could not be matched with a data reader because of Qos incompatibilities
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_5on_offered_incompatible_qos, 0, __pyx_n_s_Listener_on_offered_incompatible, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_offered_incompatible_qos, __pyx_t_1) < 0) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":899
 *         pass
 * 
 *     def on_liveliness_lost(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data writer has not met its committed LivelinessQosPolicy
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_7on_liveliness_lost, 0, __pyx_n_s_Listener_on_liveliness_lost, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_liveliness_lost, __pyx_t_1) < 0) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":912
 *         pass
 * 
 *     def on_publication_matched(self, writer, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The number of data readers matched to writer has changed.
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_9on_publication_matched, 0, __pyx_n_s_Listener_on_publication_matched, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_publication_matched, __pyx_t_1) < 0) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":925
 *         pass
 * 
 *     def on_requested_deadline_missed(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A reader's requested DeadlinePolicy was not met by it's matched writers.
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_11on_requested_deadline_missed, 0, __pyx_n_s_Listener_on_requested_deadline_m, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_requested_deadline_missed, __pyx_t_1) < 0) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":938
 *         pass
 * 
 *     def on_requested_incompatible_qos(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A data reader could not be matched with a data writer because of Qos incompatibilities
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_13on_requested_incompatible_qos, 0, __pyx_n_s_Listener_on_requested_incompatib, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_requested_incompatible_qos, __pyx_t_1) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":951
 *         pass
 * 
 *     def on_sample_rejected(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The data reader did not receive samples because of the ResourceLimitsQosPolicy
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_15on_sample_rejected, 0, __pyx_n_s_Listener_on_sample_rejected, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_sample_rejected, __pyx_t_1) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":964
 *         pass
 * 
 *     def on_liveliness_changed(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''on_liveliness_changed(reader, status)
 *         A data reader has experienced a liveliness change in a match writer
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_17on_liveliness_changed, 0, __pyx_n_s_Listener_on_liveliness_changed, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_liveliness_changed, __pyx_t_1) < 0) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":977
 *         pass
 * 
 *     def on_data_available(self, reader):             # <<<<<<<<<<<<<<
 *         '''
 *         Data is available on the passed data reader.
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_19on_data_available, 0, __pyx_n_s_Listener_on_data_available, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_data_available, __pyx_t_1) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":988
 *         pass
 * 
 *     def on_subscription_matched(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         The number of data writers matched to a reader has changed.
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_21on_subscription_matched, 0, __pyx_n_s_Listener_on_subscription_matched, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_subscription_matched, __pyx_t_1) < 0) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1001
 *         pass
 * 
 *     def on_sample_lost(self, reader, status):             # <<<<<<<<<<<<<<
 *         '''
 *         A sample for the data reader has been lost
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_23on_sample_lost, 0, __pyx_n_s_Listener_on_sample_lost, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_sample_lost, __pyx_t_1) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":1014
 *         pass
 * 
 *     def on_data_on_readers(self, subscriber):             # <<<<<<<<<<<<<<
 *         '''
 *         One or more data readers belonging to the subscriber have data available.
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_8Listener_25on_data_on_readers, 0, __pyx_n_s_Listener_on_data_on_readers, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_data_on_readers, __pyx_t_1) < 0) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "dds.pyx":851
 * 
 * # Abstract listener
 * class Listener(object):             # <<<<<<<<<<<<<<
 *     '''
 *     Abstract Listener class.
 */
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Listener, __pyx_tuple__163, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Listener, __pyx_t_1) < 0) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1107
 * 
 * # Global variable to map the C99 entity handles on the corresponding Entity class
 * cdef object _entity_register = {}             # <<<<<<<<<<<<<<
 * 
 * cdef _entity_register_add(Entity entity):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_v_3dds__entity_register);
  __Pyx_DECREF_SET(__pyx_v_3dds__entity_register, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":1153
 * # map listener methods to status defines
 * _method_to_status = {
 *     "on_inconsistent_topic": DDS_INCONSISTENT_TOPIC_STATUS,             # <<<<<<<<<<<<<<
 *     "on_offered_deadline_missed": DDS_OFFERED_DEADLINE_MISSED_STATUS,
 *     "on_requested_deadline_missed": DDS_REQUESTED_DEADLINE_MISSED_STATUS,
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_INCONSISTENT_TOPIC_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_inconsistent_topic, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1154
 * _method_to_status = {
 *     "on_inconsistent_topic": DDS_INCONSISTENT_TOPIC_STATUS,
 *     "on_offered_deadline_missed": DDS_OFFERED_DEADLINE_MISSED_STATUS,             # <<<<<<<<<<<<<<
 *     "on_requested_deadline_missed": DDS_REQUESTED_DEADLINE_MISSED_STATUS,
 *     "on_offered_incompatible_qos": DDS_OFFERED_INCOMPATIBLE_QOS_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_OFFERED_DEADLINE_MISSED_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_offered_deadline_missed, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1155
 *     "on_inconsistent_topic": DDS_INCONSISTENT_TOPIC_STATUS,
 *     "on_offered_deadline_missed": DDS_OFFERED_DEADLINE_MISSED_STATUS,
 *     "on_requested_deadline_missed": DDS_REQUESTED_DEADLINE_MISSED_STATUS,             # <<<<<<<<<<<<<<
 *     "on_offered_incompatible_qos": DDS_OFFERED_INCOMPATIBLE_QOS_STATUS,
 *     "on_requested_incompatible_qos": DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_REQUESTED_DEADLINE_MISSED_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_requested_deadline_missed, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1156
 *     "on_offered_deadline_missed": DDS_OFFERED_DEADLINE_MISSED_STATUS,
 *     "on_requested_deadline_missed": DDS_REQUESTED_DEADLINE_MISSED_STATUS,
 *     "on_offered_incompatible_qos": DDS_OFFERED_INCOMPATIBLE_QOS_STATUS,             # <<<<<<<<<<<<<<
 *     "on_requested_incompatible_qos": DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS,
 *     "on_sample_lost": DDS_SAMPLE_LOST_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_OFFERED_INCOMPATIBLE_QOS_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_offered_incompatible_qos, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1157
 *     "on_requested_deadline_missed": DDS_REQUESTED_DEADLINE_MISSED_STATUS,
 *     "on_offered_incompatible_qos": DDS_OFFERED_INCOMPATIBLE_QOS_STATUS,
 *     "on_requested_incompatible_qos": DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS,             # <<<<<<<<<<<<<<
 *     "on_sample_lost": DDS_SAMPLE_LOST_STATUS,
 *     "on_sample_rejected": DDS_SAMPLE_REJECTED_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_requested_incompatible_qos, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1158
 *     "on_offered_incompatible_qos": DDS_OFFERED_INCOMPATIBLE_QOS_STATUS,
 *     "on_requested_incompatible_qos": DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS,
 *     "on_sample_lost": DDS_SAMPLE_LOST_STATUS,             # <<<<<<<<<<<<<<
 *     "on_sample_rejected": DDS_SAMPLE_REJECTED_STATUS,
 *     "on_data_on_readers": DDS_DATA_ON_READERS_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_SAMPLE_LOST_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_sample_lost, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1159
 *     "on_requested_incompatible_qos": DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS,
 *     "on_sample_lost": DDS_SAMPLE_LOST_STATUS,
 *     "on_sample_rejected": DDS_SAMPLE_REJECTED_STATUS,             # <<<<<<<<<<<<<<
 *     "on_data_on_readers": DDS_DATA_ON_READERS_STATUS,
 *     "on_data_available": DDS_DATA_AVAILABLE_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_SAMPLE_REJECTED_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_sample_rejected, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1160
 *     "on_sample_lost": DDS_SAMPLE_LOST_STATUS,
 *     "on_sample_rejected": DDS_SAMPLE_REJECTED_STATUS,
 *     "on_data_on_readers": DDS_DATA_ON_READERS_STATUS,             # <<<<<<<<<<<<<<
 *     "on_data_available": DDS_DATA_AVAILABLE_STATUS,
 *     "on_liveliness_lost": DDS_LIVELINESS_LOST_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_DATA_ON_READERS_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_data_on_readers, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1161
 *     "on_sample_rejected": DDS_SAMPLE_REJECTED_STATUS,
 *     "on_data_on_readers": DDS_DATA_ON_READERS_STATUS,
 *     "on_data_available": DDS_DATA_AVAILABLE_STATUS,             # <<<<<<<<<<<<<<
 *     "on_liveliness_lost": DDS_LIVELINESS_LOST_STATUS,
 *     "on_liveliness_changed": DDS_LIVELINESS_CHANGED_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_DATA_AVAILABLE_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_data_available, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1162
 *     "on_data_on_readers": DDS_DATA_ON_READERS_STATUS,
 *     "on_data_available": DDS_DATA_AVAILABLE_STATUS,
 *     "on_liveliness_lost": DDS_LIVELINESS_LOST_STATUS,             # <<<<<<<<<<<<<<
 *     "on_liveliness_changed": DDS_LIVELINESS_CHANGED_STATUS,
 *     "on_publication_matched": DDS_PUBLICATION_MATCHED_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_LIVELINESS_LOST_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_liveliness_lost, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1163
 *     "on_data_available": DDS_DATA_AVAILABLE_STATUS,
 *     "on_liveliness_lost": DDS_LIVELINESS_LOST_STATUS,
 *     "on_liveliness_changed": DDS_LIVELINESS_CHANGED_STATUS,             # <<<<<<<<<<<<<<
 *     "on_publication_matched": DDS_PUBLICATION_MATCHED_STATUS,
 *     "on_subscription_matched": DDS_SUBSCRIPTION_MATCHED_STATUS,
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_LIVELINESS_CHANGED_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_liveliness_changed, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1164
 *     "on_liveliness_lost": DDS_LIVELINESS_LOST_STATUS,
 *     "on_liveliness_changed": DDS_LIVELINESS_CHANGED_STATUS,
 *     "on_publication_matched": DDS_PUBLICATION_MATCHED_STATUS,             # <<<<<<<<<<<<<<
 *     "on_subscription_matched": DDS_SUBSCRIPTION_MATCHED_STATUS,
 *     }
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_PUBLICATION_MATCHED_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_publication_matched, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1165
 *     "on_liveliness_changed": DDS_LIVELINESS_CHANGED_STATUS,
 *     "on_publication_matched": DDS_PUBLICATION_MATCHED_STATUS,
 *     "on_subscription_matched": DDS_SUBSCRIPTION_MATCHED_STATUS,             # <<<<<<<<<<<<<<
 *     }
 * # Communication Status structures
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(DDS_SUBSCRIPTION_MATCHED_STATUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_on_subscription_matched, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_method_to_status, __pyx_t_2) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1168
 *     }
 * # Communication Status structures
 * class InconsistentTopicStatus(namedtuple('InconsistentTopicStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change'])):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_total_count_change);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_InconsistentTopicStatus, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_InconsistentTopicStatus, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_InconsistentTopicStatus);
    __Pyx_GIVEREF(__pyx_n_s_InconsistentTopicStatus);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_n_s_InconsistentTopicStatus);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_InconsistentTopicStatus, __pyx_n_s_InconsistentTopicStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_InconsistentTopicStatus_total_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InconsistentTopicStatus, __pyx_t_3, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InconsistentTopicStatus, __pyx_t_1) < 0) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1183
 *     '''
 * 
 * class OfferedDeadlineMissedStatus(namedtuple('OfferedDeadlineMissedStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_total_count_change);
  __Pyx_INCREF(__pyx_n_s_last_instance_handle);
  __Pyx_GIVEREF(__pyx_n_s_last_instance_handle);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_last_instance_handle);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_OfferedDeadlineMissedStatus, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_OfferedDeadlineMissedStatus, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_OfferedDeadlineMissedStatus);
    __Pyx_GIVEREF(__pyx_n_s_OfferedDeadlineMissedStatus);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_n_s_OfferedDeadlineMissedStatus);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_OfferedDeadlineMissedStatus, __pyx_n_s_OfferedDeadlineMissedStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_OfferedDeadlineMissedStatus_tot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_OfferedDeadlineMissedStatus, __pyx_t_2, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OfferedDeadlineMissedStatus, __pyx_t_6) < 0) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1204
 *     '''
 * 
 * class OfferedIncompatibleQosStatus(namedtuple('OfferedIncompatibleQosStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_total_count_change);
  __Pyx_INCREF(__pyx_n_s_last_policy_id);
  __Pyx_GIVEREF(__pyx_n_s_last_policy_id);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_last_policy_id);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_OfferedIncompatibleQosStatus, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_OfferedIncompatibleQosStatus, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_OfferedIncompatibleQosStatus);
    __Pyx_GIVEREF(__pyx_n_s_OfferedIncompatibleQosStatus);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_n_s_OfferedIncompatibleQosStatus);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_OfferedIncompatibleQosStatus, __pyx_n_s_OfferedIncompatibleQosStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_OfferedIncompatibleQosStatus_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OfferedIncompatibleQosStatus, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OfferedIncompatibleQosStatus, __pyx_t_5) < 0) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1224
 *     '''
 * 
 * class LivelinessLostStatus(namedtuple('LivelinessLostStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change'])):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_total_count_change);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_LivelinessLostStatus, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_LivelinessLostStatus, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_LivelinessLostStatus);
    __Pyx_GIVEREF(__pyx_n_s_LivelinessLostStatus);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_n_s_LivelinessLostStatus);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_LivelinessLostStatus, __pyx_n_s_LivelinessLostStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_LivelinessLostStatus_total_coun); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_LivelinessLostStatus, __pyx_t_2, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LivelinessLostStatus, __pyx_t_1) < 0) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1241
 *     '''
 * 
 * class PublicationMatchedStatus(namedtuple('PublicationMatchedStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyList_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_total_count_change);
  __Pyx_INCREF(__pyx_n_s_current_count);
  __Pyx_GIVEREF(__pyx_n_s_current_count);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_current_count);
  __Pyx_INCREF(__pyx_n_s_current_count_change);
  __Pyx_GIVEREF(__pyx_n_s_current_count_change);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_current_count_change);
  __Pyx_INCREF(__pyx_n_s_last_subscription_handle);
  __Pyx_GIVEREF(__pyx_n_s_last_subscription_handle);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_n_s_last_subscription_handle);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_PublicationMatchedStatus, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_PublicationMatchedStatus, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_PublicationMatchedStatus);
    __Pyx_GIVEREF(__pyx_n_s_PublicationMatchedStatus);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_n_s_PublicationMatchedStatus);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_PublicationMatchedStatus, __pyx_n_s_PublicationMatchedStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_PublicationMatchedStatus_total); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PublicationMatchedStatus, __pyx_t_3, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PublicationMatchedStatus, __pyx_t_6) < 0) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1271
 *     '''
 * 
 * class RequestedDeadlineMissedStatus(namedtuple('RequestedDeadlineMissedStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_total_count_change);
  __Pyx_INCREF(__pyx_n_s_last_instance_handle);
  __Pyx_GIVEREF(__pyx_n_s_last_instance_handle);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_last_instance_handle);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_RequestedDeadlineMissedStatus, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_RequestedDeadlineMissedStatus, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_RequestedDeadlineMissedStatus);
    __Pyx_GIVEREF(__pyx_n_s_RequestedDeadlineMissedStatus);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_n_s_RequestedDeadlineMissedStatus);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_RequestedDeadlineMissedStatus, __pyx_n_s_RequestedDeadlineMissedStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_RequestedDeadlineMissedStatus_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_RequestedDeadlineMissedStatus, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RequestedDeadlineMissedStatus, __pyx_t_5) < 0) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1292
 *     '''
 * 
 * class RequestedIncompatibleQosStatus(namedtuple('RequestedIncompatibleQosStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_total_count_change);
  __Pyx_INCREF(__pyx_n_s_last_policy_id);
  __Pyx_GIVEREF(__pyx_n_s_last_policy_id);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_last_policy_id);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_RequestedIncompatibleQosStatus, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_RequestedIncompatibleQosStatus, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_RequestedIncompatibleQosStatus);
    __Pyx_GIVEREF(__pyx_n_s_RequestedIncompatibleQosStatus);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_n_s_RequestedIncompatibleQosStatus);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_RequestedIncompatibleQosStatus, __pyx_n_s_RequestedIncompatibleQosStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_RequestedIncompatibleQosStatus_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_RequestedIncompatibleQosStatus, __pyx_t_3, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RequestedIncompatibleQosStatus, __pyx_t_1) < 0) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1311
 *     '''
 * 
 * class SampleRejectedStatus(namedtuple('SampleRejectedStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_total_count_change);
  __Pyx_INCREF(__pyx_n_s_last_reason);
  __Pyx_GIVEREF(__pyx_n_s_last_reason);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_last_reason);
  __Pyx_INCREF(__pyx_n_s_last_instance_handle);
  __Pyx_GIVEREF(__pyx_n_s_last_instance_handle);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_last_instance_handle);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_SampleRejectedStatus, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_SampleRejectedStatus, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_SampleRejectedStatus);
    __Pyx_GIVEREF(__pyx_n_s_SampleRejectedStatus);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_n_s_SampleRejectedStatus);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SampleRejectedStatus, __pyx_n_s_SampleRejectedStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_SampleRejectedStatus_total_coun); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SampleRejectedStatus, __pyx_t_2, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SampleRejectedStatus, __pyx_t_6) < 0) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1334
 *     '''
 * 
 * class LivelinessChangedStatus(namedtuple('LivelinessChangedStatus',[             # <<<<<<<<<<<<<<
 *     'alive_count',
 *     'not_alive_count',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyList_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_alive_count);
  __Pyx_GIVEREF(__pyx_n_s_alive_count);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_alive_count);
  __Pyx_INCREF(__pyx_n_s_not_alive_count);
  __Pyx_GIVEREF(__pyx_n_s_not_alive_count);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_not_alive_count);
  __Pyx_INCREF(__pyx_n_s_alive_count_change);
  __Pyx_GIVEREF(__pyx_n_s_alive_count_change);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_alive_count_change);
  __Pyx_INCREF(__pyx_n_s_not_alive_count_change);
  __Pyx_GIVEREF(__pyx_n_s_not_alive_count_change);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_n_s_not_alive_count_change);
  __Pyx_INCREF(__pyx_n_s_last_publication_handle);
  __Pyx_GIVEREF(__pyx_n_s_last_publication_handle);
  PyList_SET_ITEM(__pyx_t_5, 4, __pyx_n_s_last_publication_handle);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_LivelinessChangedStatus, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_LivelinessChangedStatus, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_LivelinessChangedStatus);
    __Pyx_GIVEREF(__pyx_n_s_LivelinessChangedStatus);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_n_s_LivelinessChangedStatus);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_LivelinessChangedStatus, __pyx_n_s_LivelinessChangedStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_LivelinessChangedStatus_alive_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LivelinessChangedStatus, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LivelinessChangedStatus, __pyx_t_5) < 0) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1372
 *     '''
 * 
 * class SubscriptionMatchedStatus(namedtuple('SubscriptionMatchedStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_total_count_change);
  __Pyx_INCREF(__pyx_n_s_current_count);
  __Pyx_GIVEREF(__pyx_n_s_current_count);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_current_count);
  __Pyx_INCREF(__pyx_n_s_current_count_change);
  __Pyx_GIVEREF(__pyx_n_s_current_count_change);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_current_count_change);
  __Pyx_INCREF(__pyx_n_s_last_publication_handle);
  __Pyx_GIVEREF(__pyx_n_s_last_publication_handle);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_last_publication_handle);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_SubscriptionMatchedStatus, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_SubscriptionMatchedStatus, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_SubscriptionMatchedStatus);
    __Pyx_GIVEREF(__pyx_n_s_SubscriptionMatchedStatus);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_n_s_SubscriptionMatchedStatus);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SubscriptionMatchedStatus, __pyx_n_s_SubscriptionMatchedStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_SubscriptionMatchedStatus_total); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SubscriptionMatchedStatus, __pyx_t_2, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubscriptionMatchedStatus, __pyx_t_1) < 0) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1403
 *     '''
 * 
 * class SampleLostStatus(namedtuple('SampleLostStatus',[             # <<<<<<<<<<<<<<
 *     'total_count',
 *     'total_count_change'])):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_total_count);
  __Pyx_GIVEREF(__pyx_n_s_total_count);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_total_count);
  __Pyx_INCREF(__pyx_n_s_total_count_change);
  __Pyx_GIVEREF(__pyx_n_s_total_count_change);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_total_count_change);
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_SampleLostStatus, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_n_s_SampleLostStatus, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_SampleLostStatus);
    __Pyx_GIVEREF(__pyx_n_s_SampleLostStatus);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_n_s_SampleLostStatus);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_SampleLostStatus, __pyx_n_s_SampleLostStatus, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_SampleLostStatus_total_count_in); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SampleLostStatus, __pyx_t_3, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SampleLostStatus, __pyx_t_6) < 0) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":1574
 * # to wrap the C listener and call the corresponding Python listener
 * cdef dds.dds_topiclistener_t topic_listener
 * topic_listener.on_inconsistent_topic = on_inconsistent_topic             # <<<<<<<<<<<<<<
 * 
 * cdef dds.dds_writerlistener_t writer_listener
 */
  __pyx_v_3dds_topic_listener.on_inconsistent_topic = __pyx_f_3dds_on_inconsistent_topic;

  /* "dds.pyx":1577
 * 
 * cdef dds.dds_writerlistener_t writer_listener
 * writer_listener.on_offered_deadline_missed = on_offered_deadline_missed             # <<<<<<<<<<<<<<
 * writer_listener.on_offered_incompatible_qos = on_offered_incompatible_qos
 * writer_listener.on_liveliness_lost = on_liveliness_lost
 */
  __pyx_v_3dds_writer_listener.on_offered_deadline_missed = __pyx_f_3dds_on_offered_deadline_missed;

  /* "dds.pyx":1578
 * cdef dds.dds_writerlistener_t writer_listener
 * writer_listener.on_offered_deadline_missed = on_offered_deadline_missed
 * writer_listener.on_offered_incompatible_qos = on_offered_incompatible_qos             # <<<<<<<<<<<<<<
 * writer_listener.on_liveliness_lost = on_liveliness_lost
 * writer_listener.on_publication_matched = on_publication_matched
 */
  __pyx_v_3dds_writer_listener.on_offered_incompatible_qos = __pyx_f_3dds_on_offered_incompatible_qos;

  /* "dds.pyx":1579
 * writer_listener.on_offered_deadline_missed = on_offered_deadline_missed
 * writer_listener.on_offered_incompatible_qos = on_offered_incompatible_qos
 * writer_listener.on_liveliness_lost = on_liveliness_lost             # <<<<<<<<<<<<<<
 * writer_listener.on_publication_matched = on_publication_matched
 * 
 */
  __pyx_v_3dds_writer_listener.on_liveliness_lost = __pyx_f_3dds_on_liveliness_lost;

  /* "dds.pyx":1580
 * writer_listener.on_offered_incompatible_qos = on_offered_incompatible_qos
 * writer_listener.on_liveliness_lost = on_liveliness_lost
 * writer_listener.on_publication_matched = on_publication_matched             # <<<<<<<<<<<<<<
 * 
 * cdef dds.dds_readerlistener_t reader_listener
 */
  __pyx_v_3dds_writer_listener.on_publication_matched = __pyx_f_3dds_on_publication_matched;

  /* "dds.pyx":1583
 * 
 * cdef dds.dds_readerlistener_t reader_listener
 * reader_listener.on_requested_deadline_missed = on_requested_deadline_missed             # <<<<<<<<<<<<<<
 * reader_listener.on_requested_incompatible_qos = on_requested_incompatible_qos
 * reader_listener.on_sample_rejected = on_sample_rejected
 */
  __pyx_v_3dds_reader_listener.on_requested_deadline_missed = __pyx_f_3dds_on_requested_deadline_missed;

  /* "dds.pyx":1584
 * cdef dds.dds_readerlistener_t reader_listener
 * reader_listener.on_requested_deadline_missed = on_requested_deadline_missed
 * reader_listener.on_requested_incompatible_qos = on_requested_incompatible_qos             # <<<<<<<<<<<<<<
 * reader_listener.on_sample_rejected = on_sample_rejected
 * reader_listener.on_liveliness_changed = on_liveliness_changed
 */
  __pyx_v_3dds_reader_listener.on_requested_incompatible_qos = __pyx_f_3dds_on_requested_incompatible_qos;

  /* "dds.pyx":1585
 * reader_listener.on_requested_deadline_missed = on_requested_deadline_missed
 * reader_listener.on_requested_incompatible_qos = on_requested_incompatible_qos
 * reader_listener.on_sample_rejected = on_sample_rejected             # <<<<<<<<<<<<<<
 * reader_listener.on_liveliness_changed = on_liveliness_changed
 * reader_listener.on_data_available = on_data_available
 */
  __pyx_v_3dds_reader_listener.on_sample_rejected = __pyx_f_3dds_on_sample_rejected;

  /* "dds.pyx":1586
 * reader_listener.on_requested_incompatible_qos = on_requested_incompatible_qos
 * reader_listener.on_sample_rejected = on_sample_rejected
 * reader_listener.on_liveliness_changed = on_liveliness_changed             # <<<<<<<<<<<<<<
 * reader_listener.on_data_available = on_data_available
 * reader_listener.on_subscription_matched = on_subscription_matched
 */
  __pyx_v_3dds_reader_listener.on_liveliness_changed = __pyx_f_3dds_on_liveliness_changed;

  /* "dds.pyx":1587
 * reader_listener.on_sample_rejected = on_sample_rejected
 * reader_listener.on_liveliness_changed = on_liveliness_changed
 * reader_listener.on_data_available = on_data_available             # <<<<<<<<<<<<<<
 * reader_listener.on_subscription_matched = on_subscription_matched
 * reader_listener.on_sample_lost = on_sample_lost
 */
  __pyx_v_3dds_reader_listener.on_data_available = __pyx_f_3dds_on_data_available;

  /* "dds.pyx":1588
 * reader_listener.on_liveliness_changed = on_liveliness_changed
 * reader_listener.on_data_available = on_data_available
 * reader_listener.on_subscription_matched = on_subscription_matched             # <<<<<<<<<<<<<<
 * reader_listener.on_sample_lost = on_sample_lost
 * 
 */
  __pyx_v_3dds_reader_listener.on_subscription_matched = __pyx_f_3dds_on_subscription_matched;

  /* "dds.pyx":1589
 * reader_listener.on_data_available = on_data_available
 * reader_listener.on_subscription_matched = on_subscription_matched
 * reader_listener.on_sample_lost = on_sample_lost             # <<<<<<<<<<<<<<
 * 
 * cdef dds.dds_publisherlistener_t publisher_listener
 */
  __pyx_v_3dds_reader_listener.on_sample_lost = __pyx_f_3dds_on_sample_lost;

  /* "dds.pyx":1592
 * 
 * cdef dds.dds_publisherlistener_t publisher_listener
 * publisher_listener.writerlistener = writer_listener             # <<<<<<<<<<<<<<
 * 
 * cdef dds.dds_subscriberlistener_t subscriber_listener
 */
  __pyx_v_3dds_publisher_listener.writerlistener = __pyx_v_3dds_writer_listener;

  /* "dds.pyx":1595
 * 
 * cdef dds.dds_subscriberlistener_t subscriber_listener
 * subscriber_listener.readerlistener = reader_listener             # <<<<<<<<<<<<<<
 * subscriber_listener.on_data_readers = on_data_on_readers
 * 
 */
  __pyx_v_3dds_subscriber_listener.readerlistener = __pyx_v_3dds_reader_listener;

  /* "dds.pyx":1596
 * cdef dds.dds_subscriberlistener_t subscriber_listener
 * subscriber_listener.readerlistener = reader_listener
 * subscriber_listener.on_data_readers = on_data_on_readers             # <<<<<<<<<<<<<<
 * 
 * cdef dds.dds_participantlistener_t participant_listener
 */
  __pyx_v_3dds_subscriber_listener.on_data_readers = __pyx_f_3dds_on_data_on_readers;

  /* "dds.pyx":1599
 * 
 * cdef dds.dds_participantlistener_t participant_listener
 * participant_listener.topiclistener = topic_listener             # <<<<<<<<<<<<<<
 * participant_listener.publisherlistener = publisher_listener
 * participant_listener.subscriberlistener = subscriber_listener
 */
  __pyx_v_3dds_participant_listener.topiclistener = __pyx_v_3dds_topic_listener;

  /* "dds.pyx":1600
 * cdef dds.dds_participantlistener_t participant_listener
 * participant_listener.topiclistener = topic_listener
 * participant_listener.publisherlistener = publisher_listener             # <<<<<<<<<<<<<<
 * participant_listener.subscriberlistener = subscriber_listener
 * 
 */
  __pyx_v_3dds_participant_listener.publisherlistener = __pyx_v_3dds_publisher_listener;

  /* "dds.pyx":1601
 * participant_listener.topiclistener = topic_listener
 * participant_listener.publisherlistener = publisher_listener
 * participant_listener.subscriberlistener = subscriber_listener             # <<<<<<<<<<<<<<
 * 
 * cdef _set_status_for_listener(dds_entity_t c_entity, object listener):
 */
  __pyx_v_3dds_participant_listener.subscriberlistener = __pyx_v_3dds_subscriber_listener;

  /* "dds.pyx":1631
 *     cdef object _readers
 * 
 *     def __cinit__(self, int did = DDS_DOMAIN_DEFAULT, dds.Qos qos = None, listener = None):             # <<<<<<<<<<<<<<
 * 
 *         self._publishers = []
 */
  __pyx_k__7 = DDS_DOMAIN_DEFAULT;

  /* "dds.pyx":2484
 * 
 * 
 * class SampleInfo:             # <<<<<<<<<<<<<<
 *     '''
 *     Base sample info class
 */
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_SampleInfo, __pyx_n_s_SampleInfo, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_Base_sample_info_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":2488
 *     Base sample info class
 *     '''
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_10SampleInfo_1__init__, 0, __pyx_n_s_SampleInfo___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":2484
 * 
 * 
 * class SampleInfo:             # <<<<<<<<<<<<<<
 *     '''
 *     Base sample info class
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_SampleInfo, __pyx_empty_tuple, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SampleInfo, __pyx_t_2) < 0) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "dds.pyx":2491
 *         pass
 * 
 * _Sample = namedtuple('_Sample',['data','status'])             # <<<<<<<<<<<<<<
 * 
 * ctypedef int (*_ReadOp)(dds_entity_t rd, void ** buf, uint32_t maxs, dds_sample_info_t * si, uint32_t mask, dds_instance_handle_t handle, dds_condition_t cond)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_data);
  __Pyx_GIVEREF(__pyx_n_s_data);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_data);
  __Pyx_INCREF(__pyx_n_s_status);
  __Pyx_GIVEREF(__pyx_n_s_status);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_status);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_Sample);
  __Pyx_GIVEREF(__pyx_n_s_Sample);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_Sample);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Sample, __pyx_t_2) < 0) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":2613
 *         time.sleep(0)
 * 
 *     def read(self, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''read(n=1, masks=DDSMaskUtil.all_samples())
 *         Read samples
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSMaskUtil); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__21 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":2633
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_read, n, mask, 0, <void*>0)
 * 
 *     def take(self, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''take(n=1, masks=DDSMaskUtil.all_samples())
 *         Take samples
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSMaskUtil); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__22 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":2691
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_cond, n, 0, 0, condition._c_handle)
 * 
 *     def take_instance(self, handle, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''take_instance(n=1, masks=DDSMaskUtil.all_samples())
 *         Take samples for a given instance handle
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSMaskUtil); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__23 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":2714
 *         return _do_read_op(self._typesupport, self.get_handle(), _op_dds_take_instance, n, mask, handle, <void*>0)
 * 
 *     def read_instance(self, handle, n=1, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''read_instance(n=1, masks=DDSMaskUtil.all_samples())
 *         Read samples for a given instance handle
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSMaskUtil); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__24 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":2909
 *         return status
 * 
 *     def create_readcondition(self, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         '''
 *         Create a read condition for the data reader
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSMaskUtil); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__25 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":2920
 *         return ReadCondition(self, masks)
 * 
 *     def create_querycondition(self, masks=DDSMaskUtil.all_samples(), expression = '', parameters=[]):             # <<<<<<<<<<<<<<
 *         '''
 *         Create a query condition for the data reader
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSMaskUtil); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__26 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__27 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":3090
 *     cdef object _reader
 * 
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples()):             # <<<<<<<<<<<<<<
 *         cdef uint32_t mask = masks[0].value
 *         for i in range(1, len(masks)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSMaskUtil); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__36 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":3122
 *     cdef object _reader
 * 
 *     def __cinit__(self, DataReader reader, masks=DDSMaskUtil.all_samples(), expression = '', parameters=[]):             # <<<<<<<<<<<<<<
 *         self._reader = reader
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSMaskUtil); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_samples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__39 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__40 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":3221
 *         del self._conditions[key]
 * 
 *     def wait(self, timeout = DDSDuration.infinity()):             # <<<<<<<<<<<<<<
 *         '''wait(timeout = DDSDuration.infinity())
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DDSDuration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_infinity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k__43 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":3365
 *         return qos
 * 
 * def QosProfile(uri, profile):             # <<<<<<<<<<<<<<
 *     from warnings import warn
 *     warn('The class name QosProfile is deprecated. Use class QosProvider instead.' \
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3dds_1QosProfile, NULL, __pyx_n_s_dds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_QosProfile, __pyx_t_2) < 0) __PYX_ERR(0, 3365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":3371
 *     return QosProvider(uri, profile)
 * 
 * class DDSException(Exception):             # <<<<<<<<<<<<<<
 *     '''
 *     DDS exception
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_DDSException, __pyx_n_s_DDSException, (PyObject *) NULL, __pyx_n_s_dds, __pyx_kp_s_DDS_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "dds.pyx":3375
 *     DDS exception
 *     '''
 *     def __init__(self, message = '', code = 0):             # <<<<<<<<<<<<<<
 *         msg = message
 *         if code != 0:
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_3dds_12DDSException_1__init__, 0, __pyx_n_s_DDSException___init, NULL, __pyx_n_s_dds, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__196);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 3375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "dds.pyx":3371
 *     return QosProvider(uri, profile)
 * 
 * class DDSException(Exception):             # <<<<<<<<<<<<<<
 *     '''
 *     DDS exception
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_DDSException, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DDSException, __pyx_t_6) < 0) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":3384
 * 
 *     @staticmethod
 *     def bytes_to_ptr(str):             # <<<<<<<<<<<<<<
 *         cdef char *s = <bytes>str
 *         cdef long long addr = <long long> s
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3dds_20_SerializationHelper_1bytes_to_ptr, NULL, __pyx_n_s_dds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3dds__SerializationHelper->tp_dict, __pyx_n_s_bytes_to_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3dds__SerializationHelper);

  /* "dds.pyx":3383
 * cdef class _SerializationHelper:
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def bytes_to_ptr(str):
 *         cdef char *s = <bytes>str
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3dds__SerializationHelper, __pyx_n_s_bytes_to_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3dds__SerializationHelper->tp_dict, __pyx_n_s_bytes_to_ptr, __pyx_t_5) < 0) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_3dds__SerializationHelper);

  /* "dds.pyx":3390
 * 
 *     @staticmethod
 *     def ptr_to_bytes(ptr, size = 0):             # <<<<<<<<<<<<<<
 *         cdef long long addr = ptr
 *         cdef char *s = <char *>addr
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_3dds_20_SerializationHelper_3ptr_to_bytes, NULL, __pyx_n_s_dds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3dds__SerializationHelper->tp_dict, __pyx_n_s_ptr_to_bytes, __pyx_t_5) < 0) __PYX_ERR(0, 3390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_3dds__SerializationHelper);

  /* "dds.pyx":3389
 *         return addr
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def ptr_to_bytes(ptr, size = 0):
 *         cdef long long addr = ptr
 */
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_3dds__SerializationHelper, __pyx_n_s_ptr_to_bytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3dds__SerializationHelper->tp_dict, __pyx_n_s_ptr_to_bytes, __pyx_t_2) < 0) __PYX_ERR(0, 3390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3dds__SerializationHelper);

  /* "dds.pyx":3400
 * # these IDLPP generated descriptors, and not with the descriptors that come in over the wire.
 * cdef _builtin_topics_descriptors = {
 * 'DCPSParticipant': '<MetaData version="1.0.0"><Module name="DDS"><TypeDef name="BuiltinTopicKey_t"><Array size="3"><Long/></Array></TypeDef><TypeDef name="octSeq"><Sequence><Octet/></Sequence></TypeDef><Struct name="UserDataQosPolicy"><Member name="value"><Type name="octSeq"/></Member></Struct><Struct name="ParticipantBuiltinTopicData"><Member name="key"><Type name="BuiltinTopicKey_t"/></Member><Member name="user_data"><Type name="UserDataQosPolicy"/></Member></Struct></Module></MetaData>',             # <<<<<<<<<<<<<<
 * 'DCPSTopic': '<MetaData version="1.0.0"><Module name="DDS"><TypeDef name="BuiltinTopicKey_t"><Array size="3"><Long/></Array></TypeDef><Enum name="DurabilityQosPolicyKind"><Element name="VOLATILE_DURABILITY_QOS" value="0"/><Element name="TRANSIENT_LOCAL_DURABILITY_QOS" value="1"/><Element name="TRANSIENT_DURABILITY_QOS" value="2"/><Element name="PERSISTENT_DURABILITY_QOS" value="3"/></Enum><Struct name="Duration_t"><Member name="sec"><Long/></Member><Member name="nanosec"><ULong/></Member></Struct><Enum name="HistoryQosPolicyKind"><Element name="KEEP_LAST_HISTORY_QOS" value="0"/><Element name="KEEP_ALL_HISTORY_QOS" value="1"/></Enum><Enum name="LivelinessQosPolicyKind"><Element name="AUTOMATIC_LIVELINESS_QOS" value="0"/><Element name="MANUAL_BY_PARTICIPANT_LIVELINESS_QOS" value="1"/><Element name="MANUAL_BY_TOPIC_LIVELINESS_QOS" value="2"/></Enum><Enum name="ReliabilityQosPolicyKind"><Element name="BEST_EFFORT_RELIABILITY_QOS" value="0"/><Element name="RELIABLE_RELIABILITY_QOS" value="1"/></Enum><Struct name="TransportPriorityQosPolicy"><Member name="value"><Long/></Member></Struct><Enum name="DestinationOrderQosPolicyKind"><Element name="BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS" value="0"/><Element name="BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS" value="1"/></Enum><Struct name="ResourceLimitsQosPolicy"><Member name="max_samples"><Long/></Member><Member name="max_instances"><Long/></Member><Member name="max_samples_per_instance"><Long/></Member></Struct><Enum name="OwnershipQosPolicyKind"><Element name="SHARED_OWNERSHIP_QOS" value="0"/><Element name="EXCLUSIVE_OWNERSHIP_QOS" value="1"/></Enum><TypeDef name="octSeq"><Sequence><Octet/></Sequence></TypeDef><Struct name="DurabilityQosPolicy"><Member name="kind"><Type name="DurabilityQosPolicyKind"/></Member></Struct><Struct name="LifespanQosPolicy"><Member name="duration"><Type name="Duration_t"/></Member></Struct><Struct name="LatencyBudgetQosPolicy"><Member name="duration"><Type name="Duration_t"/></Member></Struct><Struct name="DeadlineQosPolicy"><Member name="period"><Type name="Duration_t"/></Member></Struct><Struct name="HistoryQosPolicy"><Member name="kind"><Type name="HistoryQosPolicyKind"/></Member><Member name="depth"><Long/></Member></Struct><Struct name="DurabilityServiceQosPolicy"><Member name="service_cleanup_delay"><Type name="Duration_t"/></Member><Member name="history_kind"><Type name="HistoryQosPolicyKind"/></Member><Member name="history_depth"><Long/></Member><Member name="max_samples"><Long/></Member><Member name="max_instances"><Long/></Member><Member name="max_samples_per_instance"><Long/></Member></Struct><Struct name="LivelinessQosPolicy"><Member name="kind"><Type name="LivelinessQosPolicyKind"/></Member><Member name="lease_duration"><Type name="Duration_t"/></Member></Struct><Struct name="ReliabilityQosPolicy"><Member name="kind"><Type name="ReliabilityQosPolicyKind"/></Member><Member name="max_blocking_time"><Type name="Duration_t"/></Member><Member name="synchronous"><Boolean/></Member></Struct><Struct name="DestinationOrderQosPolicy"><Member name="kind"><Type name="DestinationOrderQosPolicyKind"/></Member></Struct><Struct name="OwnershipQosPolicy"><Member name="kind"><Type name="OwnershipQosPolicyKind"/></Member></Struct><Struct name="TopicDataQosPolicy"><Member name="value"><Type name="octSeq"/></Member></Struct><Struct name="TopicBuiltinTopicData"><Member name="key"><Type name="BuiltinTopicKey_t"/></Member><Member name="name"><String/></Member><Member name="type_name"><String/></Member><Member name="durability"><Type name="DurabilityQosPolicy"/></Member><Member name="durability_service"><Type name="DurabilityServiceQosPolicy"/></Member><Member name="deadline"><Type name="DeadlineQosPolicy"/></Member><Member name="latency_budget"><Type name="LatencyBudgetQosPolicy"/></Member><Member name="liveliness"><Type name="LivelinessQosPolicy"/></Member><Member name="reliability"><Type name="ReliabilityQosPolicy"/></Member><Member name="transport_priority"><Type name="TransportPriorityQosPolicy"/></Member><Member name="lifespan"><Type name="LifespanQosPolicy"/></Member><Member name="destination_order"><Type name="DestinationOrderQosPolicy"/></Member><Member name="history"><Type name="HistoryQosPolicy"/></Member><Member name="resource_limits"><Type name="ResourceLimitsQosPolicy"/></Member><Member name="ownership"><Type name="OwnershipQosPolicy"/></Member><Member name="topic_data"><Type name="TopicDataQosPolicy"/></Member></Struct></Module></MetaData>',
 * 'DCPSPublication': '<MetaData version="1.0.0"><Module name="DDS"><TypeDef name="BuiltinTopicKey_t"><Array size="3"><Long/></Array></TypeDef><Enum name="DurabilityQosPolicyKind"><Element name="VOLATILE_DURABILITY_QOS" value="0"/><Element name="TRANSIENT_LOCAL_DURABILITY_QOS" value="1"/><Element name="TRANSIENT_DURABILITY_QOS" value="2"/><Element name="PERSISTENT_DURABILITY_QOS" value="3"/></Enum><Struct name="Duration_t"><Member name="sec"><Long/></Member><Member name="nanosec"><ULong/></Member></Struct><Enum name="LivelinessQosPolicyKind"><Element name="AUTOMATIC_LIVELINESS_QOS" value="0"/><Element name="MANUAL_BY_PARTICIPANT_LIVELINESS_QOS" value="1"/><Element name="MANUAL_BY_TOPIC_LIVELINESS_QOS" value="2"/></Enum><Enum name="ReliabilityQosPolicyKind"><Element name="BEST_EFFORT_RELIABILITY_QOS" value="0"/><Element name="RELIABLE_RELIABILITY_QOS" value="1"/></Enum><Enum name="DestinationOrderQosPolicyKind"><Element name="BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS" value="0"/><Element name="BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS" value="1"/></Enum><TypeDef name="octSeq"><Sequence><Octet/></Sequence></TypeDef><Enum name="OwnershipQosPolicyKind"><Element name="SHARED_OWNERSHIP_QOS" value="0"/><Element name="EXCLUSIVE_OWNERSHIP_QOS" value="1"/></Enum><Struct name="OwnershipStrengthQosPolicy"><Member name="value"><Long/></Member></Struct><Enum name="PresentationQosPolicyAccessScopeKind"><Element name="INSTANCE_PRESENTATION_QOS" value="0"/><Element name="TOPIC_PRESENTATION_QOS" value="1"/><Element name="GROUP_PRESENTATION_QOS" value="2"/></Enum><TypeDef name="StringSeq"><Sequence><String/></Sequence></TypeDef><Struct name="DurabilityQosPolicy"><Member name="kind"><Type name="DurabilityQosPolicyKind"/></Member></Struct><Struct name="LifespanQosPolicy"><Member name="duration"><Type name="Duration_t"/></Member></Struct><Struct name="LatencyBudgetQosPolicy"><Member name="duration"><Type name="Duration_t"/></Member></Struct><Struct name="DeadlineQosPolicy"><Member name="period"><Type name="Duration_t"/></Member></Struct><Struct name="LivelinessQosPolicy"><Member name="kind"><Type name="LivelinessQosPolicyKind"/></Member><Member name="lease_duration"><Type name="Duration_t"/></Member></Struct><Struct name="ReliabilityQosPolicy"><Member name="kind"><Type name="ReliabilityQosPolicyKind"/></Member><Member name="max_blocking_time"><Type name="Duration_t"/></Member><Member name="synchronous"><Boolean/></Member></Struct><Struct name="DestinationOrderQosPolicy"><Member name="kind"><Type name="DestinationOrderQosPolicyKind"/></Member></Struct><Struct name="GroupDataQosPolicy"><Member name="value"><Type name="octSeq"/></Member></Struct><Struct name="TopicDataQosPolicy"><Member name="value"><Type name="octSeq"/></Member></Struct><Struct name="UserDataQosPolicy"><Member name="value"><Type name="octSeq"/></Member></Struct><Struct name="OwnershipQosPolicy"><Member name="kind"><Type name="OwnershipQosPolicyKind"/></Member></Struct><Struct name="PresentationQosPolicy"><Member name="access_scope"><Type name="PresentationQosPolicyAccessScopeKind"/></Member><Member name="coherent_access"><Boolean/></Member><Member name="ordered_access"><Boolean/></Member></Struct><Struct name="PartitionQosPolicy"><Member name="name"><Type name="StringSeq"/></Member></Struct><Struct name="PublicationBuiltinTopicData"><Member name="key"><Type name="BuiltinTopicKey_t"/></Member><Member name="participant_key"><Type name="BuiltinTopicKey_t"/></Member><Member name="topic_name"><String/></Member><Member name="type_name"><String/></Member><Member name="durability"><Type name="DurabilityQosPolicy"/></Member><Member name="deadline"><Type name="DeadlineQosPolicy"/></Member><Member name="latency_budget"><Type name="LatencyBudgetQosPolicy"/></Member><Member name="liveliness"><Type name="LivelinessQosPolicy"/></Member><Member name="reliability"><Type name="ReliabilityQosPolicy"/></Member><Member name="lifespan"><Type name="LifespanQosPolicy"/></Member><Member name="destination_order"><Type name="DestinationOrderQosPolicy"/></Member><Member name="user_data"><Type name="UserDataQosPolicy"/></Member><Member name="ownership"><Type name="OwnershipQosPolicy"/></Member><Member name="ownership_strength"><Type name="OwnershipStrengthQosPolicy"/></Member><Member name="presentation"><Type name="PresentationQosPolicy"/></Member><Member name="partition"><Type name="PartitionQosPolicy"/></Member><Member name="topic_data"><Type name="TopicDataQosPolicy"/></Member><Member name="group_data"><Type name="GroupDataQosPolicy"/></Member></Struct></Module></MetaData>',
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DCPSParticipant, __pyx_kp_s_MetaData_version_1_0_0_Module_n) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DCPSTopic, __pyx_kp_s_MetaData_version_1_0_0_Module_n_2) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DCPSPublication, __pyx_kp_s_MetaData_version_1_0_0_Module_n_3) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DCPSSubscription, __pyx_kp_s_MetaData_version_1_0_0_Module_n_4) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CMParticipant, __pyx_kp_s_MetaData_version_1_0_0_Module_n_5) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CMPublisher, __pyx_kp_s_MetaData_version_1_0_0_Module_n_6) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CMSubscriber, __pyx_kp_s_MetaData_version_1_0_0_Module_n_7) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CMDataWriter, __pyx_kp_s_MetaData_version_1_0_0_Module_n_8) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_CMDataReader, __pyx_kp_s_MetaData_version_1_0_0_Module_n_9) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_DCPSType, __pyx_kp_s_MetaData_version_1_0_0_Module_n_10) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  __Pyx_XGOTREF(__pyx_v_3dds__builtin_topics_descriptors);
  __Pyx_DECREF_SET(__pyx_v_3dds__builtin_topics_descriptors, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "dds.pyx":3415
 * # spec name in order to find the classes in the class_dict.
 * cdef _builtin_topics_type_name_map = {
 * 'kernelModule::v_participantInfo': 'DDS::ParticipantBuiltinTopicData',             # <<<<<<<<<<<<<<
 * 'kernelModule::v_topicInfo': 'DDS::TopicBuiltinTopicData',
 * 'kernelModule::v_publicationInfo': 'DDS::PublicationBuiltinTopicData',
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_participantInfo, __pyx_kp_s_DDS_ParticipantBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_topicInfo, __pyx_kp_s_DDS_TopicBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_publicationInfo, __pyx_kp_s_DDS_PublicationBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_subscriptionInfo, __pyx_kp_s_DDS_SubscriptionBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_participantCMInfo, __pyx_kp_s_DDS_CMParticipantBuiltinTopicDat) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_publisherCMInfo, __pyx_kp_s_DDS_CMPublisherBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_subscriberCMInfo, __pyx_kp_s_DDS_CMSubscriberBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_dataWriterCMInfo, __pyx_kp_s_DDS_CMDataWriterBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_dataReaderCMInfo, __pyx_kp_s_DDS_CMDataReaderBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_kernelModule_v_typeInfo, __pyx_kp_s_DDS_TypeBuiltinTopicData) < 0) __PYX_ERR(0, 3415, __pyx_L1_error)
  __Pyx_XGOTREF(__pyx_v_3dds__builtin_topics_type_name_map);
  __Pyx_DECREF_SET(__pyx_v_3dds__builtin_topics_type_name_map, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypeSupport(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3dds_3__pyx_unpickle_TypeSupport, NULL, __pyx_n_s_dds); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TypeSupport, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TypeSupport__set_state(<TypeSupport> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeSupport__set_state(TypeSupport __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3dds_5__pyx_unpickle__SerializationHelper, NULL, __pyx_n_s_dds); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__SerializationHel, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "dds.pyx":1
 * #             # <<<<<<<<<<<<<<
 * #                         Vortex OpenSplice
 * #
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init dds", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init dds");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* DelItemInt */
static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
    int r;
    if (!j) return -1;
    r = PyObject_DelItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
                                               CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
#if !CYTHON_USE_TYPE_SLOTS
    if (is_list || PySequence_Check(o)) {
        return PySequence_DelItem(o, i);
    }
#else
    PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
    if (likely(m && m->sq_ass_item)) {
        if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
            Py_ssize_t l = m->sq_length(o);
            if (likely(l >= 0)) {
                i += l;
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    return -1;
                PyErr_Clear();
            }
        }
        return m->sq_ass_item(o, i, (PyObject *)NULL);
    }
#endif
    return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return PyUnicode_FromUnicode(NULL, 0);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_TRUE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    while (type && type->tp_traverse == current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_traverse)
        return type->tp_traverse(obj, v, a);
    return 0;
}

/* CallNextTpClear */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_3);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchInspect */
static PyObject* __Pyx_patch_inspect(PyObject* module) {
#if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT)
    static int inspect_patched = 0;
    if (unlikely((!inspect_patched) && module)) {
        module = __Pyx_Coroutine_patch_module(
            module, ""
"old_types = getattr(_module.isgenerator, '_cython_generator_types', None)\n"
"if old_types is None or not isinstance(old_types, set):\n"
"    old_types = set()\n"
"    def cy_wrap(orig_func, type=type, cython_generator_types=old_types):\n"
"        def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj)\n"
"        cy_isgenerator._cython_generator_types = cython_generator_types\n"
"        return cy_isgenerator\n"
"    _module.isgenerator = cy_wrap(_module.isgenerator)\n"
"old_types.add(_cython_generator_type)\n"
        );
        inspect_patched = 1;
    }
#else
    if ((0)) return __Pyx_Coroutine_patch_module(module, NULL);
#endif
    return module;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* GetNameInClass */
static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
    PyObject *result;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result) {
        result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
    }
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
    const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
    const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
    const uint32_t neg_one = (uint32_t) ((uint32_t) 0 - (uint32_t) 1), const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) ((int32_t) 0 - (int32_t) 1), const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dds_sample_rejected_status_kind(dds_sample_rejected_status_kind value) {
    const dds_sample_rejected_status_kind neg_one = (dds_sample_rejected_status_kind) ((dds_sample_rejected_status_kind) 0 - (dds_sample_rejected_status_kind) 1), const_zero = (dds_sample_rejected_status_kind) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(dds_sample_rejected_status_kind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(dds_sample_rejected_status_kind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(dds_sample_rejected_status_kind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(dds_sample_rejected_status_kind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(dds_sample_rejected_status_kind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(dds_sample_rejected_status_kind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dds_sample_state_t(dds_sample_state_t value) {
    const dds_sample_state_t neg_one = (dds_sample_state_t) ((dds_sample_state_t) 0 - (dds_sample_state_t) 1), const_zero = (dds_sample_state_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(dds_sample_state_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(dds_sample_state_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(dds_sample_state_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(dds_sample_state_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(dds_sample_state_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(dds_sample_state_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dds_view_state_t(dds_view_state_t value) {
    const dds_view_state_t neg_one = (dds_view_state_t) ((dds_view_state_t) 0 - (dds_view_state_t) 1), const_zero = (dds_view_state_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(dds_view_state_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(dds_view_state_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(dds_view_state_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(dds_view_state_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(dds_view_state_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(dds_view_state_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dds_instance_state_t(dds_instance_state_t value) {
    const dds_instance_state_t neg_one = (dds_instance_state_t) ((dds_instance_state_t) 0 - (dds_instance_state_t) 1), const_zero = (dds_instance_state_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(dds_instance_state_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(dds_instance_state_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(dds_instance_state_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(dds_instance_state_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(dds_instance_state_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(dds_instance_state_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) ((PY_LONG_LONG) 0 - (PY_LONG_LONG) 1), const_zero = (PY_LONG_LONG) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
    const uint32_t neg_one = (uint32_t) ((uint32_t) 0 - (uint32_t) 1), const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint32_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint32_t) -1;
        }
    } else {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyInt_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE dds_durability_kind_t __Pyx_PyInt_As_dds_durability_kind_t(PyObject *x) {
    const dds_durability_kind_t neg_one = (dds_durability_kind_t) ((dds_durability_kind_t) 0 - (dds_durability_kind_t) 1), const_zero = (dds_durability_kind_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(dds_durability_kind_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (dds_durability_kind_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (dds_durability_kind_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(dds_durability_kind_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) >= 2 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) (((((dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(dds_durability_kind_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) >= 3 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) (((((((dds_durability_kind_t)digits[2]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(dds_durability_kind_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) >= 4 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) (((((((((dds_durability_kind_t)digits[3]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[2]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (dds_durability_kind_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(dds_durability_kind_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(dds_durability_kind_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(dds_durability_kind_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(dds_durability_kind_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (dds_durability_kind_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(dds_durability_kind_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(dds_durability_kind_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) - 1 > 2 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) (((dds_durability_kind_t)-1)*(((((dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(dds_durability_kind_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) - 1 > 2 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) ((((((dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(dds_durability_kind_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) - 1 > 3 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) (((dds_durability_kind_t)-1)*(((((((dds_durability_kind_t)digits[2]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(dds_durability_kind_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) - 1 > 3 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) ((((((((dds_durability_kind_t)digits[2]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(dds_durability_kind_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) - 1 > 4 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) (((dds_durability_kind_t)-1)*(((((((((dds_durability_kind_t)digits[3]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[2]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(dds_durability_kind_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(dds_durability_kind_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(dds_durability_kind_t) - 1 > 4 * PyLong_SHIFT) {
                            return (dds_durability_kind_t) ((((((((((dds_durability_kind_t)digits[3]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[2]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[1]) << PyLong_SHIFT) | (dds_durability_kind_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(dds_durability_kind_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(dds_durability_kind_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(dds_durability_kind_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(dds_durability_kind_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            dds_durability_kind_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (dds_durability_kind_t) -1;
        }
    } else {
        dds_durability_kind_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (dds_durability_kind_t) -1;
        val = __Pyx_PyInt_As_dds_durability_kind_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to dds_durability_kind_t");
    return (dds_durability_kind_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to dds_durability_kind_t");
    return (dds_durability_kind_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum dds_history_kind __Pyx_PyInt_As_enum__dds_history_kind(PyObject *x) {
    const enum dds_history_kind neg_one = (enum dds_history_kind) ((enum dds_history_kind) 0 - (enum dds_history_kind) 1), const_zero = (enum dds_history_kind) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(enum dds_history_kind) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum dds_history_kind) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_history_kind) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_history_kind, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum dds_history_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) >= 2 * PyLong_SHIFT) {
                            return (enum dds_history_kind) (((((enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_history_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) >= 3 * PyLong_SHIFT) {
                            return (enum dds_history_kind) (((((((enum dds_history_kind)digits[2]) << PyLong_SHIFT) | (enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_history_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) >= 4 * PyLong_SHIFT) {
                            return (enum dds_history_kind) (((((((((enum dds_history_kind)digits[3]) << PyLong_SHIFT) | (enum dds_history_kind)digits[2]) << PyLong_SHIFT) | (enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum dds_history_kind) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum dds_history_kind) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_history_kind, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_history_kind) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_history_kind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_history_kind) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum dds_history_kind, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_history_kind,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum dds_history_kind) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_history_kind) (((enum dds_history_kind)-1)*(((((enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum dds_history_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_history_kind) ((((((enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum dds_history_kind) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_history_kind) (((enum dds_history_kind)-1)*(((((((enum dds_history_kind)digits[2]) << PyLong_SHIFT) | (enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_history_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_history_kind) ((((((((enum dds_history_kind)digits[2]) << PyLong_SHIFT) | (enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum dds_history_kind) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_history_kind) (((enum dds_history_kind)-1)*(((((((((enum dds_history_kind)digits[3]) << PyLong_SHIFT) | (enum dds_history_kind)digits[2]) << PyLong_SHIFT) | (enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_history_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_history_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_history_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_history_kind) ((((((((((enum dds_history_kind)digits[3]) << PyLong_SHIFT) | (enum dds_history_kind)digits[2]) << PyLong_SHIFT) | (enum dds_history_kind)digits[1]) << PyLong_SHIFT) | (enum dds_history_kind)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum dds_history_kind) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_history_kind, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_history_kind) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_history_kind, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            enum dds_history_kind val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (enum dds_history_kind) -1;
        }
    } else {
        enum dds_history_kind val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum dds_history_kind) -1;
        val = __Pyx_PyInt_As_enum__dds_history_kind(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum dds_history_kind");
    return (enum dds_history_kind) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum dds_history_kind");
    return (enum dds_history_kind) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
    const int32_t neg_one = (int32_t) ((int32_t) 0 - (int32_t) 1), const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 2 * PyLong_SHIFT) {
                            return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 3 * PyLong_SHIFT) {
                            return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 4 * PyLong_SHIFT) {
                            return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int32_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int32_t) -1;
        }
    } else {
        int32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int32_t) -1;
        val = __Pyx_PyInt_As_int32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int32_t");
    return (int32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int32_t");
    return (int32_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum dds_presentation_access_scope_kind __Pyx_PyInt_As_enum__dds_presentation_access_scope_kind(PyObject *x) {
    const enum dds_presentation_access_scope_kind neg_one = (enum dds_presentation_access_scope_kind) ((enum dds_presentation_access_scope_kind) 0 - (enum dds_presentation_access_scope_kind) 1), const_zero = (enum dds_presentation_access_scope_kind) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(enum dds_presentation_access_scope_kind) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum dds_presentation_access_scope_kind) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_presentation_access_scope_kind) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) >= 2 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) (((((enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) >= 3 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) (((((((enum dds_presentation_access_scope_kind)digits[2]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) >= 4 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) (((((((((enum dds_presentation_access_scope_kind)digits[3]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[2]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum dds_presentation_access_scope_kind) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum dds_presentation_access_scope_kind) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_presentation_access_scope_kind, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_presentation_access_scope_kind) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_presentation_access_scope_kind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_presentation_access_scope_kind) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) (((enum dds_presentation_access_scope_kind)-1)*(((((enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) ((((((enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) (((enum dds_presentation_access_scope_kind)-1)*(((((((enum dds_presentation_access_scope_kind)digits[2]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) ((((((((enum dds_presentation_access_scope_kind)digits[2]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) (((enum dds_presentation_access_scope_kind)-1)*(((((((((enum dds_presentation_access_scope_kind)digits[3]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[2]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_presentation_access_scope_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_presentation_access_scope_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_presentation_access_scope_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_presentation_access_scope_kind) ((((((((((enum dds_presentation_access_scope_kind)digits[3]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[2]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[1]) << PyLong_SHIFT) | (enum dds_presentation_access_scope_kind)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum dds_presentation_access_scope_kind) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_presentation_access_scope_kind, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_presentation_access_scope_kind) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_presentation_access_scope_kind, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            enum dds_presentation_access_scope_kind val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (enum dds_presentation_access_scope_kind) -1;
        }
    } else {
        enum dds_presentation_access_scope_kind val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum dds_presentation_access_scope_kind) -1;
        val = __Pyx_PyInt_As_enum__dds_presentation_access_scope_kind(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum dds_presentation_access_scope_kind");
    return (enum dds_presentation_access_scope_kind) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum dds_presentation_access_scope_kind");
    return (enum dds_presentation_access_scope_kind) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
    const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT) {
                            return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT) {
                            return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 4 * PyLong_SHIFT) {
                            return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int64_t) -1;
        }
    } else {
        int64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int64_t) -1;
        val = __Pyx_PyInt_As_int64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int64_t");
    return (int64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int64_t");
    return (int64_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum dds_ownership_kind __Pyx_PyInt_As_enum__dds_ownership_kind(PyObject *x) {
    const enum dds_ownership_kind neg_one = (enum dds_ownership_kind) ((enum dds_ownership_kind) 0 - (enum dds_ownership_kind) 1), const_zero = (enum dds_ownership_kind) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(enum dds_ownership_kind) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum dds_ownership_kind) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_ownership_kind) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum dds_ownership_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) >= 2 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) (((((enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_ownership_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) >= 3 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) (((((((enum dds_ownership_kind)digits[2]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_ownership_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) >= 4 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) (((((((((enum dds_ownership_kind)digits[3]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[2]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum dds_ownership_kind) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum dds_ownership_kind) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_ownership_kind, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_ownership_kind) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_ownership_kind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_ownership_kind) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum dds_ownership_kind) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) (((enum dds_ownership_kind)-1)*(((((enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum dds_ownership_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) ((((((enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum dds_ownership_kind) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) (((enum dds_ownership_kind)-1)*(((((((enum dds_ownership_kind)digits[2]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_ownership_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) ((((((((enum dds_ownership_kind)digits[2]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum dds_ownership_kind) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) (((enum dds_ownership_kind)-1)*(((((((((enum dds_ownership_kind)digits[3]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[2]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_ownership_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_ownership_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_ownership_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_ownership_kind) ((((((((((enum dds_ownership_kind)digits[3]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[2]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[1]) << PyLong_SHIFT) | (enum dds_ownership_kind)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum dds_ownership_kind) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_ownership_kind, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_ownership_kind) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_ownership_kind, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            enum dds_ownership_kind val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (enum dds_ownership_kind) -1;
        }
    } else {
        enum dds_ownership_kind val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum dds_ownership_kind) -1;
        val = __Pyx_PyInt_As_enum__dds_ownership_kind(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum dds_ownership_kind");
    return (enum dds_ownership_kind) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum dds_ownership_kind");
    return (enum dds_ownership_kind) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum dds_liveliness_kind __Pyx_PyInt_As_enum__dds_liveliness_kind(PyObject *x) {
    const enum dds_liveliness_kind neg_one = (enum dds_liveliness_kind) ((enum dds_liveliness_kind) 0 - (enum dds_liveliness_kind) 1), const_zero = (enum dds_liveliness_kind) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(enum dds_liveliness_kind) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum dds_liveliness_kind) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_liveliness_kind) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum dds_liveliness_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) >= 2 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) (((((enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_liveliness_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) >= 3 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) (((((((enum dds_liveliness_kind)digits[2]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_liveliness_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) >= 4 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) (((((((((enum dds_liveliness_kind)digits[3]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[2]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum dds_liveliness_kind) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum dds_liveliness_kind) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_liveliness_kind, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_liveliness_kind) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_liveliness_kind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_liveliness_kind) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum dds_liveliness_kind) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) (((enum dds_liveliness_kind)-1)*(((((enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum dds_liveliness_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) ((((((enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum dds_liveliness_kind) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) (((enum dds_liveliness_kind)-1)*(((((((enum dds_liveliness_kind)digits[2]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_liveliness_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) ((((((((enum dds_liveliness_kind)digits[2]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum dds_liveliness_kind) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) (((enum dds_liveliness_kind)-1)*(((((((((enum dds_liveliness_kind)digits[3]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[2]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_liveliness_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_liveliness_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_liveliness_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_liveliness_kind) ((((((((((enum dds_liveliness_kind)digits[3]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[2]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[1]) << PyLong_SHIFT) | (enum dds_liveliness_kind)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum dds_liveliness_kind) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_liveliness_kind, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_liveliness_kind) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_liveliness_kind, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            enum dds_liveliness_kind val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (enum dds_liveliness_kind) -1;
        }
    } else {
        enum dds_liveliness_kind val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum dds_liveliness_kind) -1;
        val = __Pyx_PyInt_As_enum__dds_liveliness_kind(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum dds_liveliness_kind");
    return (enum dds_liveliness_kind) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum dds_liveliness_kind");
    return (enum dds_liveliness_kind) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum dds_reliability_kind __Pyx_PyInt_As_enum__dds_reliability_kind(PyObject *x) {
    const enum dds_reliability_kind neg_one = (enum dds_reliability_kind) ((enum dds_reliability_kind) 0 - (enum dds_reliability_kind) 1), const_zero = (enum dds_reliability_kind) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(enum dds_reliability_kind) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum dds_reliability_kind) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_reliability_kind) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum dds_reliability_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) >= 2 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) (((((enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_reliability_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) >= 3 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) (((((((enum dds_reliability_kind)digits[2]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_reliability_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) >= 4 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) (((((((((enum dds_reliability_kind)digits[3]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[2]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum dds_reliability_kind) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum dds_reliability_kind) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_reliability_kind, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_reliability_kind) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_reliability_kind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_reliability_kind) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum dds_reliability_kind) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) (((enum dds_reliability_kind)-1)*(((((enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum dds_reliability_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) ((((((enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum dds_reliability_kind) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) (((enum dds_reliability_kind)-1)*(((((((enum dds_reliability_kind)digits[2]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_reliability_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) ((((((((enum dds_reliability_kind)digits[2]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum dds_reliability_kind) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) (((enum dds_reliability_kind)-1)*(((((((((enum dds_reliability_kind)digits[3]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[2]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_reliability_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_reliability_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_reliability_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_reliability_kind) ((((((((((enum dds_reliability_kind)digits[3]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[2]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[1]) << PyLong_SHIFT) | (enum dds_reliability_kind)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum dds_reliability_kind) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_reliability_kind, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_reliability_kind) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_reliability_kind, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            enum dds_reliability_kind val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (enum dds_reliability_kind) -1;
        }
    } else {
        enum dds_reliability_kind val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum dds_reliability_kind) -1;
        val = __Pyx_PyInt_As_enum__dds_reliability_kind(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum dds_reliability_kind");
    return (enum dds_reliability_kind) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum dds_reliability_kind");
    return (enum dds_reliability_kind) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum dds_destination_order_kind __Pyx_PyInt_As_enum__dds_destination_order_kind(PyObject *x) {
    const enum dds_destination_order_kind neg_one = (enum dds_destination_order_kind) ((enum dds_destination_order_kind) 0 - (enum dds_destination_order_kind) 1), const_zero = (enum dds_destination_order_kind) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(enum dds_destination_order_kind) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum dds_destination_order_kind) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_destination_order_kind) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum dds_destination_order_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) >= 2 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) (((((enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_destination_order_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) >= 3 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) (((((((enum dds_destination_order_kind)digits[2]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_destination_order_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) >= 4 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) (((((((((enum dds_destination_order_kind)digits[3]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[2]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (enum dds_destination_order_kind) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum dds_destination_order_kind) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_destination_order_kind, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_destination_order_kind) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_destination_order_kind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (enum dds_destination_order_kind) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum dds_destination_order_kind) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) (((enum dds_destination_order_kind)-1)*(((((enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum dds_destination_order_kind) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) - 1 > 2 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) ((((((enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum dds_destination_order_kind) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) (((enum dds_destination_order_kind)-1)*(((((((enum dds_destination_order_kind)digits[2]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum dds_destination_order_kind) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) - 1 > 3 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) ((((((((enum dds_destination_order_kind)digits[2]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum dds_destination_order_kind) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) (((enum dds_destination_order_kind)-1)*(((((((((enum dds_destination_order_kind)digits[3]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[2]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum dds_destination_order_kind) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum dds_destination_order_kind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum dds_destination_order_kind) - 1 > 4 * PyLong_SHIFT) {
                            return (enum dds_destination_order_kind) ((((((((((enum dds_destination_order_kind)digits[3]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[2]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[1]) << PyLong_SHIFT) | (enum dds_destination_order_kind)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum dds_destination_order_kind) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_destination_order_kind, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum dds_destination_order_kind) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum dds_destination_order_kind, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            enum dds_destination_order_kind val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (enum dds_destination_order_kind) -1;
        }
    } else {
        enum dds_destination_order_kind val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum dds_destination_order_kind) -1;
        val = __Pyx_PyInt_As_enum__dds_destination_order_kind(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum dds_destination_order_kind");
    return (enum dds_destination_order_kind) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum dds_destination_order_kind");
    return (enum dds_destination_order_kind) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint64_t) -1;
        }
    } else {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyInt_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) ((PY_LONG_LONG) 0 - (PY_LONG_LONG) 1), const_zero = (PY_LONG_LONG) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PY_LONG_LONG) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PY_LONG_LONG) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, digits[0])
                case 2:
                    if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (PY_LONG_LONG) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PY_LONG_LONG) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PY_LONG_LONG val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (PY_LONG_LONG) -1;
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
