Skip to content

Commit 4b9fa0d

Browse files
PProfizigithub-actions[bot]
authored andcommitted
update generated code
1 parent 85b1451 commit 4b9fa0d

File tree

12 files changed

+323
-27
lines changed

12 files changed

+323
-27
lines changed

src/ansys/dpf/gate/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from .generated import external_operator_capi
2828
from .generated import f_e_model_abstract_api
2929
from .generated import f_e_model_capi
30+
from .generated import fbs_ref_abstract_api
31+
from .generated import fbs_ref_capi
3032
from .generated import field_abstract_api
3133
from .generated import field_capi
3234
from .generated import field_definition_abstract_api

src/ansys/dpf/gate/generated/capi.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5078,4 +5078,35 @@ def load_api(path):
50785078
dll.Workflow_create_connection_map_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
50795079
dll.Workflow_create_connection_map_for_object.restype = ctypes.c_void_p
50805080

5081+
#-------------------------------------------------------------------------------
5082+
# FbsRef
5083+
#-------------------------------------------------------------------------------
5084+
if hasattr(dll, "FbsRef_new"):
5085+
dll.FbsRef_new.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5086+
dll.FbsRef_new.restype = ctypes.c_void_p
5087+
5088+
if hasattr(dll, "FbsRef_getFromDB"):
5089+
dll.FbsRef_getFromDB.argtypes = (ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5090+
dll.FbsRef_getFromDB.restype = ctypes.c_void_p
5091+
5092+
if hasattr(dll, "FbsRef_getID"):
5093+
dll.FbsRef_getID.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5094+
dll.FbsRef_getID.restype = ctypes.c_size_t
5095+
5096+
if hasattr(dll, "Any_getAs_FbsRef"):
5097+
dll.Any_getAs_FbsRef.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5098+
dll.Any_getAs_FbsRef.restype = None
5099+
5100+
if hasattr(dll, "FbsRef_StartOrGetThreadServer"):
5101+
dll.FbsRef_StartOrGetThreadServer.argtypes = (ctypes.c_bool, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5102+
dll.FbsRef_StartOrGetThreadServer.restype = ctypes.c_void_p
5103+
5104+
if hasattr(dll, "FbsRef_new_on_client"):
5105+
dll.FbsRef_new_on_client.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5106+
dll.FbsRef_new_on_client.restype = ctypes.c_void_p
5107+
5108+
if hasattr(dll, "FbsRef_StartOrGetThreadServer_on_client"):
5109+
dll.FbsRef_StartOrGetThreadServer_on_client.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), )
5110+
dll.FbsRef_StartOrGetThreadServer_on_client.restype = ctypes.c_void_p
5111+
50815112

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#-------------------------------------------------------------------------------
2+
# FbsRef
3+
#-------------------------------------------------------------------------------
4+
5+
class FbsRefAbstractAPI:
6+
@staticmethod
7+
def init_fbs_ref_environment(object):
8+
pass
9+
10+
@staticmethod
11+
def finish_fbs_ref_environment(object):
12+
pass
13+
14+
@staticmethod
15+
def fbs_ref_new(client, channel_address, req_slice, req_offset):
16+
raise NotImplementedError
17+
18+
@staticmethod
19+
def fbs_ref_get_from_db(id):
20+
raise NotImplementedError
21+
22+
@staticmethod
23+
def fbs_ref_get_id(obj):
24+
raise NotImplementedError
25+
26+
@staticmethod
27+
def any_get_as_fbs_ref(obj, client, channel_address, req_slice, req_offset):
28+
raise NotImplementedError
29+
30+
@staticmethod
31+
def fbs_ref_start_or_get_thread_server(get_existing, ip, port, address):
32+
raise NotImplementedError
33+
34+
@staticmethod
35+
def fbs_ref_new_on_client(client, channel, channel_address, req_slice, req_offset):
36+
raise NotImplementedError
37+
38+
@staticmethod
39+
def fbs_ref_start_or_get_thread_server_on_client(client, get_existing, ip, port, address):
40+
raise NotImplementedError
41+
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import ctypes
2+
from ansys.dpf.gate import utils
3+
from ansys.dpf.gate import errors
4+
from ansys.dpf.gate.generated import capi
5+
from ansys.dpf.gate.generated import fbs_ref_abstract_api
6+
from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI
7+
8+
#-------------------------------------------------------------------------------
9+
# FbsRef
10+
#-------------------------------------------------------------------------------
11+
12+
class FbsRefCAPI(fbs_ref_abstract_api.FbsRefAbstractAPI):
13+
14+
@staticmethod
15+
def init_fbs_ref_environment(object):
16+
# get core api
17+
DataProcessingCAPI.init_data_processing_environment(object)
18+
object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj)
19+
20+
@staticmethod
21+
def fbs_ref_new(client, channel_address, req_slice, req_offset):
22+
errorSize = ctypes.c_int(0)
23+
sError = ctypes.c_wchar_p()
24+
res = capi.dll.FbsRef_new(client, utils.to_char_ptr(channel_address), req_slice, req_offset, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
25+
if errorSize.value != 0:
26+
raise errors.DPFServerException(sError.value)
27+
return res
28+
29+
@staticmethod
30+
def fbs_ref_get_from_db(id):
31+
errorSize = ctypes.c_int(0)
32+
sError = ctypes.c_wchar_p()
33+
res = capi.dll.FbsRef_getFromDB(id, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
34+
if errorSize.value != 0:
35+
raise errors.DPFServerException(sError.value)
36+
return res
37+
38+
@staticmethod
39+
def fbs_ref_get_id(obj):
40+
errorSize = ctypes.c_int(0)
41+
sError = ctypes.c_wchar_p()
42+
res = capi.dll.FbsRef_getID(obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
43+
if errorSize.value != 0:
44+
raise errors.DPFServerException(sError.value)
45+
return res
46+
47+
@staticmethod
48+
def any_get_as_fbs_ref(obj, client, channel_address, req_slice, req_offset):
49+
errorSize = ctypes.c_int(0)
50+
sError = ctypes.c_wchar_p()
51+
res = capi.dll.Any_getAs_FbsRef(obj._internal_obj if obj is not None else None, client, utils.to_char_ptr(channel_address), req_slice, req_offset, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
52+
if errorSize.value != 0:
53+
raise errors.DPFServerException(sError.value)
54+
return res
55+
56+
@staticmethod
57+
def fbs_ref_start_or_get_thread_server(get_existing, ip, port, address):
58+
errorSize = ctypes.c_int(0)
59+
sError = ctypes.c_wchar_p()
60+
res = capi.dll.FbsRef_StartOrGetThreadServer(get_existing, utils.to_char_ptr(ip), utils.to_int32(port), utils.to_char_ptr(address), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
61+
if errorSize.value != 0:
62+
raise errors.DPFServerException(sError.value)
63+
return res
64+
65+
@staticmethod
66+
def fbs_ref_new_on_client(client, channel, channel_address, req_slice, req_offset):
67+
errorSize = ctypes.c_int(0)
68+
sError = ctypes.c_wchar_p()
69+
res = capi.dll.FbsRef_new_on_client(client._internal_obj if client is not None else None, channel, utils.to_char_ptr(channel_address), req_slice, req_offset, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
70+
if errorSize.value != 0:
71+
raise errors.DPFServerException(sError.value)
72+
return res
73+
74+
@staticmethod
75+
def fbs_ref_start_or_get_thread_server_on_client(client, get_existing, ip, port, address):
76+
errorSize = ctypes.c_int(0)
77+
sError = ctypes.c_wchar_p()
78+
res = capi.dll.FbsRef_StartOrGetThreadServer_on_client(client._internal_obj if client is not None else None, get_existing, utils.to_char_ptr(ip), utils.to_int32(port), utils.to_char_ptr(address), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
79+
if errorSize.value != 0:
80+
raise errors.DPFServerException(sError.value)
81+
return res
82+
203 KB
Binary file not shown.
6.5 KB
Binary file not shown.
257 KB
Binary file not shown.
13.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)