Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

86 lines
4.4 KiB

  1. ! BSD 2-Clause License
  2. !
  3. ! Copyright (c) 2021-2022, Hewlett Packard Enterprise
  4. ! All rights reserved.
  5. !
  6. ! Redistribution and use in source and binary forms, with or without
  7. ! modification, are permitted provided that the following conditions are met:
  8. !
  9. ! 1. Redistributions of source code must retain the above copyright notice, this
  10. ! list of conditions and the following disclaimer.
  11. !
  12. ! 2. Redistributions in binary form must reproduce the above copyright notice,
  13. ! this list of conditions and the following disclaimer in the documentation
  14. ! and/or other materials provided with the distribution.
  15. !
  16. ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  17. ! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  18. ! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. ! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  20. ! FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  21. ! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  22. ! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  23. ! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  24. ! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  25. ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. interface
  27. function put_dataset_c(client, dataset) bind(C, name="put_dataset")
  28. use iso_c_binding, only : c_ptr
  29. import :: enum_kind
  30. integer(kind=enum_kind) :: put_dataset_c
  31. type(c_ptr), value, intent(in) :: client !< Pointer to the initialized C-client
  32. type(c_ptr), value, intent(in) :: dataset !< Pointer to the dataset
  33. end function put_dataset_c
  34. end interface
  35. interface
  36. function get_dataset_c(client, c_name, name_length, dataset) bind(C, name="get_dataset")
  37. use iso_c_binding, only : c_ptr, c_char, c_size_t
  38. import :: enum_kind
  39. integer(kind=enum_kind) :: get_dataset_c
  40. type(c_ptr), value :: client !< Pointer to the initialized C-client
  41. character(kind=c_char) :: c_name(*) !< Name of the dataset to retrieve from the database
  42. integer(kind=c_size_t), value :: name_length !< Number of characters in the dataset's name
  43. type(c_ptr) :: dataset !< receives the dataset
  44. end function get_dataset_c
  45. end interface
  46. interface
  47. function rename_dataset_c(client, c_name, name_length, c_new_name, new_name_length) &
  48. bind(C, name="rename_dataset")
  49. use iso_c_binding, only : c_ptr, c_char, c_size_t
  50. import :: enum_kind
  51. integer(kind=enum_kind) :: rename_dataset_c
  52. type(c_ptr), value :: client !< Pointer to the initialized C-client
  53. character(kind=c_char) :: c_name(*) !< Original name of the dataset
  54. integer(kind=c_size_t), value :: name_length !< Number of characters in the dataset's name
  55. character(kind=c_char) :: c_new_name(*) !< New name of the dataset to in the database
  56. integer(kind=c_size_t), value :: new_name_length !< Number of characters in the dataset's new name
  57. end function rename_dataset_c
  58. end interface
  59. interface
  60. function copy_dataset_c(client, c_name, name_length, c_new_name, new_name_length) &
  61. bind(C, name="copy_dataset")
  62. use iso_c_binding, only : c_ptr, c_char, c_size_t
  63. import :: enum_kind
  64. integer(kind=enum_kind) :: copy_dataset_c
  65. type(c_ptr), value :: client !< Pointer to the initialized C-client
  66. character(kind=c_char) :: c_name(*) !< Original name of the dataset
  67. integer(kind=c_size_t), value :: name_length !< Number of characters in the dataset's name
  68. character(kind=c_char) :: c_new_name(*) !< New name of the dataset to in the database
  69. integer(kind=c_size_t), value :: new_name_length !< Number of characters in the dataset's new name
  70. end function copy_dataset_c
  71. end interface
  72. interface
  73. function delete_dataset_c(client, c_name, name_length) bind(C, name="delete_dataset")
  74. use iso_c_binding, only : c_ptr, c_char, c_size_t
  75. import :: enum_kind
  76. integer(kind=enum_kind) :: delete_dataset_c
  77. type(c_ptr), value :: client !< Pointer to the initialized C-client
  78. character(kind=c_char) :: c_name(*) !< Name of the dataset to be deleted
  79. integer(kind=c_size_t), value :: name_length !< Number of characters in the dataset's name
  80. end function delete_dataset_c
  81. end interface