open62541.i 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. %module open62541
  2. %{
  3. #include "ua_types.h"
  4. #include "ua_server.h"
  5. %}
  6. #if defined(SWIGPYTHON)
  7. %{
  8. /* avoid no previous prototype warning/error */
  9. #if PY_VERSION_HEX >= 0x03000000
  10. PyObject*
  11. #else
  12. void
  13. #endif
  14. SWIG_init (void);
  15. %}
  16. #endif
  17. #if defined(SWIGLUA)
  18. %{
  19. /* avoid no previous prototype warning/error */
  20. SWIGEXPORT int SWIG_init (lua_State* L);
  21. %}
  22. #endif
  23. %define UA_TYPE_HANDLING_FUNCTIONS_SWIG(TYPE)
  24. TYPE * TYPE##_new(void);
  25. void TYPE##_init(TYPE * p);
  26. void TYPE##_delete(TYPE * p);
  27. void TYPE##_deleteMembers(TYPE * p);
  28. UA_StatusCode TYPE##_copy(const TYPE *src, TYPE *dst);
  29. %enddef
  30. %define UA_EXPORT
  31. %enddef
  32. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Boolean)
  33. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_SByte)
  34. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Byte)
  35. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Int16)
  36. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_UInt16)
  37. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Int32)
  38. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_UInt32)
  39. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Int64)
  40. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_UInt64)
  41. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Float)
  42. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Double)
  43. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_String)
  44. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_DateTime)
  45. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Guid)
  46. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_ByteString)
  47. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_XmlElement)
  48. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_NodeId)
  49. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_ExpandedNodeId)
  50. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_StatusCode)
  51. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_QualifiedName)
  52. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_LocalizedText)
  53. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_ExtensionObject)
  54. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_DataValue)
  55. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_Variant)
  56. UA_TYPE_HANDLING_FUNCTIONS_SWIG(UA_DiagnosticInfo)
  57. %include "ua_types.h"
  58. %include "ua_server.h"