diff --git a/.ci/build_doc.bat b/.ci/build_doc.bat index 2f659b0fde..149a9890d0 100644 --- a/.ci/build_doc.bat +++ b/.ci/build_doc.bat @@ -4,7 +4,8 @@ call sphinx-apidoc -o ../docs/source/api ../src/ansys ../src/ansys/dpf/core/log. ../src/ansys/dpf/core/field_base.py ../src/ansys/dpf/core/cache.py ../src/ansys/dpf/core/misc.py ^ ../src/ansys/dpf/core/check_version.py ../src/ansys/dpf/core/operators/build.py ../src/ansys/dpf/core/operators/specification.py ^ ../src/ansys/dpf/core/vtk_helper.py ../src/ansys/dpf/core/label_space.py ../src/ansys/dpf/core/examples/python_plugins/* ^ -../src/ansys/dpf/core/examples/examples.py ../src/ansys/dpf/core/property_fields_container.py ^ +../src/ansys/dpf/core/examples/examples.py ../src/ansys/dpf/gate/* ../src/ansys/dpf/gatebin/* ../src/ansys/grpc/dpf/* ^ + ../src/ansys/dpf/core/property_fields_container.py ^ -f --implicit-namespaces --separate --no-headings pushd . cd ../docs/ @@ -15,14 +16,14 @@ dir rem Patch pyVista issue with elemental plots -xcopy source\examples\04-advanced\02-volume_averaged_stress\sphx_glr_02-volume_averaged_stress_001.png build\html\_images\sphx_glr_02-volume_averaged_stress_001.png /y -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_001.png build\html\_images\sphx_glr_02-fluids_results_001.png /y -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_002.png build\html\_images\sphx_glr_02-fluids_results_002.png /y -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_003.png build\html\_images\sphx_glr_02-fluids_results_003.png /y -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_004.png build\html\_images\sphx_glr_02-fluids_results_004.png /y -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_005.png build\html\_images\sphx_glr_02-fluids_results_005.png /y -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_006.png build\html\_images\sphx_glr_02-fluids_results_006.png /y -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_007.png build\html\_images\sphx_glr_02-fluids_results_007.png /y -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_thumb.png build\html\_images\sphx_glr_02-fluids_results_thumb.png /y +xcopy source\examples\04-advanced\02-volume_averaged_stress\sphx_glr_02-volume_averaged_stress_001.png build\html\_images /y /f /i +xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_001.png build\html\_images /y /f /i +xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_002.png build\html\_images /y /f /i +xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_003.png build\html\_images /y /f /i +xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_004.png build\html\_images /y /f /i +xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_005.png build\html\_images /y /f /i +xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_006.png build\html\_images /y /f /i +xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_007.png build\html\_images /y /f /i +xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_thumb.png build\html\_images /y /f /i popd diff --git a/.ci/update_dpf_dependencies.py b/.ci/update_dpf_dependencies.py new file mode 100644 index 0000000000..389048074a --- /dev/null +++ b/.ci/update_dpf_dependencies.py @@ -0,0 +1,82 @@ +"""Script to update ansys-dpf-gate, ansys-dpf-gatebin and ansys-grpc-dpf based on repositories + +This script should only be used to quickly test changes to any of these dependencies. +Actual commit of updated code should not occur. +The GitHub pipelines take care of the actual update in ansys-dpf-core. + +Define environment variables to know where to get the code from: +- "DPFDV_ROOT" defines the DPF repo where ansys-grpc-dpf resides. + Will unzip the latest wheel built in DPF/proto/dist/. +- "ANSYSDPFPYGATE_ROOT" defines where the ansys-dpf-pygate repository resides. + +It will update the current repo +or the repo defined by the environment variable "ANSYSDPFCORE_ROOT" if it exists. +""" +import os +import glob +import pathlib +import platform +import shutil +import zipfile + + +grpc_path_key = "DPFDV_ROOT" +gate_path_key = "ANSYSDPFPYGATE_ROOT" +core_path = pathlib.Path(__file__).parent.parent.resolve() +if "ANSYSDPFCORE_ROOT" in os.environ: + core_path = os.environ["ANSYSDPFCORE_ROOT"] + +grpc_path = os.getenv(grpc_path_key, None) +gate_path = os.getenv(gate_path_key, None) + +if grpc_path is not None: + # Update ansys-grpc-dpf with latest in proto/dist + print("Updating ansys.grpc.dpf") + dist_path = os.path.join(grpc_path, "proto", "dist", "*") + print(f"from {dist_path}") + destination = os.path.join(core_path, "src") + print(f"into {destination}") + latest_wheel = max(glob.glob(dist_path), key=os.path.getctime) + with zipfile.ZipFile(latest_wheel, 'r') as wheel: + for file in wheel.namelist(): + # print(file) + if file.startswith('ansys/'): + wheel.extract( + file, + path=destination, + ) + print("Done updating ansys-grpc-dpf") +else: + print(f"{grpc_path_key} environment variable is not defined. " + "Cannot update ansys-grpc-dpf.") + +if gate_path is not None: + # Update ansys-dpf-gate + print("Updating ansys.dpf.gate") + dist_path = os.path.join(gate_path, "ansys-dpf-gate", "ansys") + print(f"from {dist_path}") + destination = os.path.join(core_path, "src", "ansys") + print(f"into {destination}") + shutil.copytree( + src=dist_path, + dst=destination, + dirs_exist_ok=True, + ignore=lambda directory, contents: ["__pycache__"] if directory[-5:] == "gate" else [], + ) + print("Done updating ansys-dpf-gate") + + # Update ansys-dpf-gatebin + print("Updating ansys.dpf.gatebin") + dist_path = os.path.join(gate_path, "ansys-dpf-gatebin", "ansys") + print(f"from {dist_path}") + destination = os.path.join(core_path, "src", "ansys") + print(f"into {destination}") + shutil.copytree( + src=dist_path, + dst=destination, + dirs_exist_ok=True, + ) + print(f"Done updating ansys-dpf-gatebin for {platform.system()}") +else: + print(f"{gate_path_key} environment variable is not defined. " + "Cannot update ansys-dpf-gate or ansys-dpf-gatebin.") diff --git a/.flake8 b/.flake8 index 6ebe24b33d..17e85525f0 100644 --- a/.flake8 +++ b/.flake8 @@ -1,7 +1,8 @@ [flake8] -exclude = venv, src/ansys/dpf/core/operators, __init__.py, docs/build, .venv +exclude = venv, src/ansys/dpf/core/operators, __init__.py, docs/build, .venv, src/ansys/dpf/gate, src/ansys/dpf/gatebin, src/ansys/grpc/dpf select = W191, W391, E115, E117, E122, E124, E125, E301, W291, W293, E225, E231, E303, E501, F401, F403 -per-file-ignores = __init__.py:F401,F403 +per-file-ignores = + __init__.py:F401,F403 count = True max-complexity = 10 max-line-length = 100 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d040b21fff..575111be6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,21 +14,6 @@ on: description: 'Suffix of the branch on standalone' required: false default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: 'requirements/requirements_dev.txt' - custom-wheels: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: './dpf-standalone/v241/dist' - custom-wheels-docker: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: './dpf-standalone/dist' concurrency: @@ -73,8 +58,6 @@ jobs: wheel: true wheelhouse: false standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} - custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} secrets: inherit docker_tests: @@ -83,8 +66,6 @@ jobs: with: ANSYS_VERSION: "241" standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} - custom-wheels: ${{ github.event.inputs.custom-wheels-docker || './dpf-standalone/dist' }} secrets: inherit docker_examples: @@ -94,8 +75,6 @@ jobs: ANSYS_VERSION: "241" python_versions: '["3.8"]' standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} - custom-wheels: ${{ github.event.inputs.custom-wheels-docker || './dpf-standalone/dist' }} secrets: inherit docs: @@ -104,8 +83,6 @@ jobs: with: ANSYS_VERSION: "241" standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} - custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} event_name: ${{ github.event_name }} secrets: inherit @@ -129,8 +106,6 @@ jobs: ANSYS_VERSION: "241" python_versions: '["3.8"]' standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} - custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} secrets: inherit retro_232: @@ -142,7 +117,6 @@ jobs: python_versions: '["3.8"]' DOCSTRING: false standalone_suffix: '' - custom-wheels: './dpf-standalone/v232/dist --pre' secrets: inherit retro_231: @@ -153,7 +127,6 @@ jobs: ANSYS_VERSION: "231" python_versions: '["3.8"]' DOCSTRING: false - custom-wheels: './.github' secrets: inherit retro_222: @@ -164,18 +137,6 @@ jobs: ANSYS_VERSION: "222" python_versions: '["3.8"]' DOCSTRING: false - custom-wheels: './.github' - secrets: inherit - - retro_221: - name: "retro 221" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "221" - python_versions: '["3.8"]' - DOCSTRING: false - custom-wheels: './.github' secrets: inherit pydpf-post: @@ -186,7 +147,5 @@ jobs: ANSYS_VERSION: "241" post_branch: "master" standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} - custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} test_docstrings: "true" secrets: inherit diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 829a82a7f0..18ce9a69ea 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -107,15 +107,6 @@ jobs: DOCSTRING: false secrets: inherit - retro_221: - name: "retro 221" - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "221" - python_versions: '["3.8"]' - DOCSTRING: false - secrets: inherit - pydpf-post_241: name: "PyDPF-Post with 241" uses: ./.github/workflows/pydpf-post.yml @@ -146,13 +137,6 @@ jobs: ANSYS_VERSION: "222" secrets: inherit - pydpf-post_221: - name: "PyDPF-Post with 221" - uses: ./.github/workflows/pydpf-post.yml - with: - ANSYS_VERSION: "221" - secrets: inherit - gate: name: "gate" uses: ./.github/workflows/gate.yml @@ -182,7 +166,7 @@ jobs: draft_release: name: "Draft Release" if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - needs: [style, tests, docs, examples, retro_232, retro_231, retro_222, retro_221, gate, docker_tests] + needs: [style, tests, docs, examples, retro_232, retro_231, retro_222, gate, docker_tests] runs-on: ubuntu-latest steps: - name: "Download artifacts" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a4521950df..81a5e2da0e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,16 +17,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip '--find-links XXX' argument to find custom dpf wheels" - required: false - type: string - default: '' event_name: description: "Name of event calling" required: true @@ -50,16 +40,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: '' env: PACKAGE_NAME: ansys-dpf-core @@ -103,9 +83,7 @@ jobs: install_extras: plotting wheel: false wheelhouse: false - extra-pip-args: ${{ inputs.custom-wheels && format('--find-links {0}', inputs.custom-wheels) || '' }} standalone_suffix: ${{ inputs.standalone_suffix }} - custom-requirements: ${{ inputs.custom-requirements }} - name: "Setup headless display" uses: pyvista/setup-headless-display-action@v1 diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 672ad78274..09ef1825a0 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -17,16 +17,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: '' # Can be called manually workflow_dispatch: inputs: @@ -45,16 +35,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: '' env: PACKAGE_NAME: ansys-dpf-core @@ -107,9 +87,7 @@ jobs: install_extras: plotting wheelhouse: false wheel: false - extra-pip-args: ${{ inputs.custom-wheels && format('--find-links {0}', inputs.custom-wheels) || '' }} standalone_suffix: ${{ inputs.standalone_suffix }} - custom-requirements: ${{ inputs.custom-requirements }} - name: "Prepare Testing Environment" uses: ansys/pydpf-actions/prepare_tests@v2.3 diff --git a/.github/workflows/examples_docker.yml b/.github/workflows/examples_docker.yml index 92a17c29b4..ee409e11de 100644 --- a/.github/workflows/examples_docker.yml +++ b/.github/workflows/examples_docker.yml @@ -17,16 +17,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip '--find-links XXX' argument to find custom dpf wheels" - required: false - type: string - default: '' # Can be called manually workflow_dispatch: inputs: @@ -45,16 +35,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip '--find-links XXX' argument to find custom dpf wheels" - required: false - type: string - default: '' env: PACKAGE_NAME: ansys-dpf-core @@ -103,9 +83,7 @@ jobs: install_extras: plotting wheel: false wheelhouse: false - extra-pip-args: ${{ inputs.custom-wheels && format('--find-links {0}', inputs.custom-wheels) || '' }} standalone_suffix: ${{ inputs.standalone_suffix }} - custom-requirements: ${{ inputs.custom-requirements }} - name: "Prepare Testing Environment" uses: ansys/pydpf-actions/prepare_tests@v2.3 diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 8f0a91ba6e..809a406dc3 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -87,9 +87,7 @@ jobs: install_extras: plotting wheelhouse: false wheel: false - extra-pip-args: ${{ format('--find-links ./dpf-standalone/v{0}/dist', inputs.ANSYS_VERSION) }} standalone_suffix: ${{ inputs.standalone_suffix }} - custom-requirements: ${{ inputs.custom-requirements }} - name: "Prepare Testing Environment" uses: ansys/pydpf-actions/prepare_tests@v2.3 diff --git a/.github/workflows/pydpf-post.yml b/.github/workflows/pydpf-post.yml index e712d7915d..0c71485723 100644 --- a/.github/workflows/pydpf-post.yml +++ b/.github/workflows/pydpf-post.yml @@ -16,16 +16,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: '' test_docstrings: description: "whether to run doctest" required: false @@ -48,16 +38,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: '' test_docstrings: description: "whether to run doctest" required: false @@ -104,16 +84,7 @@ jobs: install_extras: plotting wheel: false wheelhouse: false - extra-pip-args: ${{ inputs.custom-wheels && format('--find-links {0}', inputs.custom-wheels) || '' }} standalone_suffix: ${{ inputs.standalone_suffix }} - custom-requirements: ${{ inputs.custom-requirements }} - - - name: "Install ansys-grpc-dpf==0.4.0" - if: inputs.ANSYS_VERSION == 221 - shell: bash - run: | - pip install ansys-grpc-dpf==0.4.0 - pip install protobuf==3.20.* - name: "Clone PyDPF-Post" shell: bash diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 99cb020a0a..09249744c0 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -13,16 +13,6 @@ on: required: false type: string default: "241" - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip '--find-links XXX' argument to find custom dpf wheels" - required: false - type: string - default: '' # Can be called manually workflow_dispatch: inputs: @@ -36,16 +26,6 @@ on: required: true type: string default: "241" - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip '--find-links XXX' argument to find custom dpf wheels" - required: false - type: string - default: '' env: PACKAGE_NAME: ansys-dpf-core @@ -76,9 +56,7 @@ jobs: install_extras: plotting wheel: false wheelhouse: false - extra-pip-args: ${{ inputs.custom-wheels && format('--find-links {0}', inputs.custom-wheels) || '' }} standalone_suffix: ${{ inputs.standalone_suffix }} - custom-requirements: ${{ inputs.custom-requirements }} - name: "Prepare Testing Environment" uses: ansys/pydpf-actions/prepare_tests@v2.3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d0bfdc0c4d..57e9f056c0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,16 +29,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: '' # Can be called manually workflow_dispatch: inputs: @@ -72,16 +62,6 @@ on: required: false type: string default: '' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: '' - custom-wheels: - description: "extra pip --find-links argument to find custom dpf wheels" - required: false - type: string - default: '' env: PACKAGE_NAME: ansys-dpf-core @@ -129,15 +109,7 @@ jobs: install_extras: plotting wheel: ${{ inputs.wheel }} wheelhouse: ${{ inputs.wheelhouse }} - extra-pip-args: ${{ inputs.custom-wheels && format('--find-links {0}', inputs.custom-wheels) || '' }} standalone_suffix: ${{ inputs.standalone_suffix }} - custom-requirements: ${{ inputs.custom-requirements }} - - - name: "Install ansys-grpc-dpf==0.4.0" - if: inputs.ANSYS_VERSION == 221 - shell: pwsh - run: | - pip install ansys-grpc-dpf==0.4.0 - name: "Prepare Testing Environment" uses: ansys/pydpf-actions/prepare_tests@v2.3 diff --git a/.github/workflows/update_operators.yml b/.github/workflows/update_operators.yml index ef826b396e..c204057104 100644 --- a/.github/workflows/update_operators.yml +++ b/.github/workflows/update_operators.yml @@ -1,4 +1,4 @@ -name: update_operators +name: Update generated code on: # Can be called manually or remotely @@ -14,16 +14,6 @@ on: required: false type: string default: '' - extra-pip-args: - description: "Args given to pip install command" - required: false - type: string - default: './dpf-standalone/v241/dist' - custom-requirements: - description: "Path to requirements.txt file to install" - required: false - type: string - default: 'requirements/requirements_dev.txt' env: PACKAGE_NAME: ansys-dpf-core @@ -32,8 +22,8 @@ env: ANSYS_DPF_ACCEPT_LA: Y jobs: - update_operators: - name: "Update operators" + update_generated: + name: "Update Generated Code" runs-on: windows-latest steps: @@ -52,12 +42,43 @@ jobs: standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} ANSYS_VERSION : ${{ github.event.inputs.ANSYS_VERSION || '241' }} - - name: "Install custom requirements" - uses: ansys/pydpf-actions/install-custom-requirements@v2.3 - if: inputs.custom-requirements != '' - with: - extra-pip-args: ${{ inputs.extra-pip-args && format('--find-links {0}', inputs.extra-pip-args) }} - custom-requirements: ${{ inputs.custom-requirements }} + - name: "Update ansys-grpc-dpf" + shell: bash + run: | + wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_grpc_dpf-*" -type f) + echo $wheel_file + rm -r src/ansys/grpc + unzip -o $wheel_file "ansys/**/*" -d src/ + chmod -R 777 src/ansys/grpc + git add -f src/ansys/grpc + + - name: "Update ansys-dpf-gate" + shell: bash + run: | + wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_dpf_gate-*" -type f) + echo $wheel_file + rm -r src/ansys/dpf/gate + unzip -o $wheel_file "ansys/**/*" -d src/ + chmod -R 777 src/ansys/dpf/gate + git add -f src/ansys/dpf/gate + + - name: "Update ansys-dpf-gatebin lin" + shell: bash + run: | + wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_dpf_gatebin-*linux1*" -type f) + echo $wheel_file + rm -r src/ansys/dpf/gatebin + unzip -o $wheel_file "ansys/**/*" -d src/ + chmod -R 777 src/ansys/dpf/gatebin + + - name: "Update ansys-dpf-gatebin win" + shell: bash + run: | + wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_dpf_gatebin-*win*" -type f) + echo $wheel_file + unzip -o $wheel_file "ansys/**/*" -d src/ + chmod -R 777 src/ansys/dpf/gatebin + git add -f src/ansys/dpf/gatebin - name: "Install local package as editable" shell: bash @@ -96,12 +117,15 @@ jobs: with: delete-branch: true add-paths: | + src/ansys/dpf/gate/* + src/ansys/dpf/gatebin/* + src/ansys/grpc/* src/ansys/dpf/core/operators/* docs/source/_static/dpf_operators.html - commit-message: update operators - title: Update Operators for DPF ${{ github.event.inputs.ANSYS_VERSION || '241' }}${{ github.event.inputs.standalone_branch_suffix || '' }} on ${{ github.ref_name }} - body: An update of operators has been triggered either manually or by an update in the dpf-standalone repository. - branch: maint/update_operators_for_${{ github.event.inputs.ANSYS_VERSION || '241' }}${{ github.event.inputs.standalone_branch_suffix || '' }}_on_${{ github.ref_name }} + commit-message: update generated code + title: Update generated code for DPF ${{ github.event.inputs.ANSYS_VERSION || '241' }}${{ github.event.inputs.standalone_branch_suffix || '' }} on ${{ github.ref_name }} + body: An update of generated code has been triggered either manually or by an update in the dpf-standalone repository. + branch: maint/update_code_for_${{ github.event.inputs.ANSYS_VERSION || '241' }}${{ github.event.inputs.standalone_branch_suffix || '' }}_on_${{ github.ref_name }} labels: maintenance - name: "Kill all servers" diff --git a/.gitignore b/.gitignore index 716bdb15a0..24ff3b7fd6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,6 @@ __pycache__/ *.py[cod] *$py.class -# C extensions -*.so - # Distribution / packaging .Python build/ @@ -186,4 +183,12 @@ dpf-standalone/ # to be deleted -search/ \ No newline at end of file +search/ + +# ansys-dpf-gate, ansys-grpc-dpf and ansys-dpg-gatebin +src/ansys/dpf/core/gate/ +src/ansys/dpf/core/gatebin/ +src/ansys/dpf/core/grpc/ + +# C extensions +*.so diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a49c65b00..cad541b0d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,10 @@ exclude: | src/ansys/dpf/core/operators/| examples_notebooks/| src/ansys/dpf/core/__init__.py| - docs/styles/ + docs/styles/| + src/ansys/dpf/gate/| + src/ansys/dpf/gatebin/| + src/ansys/grpc/dpf/| ) repos: diff --git a/codacy.yml b/codacy.yml index 12a49e1bf0..ea272b5424 100644 --- a/codacy.yml +++ b/codacy.yml @@ -1,4 +1,7 @@ --- exclude_paths: - - "./src/ansys/dpf/core/operators/**/*" - "./ci/**/*" + - "./src/ansys/dpf/core/operators/**/*" + - "./src/ansys/dpf/gate/**/*" + - "./src/ansys/dpf/gatebin/**/*" + - "./src/ansys/grpc/dpf/**/*" \ No newline at end of file diff --git a/codecov.yml b/codecov.yml index 35c5e9f9fe..d8a9d1785e 100644 --- a/codecov.yml +++ b/codecov.yml @@ -18,4 +18,7 @@ coverage: - "docs" # ignore folder and all its contents - "docker" # ignore folder and all its contents - "tests" # ignore folder and all its contents - - "src/ansys/dpf/core/operators" # ignore folder and all its contents \ No newline at end of file + - "src/ansys/dpf/core/operators" # ignore folder and all its contents + - "src/ansys/dpf/gate" # ignore folder and all its contents + - "src/ansys/dpf/gatebin" # ignore folder and all its contents + - "src/ansys/grpc/dpf" # ignore folder and all its contents \ No newline at end of file diff --git a/docs/source/_static/dpf_operators.html b/docs/source/_static/dpf_operators.html index 6980c0cb70..9d48736c89 100644 --- a/docs/source/_static/dpf_operators.html +++ b/docs/source/_static/dpf_operators.html @@ -2070,7 +2070,7 @@

Configurating operators

0 0 0 0 0 0 0 0 0 -">

Example of workflows and their scripts

math: imaginary part

Inputs

Outputs

Configurations

Scripting

math: amplitude (fields container)

Inputs

Outputs

Configurations

Scripting

metadata: mesh support provider

Inputs

Outputs

Configurations

Scripting

result: beam axial stress (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: unit convert (fields container)

Inputs

Outputs

Configurations

Scripting

math: norm (fields container)

Inputs

Outputs

Configurations

Scripting

math: sqrt (fields container)

Inputs

Outputs

Configurations

Scripting

mapping: prepare mapping workflow

Inputs

Outputs

Configurations

Scripting

math: conjugate

Inputs

Outputs

Configurations

Scripting

utility: html doc

Inputs

Outputs

Configurations

Scripting

math: real part

Inputs

Outputs

Configurations

Scripting

result: current density

Inputs

Outputs

Configurations

Scripting

math: multiply (complex fields)

Inputs

Outputs

Configurations

Scripting

utility: merge result infos

Inputs

Outputs

Configurations

Scripting

result: cyclic kinetic energy

Inputs

Outputs

Configurations

Scripting

result: global total mass (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: unit convert

Inputs

Outputs

Configurations

Scripting

math: sqrt (field)

Inputs

Outputs

Configurations

Scripting

utility: make label space

Inputs

Outputs

Configurations

Scripting

math: norm (field)

Inputs

Outputs

Configurations

Scripting

math: accumulate min over label

Inputs

Outputs

Configurations

Scripting

result: y plus (y+)

Inputs

Outputs

Configurations

Scripting

math: +

Inputs

Outputs

Configurations

Scripting

min_max: min max over time

Inputs

Outputs

Configurations

Scripting

math: time freq interpolation

Inputs

Outputs

Configurations

Scripting

math: + (fields container)

Inputs

Outputs

Configurations

Scripting

math: sin (fields container)

Inputs

Outputs

Configurations

Scripting

math: + constant (field)

Inputs

Outputs

Configurations

Scripting

result: tangential contact force

Inputs

Outputs

Configurations

Scripting

math: / (component-wise field)

Inputs

Outputs

Configurations

Scripting

result: normal contact force

Inputs

Outputs

Configurations

Scripting

math: + constant (fields container)

Inputs

Outputs

Configurations

Scripting

utility: make for each range

Inputs

Outputs

Configurations

Scripting

math: cross product (fields container)

Inputs

Outputs

Configurations

Scripting

result: cyclic strain energy

Inputs

Outputs

Configurations

Scripting

invariant: scalar invariants (fields container)

Inputs

Outputs

Configurations

Scripting

result: plastic strain principal 1

Inputs

Outputs

Configurations

Scripting

math: -

Inputs

Outputs

Configurations

Scripting

math: total sum

Inputs

Outputs

Configurations

Scripting

math: - (fields container)

Inputs

Outputs

Configurations

Scripting

scoping: intersect scopings

Inputs

Outputs

Configurations

Scripting

math: ^ (field)

Inputs

Outputs

Configurations

Scripting

math: scale (field)

Inputs

Outputs

Configurations

Scripting

result: enthalpy

Inputs

Outputs

Configurations

Scripting

math: ^ (fields container)

Inputs

Outputs

Configurations

Scripting

result: global eroded internal energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: scale (fields container)

Inputs

Outputs

Configurations

Scripting

math: sweeping phase

Inputs

Outputs

Configurations

Scripting

math: centroid

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (field)

Inputs

Outputs

Configurations

Scripting

math: sweeping phase (fields container)

Inputs

Outputs

Configurations

Scripting

math: centroid (fields container)

Inputs

Outputs

Configurations

Scripting

math: ^2 (field)

Inputs

Outputs

Configurations

Scripting

utility: remove unnecessary labels

Inputs

Outputs

Configurations

Scripting

result: velocity Z

Inputs

Outputs

Configurations

Scripting

math: sin (field)

Inputs

Outputs

Configurations

Scripting

math: cos (field)

Inputs

Outputs

Configurations

Scripting

math: cos (fields container)

Inputs

Outputs

Configurations

Scripting

logic: ascending sort

Inputs

Outputs

Configurations

Scripting

result: initial coordinates (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: convert to fields container

Inputs

Outputs

Configurations

Scripting

math: linear combination

Inputs

Outputs

Configurations

Scripting

math: ^2 (fields container)

Inputs

Outputs

Configurations

Scripting

result: mean static pressure

Inputs

Outputs

Configurations

Scripting

math: exp (field)

Inputs

Outputs

Configurations

Scripting

math: exp (fields container)

Inputs

Outputs

Configurations

Scripting

result: num surface status changes

Inputs

Outputs

Configurations

Scripting

math: ln (field)

Inputs

Outputs

Configurations

Scripting

utility: incremental property field

Inputs

Outputs

Configurations

Scripting

mesh: mesh to pyvista

Inputs

Outputs

Configurations

Scripting

math: ln (fields container)

Inputs

Outputs

Configurations

Scripting

invariant: scalar invariants (field)

Inputs

Outputs

Configurations

Scripting

math: cross product

Inputs

Outputs

Configurations

Scripting

filter: high pass (timefreq)

Inputs

Outputs

Configurations

Scripting

math: / (component-wise fields container)

Inputs

Outputs

Configurations

Scripting

result: global sliding interface energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: kronecker product

Inputs

Outputs

Configurations

Scripting

math: modulus (fields container)

Inputs

Outputs

Configurations

Scripting

result: joint relative angular velocity

Inputs

Outputs

Configurations

Scripting

math: dot (complex fields)

Inputs

Outputs

Configurations

Scripting

math: / (complex fields)

Inputs

Outputs

Configurations

Scripting

utility: server path

Inputs

Outputs

Configurations

Scripting

result: beam axial force (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: derivate (complex fields)

Inputs

Outputs

Configurations

Scripting

math: polar to complex fields

Inputs

Outputs

Configurations

Scripting

utility: merge data tree

Inputs

Outputs

Configurations

Scripting

math: dot (fields container)

Inputs

Outputs

Configurations

Scripting

math: phase (field)

Inputs

Outputs

Configurations

Scripting

result: nodal moment

Inputs

Outputs

Configurations

Scripting

math: phase (fields container)

Inputs

Outputs

Configurations

Scripting

math: modulus (field)

Inputs

Outputs

Configurations

Scripting

result: elemental mass

Inputs

Outputs

Configurations

Scripting

result: heat flux

Inputs

Outputs

Configurations

Scripting

math: total sum (fields container)

Inputs

Outputs

Configurations

Scripting

result: co-energy

Inputs

Outputs

Configurations

Scripting

math: dot

Inputs

Outputs

Configurations

Scripting

min_max: max over phase

Inputs

Outputs

Configurations

Scripting

math: outer product

Inputs

Outputs

Configurations

Scripting

math: overall dot

Inputs

Outputs

Configurations

Scripting

math: cross product

Inputs

Outputs

Configurations

Scripting

result: velocity Y

Inputs

Outputs

Configurations

Scripting

result: global velocity (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: superficial velocity

Inputs

Outputs

Configurations

Scripting

math: absolute value by component (field)

Inputs

Outputs

Configurations

Scripting

result: incremental energy

Inputs

Outputs

Configurations

Scripting

result: thermal strain

Inputs

Outputs

Configurations

Scripting

result: stiffness matrix energy

Inputs

Outputs

Configurations

Scripting

math: absolute value by component (fields container)

Inputs

Outputs

Configurations

Scripting

logic: component selector (fields container)

Inputs

Outputs

Configurations

Scripting

logic: component selector (field)

Inputs

Outputs

Configurations

Scripting

scoping: on property

Inputs

Outputs

Configurations

Scripting

logic: component transformer (field)

Inputs

Outputs

Configurations

Scripting

logic: same property fields?

Inputs

Outputs

Configurations

Scripting

logic: component transformer (fields container)

Inputs

Outputs

Configurations

Scripting

min_max: over field

Inputs

Outputs

Configurations

Scripting

result: transient rayleigh integration

Inputs

Outputs

Configurations

Scripting

result: rms velocity

Inputs

Outputs

Configurations

Scripting

logic: entity selector (fields container)

Inputs

Outputs

Configurations

Scripting

result: poynting vector

Inputs

Outputs

Configurations

Scripting

result: acceleration X

Inputs

Outputs

Configurations

Scripting

logic: entity selector (field)

Inputs

Outputs

Configurations

Scripting

utility: change location

Inputs

Outputs

Configurations

Scripting

utility: extract field

Inputs

Outputs

Configurations

Scripting

mesh: node coordinates

Inputs

Outputs

Configurations

Scripting

utility: bind support

Inputs

Outputs

Configurations

Scripting

mesh: stl export

Inputs

Outputs

Configurations

Scripting

utility: convert to field

Inputs

Outputs

Configurations

Scripting

result: beam axial total strain (LSDyna)

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (timefreq)

Inputs

Outputs

Configurations

Scripting

utility: convert to scoping

Inputs

Outputs

Configurations

Scripting

utility: set property

Inputs

Outputs

Configurations

Scripting

utility: forward field

Inputs

Outputs

Configurations

Scripting

utility: incremental mesh

Inputs

Outputs

Configurations

Scripting

mesh: points from coordinates

Inputs

Outputs

Configurations

Scripting

utility: forward fields container

Inputs

Outputs

Configurations

Scripting

result: electric flux density

Inputs

Outputs

Configurations

Scripting

geo: integrate over elements

Inputs

Outputs

Configurations

Scripting

result: plastic strain principal 2

Inputs

Outputs

Configurations

Scripting

utility: forward meshes container

Inputs

Outputs

Configurations

Scripting

result: compute total strain X

Example of workflows and their scripts

math: imaginary part

Inputs

Outputs

Configurations

Scripting

math: amplitude (fields container)

Inputs

Outputs

Configurations

Scripting

metadata: mesh support provider

Inputs

Outputs

Configurations

Scripting

result: beam axial stress (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: unit convert (fields container)

Inputs

Outputs

Configurations

Scripting

math: norm (fields container)

Inputs

Outputs

Configurations

Scripting

math: sqrt (fields container)

Inputs

Outputs

Configurations

Scripting

mapping: prepare mapping workflow

Inputs

Outputs

Configurations

Scripting

math: conjugate

Inputs

Outputs

Configurations

Scripting

utility: html doc

Inputs

Outputs

Configurations

Scripting

math: real part

Inputs

Outputs

Configurations

Scripting

result: current density

Inputs

Outputs

Configurations

Scripting

math: multiply (complex fields)

Inputs

Outputs

Configurations

Scripting

utility: merge result infos

Inputs

Outputs

Configurations

Scripting

result: cyclic kinetic energy

Inputs

Outputs

Configurations

Scripting

result: global total mass (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: unit convert

Inputs

Outputs

Configurations

Scripting

math: sqrt (field)

Inputs

Outputs

Configurations

Scripting

utility: make label space

Inputs

Outputs

Configurations

Scripting

math: norm (field)

Inputs

Outputs

Configurations

Scripting

math: accumulate min over label

Inputs

Outputs

Configurations

Scripting

result: y plus (y+)

Inputs

Outputs

Configurations

Scripting

math: +

Inputs

Outputs

Configurations

Scripting

min_max: min max over time

Inputs

Outputs

Configurations

Scripting

math: time freq interpolation

Inputs

Outputs

Configurations

Scripting

math: + (fields container)

Inputs

Outputs

Configurations

Scripting

math: sin (fields container)

Inputs

Outputs

Configurations

Scripting

math: + constant (field)

Inputs

Outputs

Configurations

Scripting

result: tangential contact force

Inputs

Outputs

Configurations

Scripting

math: / (component-wise field)

Inputs

Outputs

Configurations

Scripting

result: normal contact force

Inputs

Outputs

Configurations

Scripting

math: + constant (fields container)

Inputs

Outputs

Configurations

Scripting

utility: make for each range

Inputs

Outputs

Configurations

Scripting

math: cross product (fields container)

Inputs

Outputs

Configurations

Scripting

result: cyclic strain energy

Inputs

Outputs

Configurations

Scripting

invariant: scalar invariants (fields container)

Inputs

Outputs

Configurations

Scripting

result: plastic strain principal 1

Inputs

Outputs

Configurations

Scripting

math: -

Inputs

Outputs

Configurations

Scripting

math: total sum

Inputs

Outputs

Configurations

Scripting

math: - (fields container)

Inputs

Outputs

Configurations

Scripting

scoping: intersect scopings

Inputs

Outputs

Configurations

Scripting

math: ^ (field)

Inputs

Outputs

Configurations

Scripting

math: scale (field)

Inputs

Outputs

Configurations

Scripting

result: enthalpy

Inputs

Outputs

Configurations

Scripting

math: ^ (fields container)

Inputs

Outputs

Configurations

Scripting

result: global eroded internal energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: scale (fields container)

Inputs

Outputs

Configurations

Scripting

math: sweeping phase

Inputs

Outputs

Configurations

Scripting

math: centroid

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (field)

Inputs

Outputs

Configurations

Scripting

math: sweeping phase (fields container)

Inputs

Outputs

Configurations

Scripting

math: centroid (fields container)

Inputs

Outputs

Configurations

Scripting

math: ^2 (field)

Inputs

Outputs

Configurations

Scripting

utility: remove unnecessary labels

Inputs

Outputs

Configurations

Scripting

result: velocity Z

Inputs

Outputs

Configurations

Scripting

math: sin (field)

Inputs

Outputs

Configurations

Scripting

math: cos (field)

Inputs

Outputs

Configurations

Scripting

math: cos (fields container)

Inputs

Outputs

Configurations

Scripting

logic: ascending sort

Inputs

Outputs

Configurations

Scripting

result: initial coordinates (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: convert to fields container

Inputs

Outputs

Configurations

Scripting

math: linear combination

Inputs

Outputs

Configurations

Scripting

math: ^2 (fields container)

Inputs

Outputs

Configurations

Scripting

result: mean static pressure

Inputs

Outputs

Configurations

Scripting

math: exp (field)

Inputs

Outputs

Configurations

Scripting

math: exp (fields container)

Inputs

Outputs

Configurations

Scripting

result: num surface status changes

Inputs

Outputs

Configurations

Scripting

math: ln (field)

Inputs

Outputs

Configurations

Scripting

utility: incremental property field

Inputs

Outputs

Configurations

Scripting

mesh: mesh to pyvista

Inputs

Outputs

Configurations

Scripting

math: ln (fields container)

Inputs

Outputs

Configurations

Scripting

invariant: scalar invariants (field)

Inputs

Outputs

Configurations

Scripting

math: cross product

Inputs

Outputs

Configurations

Scripting

filter: high pass (timefreq)

Inputs

Outputs

Configurations

Scripting

math: / (component-wise fields container)

Inputs

Outputs

Configurations

Scripting

result: global sliding interface energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: kronecker product

Inputs

Outputs

Configurations

Scripting

math: modulus (fields container)

Inputs

Outputs

Configurations

Scripting

result: joint relative angular velocity

Inputs

Outputs

Configurations

Scripting

math: dot (complex fields)

Inputs

Outputs

Configurations

Scripting

math: / (complex fields)

Inputs

Outputs

Configurations

Scripting

utility: server path

Inputs

Outputs

Configurations

Scripting

result: beam axial force (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: derivate (complex fields)

Inputs

Outputs

Configurations

Scripting

math: polar to complex fields

Inputs

Outputs

Configurations

Scripting

utility: merge data tree

Inputs

Outputs

Configurations

Scripting

math: dot (fields container)

Inputs

Outputs

Configurations

Scripting

math: phase (field)

Inputs

Outputs

Configurations

Scripting

result: nodal moment

Inputs

Outputs

Configurations

Scripting

math: phase (fields container)

Inputs

Outputs

Configurations

Scripting

math: modulus (field)

Inputs

Outputs

Configurations

Scripting

result: elemental mass

Inputs

Outputs

Configurations

Scripting

result: heat flux

Inputs

Outputs

Configurations

Scripting

math: total sum (fields container)

Inputs

Outputs

Configurations

Scripting

result: co-energy

Inputs

Outputs

Configurations

Scripting

math: dot

Inputs

Outputs

Configurations

Scripting

min_max: max over phase

Inputs

Outputs

Configurations

Scripting

math: outer product

Inputs

Outputs

Configurations

Scripting

math: overall dot

Inputs

Outputs

Configurations

Scripting

math: cross product

Inputs

Outputs

Configurations

Scripting

result: velocity Y

Inputs

Outputs

Configurations

Scripting

result: global velocity (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: superficial velocity

Inputs

Outputs

Configurations

Scripting

math: absolute value by component (field)

Inputs

Outputs

Configurations

Scripting

result: incremental energy

Inputs

Outputs

Configurations

Scripting

result: thermal strain

Inputs

Outputs

Configurations

Scripting

result: stiffness matrix energy

Inputs

Outputs

Configurations

Scripting

math: absolute value by component (fields container)

Inputs

Outputs

Configurations

Scripting

logic: component selector (fields container)

Inputs

Outputs

Configurations

Scripting

logic: component selector (field)

Inputs

Outputs

Configurations

Scripting

scoping: on property

Inputs

Outputs

Configurations

Scripting

logic: component transformer (field)

Inputs

Outputs

Configurations

Scripting

logic: same property fields?

Inputs

Outputs

Configurations

Scripting

logic: component transformer (fields container)

Inputs

Outputs

Configurations

Scripting

min_max: over field

Inputs

Outputs

Configurations

Scripting

result: transient rayleigh integration

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (timefreq)

Inputs

Outputs

Configurations

Scripting

logic: elementary data selector (fields container)

Inputs

Outputs

Configurations

Scripting

utility: convert to scoping

Inputs

Outputs

Configurations

Scripting

logic: elementary data selector (field)

Inputs

Outputs

Configurations

Scripting

utility: change location

Inputs

Outputs

Configurations

Scripting

utility: extract field

Inputs

Outputs

Configurations

Scripting

mesh: node coordinates

Inputs

Outputs

Configurations

Scripting

utility: bind support

Inputs

Outputs

Configurations

Scripting

mesh: stl export

Inputs

Outputs

Configurations

Scripting

utility: convert to field

Inputs

Outputs

Configurations

Scripting

result: beam axial total strain (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: set property

Inputs

Outputs

Configurations

Scripting

utility: forward field

Inputs

Outputs

Configurations

Scripting

utility: incremental mesh

Inputs

Outputs

Configurations

Scripting

mesh: points from coordinates

Inputs

Outputs

Configurations

Scripting

utility: forward fields container

Inputs

Outputs

Configurations

Scripting

result: electric flux density

Inputs

Outputs

Configurations

Scripting

geo: integrate over elements

Inputs

Outputs

Configurations

Scripting

result: plastic strain principal 2

Inputs

Outputs

Configurations

Scripting

utility: forward meshes container

Inputs

Outputs

Configurations

Scripting

result: compute total strain X

Configurating operators Only linear analysis are supported without On Demand Expansion. All coordinates are global coordinates. Euler Angles need to be included in the database. - Get the XX normal component (00 component).">

Inputs

Outputs

Configurations

Scripting

utility: forward

Inputs

Outputs

Configurations

Scripting

result: total temperature

Inputs

Outputs

Configurations

Scripting

result: acceleration Y

Inputs

Outputs

Configurations

Scripting

utility: delegate to operator

Inputs

Outputs

Configurations

Scripting

utility: txt file to dpf

Inputs

Outputs

Configurations

Scripting

result: normal contact moment

Inputs

Outputs

Configurations

Scripting

result: thermal strain XZ

Inputs

Outputs

Configurations

Scripting

utility: fields container get attribute

Inputs

Outputs

Configurations

Scripting

utility: assemble scalars to vector

Inputs

Outputs

Configurations

Scripting

result: global eroded hourglass energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: assemble scalars to vector (fields container)

Inputs

Outputs

Configurations

Scripting

utility: assemble scalars to matrix

Inputs

Outputs

Configurations

Scripting

math: make one on component

Inputs

Outputs

Configurations

Scripting

mesh: from scopings

Inputs

Outputs

Configurations

Scripting

utility: assemble scalars to matrix (fields container)

Inputs

Outputs

Configurations

Scripting

result: interface contact area (LSDyna)

Inputs

Outputs

Configurations

Scripting

mesh: extract from field

Inputs

Outputs

Configurations

Scripting

result: pres to field

Inputs

Outputs

Configurations

Scripting

result: part internal energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: part momentum (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: compute invariant terms rbd

Inputs

Outputs

Configurations

Scripting

utility: default value

Inputs

Outputs

Configurations

Scripting

averaging: elemental nodal to nodal elemental (fields container)

Inputs

Outputs

Configurations

Scripting

utility: extract sub fields container

Inputs

Outputs

Configurations

Scripting

result: total strain (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: extract sub meshes container

Inputs

Outputs

Configurations

Scripting

utility: extract sub scopings container

Inputs

Outputs

Configurations

Scripting

averaging: elemental difference (fields container)

Inputs

Outputs

Configurations

Scripting

utility: compute time scoping

Inputs

Outputs

Configurations

Scripting

result: static pressure

Inputs

Outputs

Configurations

Scripting

result: elastic strain

Inputs

Outputs

Configurations

Scripting

result: turbulent viscosity

Inputs

Outputs

Configurations

Scripting

math: window blackman

Inputs

Outputs

Configurations

Scripting

mesh: wireframe

Inputs

Outputs

Configurations

Scripting

utility: python generator

Inputs

Outputs

Configurations

Scripting

utility: make overall

Inputs

Outputs

Configurations

Scripting

geo: elements volume

Inputs

Outputs

Configurations

Scripting

result: pressure

Inputs

Outputs

Configurations

Scripting

result: stress

Inputs

Outputs

Configurations

Scripting

result: stress X

Inputs

Outputs

Configurations

Scripting

result: stress Y

Inputs

Outputs

Configurations

Scripting

result: stress Z

Inputs

Outputs

Configurations

Scripting

result: stress XY

Inputs

Outputs

Configurations

Scripting

result: stress YZ

Inputs

Outputs

Configurations

Scripting

result: stress XZ

Inputs

Outputs

Configurations

Scripting

result: stress principal 1

Inputs

Outputs

Configurations

Scripting

result: stress principal 2

Inputs

Outputs

Configurations

Scripting

result: tangential contact moment

Inputs

Outputs

Configurations

Scripting

result: nodal solution to global cs

Inputs

Outputs

Configurations

Scripting

invariant: convertnum bcs to nod

Inputs

Outputs

Configurations

Scripting

result: stress principal 3

Inputs

Outputs

Configurations

Scripting

result: elastic strain X

Inputs

Outputs

Configurations

Scripting

result: elastic strain Y

Inputs

Outputs

Configurations

Scripting

result: elastic strain Z

Inputs

Outputs

Configurations

Scripting

math: min/max over time

Inputs

Outputs

Configurations

Scripting

utility: merge fields containers

Inputs

Outputs

Configurations

Scripting

result: global energy ratio without eroded energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: merge weighted fields containers

Inputs

Outputs

Configurations

Scripting

result: elastic strain XY

Inputs

Outputs

Configurations

Scripting

result: elastic strain YZ

Inputs

Outputs

Configurations

Scripting

result: interface contact mass (LSDyna)

Inputs

Outputs

Configurations

Scripting

invariant: eigen values (fields container)

Inputs

Outputs

Configurations

Scripting

result: elastic strain XZ

Inputs

Outputs

Configurations

Scripting

metadata: mesh property provider

Inputs

Outputs

Configurations

Scripting

result: rigid transformation

Inputs

Outputs

Configurations

Scripting

result: elastic strain principal 1

Inputs

Outputs

Configurations

Scripting

geo: scoping normals

Inputs

Outputs

Configurations

Scripting

result: elastic strain principal 2

Inputs

Outputs

Configurations

Scripting

utility: merge scopings

Inputs

Outputs

Configurations

Scripting

result: elastic strain principal 3

Inputs

Outputs

Configurations

Scripting

result: cyclic analytic disp max

Inputs

Outputs

Configurations

Scripting

result: elastic strain eqv

Inputs

Outputs

Configurations

Scripting

result: turbulent dissipation rate (omega)

Inputs

Outputs

Configurations

Scripting

averaging: to elemental (fields container)

Inputs

Outputs

Configurations

Scripting

result: plastic strain

Inputs

Outputs

Configurations

Scripting

scoping: transpose

Inputs

Outputs

Configurations

Scripting

result: mass fraction

Inputs

Outputs

Configurations

Scripting

result: plastic strain X

Inputs

Outputs

Configurations

Scripting

filter: band pass (fields container)

Inputs

Outputs

Configurations

Scripting

result: coordinates (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: plastic strain Y

Inputs

Outputs

Configurations

Scripting

geo: to polar coordinates

Inputs

Outputs

Configurations

Scripting

math: fft evaluation

Inputs

Outputs

Configurations

Scripting

result: global total energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: plastic strain Z

Inputs

Outputs

Configurations

Scripting

result: dynamic viscosity

Inputs

Outputs

Configurations

Scripting

serialization: vtk export

Inputs

Outputs

Configurations

Scripting

utility: merge materials

Inputs

Outputs

Configurations

Scripting

result: plastic strain XY

Inputs

Outputs

Configurations

Scripting

result: hydrostatic pressure

Inputs

Outputs

Configurations

Scripting

result: plastic strain YZ

Inputs

Outputs

Configurations

Scripting

result: compute stress von mises

Inputs

Outputs

Configurations

Scripting

filter: low pass (scoping)

Inputs

Outputs

Configurations

Scripting

result: plastic strain XZ

Inputs

Outputs

Configurations

Scripting

result: workflow energy per harmonic

Inputs

Outputs

Configurations

Scripting

result: plastic strain principal 3

Inputs

Outputs

Configurations

Scripting

result: plastic strain eqv

Inputs

Outputs

Configurations

Scripting

result: thermal strain X

Inputs

Outputs

Configurations

Scripting

result: thermal strain Y

Inputs

Outputs

Configurations

Scripting

math: accumulate level over label

Inputs

Outputs

Configurations

Scripting

result: equivalent radiated power

Inputs

Outputs

Configurations

Scripting

result: thermal strain Z

Inputs

Outputs

Configurations

Scripting

result: thermal strain XY

Inputs

Outputs

Configurations

Scripting

math: accumulate over label

Inputs

Outputs

Configurations

Scripting

utility: merge scopings containers

Inputs

Outputs

Configurations

Scripting

result: thermal strain YZ

Inputs

Outputs

Configurations

Scripting

result: thermal strain principal 1

Inputs

Outputs

Configurations

Scripting

result: thermal strain principal 2

Inputs

Outputs

Configurations

Scripting

result: thermal strain principal 3

Inputs

Outputs

Configurations

Scripting

result: global external work (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: acceleration

Inputs

Outputs

Configurations

Scripting

result: element centroids

Inputs

Outputs

Configurations

Scripting

result: acceleration Z

Inputs

Outputs

Configurations

Scripting

scoping: rescope (fields container)

Inputs

Outputs

Configurations

Scripting

result: wall shear stress

Inputs

Outputs

Configurations

Scripting

result: reaction force

Inputs

Outputs

Configurations

Scripting

result: velocity

Inputs

Outputs

Configurations

Scripting

serialization: serializer

Inputs

Outputs

Configurations

Scripting

result: velocity X

Inputs

Outputs

Configurations

Scripting

geo: cartesian to spherical coordinates (fields container)

Inputs

Outputs

Configurations

Scripting

result: displacement

Inputs

Outputs

Configurations

Scripting

result: displacement X

Inputs

Outputs

Configurations

Scripting

result: displacement Y

Inputs

Outputs

Configurations

Scripting

result: displacement Z

Inputs

Outputs

Configurations

Scripting

result: heat flux X

Inputs

Outputs

Configurations

Scripting

result: heat flux Y

Inputs

Outputs

Configurations

Scripting

result: electric field

Inputs

Outputs

Configurations

Scripting

result: total contact moment

Inputs

Outputs

Configurations

Scripting

result: heat flux Z

Inputs

Outputs

Configurations

Scripting

result: element nodal forces

Inputs

Outputs

Configurations

Scripting

result: compute total strain Z

Inputs

Outputs

Configurations

Scripting

utility: forward

Inputs

Outputs

Configurations

Scripting

result: total temperature

Inputs

Outputs

Configurations

Scripting

result: acceleration Y

Inputs

Outputs

Configurations

Scripting

utility: delegate to operator

Inputs

Outputs

Configurations

Scripting

utility: txt file to dpf

Inputs

Outputs

Configurations

Scripting

result: normal contact moment

Inputs

Outputs

Configurations

Scripting

result: thermal strain XZ

Inputs

Outputs

Configurations

Scripting

utility: fields container get attribute

Inputs

Outputs

Configurations

Scripting

utility: assemble scalars to vector

Inputs

Outputs

Configurations

Scripting

result: global eroded hourglass energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: assemble scalars to vector fc

Inputs

Outputs

Configurations

Scripting

utility: assemble scalars to matrix

Inputs

Outputs

Configurations

Scripting

math: make one on component

Inputs

Outputs

Configurations

Scripting

mesh: from scopings

Inputs

Outputs

Configurations

Scripting

utility: assemble scalars to matrix fc

Inputs

Outputs

Configurations

Scripting

result: interface contact area (LSDyna)

Inputs

Outputs

Configurations

Scripting

mesh: extract from field

Inputs

Outputs

Configurations

Scripting

result: pres to field

Inputs

Outputs

Configurations

Scripting

result: part internal energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: part momentum (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: compute invariant terms rbd

Inputs

Outputs

Configurations

Scripting

utility: default value

Inputs

Outputs

Configurations

Scripting

averaging: elemental nodal to nodal elemental (fields container)

Inputs

Outputs

Configurations

Scripting

result: rms velocity

Inputs

Outputs

Configurations

Scripting

result: poynting vector

Inputs

Outputs

Configurations

Scripting

result: acceleration X

Inputs

Outputs

Configurations

Scripting

utility: extract sub fields container

Inputs

Outputs

Configurations

Scripting

result: total strain (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: extract sub meshes container

Inputs

Outputs

Configurations

Scripting

utility: extract sub scopings container

Inputs

Outputs

Configurations

Scripting

averaging: elemental difference (fields container)

Inputs

Outputs

Configurations

Scripting

utility: compute time scoping

Inputs

Outputs

Configurations

Scripting

result: static pressure

Inputs

Outputs

Configurations

Scripting

result: elastic strain

Inputs

Outputs

Configurations

Scripting

result: turbulent viscosity

Inputs

Outputs

Configurations

Scripting

math: window blackman

Inputs

Outputs

Configurations

Scripting

mesh: wireframe

Inputs

Outputs

Configurations

Scripting

utility: python generator

Inputs

Outputs

Configurations

Scripting

utility: make overall

Inputs

Outputs

Configurations

Scripting

geo: elements volume

Inputs

Outputs

Configurations

Scripting

result: pressure

Inputs

Outputs

Configurations

Scripting

result: stress

Inputs

Outputs

Configurations

Scripting

result: stress X

Inputs

Outputs

Configurations

Scripting

result: stress Y

Inputs

Outputs

Configurations

Scripting

result: stress Z

Inputs

Outputs

Configurations

Scripting

result: stress XY

Inputs

Outputs

Configurations

Scripting

result: stress YZ

Inputs

Outputs

Configurations

Scripting

result: stress XZ

Inputs

Outputs

Configurations

Scripting

result: stress principal 1

Inputs

Outputs

Configurations

Scripting

result: stress principal 2

Inputs

Outputs

Configurations

Scripting

result: tangential contact moment

Inputs

Outputs

Configurations

Scripting

result: nodal solution to global cs

Inputs

Outputs

Configurations

Scripting

invariant: convertnum bcs to nod

Inputs

Outputs

Configurations

Scripting

result: stress principal 3

Inputs

Outputs

Configurations

Scripting

result: elastic strain X

Inputs

Outputs

Configurations

Scripting

result: elastic strain Y

Inputs

Outputs

Configurations

Scripting

result: elastic strain Z

Inputs

Outputs

Configurations

Scripting

math: min/max over time

Inputs

Outputs

Configurations

Scripting

utility: merge fields containers

Inputs

Outputs

Configurations

Scripting

result: global energy ratio without eroded energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

utility: merge weighted fields containers

Inputs

Outputs

Configurations

Scripting

result: elastic strain XY

Inputs

Outputs

Configurations

Scripting

result: elastic strain YZ

Inputs

Outputs

Configurations

Scripting

result: interface contact mass (LSDyna)

Inputs

Outputs

Configurations

Scripting

invariant: eigen values (fields container)

Inputs

Outputs

Configurations

Scripting

result: elastic strain XZ

Inputs

Outputs

Configurations

Scripting

metadata: mesh property provider

Inputs

Outputs

Configurations

Scripting

result: rigid transformation

Inputs

Outputs

Configurations

Scripting

result: elastic strain principal 1

Inputs

Outputs

Configurations

Scripting

geo: scoping normals

Inputs

Outputs

Configurations

Scripting

result: elastic strain principal 2

Inputs

Outputs

Configurations

Scripting

utility: merge scopings

Inputs

Outputs

Configurations

Scripting

result: elastic strain principal 3

Inputs

Outputs

Configurations

Scripting

result: cyclic analytic disp max

Inputs

Outputs

Configurations

Scripting

result: elastic strain eqv

Inputs

Outputs

Configurations

Scripting

result: turbulent dissipation rate (omega)

Inputs

Outputs

Configurations

Scripting

averaging: to elemental (fields container)

Inputs

Outputs

Configurations

Scripting

result: plastic strain

Inputs

Outputs

Configurations

Scripting

scoping: transpose

Inputs

Outputs

Configurations

Scripting

result: mass fraction

Inputs

Outputs

Configurations

Scripting

result: plastic strain X

Inputs

Outputs

Configurations

Scripting

filter: band pass (fields container)

Inputs

Outputs

Configurations

Scripting

result: coordinates (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: plastic strain Y

Inputs

Outputs

Configurations

Scripting

geo: to polar coordinates

Inputs

Outputs

Configurations

Scripting

math: fft evaluation

Inputs

Outputs

Configurations

Scripting

result: global total energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: plastic strain Z

Inputs

Outputs

Configurations

Scripting

result: dynamic viscosity

Inputs

Outputs

Configurations

Scripting

serialization: vtk export

Inputs

Outputs

Configurations

Scripting

utility: merge materials

Inputs

Outputs

Configurations

Scripting

result: plastic strain XY

Inputs

Outputs

Configurations

Scripting

result: hydrostatic pressure

Inputs

Outputs

Configurations

Scripting

result: plastic strain YZ

Inputs

Outputs

Configurations

Scripting

mesh: iso surfaces

Inputs

Outputs

Configurations

Scripting

result: compute stress von mises

Inputs

Outputs

Configurations

Scripting

filter: low pass (scoping)

Inputs

Outputs

Configurations

Scripting

result: plastic strain XZ

Inputs

Outputs

Configurations

Scripting

result: workflow energy per harmonic

Inputs

Outputs

Configurations

Scripting

result: plastic strain principal 3

Inputs

Outputs

Configurations

Scripting

result: plastic strain eqv

Inputs

Outputs

Configurations

Scripting

result: thermal strain X

Inputs

Outputs

Configurations

Scripting

result: thermal strain Y

Inputs

Outputs

Configurations

Scripting

math: accumulate level over label

Inputs

Outputs

Configurations

Scripting

result: equivalent radiated power

Inputs

Outputs

Configurations

Scripting

result: thermal strain Z

Inputs

Outputs

Configurations

Scripting

result: thermal strain XY

Inputs

Outputs

Configurations

Scripting

math: accumulate over label

Inputs

Outputs

Configurations

Scripting

utility: merge scopings containers

Inputs

Outputs

Configurations

Scripting

result: thermal strain YZ

Inputs

Outputs

Configurations

Scripting

result: thermal strain principal 1

Inputs

Outputs

Configurations

Scripting

result: thermal strain principal 2

Inputs

Outputs

Configurations

Scripting

result: thermal strain principal 3

Inputs

Outputs

Configurations

Scripting

result: global external work (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: acceleration

Inputs

Outputs

Configurations

Scripting

result: element centroids

Inputs

Outputs

Configurations

Scripting

result: acceleration Z

Inputs

Outputs

Configurations

Scripting

scoping: rescope (fields container)

Inputs

Outputs

Configurations

Scripting

result: wall shear stress

Inputs

Outputs

Configurations

Scripting

result: reaction force

Inputs

Outputs

Configurations

Scripting

result: velocity

Inputs

Outputs

Configurations

Scripting

serialization: serializer

Inputs

Outputs

Configurations

Scripting

result: velocity X

Inputs

Outputs

Configurations

Scripting

geo: cartesian to spherical coordinates (fields container)

Inputs

Outputs

Configurations

Scripting

result: displacement

Inputs

Outputs

Configurations

Scripting

result: displacement X

Inputs

Outputs

Configurations

Scripting

result: displacement Y

Inputs

Outputs

Configurations

Scripting

result: displacement Z

Inputs

Outputs

Configurations

Scripting

result: heat flux X

Inputs

Outputs

Configurations

Scripting

result: heat flux Y

Inputs

Outputs

Configurations

Scripting

result: electric field

Inputs

Outputs

Configurations

Scripting

result: total contact moment

Inputs

Outputs

Configurations

Scripting

result: heat flux Z

Inputs

Outputs

Configurations

Scripting

result: element nodal forces

Inputs

Outputs

Configurations

Scripting

result: compute total strain Z

Configurating operators Euler Angles need to be included in the database. Get the ZZ normal component (22 component).">

Inputs

Outputs

Configurations

Scripting

result: structural temperature

Inputs

Outputs

Configurations

Scripting

result: beam torsional moment (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: equivalent stress parameter

Inputs

Outputs

Configurations

Scripting

filter: band pass (timescoping)

Inputs

Outputs

Configurations

Scripting

result: stress ratio

Inputs

Outputs

Configurations

Scripting

mesh: skin (tri mesh)

Inputs

Outputs

Configurations

Scripting

metadata: result info provider

Inputs

Outputs

Configurations

Scripting

result: accu eqv plastic strain

Inputs

Outputs

Configurations

Scripting

result: plastic state variable

Inputs

Outputs

Configurations

Scripting

math: average over label

Inputs

Outputs

Configurations

Scripting

result: accu eqv creep strain

Inputs

Outputs

Configurations

Scripting

result: plastic strain energy density

Inputs

Outputs

Configurations

Scripting

result: material property of element

Inputs

Outputs

Configurations

Scripting

result: creep strain energy density

Inputs

Outputs

Configurations

Scripting

result: erp radiation efficiency

Inputs

Outputs

Configurations

Scripting

result: elastic strain energy density

Inputs

Outputs

Configurations

Scripting

serialization: field to csv

Inputs

Outputs

Configurations

Scripting

result: contact status

Inputs

Outputs

Configurations

Scripting

result: contact penetration

Inputs

Outputs

Configurations

Scripting

result: contact pressure

Inputs

Outputs

Configurations

Scripting

result: contact friction stress

Inputs

Outputs

Configurations

Scripting

result: contact total stress

Inputs

Outputs

Configurations

Scripting

result: contact sliding distance

Inputs

Outputs

Configurations

Scripting

utility: merge generic data container

Inputs

Outputs

Configurations

Scripting

result: global joint internal energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded element nodal forces

Inputs

Outputs

Configurations

Scripting

serialization: vtk to fields

Inputs

Outputs

Configurations

Scripting

result: contact gap distance

Inputs

Outputs

Configurations

Scripting

utility: merge any objects

Inputs

Outputs

Configurations

Scripting

result: contact surface heat flux

Inputs

Outputs

Configurations

Scripting

result: contact fluid penetration pressure

Inputs

Outputs

Configurations

Scripting

result: elemental volume

Inputs

Outputs

Configurations

Scripting

result: artificial hourglass energy

Inputs

Outputs

Configurations

Scripting

result: kinetic energy

Inputs

Outputs

Configurations

Scripting

result: thermal dissipation energy

Inputs

Outputs

Configurations

Scripting

result: nodal force

Inputs

Outputs

Configurations

Scripting

result: total mass

Inputs

Outputs

Configurations

Scripting

result: rms static pressure

Inputs

Outputs

Configurations

Scripting

result: swelling strains

Inputs

Outputs

Configurations

Scripting

result: total contact force

Inputs

Outputs

Configurations

Scripting

result: temperature

Inputs

Outputs

Configurations

Scripting

result: compute stress

Inputs

Outputs

Configurations

Scripting

result: raw displacement

Inputs

Outputs

Configurations

Scripting

result: raw reaction force

Inputs

Outputs

Configurations

Scripting

result: turbulent kinetic energy (k)

Inputs

Outputs

Configurations

Scripting

result: electric potential

Inputs

Outputs

Configurations

Scripting

result: thickness

Inputs

Outputs

Configurations

Scripting

serialization: csv to field

Inputs

Outputs

Configurations

Scripting

result: mapdl run

Inputs

Outputs

Configurations

Scripting

result: equivalent mass

Inputs

Outputs

Configurations

Scripting

serialization: serialize to hdf5

Inputs

Outputs

Configurations

Scripting

result: element orientations

Inputs

Outputs

Configurations

Scripting

result: custom result

Inputs

Outputs

Configurations

Scripting

result: elemental heat generation

Inputs

Outputs

Configurations

Scripting

result: temperature gradient

Inputs

Outputs

Configurations

Scripting

result: joint force reaction

Inputs

Outputs

Configurations

Scripting

result: joint moment reaction

Inputs

Outputs

Configurations

Scripting

result: beam T shear force (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: joint relative displacement

Inputs

Outputs

Configurations

Scripting

result: joint relative rotation

Inputs

Outputs

Configurations

Scripting

result: joint relative velocity

Inputs

Outputs

Configurations

Scripting

result: joint relative acceleration

Inputs

Outputs

Configurations

Scripting

result: joint relative angular acceleration

Inputs

Outputs

Configurations

Scripting

result: global internal energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

serialization: txt to data tree

Inputs

Outputs

Configurations

Scripting

result: thermal strains eqv

Inputs

Outputs

Configurations

Scripting

result: stress von mises

Inputs

Outputs

Configurations

Scripting

utility: merge supports

Inputs

Outputs

Configurations

Scripting

result: global kinetic energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: global time step (LSDyna)

Inputs

Outputs

Configurations

Scripting

math: matrix inverse

Inputs

Outputs

Configurations

Scripting

result: global rigid body stopper energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

geo: cartesian to spherical coordinates

Inputs

Outputs

Configurations

Scripting

result: global spring and damper energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: beam T bending moment (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: global hourglass energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: global system damping energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

mesh: mesh clipper

Inputs

Outputs

Configurations

Scripting

result: global eroded kinetic energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: global energy ratio (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: global added mass (LSDyna)

Inputs

Outputs

Configurations

Scripting

mapping: on reduced coordinates

Inputs

Outputs

Configurations

Scripting

result: global added mass (percentage) (LSDyna)

Inputs

Outputs

Configurations

Scripting

invariant: principal invariants (fields container)

Inputs

Outputs

Configurations

Scripting

result: global center of mass (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: beam S shear force (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: beam S bending moment (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: beam RS shear stress (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: beam TR shear stress (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: beam axial plastic strain (LSDyna)

Inputs

Outputs

Configurations

Scripting

invariant: von mises eqv (field)

Inputs

Outputs

Configurations

Scripting

invariant: segalman von mises eqv (field)

Inputs

Outputs

Configurations

Scripting

result: part eroded internal energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: part kinetic energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

scoping: on mesh property

Inputs

Outputs

Configurations

Scripting

serialization: string deserializer

Inputs

Outputs

Configurations

Scripting

result: compute stress Z

Inputs

Outputs

Configurations

Scripting

result: part eroded kinetic energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

scoping: from mesh

Inputs

Outputs

Configurations

Scripting

result: part added mass (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: part hourglass energy (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: part rigid body velocity (LSDyna)

Inputs

Outputs

Configurations

Scripting

min_max: time of max

Inputs

Outputs

Configurations

Scripting

result: interface contact force (LSDyna)

Inputs

Outputs

Configurations

Scripting

metadata: cyclic support provider

Inputs

Outputs

Configurations

Scripting

result: interface resultant contact force (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: interface contact moment (LSDyna)

Inputs

Outputs

Configurations

Scripting

result: density

Inputs

Outputs

Configurations

Scripting

averaging: elemental to elemental nodal (fields container)

Inputs

Outputs

Configurations

Scripting

result: total pressure

Inputs

Outputs

Configurations

Scripting

result: mean velocity

Inputs

Outputs

Configurations

Scripting

result: entropy

Inputs

Outputs

Configurations

Scripting

result: volume fraction

Inputs

Outputs

Configurations

Scripting

result: mass flow rate

Inputs

Outputs

Configurations

Scripting

result: mach number

Inputs

Outputs

Configurations

Scripting

result: rms temperature

Inputs

Outputs

Configurations

Scripting

result: mean temperature

Inputs

Outputs

Configurations

Scripting

scoping: scoping get attribute

Inputs

Outputs

Configurations

Scripting

min_max: over fields container

Inputs

Outputs

Configurations

Scripting

result: surface heat rate

Inputs

Outputs

Configurations

Scripting

result: thermal conductivity

Inputs

Outputs

Configurations

Scripting

utility: extract scoping

Inputs

Outputs

Configurations

Scripting

result: specific heat

Inputs

Outputs

Configurations

Scripting

logic: enrich materials

Inputs

Outputs

Configurations

Scripting

result: turbulent dissipation rate (epsilon)

Inputs

Outputs

Configurations

Scripting

metadata: time freq provider

Inputs

Outputs

Configurations

Scripting

metadata: mesh info provider

Inputs

Outputs

Configurations

Scripting

metadata: material provider

Inputs

Outputs

Configurations

Scripting

result: von mises stresses as mechanical

Inputs

Outputs

Configurations

Scripting

metadata: streams provider

Inputs

Outputs

Configurations

Scripting

result: poynting vector surface

Inputs

Outputs

Configurations

Scripting

metadata: datasources provider

Inputs

Outputs

Configurations

Scripting

mesh: mesh provider

Inputs

Outputs

Configurations

Scripting

mesh: meshes provider

Inputs

Outputs

Configurations

Scripting

utility: for each

Inputs

Outputs

Configurations

Scripting

metadata: mesh selection manager provider

Inputs

Outputs

Configurations

Scripting

metadata: boundary condition provider

Inputs

Outputs

Configurations

Scripting

serialization: data tree to txt

Inputs

Outputs

Configurations

Scripting

utility: merge property fields

Inputs

Outputs

Configurations

Scripting

metadata: cyclic analysis?

Inputs

Outputs

Configurations

Scripting

metadata: material support provider

Inputs

Outputs

Configurations

Scripting

scoping: on named selection

Inputs

Outputs

Configurations

Scripting

scoping: reduce sampling scoping

Inputs

Outputs

Configurations

Scripting

math: accumulation per scoping

Inputs

Outputs

Configurations

Scripting

logic: fields included?

Inputs

Outputs

Configurations

Scripting

mesh: beam properties

Inputs

Outputs

Configurations

Scripting

result: euler nodes

Inputs

Outputs

Configurations

Scripting

filter: low pass (timescoping)

Inputs

Outputs

Configurations

Scripting

scoping: rescope

Inputs

Outputs

Configurations

Scripting

utility: data sources get attribute

Inputs

Outputs

Configurations

Scripting

utility: remote workflow instantiate

Inputs

Outputs

Configurations

Scripting

mesh: make sphere levelset

Inputs

Outputs

Configurations

Scripting

utility: remote operator instantiate

Inputs

Outputs

Configurations

Scripting

result: add rigid body motion (fields container)

Inputs

Outputs

Configurations

Scripting

utility: merge time freq supports

Inputs

Outputs

Configurations

Scripting

scoping: split on property type

Inputs

Outputs

Configurations

Scripting

min_max: incremental over fields container

Inputs

Outputs

Configurations

Scripting

min_max: max over time

Inputs

Outputs

Configurations

Scripting

scoping: connectivity ids

Inputs

Outputs

Configurations

Scripting

utility: overlap fields

Inputs

Outputs

Configurations

Scripting

averaging: elemental nodal to nodal elemental (field)

Inputs

Outputs

Configurations

Scripting

metadata: property field provider by property name

Inputs

Outputs

Configurations

Scripting

utility: change shell layers

Inputs

Outputs

Configurations

Scripting

utility: merge meshes

Inputs

Outputs

Configurations

Scripting

utility: merge fields

Inputs

Outputs

Configurations

Scripting

utility: merge weighted fields

Inputs

Outputs

Configurations

Scripting

min_max: max by component

Inputs

Outputs

Configurations

Scripting

utility: weighted merge fields by label

Inputs

Outputs

Configurations

Scripting

utility: merge fields by label

Inputs

Outputs

Configurations

Scripting

averaging: elemental to elemental nodal (field)

Inputs

Outputs

Configurations

Scripting

utility: merge meshes containers

Inputs

Outputs

Configurations

Scripting

result: erp accumulate results

Inputs

Outputs

Configurations

Scripting

logic: merge solid and shell fields

Inputs

Outputs

Configurations

Scripting

min_max: min max by entity

Inputs

Outputs

Configurations

Scripting

min_max: min max by entity over time

Inputs

Outputs

Configurations

Scripting

result: global_to_nodal

Inputs

Outputs

Configurations

Scripting

min_max: min over time

Inputs

Outputs

Configurations

Scripting

geo: element nodal contribution

Inputs

Outputs

Configurations

Scripting

serialization: export symbolic workflow

Inputs

Outputs

Configurations

Scripting

result: write cms rbd file

Inputs

Outputs

Configurations

Scripting

logic: same meshes?

Inputs

Outputs

Configurations

Scripting

mesh: external layer

Inputs

Outputs

Configurations

Scripting

min_max: over label

Inputs

Outputs

Configurations

Scripting

min_max: min by component

Inputs

Outputs

Configurations

Scripting

serialization: serializer to string

Inputs

Outputs

Configurations

Scripting

serialization: deserializer

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded velocity

Inputs

Outputs

Configurations

Scripting

utility: split in for each range

Inputs

Outputs

Configurations

Scripting

mesh: skin

Inputs

Outputs

Configurations

Scripting

result: smisc

Inputs

Outputs

Configurations

Scripting

utility: incremental field

Inputs

Outputs

Configurations

Scripting

utility: incremental fields container

Inputs

Outputs

Configurations

Scripting

geo: rotate (fields container)

Inputs

Outputs

Configurations

Scripting

utility: incremental concantenate as fields container.

Inputs

Outputs

Configurations

Scripting

utility: make producer consumer for each iterator

Inputs

Outputs

Configurations

Scripting

result: members in bending not certified

Inputs

Outputs

Configurations

Scripting

utility: producer consumer for each

Inputs

Outputs

Configurations

Scripting

averaging: extend to mid nodes (field)

Inputs

Outputs

Configurations

Scripting

invariant: eigen vectors (on fields container)

Inputs

Outputs

Configurations

Scripting

mesh: mesh get attribute

Inputs

Outputs

Configurations

Scripting

metadata: time freq support get attribute

Inputs

Outputs

Configurations

Scripting

utility: set attribute

Inputs

Outputs

Configurations

Scripting

min_max: time of min

Inputs

Outputs

Configurations

Scripting

min_max: phase of max

Inputs

Outputs

Configurations

Scripting

utility: voigt to standard strains

Inputs

Outputs

Configurations

Scripting

min_max: incremental over field

Inputs

Outputs

Configurations

Scripting

logic: same fields?

Inputs

Outputs

Configurations

Scripting

logic: same fields container?

Inputs

Outputs

Configurations

Scripting

math: window hanning

Inputs

Outputs

Configurations

Scripting

filter: high pass (field)

Inputs

Outputs

Configurations

Scripting

result: members in compression not certified

Inputs

Outputs

Configurations

Scripting

filter: high pass (scoping)

Inputs

Outputs

Configurations

Scripting

filter: high pass (timescoping)

Inputs

Outputs

Configurations

Scripting

filter: high pass (fields container)

Inputs

Outputs

Configurations

Scripting

filter: low pass (field)

Inputs

Outputs

Configurations

Scripting

filter: band pass (field)

Inputs

Outputs

Configurations

Scripting

filter: low pass (timefreq)

Inputs

Outputs

Configurations

Scripting

filter: low pass (fields container)

Inputs

Outputs

Configurations

Scripting

filter: band pass (scoping)

Inputs

Outputs

Configurations

Scripting

filter: band pass (timefreq)

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (scoping)

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (timescoping)

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (fields container)

Inputs

Outputs

Configurations

Scripting

result: members in linear compression bending not certified

Inputs

Outputs

Configurations

Scripting

invariant: convertnum nod to bcs

Inputs

Outputs

Configurations

Scripting

geo: rotate

Inputs

Outputs

Configurations

Scripting

serialization: data tree to json

Inputs

Outputs

Configurations

Scripting

serialization: json to data tree

Inputs

Outputs

Configurations

Scripting

averaging: nodal difference (fields container)

Inputs

Outputs

Configurations

Scripting

logic: descending sort

Inputs

Outputs

Configurations

Scripting

logic: ascending sort (fields container)

Inputs

Outputs

Configurations

Scripting

logic: descending sort (fields container)

Inputs

Outputs

Configurations

Scripting

serialization: import symbolic workflow

Inputs

Outputs

Configurations

Scripting

filter: filtering max over time workflow

Inputs

Outputs

Configurations

Scripting

metadata: integrate over time freq

Inputs

Outputs

Configurations

Scripting

utility: extract time freq

Inputs

Outputs

Configurations

Scripting

averaging: elemental nodal to nodal (field)

Inputs

Outputs

Configurations

Scripting

averaging: elemental nodal to nodal (fields container)

Inputs

Outputs

Configurations

Scripting

averaging: elemental to nodal (field)

Outputs

Configurations

Scripting

mesh: meshes provider

Inputs

Outputs

Configurations

Scripting

utility: for each

Inputs

Outputs

Configurations

Scripting

metadata: mesh selection manager provider

Inputs

Outputs

Configurations

Scripting

metadata: boundary condition provider

Inputs

Outputs

Configurations

Scripting

serialization: data tree to txt

Inputs

Outputs

Configurations

Scripting

utility: merge property fields

Inputs

Outputs

Configurations

Scripting

metadata: cyclic analysis?

Inputs

Outputs

Configurations

Scripting

metadata: material support provider

Inputs

Outputs

Configurations

Scripting

scoping: on named selection

Inputs

Outputs

Configurations

Scripting

scoping: reduce sampling scoping

Inputs

Outputs

Configurations

Scripting

math: accumulation per scoping

Inputs

Outputs

Configurations

Scripting

logic: fields included?

Inputs

Outputs

Configurations

Scripting

mesh: beam properties

Inputs

Outputs

Configurations

Scripting

result: euler nodes

Inputs

Outputs

Configurations

Scripting

filter: low pass (timescoping)

Inputs

Outputs

Configurations

Scripting

scoping: rescope

Inputs

Outputs

Configurations

Scripting

utility: data sources get attribute

Inputs

Outputs

Configurations

Scripting

utility: remote workflow instantiate

Inputs

Outputs

Configurations

Scripting

mesh: make sphere levelset

Inputs

Outputs

Configurations

Scripting

utility: remote operator instantiate

Inputs

Outputs

Configurations

Scripting

result: add rigid body motion (fields container)

Inputs

Outputs

Configurations

Scripting

utility: merge time freq supports

Inputs

Outputs

Configurations

Scripting

scoping: split on property type

Inputs

Outputs

Configurations

Scripting

min_max: incremental over fields container

Inputs

Outputs

Configurations

Scripting

min_max: max over time

Inputs

Outputs

Configurations

Scripting

scoping: connectivity ids

Inputs

Outputs

Configurations

Scripting

utility: overlap fields

Inputs

Outputs

Configurations

Scripting

averaging: elemental nodal to nodal elemental (field)

Inputs

Outputs

Configurations

Scripting

metadata: property field provider by property name

Inputs

Outputs

Configurations

Scripting

utility: change shell layers

Inputs

Outputs

Configurations

Scripting

utility: merge meshes

Inputs

Outputs

Configurations

Scripting

utility: merge fields

Inputs

Outputs

Configurations

Scripting

utility: merge weighted fields

Inputs

Outputs

Configurations

Scripting

min_max: max by component

Inputs

Outputs

Configurations

Scripting

utility: weighted merge fields by label

Inputs

Outputs

Configurations

Scripting

utility: merge fields by label

Inputs

Outputs

Configurations

Scripting

averaging: elemental to elemental nodal (field)

Inputs

Outputs

Configurations

Scripting

utility: merge meshes containers

Inputs

Outputs

Configurations

Scripting

result: erp accumulate results

Inputs

Outputs

Configurations

Scripting

logic: merge solid and shell fields

Inputs

Outputs

Configurations

Scripting

min_max: min max by entity

Inputs

Outputs

Configurations

Scripting

min_max: min max by entity over time

Inputs

Outputs

Configurations

Scripting

result: global_to_nodal

Inputs

Outputs

Configurations

Scripting

min_max: min over time

Inputs

Outputs

Configurations

Scripting

geo: element nodal contribution

Inputs

Outputs

Configurations

Scripting

serialization: export symbolic workflow

Inputs

Outputs

Configurations

Scripting

result: write cms rbd file

Inputs

Outputs

Configurations

Scripting

logic: same meshes?

Inputs

Outputs

Configurations

Scripting

mesh: external layer

Inputs

Outputs

Configurations

Scripting

min_max: over label

Inputs

Outputs

Configurations

Scripting

min_max: min by component

Inputs

Outputs

Configurations

Scripting

serialization: serializer to string

Inputs

Outputs

Configurations

Scripting

serialization: deserializer

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded velocity

Inputs

Outputs

Configurations

Scripting

utility: split in for each range

Inputs

Outputs

Configurations

Scripting

mesh: skin

Inputs

Outputs

Configurations

Scripting

result: smisc

Inputs

Outputs

Configurations

Scripting

utility: incremental field

Inputs

Outputs

Configurations

Scripting

utility: incremental fields container

Inputs

Outputs

Configurations

Scripting

geo: rotate (fields container)

Inputs

Outputs

Configurations

Scripting

utility: incremental concantenate as fields container.

Inputs

Outputs

Configurations

Scripting

utility: make producer consumer for each iterator

Inputs

Outputs

Configurations

Scripting

result: members in bending not certified

Inputs

Outputs

Configurations

Scripting

utility: producer consumer for each

Inputs

Outputs

Configurations

Scripting

averaging: extend to mid nodes (field)

Inputs

Outputs

Configurations

Scripting

invariant: eigen vectors (on fields container)

Inputs

Outputs

Configurations

Scripting

mesh: mesh get attribute

Inputs

Outputs

Configurations

Scripting

metadata: time freq support get attribute

Inputs

Outputs

Configurations

Scripting

utility: set attribute

Inputs

Outputs

Configurations

Scripting

min_max: time of min

Inputs

Outputs

Configurations

Scripting

min_max: phase of max

Inputs

Outputs

Configurations

Scripting

utility: voigt to standard strains

Inputs

Outputs

Configurations

Scripting

min_max: incremental over field

Inputs

Outputs

Configurations

Scripting

logic: same fields?

Inputs

Outputs

Configurations

Scripting

logic: same fields container?

Inputs

Outputs

Configurations

Scripting

math: window hanning

Inputs

Outputs

Configurations

Scripting

filter: high pass (field)

Inputs

Outputs

Configurations

Scripting

result: members in compression not certified

Inputs

Outputs

Configurations

Scripting

filter: high pass (scoping)

Inputs

Outputs

Configurations

Scripting

filter: high pass (timescoping)

Inputs

Outputs

Configurations

Scripting

filter: high pass (fields container)

Inputs

Outputs

Configurations

Scripting

filter: low pass (field)

Inputs

Outputs

Configurations

Scripting

filter: band pass (field)

Inputs

Outputs

Configurations

Scripting

filter: low pass (timefreq)

Inputs

Outputs

Configurations

Scripting

filter: low pass (fields container)

Inputs

Outputs

Configurations

Scripting

filter: band pass (scoping)

Inputs

Outputs

Configurations

Scripting

filter: band pass (timefreq)

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (scoping)

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (timescoping)

Inputs

Outputs

Configurations

Scripting

filter: signed high pass (fields container)

Inputs

Outputs

Configurations

Scripting

result: members in linear compression bending not certified

Inputs

Outputs

Configurations

Scripting

invariant: convertnum nod to bcs

Inputs

Outputs

Configurations

Scripting

geo: rotate

Inputs

Outputs

Configurations

Scripting

serialization: data tree to json

Inputs

Outputs

Configurations

Scripting

serialization: json to data tree

Inputs

Outputs

Configurations

Scripting

averaging: nodal difference (fields container)

Inputs

Outputs

Configurations

Scripting

logic: descending sort

Inputs

Outputs

Configurations

Scripting

logic: ascending sort (fields container)

Inputs

Outputs

Configurations

Scripting

logic: descending sort (fields container)

Inputs

Outputs

Configurations

Scripting

serialization: import symbolic workflow

Inputs

Outputs

Configurations

Scripting

filter: filtering max over time workflow

Inputs

Outputs

Configurations

Scripting

metadata: integrate over time freq

Inputs

Outputs

Configurations

Scripting

utility: extract time freq

Inputs

Outputs

Configurations

Scripting

averaging: elemental nodal to nodal (field)

Inputs

Outputs

Configurations

Scripting

averaging: elemental nodal to nodal (fields container)

Inputs

Outputs

Configurations

Scripting

averaging: elemental to nodal (field)

Configurating operators - If not, compute the Frink weights and apply the Holmes' weight clip. - If the clipping produces a large overshoot, inverse volume weighted average is used.. 3. For a face finite volume mesh inverse distance weighted average is used.">

Inputs

Outputs

Configurations

Scripting

averaging: to nodal (field)

Inputs

Outputs

Configurations

Scripting

averaging: to nodal (fields container)

Inputs

Outputs

Configurations

Scripting

averaging: elemental mean (field)

Inputs

Outputs

Configurations

Scripting

averaging: elemental mean (fields container)

Inputs

Outputs

Configurations

Scripting

averaging: nodal to elemental (field)

Inputs

Outputs

Configurations

Scripting

averaging: nodal to elemental (fields container)

Inputs

Outputs

Configurations

Scripting

invariant: eigen values (field)

Inputs

Outputs

Configurations

Scripting

invariant: principal invariants (field)

Inputs

Outputs

Configurations

Scripting

invariant: von mises eqv (fields container)

Inputs

Outputs

Configurations

Scripting

invariant: segalman von mises eqv (fields container)

Inputs

Outputs

Configurations

Scripting

scoping: compute element centroids

Inputs

Outputs

Configurations

Scripting

math: entity extractor

Inputs

Outputs

Configurations

Scripting

metadata: cyclic mesh expansion

Inputs

Outputs

Configurations

Scripting

result: cyclic analytic stress eqv max

Inputs

Outputs

Configurations

Scripting

result: remove rigid body motion (fields container)

Inputs

Outputs

Configurations

Scripting

result: cyclic expansion

Inputs

Outputs

Configurations

Scripting

averaging: nodal fraction (fields container)

Inputs

Outputs

Configurations

Scripting

result: recombine cyclic harmonic indices

Inputs

Outputs

Configurations

Scripting

mapping: find reduced coordinates

Inputs

Outputs

Configurations

Scripting

mapping: on coordinates

Inputs

Outputs

Configurations

Scripting

mapping: scoping on coordinates

Inputs

Outputs

Configurations

Scripting

filter: abc weightings

Inputs

Outputs

Configurations

Scripting

math: fft filtering and cubic fitting

Inputs

Outputs

Configurations

Scripting

mapping: solid to skin

Inputs

Outputs

Configurations

Scripting

mapping: solid to skin (fields container)

Inputs

Outputs

Configurations

Scripting

averaging: nodal difference (field)

Inputs

Outputs

Configurations

Scripting

averaging: elemental difference (field)

Inputs

Outputs

Configurations

Scripting

averaging: elemental fraction (fields container)

Inputs

Outputs

Configurations

Scripting

averaging: extend to mid nodes (fields container)

Inputs

Outputs

Configurations

Scripting

geo: rotate cylindrical coordinates

Inputs

Outputs

Configurations

Scripting

geo: rotate in cylindrical coordinates (fields container)

Inputs

Outputs

Configurations

Scripting

geo: spherical to cartesian coordinates (fields container)

Inputs

Outputs

Configurations

Scripting

geo: spherical to cartesian coordinates

Inputs

Outputs

Configurations

Scripting

mesh: change cs (meshes)

Inputs

Outputs

Configurations

Scripting

geo: normals provider nl (nodes or elements)

Inputs

Outputs

Configurations

Scripting

geo: elements volumes over time

Inputs

Outputs

Configurations

Scripting

geo: elements facets surfaces over time

Inputs

Outputs

Configurations

Scripting

math: window bartlett

Inputs

Outputs

Configurations

Scripting

mesh: from scoping

Inputs

Outputs

Configurations

Scripting

mesh: split field wrt mesh regions

Inputs

Outputs

Configurations

Scripting

mesh: split mesh wrt property

Inputs

Outputs

Configurations

Scripting

result: torque

Inputs

Outputs

Configurations

Scripting

result: euler load buckling

Inputs

Outputs

Configurations

Scripting

geo: faces area

Inputs

Outputs

Configurations

Scripting

result: compute stress 3

Inputs

Outputs

Configurations

Scripting

geo: gauss to node (field)

Inputs

Outputs

Configurations

Scripting

averaging: gauss to node (fields container)

Inputs

Outputs

Configurations

Scripting

math: correlation

Inputs

Outputs

Configurations

Scripting

result: workflow energy per component

Inputs

Outputs

Configurations

Scripting

result: add rigid body motion (field)

Inputs

Outputs

Configurations

Scripting

math: window hamming

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded temperature

Inputs

Outputs

Configurations

Scripting

result: nodal_to_global

Inputs

Outputs

Configurations

Scripting

mesh: mesh_to_graphics

Inputs

Outputs

Configurations

Scripting

result: enf solution to global cs

Inputs

Outputs

Configurations

Scripting

result: cms matrices provider

Inputs

Outputs

Configurations

Scripting

serialization: hdf5dpf custom read

Inputs

Outputs

Configurations

Scripting

result: coordinate system

Inputs

Outputs

Configurations

Scripting

result: nmisc

Inputs

Outputs

Configurations

Scripting

result: stress solution to global cs

Inputs

Outputs

Configurations

Scripting

result: elastic strain solution to global cs

Inputs

Outputs

Configurations

Scripting

result: plastic strain to global cs

Inputs

Outputs

Configurations

Scripting

result: prns to field

Inputs

Outputs

Configurations

Scripting

mesh: mesh cutter

Inputs

Outputs

Configurations

Scripting

result: remove rigid body motion (field)

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded displacement

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded acceleration

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded stress

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded el strain

Inputs

Outputs

Configurations

Scripting

result: cms subfile info provider

Inputs

Outputs

Configurations

Scripting

result: cyclic volume

Inputs

Outputs

Configurations

Scripting

math: window triangular

Inputs

Outputs

Configurations

Scripting

result: compute total strain XZ

Inputs

Outputs

Configurations

Scripting

mapping: solid to skin

Inputs

Outputs

Configurations

Scripting

mapping: solid to skin (fields container)

Inputs

Outputs

Configurations

Scripting

averaging: nodal difference (field)

Inputs

Outputs

Configurations

Scripting

averaging: elemental difference (field)

Inputs

Outputs

Configurations

Scripting

averaging: elemental fraction (fields container)

Inputs

Outputs

Configurations

Scripting

averaging: extend to mid nodes (fields container)

Inputs

Outputs

Configurations

Scripting

geo: rotate cylindrical coordinates

Inputs

Outputs

Configurations

Scripting

geo: rotate in cylindrical coordinates (fields container)

Inputs

Outputs

Configurations

Scripting

geo: spherical to cartesian coordinates (fields container)

Inputs

Outputs

Configurations

Scripting

geo: spherical to cartesian coordinates

Inputs

Outputs

Configurations

Scripting

mesh: change cs (meshes)

Inputs

Outputs

Configurations

Scripting

geo: normals provider nl (nodes or elements)

Inputs

Outputs

Configurations

Scripting

geo: elements volumes over time

Inputs

Outputs

Configurations

Scripting

geo: elements facets surfaces over time

Inputs

Outputs

Configurations

Scripting

math: window bartlett

Inputs

Outputs

Configurations

Scripting

mesh: from scoping

Inputs

Outputs

Configurations

Scripting

mesh: split field wrt mesh regions

Inputs

Outputs

Configurations

Scripting

mesh: split mesh wrt property

Inputs

Outputs

Configurations

Scripting

result: torque

Inputs

Outputs

Configurations

Scripting

result: euler load buckling

Inputs

Outputs

Configurations

Scripting

geo: faces area

Inputs

Outputs

Configurations

Scripting

result: compute stress 3

Inputs

Outputs

Configurations

Scripting

geo: gauss to node (field)

Inputs

Outputs

Configurations

Scripting

averaging: gauss to node (fields container)

Inputs

Outputs

Configurations

Scripting

math: correlation

Inputs

Outputs

Configurations

Scripting

result: workflow energy per component

Inputs

Outputs

Configurations

Scripting

result: add rigid body motion (field)

Inputs

Outputs

Configurations

Scripting

math: window hamming

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded temperature

Inputs

Outputs

Configurations

Scripting

result: nodal_to_global

Inputs

Outputs

Configurations

Scripting

mesh: mesh_to_graphics

Inputs

Outputs

Configurations

Scripting

result: enf solution to global cs

Inputs

Outputs

Configurations

Scripting

result: cms matrices provider

Inputs

Outputs

Configurations

Scripting

serialization: hdf5dpf custom read

Inputs

Outputs

Configurations

Scripting

result: coordinate system

Inputs

Outputs

Configurations

Scripting

result: nmisc

Inputs

Outputs

Configurations

Scripting

result: stress solution to global cs

Inputs

Outputs

Configurations

Scripting

result: elastic strain solution to global cs

Inputs

Outputs

Configurations

Scripting

result: plastic strain to global cs

Inputs

Outputs

Configurations

Scripting

result: prns to field

Inputs

Outputs

Configurations

Scripting

mesh: mesh cutter

Inputs

Outputs

Configurations

Scripting

result: remove rigid body motion (field)

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded displacement

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded acceleration

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded stress

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded el strain

Inputs

Outputs

Configurations

Scripting

result: cms subfile info provider

Inputs

Outputs

Configurations

Scripting

result: cyclic volume

Inputs

Outputs

Configurations

Scripting

math: window triangular

Inputs

Outputs

Configurations

Scripting

result: compute total strain XZ

Configurating operators Only linear analysis are supported without On Demand Expansion. All coordinates are global coordinates. Euler Angles need to be included in the database. - Get the XZ shear component (02 component).">

Inputs

Outputs

Configurations

Scripting

result: cms dst table provider

Inputs

Outputs

Configurations

Scripting

invariant: eigen vectors (on field)

Inputs

Outputs

Configurations

Scripting

result: mapdl material properties

Inputs

Outputs

Configurations

Scripting

result: mapdl_section

Inputs

Outputs

Configurations

Scripting

result: rom data provider

Inputs

Outputs

Configurations

Scripting

geo: transform invariant terms rbd

Inputs

Outputs

Configurations

Scripting

result: compute invariant terms motion

Inputs

Outputs

Configurations

Scripting

result: write motion dfmf file

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded element heat flux

Inputs

Outputs

Configurations

Scripting

mesh: mesh plan clipper

Inputs

Outputs

Configurations

Scripting

mesh: mesh_to_graphics_edges

Inputs

Outputs

Configurations

Scripting

serialization: migrate to vtk

Inputs

Outputs

Configurations

Scripting

mesh: combine levelset

Inputs

Outputs

Configurations

Scripting

mesh: exclude levelset

Inputs

Outputs

Configurations

Scripting

mesh: make plane levelset

Inputs

Outputs

Configurations

Scripting

mesh: mesh extraction

Inputs

Outputs

Configurations

Scripting

mapping: fft

Inputs

Outputs

Configurations

Scripting

math: fft gradient evaluation

Inputs

Outputs

Configurations

Scripting

math: fft multi harmonic solution minmax

Inputs

Outputs

Configurations

Scripting

math: qr solve

Inputs

Outputs

Configurations

Scripting

math: svd

Inputs

Outputs

Configurations

Scripting

mapping: prep sampling fft

Inputs

Outputs

Configurations

Scripting

math: window welch

Inputs

Outputs

Configurations

Scripting

serialization: hdf5dpf generate result file

Inputs

Outputs

Configurations

Scripting

result: migrate to h5dpf

Inputs

Outputs

Configurations

Scripting

utility: hdf5dpf workflow provider

Inputs

Outputs

Configurations

Scripting

serialization: vtu export

Inputs

Outputs

Configurations

Scripting

result: compute total strain

Inputs

Outputs

Configurations

Scripting

result: cms dst table provider

Inputs

Outputs

Configurations

Scripting

invariant: eigen vectors (on field)

Inputs

Outputs

Configurations

Scripting

result: mapdl material properties

Inputs

Outputs

Configurations

Scripting

result: mapdl_section

Inputs

Outputs

Configurations

Scripting

result: rom data provider

Inputs

Outputs

Configurations

Scripting

geo: transform invariant terms rbd

Inputs

Outputs

Configurations

Scripting

result: compute invariant terms motion

Inputs

Outputs

Configurations

Scripting

result: write motion dfmf file

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded element heat flux

Inputs

Outputs

Configurations

Scripting

mesh: mesh plan clipper

Inputs

Outputs

Configurations

Scripting

mesh: mesh_to_graphics_edges

Inputs

Outputs

Configurations

Scripting

serialization: migrate to vtk

Inputs

Outputs

Configurations

Scripting

mesh: combine levelset

Inputs

Outputs

Configurations

Scripting

mesh: exclude levelset

Inputs

Outputs

Configurations

Scripting

mesh: make plane levelset

Inputs

Outputs

Configurations

Scripting

mesh: mesh extraction

Inputs

Outputs

Configurations

Scripting

mapping: fft

Inputs

Outputs

Configurations

Scripting

math: fft gradient evaluation

Inputs

Outputs

Configurations

Scripting

math: fft multi harmonic solution minmax

Inputs

Outputs

Configurations

Scripting

math: qr solve

Inputs

Outputs

Configurations

Scripting

math: svd

Inputs

Outputs

Configurations

Scripting

mapping: prep sampling fft

Inputs

Outputs

Configurations

Scripting

math: window welch

Inputs

Outputs

Configurations

Scripting

serialization: hdf5dpf generate result file

Inputs

Outputs

Configurations

Scripting

result: migrate to h5dpf

Inputs

Outputs

Configurations

Scripting

utility: hdf5dpf workflow provider

Inputs

Outputs

Configurations

Scripting

serialization: vtu export

Inputs

Outputs

Configurations

Scripting

result: compute total strain

=3.2,<4"] -build-backend = "flit_core.buildapi" +build-backend = "setuptools.build_meta" +requires = ["setuptools>=61.0.0"] [project] -# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections +# Check https://setuptools.pypa.io/en/stable/userguide/quickstart.html for all available sections name = "ansys-dpf-core" version = "0.9.1.dev0" description = "Data Processing Framework - Python Core " @@ -19,12 +19,16 @@ maintainers = [ classifiers = [ "Development Status :: 4 - Beta", - "Programming Language :: Python :: 3", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Information Analysis", "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: Python :: 3", ] dependencies = [ - "ansys-dpf-gate>=0.3.0", + "google-api-python-client", + "grpcio", "importlib-metadata >=4.0", "numpy", "packaging", @@ -45,9 +49,6 @@ plotting = [ "imageio-ffmpeg", ] -[tool.flit.module] -name = "ansys.dpf.core" - [project.urls] Homepage = "https://dpf.docs.pyansys.com/" Documentation = "https://dpf.docs.pyansys.com/" @@ -58,7 +59,7 @@ Tracker = "https://github.com/ansys/pydpf-core/issues" line-length = 100 [tool.coverage.run] -source = ["ansys.dpf"] +source = ["ansys.dpf.core"] [tool.coverage.report] show_missing = true diff --git a/requirements/requirements_dev.txt b/requirements/requirements_dev.txt index 5146bf629b..e69de29bb2 100644 --- a/requirements/requirements_dev.txt +++ b/requirements/requirements_dev.txt @@ -1,3 +0,0 @@ -ansys-dpf-gate==0.4.2.dev0 -ansys-dpf-gatebin==0.4.2.dev0 -ansys-grpc-dpf==0.8.2.dev0 diff --git a/requirements/requirements_install.txt b/requirements/requirements_install.txt index 9256e83df6..29dadad0c4 100644 --- a/requirements/requirements_install.txt +++ b/requirements/requirements_install.txt @@ -1,7 +1,5 @@ -ansys-dpf-gate==0.3.1 importlib-metadata==6.8.0 numpy==1.25.2 packaging==23.1 psutil==5.9.4 -setuptools==67.7.2 tqdm==4.65.0 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000..a500a23671 --- /dev/null +++ b/setup.py @@ -0,0 +1,39 @@ +"""Installation file for python dpf module +""" +# To keep according to https://setuptools.pypa.io/en/stable/userguide/pyproject_config.html +# to allow -e with pip<21.1 +from setuptools import setup, find_namespace_packages + + +setup( + package_dir={"": "src"}, + include_package_data=True, + packages=find_namespace_packages(where="src"), + package_data={ + "ansys.dpf.gatebin": ["*.so", "*.dll"], + "ansys.dpf.core.examples": ["**/*"], + }, +) +# "ansys.dpf.core.examples" = [ +# "ASimpleBar.rst", +# "static.rst", +# "complex.rst", +# "model_with_ns.rst", +# "file_cyclic.rst", +# "msup_transient_plate1.rst", +# "rth/rth_electric.rth", +# "rth/rth_steady.rth", +# "rth/rth_transient.rth", +# "sub/cp56.sub", +# "msup/file.mode", +# "msup/file.rst", +# "msup/file.rfrq", +# "distributed/file0.rst", +# "distributed/file1.rst", +# "msup_distributed/file0.rst", +# "msup_distributed/file1.rst", +# "msup_distributed/file0.mode", +# "msup_distributed/file1.mode", +# "msup_distributed/file_load_1.rfrq", +# "msup_distributed/file_load_2.rfrq", +# ] diff --git a/src/ansys/dpf/core/operators/build.py b/src/ansys/dpf/core/operators/build.py index fb7af4fc33..9abee27a41 100644 --- a/src/ansys/dpf/core/operators/build.py +++ b/src/ansys/dpf/core/operators/build.py @@ -164,8 +164,11 @@ def build_operator( mustache_file = os.path.join(this_path, "operator.mustache") with open(mustache_file, "r") as f: cls = chevron.render(f, data) - - return black.format_str(cls, mode=black.FileMode()) + try: + return black.format_str(cls, mode=black.FileMode()) + except Exception as e: + print(f"{operator_name=}") + raise e def build_operators(): diff --git a/src/ansys/dpf/core/operators/filter/filtering_max_over_time.py b/src/ansys/dpf/core/operators/filter/filtering_max_over_time.py index 744b7da9c3..fd35ef7bd4 100644 --- a/src/ansys/dpf/core/operators/filter/filtering_max_over_time.py +++ b/src/ansys/dpf/core/operators/filter/filtering_max_over_time.py @@ -18,9 +18,8 @@ class filtering_max_over_time(Operator): ---------- invariant_fc_operator : str Name of the invariant operator to be used to - calculate filter (avalailable: - eqv_fc, invariants_deriv_fc, - invariants_fc). + calculate filter (available: eqv_fc, + invariants_deriv_fc, invariants_fc). output_pin : int, optional Output pin of the invariant operator. default = 0. @@ -94,9 +93,8 @@ def _spec(): type_names=["string"], optional=False, document="""Name of the invariant operator to be used to - calculate filter (avalailable: - eqv_fc, invariants_deriv_fc, - invariants_fc).""", + calculate filter (available: eqv_fc, + invariants_deriv_fc, invariants_fc).""", ), 1: PinSpecification( name="output_pin", @@ -208,9 +206,8 @@ def invariant_fc_operator(self): """Allows to connect invariant_fc_operator input to the operator. Name of the invariant operator to be used to - calculate filter (avalailable: - eqv_fc, invariants_deriv_fc, - invariants_fc). + calculate filter (available: eqv_fc, + invariants_deriv_fc, invariants_fc). Parameters ---------- diff --git a/src/ansys/dpf/core/operators/geo/element_nodal_contribution.py b/src/ansys/dpf/core/operators/geo/element_nodal_contribution.py index de3587e44b..d31c59c78d 100644 --- a/src/ansys/dpf/core/operators/geo/element_nodal_contribution.py +++ b/src/ansys/dpf/core/operators/geo/element_nodal_contribution.py @@ -11,8 +11,11 @@ class element_nodal_contribution(Operator): - """Compute the fraction of the volume attributed to each node of each - element. + """Compute the fraction of the element measure attributed to each node of + each element (fraction of the volume for 3D elements, fraction of + the area for 2D elements or fraction of the length for 1D + elements). It is computed by taking the integral of the shape + function associated to each node within each element. Parameters ---------- @@ -21,10 +24,10 @@ class element_nodal_contribution(Operator): Integrate the input field over a specific scoping. volume_fraction : bool, optional - If true, returns influence volume. if false, - returns the influence volume fraction - (for example, the integrated value of - shape function for each node). + If true, returns influence volume, area or + length. if false, the values are + normalized with the element volume, + area or length. default: true. Examples @@ -70,8 +73,12 @@ def __init__( @staticmethod def _spec(): - description = """Compute the fraction of the volume attributed to each node of each - element.""" + description = """Compute the fraction of the element measure attributed to each node of + each element (fraction of the volume for 3D elements, + fraction of the area for 2D elements or fraction of the + length for 1D elements). It is computed by taking the + integral of the shape function associated to each node + within each element.""" spec = Specification( description=description, map_input_pin_spec={ @@ -92,10 +99,10 @@ def _spec(): name="volume_fraction", type_names=["bool"], optional=True, - document="""If true, returns influence volume. if false, - returns the influence volume fraction - (for example, the integrated value of - shape function for each node).""", + document="""If true, returns influence volume, area or + length. if false, the values are + normalized with the element volume, + area or length. default: true.""", ), }, map_output_pin_spec={ @@ -220,10 +227,10 @@ def scoping(self): def volume_fraction(self): """Allows to connect volume_fraction input to the operator. - If true, returns influence volume. if false, - returns the influence volume fraction - (for example, the integrated value of - shape function for each node). + If true, returns influence volume, area or + length. if false, the values are + normalized with the element volume, + area or length. default: true. Parameters ---------- diff --git a/src/ansys/dpf/core/operators/geo/integrate_over_elements.py b/src/ansys/dpf/core/operators/geo/integrate_over_elements.py index bbfd9a8d74..367c16e668 100644 --- a/src/ansys/dpf/core/operators/geo/integrate_over_elements.py +++ b/src/ansys/dpf/core/operators/geo/integrate_over_elements.py @@ -20,8 +20,8 @@ class integrate_over_elements(Operator): Integrate the input field over a specific scoping. mesh : MeshedRegion, optional - Mesh to integrate on, if not provided the one - from input field is provided. + Mesh to integrate on. if not provided, the + one from input field is employed. Examples @@ -84,8 +84,8 @@ def _spec(): name="mesh", type_names=["abstract_meshed_region"], optional=True, - document="""Mesh to integrate on, if not provided the one - from input field is provided.""", + document="""Mesh to integrate on. if not provided, the + one from input field is employed.""", ), }, map_output_pin_spec={ @@ -204,8 +204,8 @@ def scoping(self): def mesh(self): """Allows to connect mesh input to the operator. - Mesh to integrate on, if not provided the one - from input field is provided. + Mesh to integrate on. if not provided, the + one from input field is employed. Parameters ---------- diff --git a/src/ansys/dpf/core/operators/logic/__init__.py b/src/ansys/dpf/core/operators/logic/__init__.py index be38e86933..ff23f0b37b 100644 --- a/src/ansys/dpf/core/operators/logic/__init__.py +++ b/src/ansys/dpf/core/operators/logic/__init__.py @@ -6,9 +6,9 @@ from .component_transformer_fc import component_transformer_fc from .descending_sort import descending_sort from .descending_sort_fc import descending_sort_fc +from .elementary_data_selector import elementary_data_selector +from .elementary_data_selector_fc import elementary_data_selector_fc from .enrich_materials import enrich_materials -from .entity_selector import entity_selector -from .entity_selector_fc import entity_selector_fc from .identical_fc import identical_fc from .identical_fields import identical_fields from .identical_meshes import identical_meshes diff --git a/src/ansys/dpf/core/operators/logic/entity_selector.py b/src/ansys/dpf/core/operators/logic/elementary_data_selector.py similarity index 60% rename from src/ansys/dpf/core/operators/logic/entity_selector.py rename to src/ansys/dpf/core/operators/logic/elementary_data_selector.py index 50c78a5cf7..2d189ce6a9 100644 --- a/src/ansys/dpf/core/operators/logic/entity_selector.py +++ b/src/ansys/dpf/core/operators/logic/elementary_data_selector.py @@ -1,6 +1,6 @@ """ -entity_selector -=============== +elementary_data_selector +======================== Autogenerated DPF operator classes. """ from warnings import warn @@ -10,18 +10,19 @@ from ansys.dpf.core.operators.specification import PinSpecification, Specification -class entity_selector(Operator): - """Creates a scalar/vector field based on the selected entity. +class elementary_data_selector(Operator): + """Creates a scalar/vector field based on the selected elementary data. Parameters ---------- field : Field or FieldsContainer - entity_number : int - One or several entity index that will be - extracted from the initial field. + elementary_data_index : int + One or several elementary data index that + will be extracted from the initial + field. default_value : float, optional - Set a default value for entity that do not - exist. + Set a default value for elementary data that + do not exist. Examples @@ -29,20 +30,20 @@ class entity_selector(Operator): >>> from ansys.dpf import core as dpf >>> # Instantiate operator - >>> op = dpf.operators.logic.entity_selector() + >>> op = dpf.operators.logic.elementary_data_selector() >>> # Make input connections >>> my_field = dpf.Field() >>> op.inputs.field.connect(my_field) - >>> my_entity_number = int() - >>> op.inputs.entity_number.connect(my_entity_number) + >>> my_elementary_data_index = int() + >>> op.inputs.elementary_data_index.connect(my_elementary_data_index) >>> my_default_value = float() >>> op.inputs.default_value.connect(my_default_value) >>> # Instantiate operator and connect inputs in one line - >>> op = dpf.operators.logic.entity_selector( + >>> op = dpf.operators.logic.elementary_data_selector( ... field=my_field, - ... entity_number=my_entity_number, + ... elementary_data_index=my_elementary_data_index, ... default_value=my_default_value, ... ) @@ -53,24 +54,26 @@ class entity_selector(Operator): def __init__( self, field=None, - entity_number=None, + elementary_data_index=None, default_value=None, config=None, server=None, ): - super().__init__(name="entity_selector", config=config, server=server) - self._inputs = InputsEntitySelector(self) - self._outputs = OutputsEntitySelector(self) + super().__init__(name="elementary_data_selector", config=config, server=server) + self._inputs = InputsElementaryDataSelector(self) + self._outputs = OutputsElementaryDataSelector(self) if field is not None: self.inputs.field.connect(field) - if entity_number is not None: - self.inputs.entity_number.connect(entity_number) + if elementary_data_index is not None: + self.inputs.elementary_data_index.connect(elementary_data_index) if default_value is not None: self.inputs.default_value.connect(default_value) @staticmethod def _spec(): - description = """Creates a scalar/vector field based on the selected entity.""" + description = ( + """Creates a scalar/vector field based on the selected elementary data.""" + ) spec = Specification( description=description, map_input_pin_spec={ @@ -81,18 +84,19 @@ def _spec(): document="""""", ), 1: PinSpecification( - name="entity_number", + name="elementary_data_index", type_names=["int32", "vector"], optional=False, - document="""One or several entity index that will be - extracted from the initial field.""", + document="""One or several elementary data index that + will be extracted from the initial + field.""", ), 2: PinSpecification( name="default_value", type_names=["double"], optional=True, - document="""Set a default value for entity that do not - exist.""", + document="""Set a default value for elementary data that + do not exist.""", ), }, map_output_pin_spec={ @@ -120,7 +124,7 @@ def default_config(server=None): Server with channel connected to the remote or local instance. When ``None``, attempts to use the global server. """ - return Operator.default_config(name="entity_selector", server=server) + return Operator.default_config(name="elementary_data_selector", server=server) @property def inputs(self): @@ -128,7 +132,7 @@ def inputs(self): Returns -------- - inputs : InputsEntitySelector + inputs : InputsElementaryDataSelector """ return super().inputs @@ -138,34 +142,38 @@ def outputs(self): Returns -------- - outputs : OutputsEntitySelector + outputs : OutputsElementaryDataSelector """ return super().outputs -class InputsEntitySelector(_Inputs): +class InputsElementaryDataSelector(_Inputs): """Intermediate class used to connect user inputs to - entity_selector operator. + elementary_data_selector operator. Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector() + >>> op = dpf.operators.logic.elementary_data_selector() >>> my_field = dpf.Field() >>> op.inputs.field.connect(my_field) - >>> my_entity_number = int() - >>> op.inputs.entity_number.connect(my_entity_number) + >>> my_elementary_data_index = int() + >>> op.inputs.elementary_data_index.connect(my_elementary_data_index) >>> my_default_value = float() >>> op.inputs.default_value.connect(my_default_value) """ def __init__(self, op: Operator): - super().__init__(entity_selector._spec().inputs, op) - self._field = Input(entity_selector._spec().input_pin(0), 0, op, -1) + super().__init__(elementary_data_selector._spec().inputs, op) + self._field = Input(elementary_data_selector._spec().input_pin(0), 0, op, -1) self._inputs.append(self._field) - self._entity_number = Input(entity_selector._spec().input_pin(1), 1, op, -1) - self._inputs.append(self._entity_number) - self._default_value = Input(entity_selector._spec().input_pin(2), 2, op, -1) + self._elementary_data_index = Input( + elementary_data_selector._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._elementary_data_index) + self._default_value = Input( + elementary_data_selector._spec().input_pin(2), 2, op, -1 + ) self._inputs.append(self._default_value) @property @@ -179,7 +187,7 @@ def field(self): Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector() + >>> op = dpf.operators.logic.elementary_data_selector() >>> op.inputs.field.connect(my_field) >>> # or >>> op.inputs.field(my_field) @@ -187,32 +195,33 @@ def field(self): return self._field @property - def entity_number(self): - """Allows to connect entity_number input to the operator. + def elementary_data_index(self): + """Allows to connect elementary_data_index input to the operator. - One or several entity index that will be - extracted from the initial field. + One or several elementary data index that + will be extracted from the initial + field. Parameters ---------- - my_entity_number : int + my_elementary_data_index : int Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector() - >>> op.inputs.entity_number.connect(my_entity_number) + >>> op = dpf.operators.logic.elementary_data_selector() + >>> op.inputs.elementary_data_index.connect(my_elementary_data_index) >>> # or - >>> op.inputs.entity_number(my_entity_number) + >>> op.inputs.elementary_data_index(my_elementary_data_index) """ - return self._entity_number + return self._elementary_data_index @property def default_value(self): """Allows to connect default_value input to the operator. - Set a default value for entity that do not - exist. + Set a default value for elementary data that + do not exist. Parameters ---------- @@ -221,7 +230,7 @@ def default_value(self): Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector() + >>> op = dpf.operators.logic.elementary_data_selector() >>> op.inputs.default_value.connect(my_default_value) >>> # or >>> op.inputs.default_value(my_default_value) @@ -229,21 +238,21 @@ def default_value(self): return self._default_value -class OutputsEntitySelector(_Outputs): +class OutputsElementaryDataSelector(_Outputs): """Intermediate class used to get outputs from - entity_selector operator. + elementary_data_selector operator. Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector() + >>> op = dpf.operators.logic.elementary_data_selector() >>> # Connect inputs : op.inputs. ... >>> result_field = op.outputs.field() """ def __init__(self, op: Operator): - super().__init__(entity_selector._spec().outputs, op) - self._field = Output(entity_selector._spec().output_pin(0), 0, op) + super().__init__(elementary_data_selector._spec().outputs, op) + self._field = Output(elementary_data_selector._spec().output_pin(0), 0, op) self._outputs.append(self._field) @property @@ -257,7 +266,7 @@ def field(self): Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector() + >>> op = dpf.operators.logic.elementary_data_selector() >>> # Connect inputs : op.inputs. ... >>> result_field = op.outputs.field() """ # noqa: E501 diff --git a/src/ansys/dpf/core/operators/logic/entity_selector_fc.py b/src/ansys/dpf/core/operators/logic/elementary_data_selector_fc.py similarity index 60% rename from src/ansys/dpf/core/operators/logic/entity_selector_fc.py rename to src/ansys/dpf/core/operators/logic/elementary_data_selector_fc.py index f044c402e1..7ed94c806f 100644 --- a/src/ansys/dpf/core/operators/logic/entity_selector_fc.py +++ b/src/ansys/dpf/core/operators/logic/elementary_data_selector_fc.py @@ -1,6 +1,6 @@ """ -entity_selector_fc -================== +elementary_data_selector_fc +=========================== Autogenerated DPF operator classes. """ from warnings import warn @@ -10,16 +10,17 @@ from ansys.dpf.core.operators.specification import PinSpecification, Specification -class entity_selector_fc(Operator): - """Creates a scalar fields container based on the selected entity for - each field. +class elementary_data_selector_fc(Operator): + """Creates a scalar fields container based on the selected elementary + data for each field. Parameters ---------- fields_container : FieldsContainer or Field - entity_number : int - One or several entity index that will be - extracted from the initial field. + elementary_data_index : int + One or several elementary data index that + will be extracted from the initial + field. Examples @@ -27,18 +28,18 @@ class entity_selector_fc(Operator): >>> from ansys.dpf import core as dpf >>> # Instantiate operator - >>> op = dpf.operators.logic.entity_selector_fc() + >>> op = dpf.operators.logic.elementary_data_selector_fc() >>> # Make input connections >>> my_fields_container = dpf.FieldsContainer() >>> op.inputs.fields_container.connect(my_fields_container) - >>> my_entity_number = int() - >>> op.inputs.entity_number.connect(my_entity_number) + >>> my_elementary_data_index = int() + >>> op.inputs.elementary_data_index.connect(my_elementary_data_index) >>> # Instantiate operator and connect inputs in one line - >>> op = dpf.operators.logic.entity_selector_fc( + >>> op = dpf.operators.logic.elementary_data_selector_fc( ... fields_container=my_fields_container, - ... entity_number=my_entity_number, + ... elementary_data_index=my_elementary_data_index, ... ) >>> # Get output data @@ -46,20 +47,26 @@ class entity_selector_fc(Operator): """ def __init__( - self, fields_container=None, entity_number=None, config=None, server=None + self, + fields_container=None, + elementary_data_index=None, + config=None, + server=None, ): - super().__init__(name="entity_selector_fc", config=config, server=server) - self._inputs = InputsEntitySelectorFc(self) - self._outputs = OutputsEntitySelectorFc(self) + super().__init__( + name="elementary_data_selector_fc", config=config, server=server + ) + self._inputs = InputsElementaryDataSelectorFc(self) + self._outputs = OutputsElementaryDataSelectorFc(self) if fields_container is not None: self.inputs.fields_container.connect(fields_container) - if entity_number is not None: - self.inputs.entity_number.connect(entity_number) + if elementary_data_index is not None: + self.inputs.elementary_data_index.connect(elementary_data_index) @staticmethod def _spec(): - description = """Creates a scalar fields container based on the selected entity for - each field.""" + description = """Creates a scalar fields container based on the selected elementary + data for each field.""" spec = Specification( description=description, map_input_pin_spec={ @@ -70,11 +77,12 @@ def _spec(): document="""""", ), 1: PinSpecification( - name="entity_number", + name="elementary_data_index", type_names=["int32", "vector"], optional=False, - document="""One or several entity index that will be - extracted from the initial field.""", + document="""One or several elementary data index that + will be extracted from the initial + field.""", ), }, map_output_pin_spec={ @@ -102,7 +110,9 @@ def default_config(server=None): Server with channel connected to the remote or local instance. When ``None``, attempts to use the global server. """ - return Operator.default_config(name="entity_selector_fc", server=server) + return Operator.default_config( + name="elementary_data_selector_fc", server=server + ) @property def inputs(self): @@ -110,7 +120,7 @@ def inputs(self): Returns -------- - inputs : InputsEntitySelectorFc + inputs : InputsElementaryDataSelectorFc """ return super().inputs @@ -120,33 +130,35 @@ def outputs(self): Returns -------- - outputs : OutputsEntitySelectorFc + outputs : OutputsElementaryDataSelectorFc """ return super().outputs -class InputsEntitySelectorFc(_Inputs): +class InputsElementaryDataSelectorFc(_Inputs): """Intermediate class used to connect user inputs to - entity_selector_fc operator. + elementary_data_selector_fc operator. Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector_fc() + >>> op = dpf.operators.logic.elementary_data_selector_fc() >>> my_fields_container = dpf.FieldsContainer() >>> op.inputs.fields_container.connect(my_fields_container) - >>> my_entity_number = int() - >>> op.inputs.entity_number.connect(my_entity_number) + >>> my_elementary_data_index = int() + >>> op.inputs.elementary_data_index.connect(my_elementary_data_index) """ def __init__(self, op: Operator): - super().__init__(entity_selector_fc._spec().inputs, op) + super().__init__(elementary_data_selector_fc._spec().inputs, op) self._fields_container = Input( - entity_selector_fc._spec().input_pin(0), 0, op, -1 + elementary_data_selector_fc._spec().input_pin(0), 0, op, -1 ) self._inputs.append(self._fields_container) - self._entity_number = Input(entity_selector_fc._spec().input_pin(1), 1, op, -1) - self._inputs.append(self._entity_number) + self._elementary_data_index = Input( + elementary_data_selector_fc._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._elementary_data_index) @property def fields_container(self): @@ -159,7 +171,7 @@ def fields_container(self): Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector_fc() + >>> op = dpf.operators.logic.elementary_data_selector_fc() >>> op.inputs.fields_container.connect(my_fields_container) >>> # or >>> op.inputs.fields_container(my_fields_container) @@ -167,42 +179,45 @@ def fields_container(self): return self._fields_container @property - def entity_number(self): - """Allows to connect entity_number input to the operator. + def elementary_data_index(self): + """Allows to connect elementary_data_index input to the operator. - One or several entity index that will be - extracted from the initial field. + One or several elementary data index that + will be extracted from the initial + field. Parameters ---------- - my_entity_number : int + my_elementary_data_index : int Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector_fc() - >>> op.inputs.entity_number.connect(my_entity_number) + >>> op = dpf.operators.logic.elementary_data_selector_fc() + >>> op.inputs.elementary_data_index.connect(my_elementary_data_index) >>> # or - >>> op.inputs.entity_number(my_entity_number) + >>> op.inputs.elementary_data_index(my_elementary_data_index) """ - return self._entity_number + return self._elementary_data_index -class OutputsEntitySelectorFc(_Outputs): +class OutputsElementaryDataSelectorFc(_Outputs): """Intermediate class used to get outputs from - entity_selector_fc operator. + elementary_data_selector_fc operator. Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector_fc() + >>> op = dpf.operators.logic.elementary_data_selector_fc() >>> # Connect inputs : op.inputs. ... >>> result_fields_container = op.outputs.fields_container() """ def __init__(self, op: Operator): - super().__init__(entity_selector_fc._spec().outputs, op) - self._fields_container = Output(entity_selector_fc._spec().output_pin(0), 0, op) + super().__init__(elementary_data_selector_fc._spec().outputs, op) + self._fields_container = Output( + elementary_data_selector_fc._spec().output_pin(0), 0, op + ) self._outputs.append(self._fields_container) @property @@ -216,7 +231,7 @@ def fields_container(self): Examples -------- >>> from ansys.dpf import core as dpf - >>> op = dpf.operators.logic.entity_selector_fc() + >>> op = dpf.operators.logic.elementary_data_selector_fc() >>> # Connect inputs : op.inputs. ... >>> result_fields_container = op.outputs.fields_container() """ # noqa: E501 diff --git a/src/ansys/dpf/core/operators/mapping/fft.py b/src/ansys/dpf/core/operators/mapping/fft.py index a68fdc0c35..7323a94c48 100644 --- a/src/ansys/dpf/core/operators/mapping/fft.py +++ b/src/ansys/dpf/core/operators/mapping/fft.py @@ -12,7 +12,7 @@ class fft(Operator): """Computes the Fast Fourier Transform on each component of input Field - or each field of input Fields Fontainer (you can use + or each field of input Fields Container (you can use transpose_fields_container to have relevant scoping). Fields are assumed with the same scoping, number of components and representing equally spaced data, ideally resampled to have a 2^n @@ -88,7 +88,7 @@ def __init__( @staticmethod def _spec(): description = """Computes the Fast Fourier Transform on each component of input Field - or each field of input Fields Fontainer (you can use + or each field of input Fields Container (you can use transpose_fields_container to have relevant scoping). Fields are assumed with the same scoping, number of components and representing equally spaced data, ideally diff --git a/src/ansys/dpf/core/operators/math/__init__.py b/src/ansys/dpf/core/operators/math/__init__.py index 03bf94f178..d6239c17bd 100644 --- a/src/ansys/dpf/core/operators/math/__init__.py +++ b/src/ansys/dpf/core/operators/math/__init__.py @@ -49,6 +49,7 @@ from .matrix_inverse import matrix_inverse from .minus import minus from .minus_fc import minus_fc +from .modal_damping_ratio import modal_damping_ratio from .modal_participation import modal_participation from .modal_superposition import modal_superposition from .modulus import modulus diff --git a/src/ansys/dpf/core/operators/math/modal_damping_ratio.py b/src/ansys/dpf/core/operators/math/modal_damping_ratio.py new file mode 100644 index 0000000000..8e1ad50417 --- /dev/null +++ b/src/ansys/dpf/core/operators/math/modal_damping_ratio.py @@ -0,0 +1,341 @@ +""" +modal_damping_ratio +=================== +Autogenerated DPF operator classes. +""" +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification + + +class modal_damping_ratio(Operator): + """Computes damping ratio for each mode shape as X_i = const + ratio_i + + m_coefficient / (2*omega_i) + k_coefficient * omega_i/2. + + Parameters + ---------- + natural_freq : FieldsContainer + Input vector expects natural frequencies. + const_ratio : float, optional + Constant modal damping ratio + ratio_by_modes : optional + Modal damping ratio for each mode shape + m_coefficient : float + Global mass matrix multiplier + k_coefficient : float + Global stiffness matrix multiplier + + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.math.modal_damping_ratio() + + >>> # Make input connections + >>> my_natural_freq = dpf.FieldsContainer() + >>> op.inputs.natural_freq.connect(my_natural_freq) + >>> my_const_ratio = float() + >>> op.inputs.const_ratio.connect(my_const_ratio) + >>> my_ratio_by_modes = dpf.() + >>> op.inputs.ratio_by_modes.connect(my_ratio_by_modes) + >>> my_m_coefficient = float() + >>> op.inputs.m_coefficient.connect(my_m_coefficient) + >>> my_k_coefficient = float() + >>> op.inputs.k_coefficient.connect(my_k_coefficient) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.math.modal_damping_ratio( + ... natural_freq=my_natural_freq, + ... const_ratio=my_const_ratio, + ... ratio_by_modes=my_ratio_by_modes, + ... m_coefficient=my_m_coefficient, + ... k_coefficient=my_k_coefficient, + ... ) + + >>> # Get output data + >>> result_field = op.outputs.field() + """ + + def __init__( + self, + natural_freq=None, + const_ratio=None, + ratio_by_modes=None, + m_coefficient=None, + k_coefficient=None, + config=None, + server=None, + ): + super().__init__(name="modal_damping_ratio", config=config, server=server) + self._inputs = InputsModalDampingRatio(self) + self._outputs = OutputsModalDampingRatio(self) + if natural_freq is not None: + self.inputs.natural_freq.connect(natural_freq) + if const_ratio is not None: + self.inputs.const_ratio.connect(const_ratio) + if ratio_by_modes is not None: + self.inputs.ratio_by_modes.connect(ratio_by_modes) + if m_coefficient is not None: + self.inputs.m_coefficient.connect(m_coefficient) + if k_coefficient is not None: + self.inputs.k_coefficient.connect(k_coefficient) + + @staticmethod + def _spec(): + description = """Computes damping ratio for each mode shape as X_i = const + ratio_i + + m_coefficient / (2*omega_i) + k_coefficient * omega_i/2.""" + spec = Specification( + description=description, + map_input_pin_spec={ + 0: PinSpecification( + name="natural_freq", + type_names=["fields_container"], + optional=False, + document="""Input vector expects natural frequencies.""", + ), + 1: PinSpecification( + name="const_ratio", + type_names=["double"], + optional=True, + document="""Constant modal damping ratio""", + ), + 2: PinSpecification( + name="ratio_by_modes", + type_names=["vector"], + optional=True, + document="""Modal damping ratio for each mode shape""", + ), + 3: PinSpecification( + name="m_coefficient", + type_names=["double"], + optional=False, + document="""Global mass matrix multiplier""", + ), + 4: PinSpecification( + name="k_coefficient", + type_names=["double"], + optional=False, + document="""Global stiffness matrix multiplier""", + ), + }, + map_output_pin_spec={ + 0: PinSpecification( + name="field", + type_names=["field"], + optional=False, + document="""Field of modal damping ratio.""", + ), + }, + ) + return spec + + @staticmethod + def default_config(server=None): + """Returns the default config of the operator. + + This config can then be changed to the user needs and be used to + instantiate the operator. The Configuration allows to customize + how the operation will be processed by the operator. + + Parameters + ---------- + server : server.DPFServer, optional + Server with channel connected to the remote or local instance. When + ``None``, attempts to use the global server. + """ + return Operator.default_config(name="modal_damping_ratio", server=server) + + @property + def inputs(self): + """Enables to connect inputs to the operator + + Returns + -------- + inputs : InputsModalDampingRatio + """ + return super().inputs + + @property + def outputs(self): + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs : OutputsModalDampingRatio + """ + return super().outputs + + +class InputsModalDampingRatio(_Inputs): + """Intermediate class used to connect user inputs to + modal_damping_ratio operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.math.modal_damping_ratio() + >>> my_natural_freq = dpf.FieldsContainer() + >>> op.inputs.natural_freq.connect(my_natural_freq) + >>> my_const_ratio = float() + >>> op.inputs.const_ratio.connect(my_const_ratio) + >>> my_ratio_by_modes = dpf.() + >>> op.inputs.ratio_by_modes.connect(my_ratio_by_modes) + >>> my_m_coefficient = float() + >>> op.inputs.m_coefficient.connect(my_m_coefficient) + >>> my_k_coefficient = float() + >>> op.inputs.k_coefficient.connect(my_k_coefficient) + """ + + def __init__(self, op: Operator): + super().__init__(modal_damping_ratio._spec().inputs, op) + self._natural_freq = Input(modal_damping_ratio._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._natural_freq) + self._const_ratio = Input(modal_damping_ratio._spec().input_pin(1), 1, op, -1) + self._inputs.append(self._const_ratio) + self._ratio_by_modes = Input( + modal_damping_ratio._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._ratio_by_modes) + self._m_coefficient = Input(modal_damping_ratio._spec().input_pin(3), 3, op, -1) + self._inputs.append(self._m_coefficient) + self._k_coefficient = Input(modal_damping_ratio._spec().input_pin(4), 4, op, -1) + self._inputs.append(self._k_coefficient) + + @property + def natural_freq(self): + """Allows to connect natural_freq input to the operator. + + Input vector expects natural frequencies. + + Parameters + ---------- + my_natural_freq : FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.math.modal_damping_ratio() + >>> op.inputs.natural_freq.connect(my_natural_freq) + >>> # or + >>> op.inputs.natural_freq(my_natural_freq) + """ + return self._natural_freq + + @property + def const_ratio(self): + """Allows to connect const_ratio input to the operator. + + Constant modal damping ratio + + Parameters + ---------- + my_const_ratio : float + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.math.modal_damping_ratio() + >>> op.inputs.const_ratio.connect(my_const_ratio) + >>> # or + >>> op.inputs.const_ratio(my_const_ratio) + """ + return self._const_ratio + + @property + def ratio_by_modes(self): + """Allows to connect ratio_by_modes input to the operator. + + Modal damping ratio for each mode shape + + Parameters + ---------- + my_ratio_by_modes : + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.math.modal_damping_ratio() + >>> op.inputs.ratio_by_modes.connect(my_ratio_by_modes) + >>> # or + >>> op.inputs.ratio_by_modes(my_ratio_by_modes) + """ + return self._ratio_by_modes + + @property + def m_coefficient(self): + """Allows to connect m_coefficient input to the operator. + + Global mass matrix multiplier + + Parameters + ---------- + my_m_coefficient : float + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.math.modal_damping_ratio() + >>> op.inputs.m_coefficient.connect(my_m_coefficient) + >>> # or + >>> op.inputs.m_coefficient(my_m_coefficient) + """ + return self._m_coefficient + + @property + def k_coefficient(self): + """Allows to connect k_coefficient input to the operator. + + Global stiffness matrix multiplier + + Parameters + ---------- + my_k_coefficient : float + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.math.modal_damping_ratio() + >>> op.inputs.k_coefficient.connect(my_k_coefficient) + >>> # or + >>> op.inputs.k_coefficient(my_k_coefficient) + """ + return self._k_coefficient + + +class OutputsModalDampingRatio(_Outputs): + """Intermediate class used to get outputs from + modal_damping_ratio operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.math.modal_damping_ratio() + >>> # Connect inputs : op.inputs. ... + >>> result_field = op.outputs.field() + """ + + def __init__(self, op: Operator): + super().__init__(modal_damping_ratio._spec().outputs, op) + self._field = Output(modal_damping_ratio._spec().output_pin(0), 0, op) + self._outputs.append(self._field) + + @property + def field(self): + """Allows to get field output of the operator + + Returns + ---------- + my_field : Field + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.math.modal_damping_ratio() + >>> # Connect inputs : op.inputs. ... + >>> result_field = op.outputs.field() + """ # noqa: E501 + return self._field diff --git a/src/ansys/dpf/core/operators/mesh/__init__.py b/src/ansys/dpf/core/operators/mesh/__init__.py index 9514ab5e6a..75fd457fa3 100644 --- a/src/ansys/dpf/core/operators/mesh/__init__.py +++ b/src/ansys/dpf/core/operators/mesh/__init__.py @@ -7,6 +7,7 @@ from .from_field import from_field from .from_scoping import from_scoping from .from_scopings import from_scopings +from .iso_surfaces import iso_surfaces from .make_plane_levelset import make_plane_levelset from .make_sphere_levelset import make_sphere_levelset from .mesh_clip import mesh_clip diff --git a/src/ansys/dpf/core/operators/mesh/iso_surfaces.py b/src/ansys/dpf/core/operators/mesh/iso_surfaces.py new file mode 100644 index 0000000000..ca91fe6be5 --- /dev/null +++ b/src/ansys/dpf/core/operators/mesh/iso_surfaces.py @@ -0,0 +1,418 @@ +""" +iso_surfaces +============ +Autogenerated DPF operator classes. +""" +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification + + +class iso_surfaces(Operator): + """Extract multiple iso-contours from mesh_cut operator and set it into a + meshes container. If pin 1 is provided, 'num_surfaces' iso- + contours will be computed, ranging from 'min_value' to 'max_value' + linearly. If pin 4 is provided, the iso-values are the one set by + the user. The iso-values are stored into a FieldsContainer. + + Parameters + ---------- + field : Field + Field containing the values for the iso- + surface computation. the mesh can be + retrieved from this field's support + or through pin 2. + num_surfaces : int, optional + If provided, iso_values are linearly computed + between the min and the max of the + field of results. if not, iso_values + must be provided by the user through + pin 4 + mesh : MeshedRegion, optional + Mesh to compute the iso-surface from. used + when not given through the support of + the field in pin 0. + slice_surfaces : bool + True: slicing will also take into account + shell and skin elements. false: + slicing will ignore shell and skin + elements. the default is true. + vector_iso_values : optional + If provided, user defined iso_values to + compute. if not provided, iso_values + are linearly compute between the min + and the max of the field of results. + + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.mesh.iso_surfaces() + + >>> # Make input connections + >>> my_field = dpf.Field() + >>> op.inputs.field.connect(my_field) + >>> my_num_surfaces = int() + >>> op.inputs.num_surfaces.connect(my_num_surfaces) + >>> my_mesh = dpf.MeshedRegion() + >>> op.inputs.mesh.connect(my_mesh) + >>> my_slice_surfaces = bool() + >>> op.inputs.slice_surfaces.connect(my_slice_surfaces) + >>> my_vector_iso_values = dpf.() + >>> op.inputs.vector_iso_values.connect(my_vector_iso_values) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.mesh.iso_surfaces( + ... field=my_field, + ... num_surfaces=my_num_surfaces, + ... mesh=my_mesh, + ... slice_surfaces=my_slice_surfaces, + ... vector_iso_values=my_vector_iso_values, + ... ) + + >>> # Get output data + >>> result_meshes = op.outputs.meshes() + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__( + self, + field=None, + num_surfaces=None, + mesh=None, + slice_surfaces=None, + vector_iso_values=None, + config=None, + server=None, + ): + super().__init__(name="iso_surfaces", config=config, server=server) + self._inputs = InputsIsoSurfaces(self) + self._outputs = OutputsIsoSurfaces(self) + if field is not None: + self.inputs.field.connect(field) + if num_surfaces is not None: + self.inputs.num_surfaces.connect(num_surfaces) + if mesh is not None: + self.inputs.mesh.connect(mesh) + if slice_surfaces is not None: + self.inputs.slice_surfaces.connect(slice_surfaces) + if vector_iso_values is not None: + self.inputs.vector_iso_values.connect(vector_iso_values) + + @staticmethod + def _spec(): + description = """Extract multiple iso-contours from mesh_cut operator and set it into a + meshes container. If pin 1 is provided, "num_surfaces" + iso-contours will be computed, ranging from "min_value" to + "max_value" linearly. If pin 4 is provided, the iso-values + are the one set by the user. The iso-values are stored + into a FieldsContainer.""" + spec = Specification( + description=description, + map_input_pin_spec={ + 0: PinSpecification( + name="field", + type_names=["field"], + optional=False, + document="""Field containing the values for the iso- + surface computation. the mesh can be + retrieved from this field's support + or through pin 2.""", + ), + 1: PinSpecification( + name="num_surfaces", + type_names=["int32"], + optional=True, + document="""If provided, iso_values are linearly computed + between the min and the max of the + field of results. if not, iso_values + must be provided by the user through + pin 4""", + ), + 2: PinSpecification( + name="mesh", + type_names=["meshed_region"], + optional=True, + document="""Mesh to compute the iso-surface from. used + when not given through the support of + the field in pin 0.""", + ), + 3: PinSpecification( + name="slice_surfaces", + type_names=["bool"], + optional=False, + document="""True: slicing will also take into account + shell and skin elements. false: + slicing will ignore shell and skin + elements. the default is true.""", + ), + 4: PinSpecification( + name="vector_iso_values", + type_names=["vector"], + optional=True, + document="""If provided, user defined iso_values to + compute. if not provided, iso_values + are linearly compute between the min + and the max of the field of results.""", + ), + }, + map_output_pin_spec={ + 0: PinSpecification( + name="meshes", + type_names=["meshes_container"], + optional=False, + document="""""", + ), + 1: PinSpecification( + name="fields_container", + type_names=["fields_container"], + optional=False, + document="""""", + ), + }, + ) + return spec + + @staticmethod + def default_config(server=None): + """Returns the default config of the operator. + + This config can then be changed to the user needs and be used to + instantiate the operator. The Configuration allows to customize + how the operation will be processed by the operator. + + Parameters + ---------- + server : server.DPFServer, optional + Server with channel connected to the remote or local instance. When + ``None``, attempts to use the global server. + """ + return Operator.default_config(name="iso_surfaces", server=server) + + @property + def inputs(self): + """Enables to connect inputs to the operator + + Returns + -------- + inputs : InputsIsoSurfaces + """ + return super().inputs + + @property + def outputs(self): + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs : OutputsIsoSurfaces + """ + return super().outputs + + +class InputsIsoSurfaces(_Inputs): + """Intermediate class used to connect user inputs to + iso_surfaces operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> my_field = dpf.Field() + >>> op.inputs.field.connect(my_field) + >>> my_num_surfaces = int() + >>> op.inputs.num_surfaces.connect(my_num_surfaces) + >>> my_mesh = dpf.MeshedRegion() + >>> op.inputs.mesh.connect(my_mesh) + >>> my_slice_surfaces = bool() + >>> op.inputs.slice_surfaces.connect(my_slice_surfaces) + >>> my_vector_iso_values = dpf.() + >>> op.inputs.vector_iso_values.connect(my_vector_iso_values) + """ + + def __init__(self, op: Operator): + super().__init__(iso_surfaces._spec().inputs, op) + self._field = Input(iso_surfaces._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._field) + self._num_surfaces = Input(iso_surfaces._spec().input_pin(1), 1, op, -1) + self._inputs.append(self._num_surfaces) + self._mesh = Input(iso_surfaces._spec().input_pin(2), 2, op, -1) + self._inputs.append(self._mesh) + self._slice_surfaces = Input(iso_surfaces._spec().input_pin(3), 3, op, -1) + self._inputs.append(self._slice_surfaces) + self._vector_iso_values = Input(iso_surfaces._spec().input_pin(4), 4, op, -1) + self._inputs.append(self._vector_iso_values) + + @property + def field(self): + """Allows to connect field input to the operator. + + Field containing the values for the iso- + surface computation. the mesh can be + retrieved from this field's support + or through pin 2. + + Parameters + ---------- + my_field : Field + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> op.inputs.field.connect(my_field) + >>> # or + >>> op.inputs.field(my_field) + """ + return self._field + + @property + def num_surfaces(self): + """Allows to connect num_surfaces input to the operator. + + If provided, iso_values are linearly computed + between the min and the max of the + field of results. if not, iso_values + must be provided by the user through + pin 4 + + Parameters + ---------- + my_num_surfaces : int + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> op.inputs.num_surfaces.connect(my_num_surfaces) + >>> # or + >>> op.inputs.num_surfaces(my_num_surfaces) + """ + return self._num_surfaces + + @property + def mesh(self): + """Allows to connect mesh input to the operator. + + Mesh to compute the iso-surface from. used + when not given through the support of + the field in pin 0. + + Parameters + ---------- + my_mesh : MeshedRegion + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def slice_surfaces(self): + """Allows to connect slice_surfaces input to the operator. + + True: slicing will also take into account + shell and skin elements. false: + slicing will ignore shell and skin + elements. the default is true. + + Parameters + ---------- + my_slice_surfaces : bool + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> op.inputs.slice_surfaces.connect(my_slice_surfaces) + >>> # or + >>> op.inputs.slice_surfaces(my_slice_surfaces) + """ + return self._slice_surfaces + + @property + def vector_iso_values(self): + """Allows to connect vector_iso_values input to the operator. + + If provided, user defined iso_values to + compute. if not provided, iso_values + are linearly compute between the min + and the max of the field of results. + + Parameters + ---------- + my_vector_iso_values : + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> op.inputs.vector_iso_values.connect(my_vector_iso_values) + >>> # or + >>> op.inputs.vector_iso_values(my_vector_iso_values) + """ + return self._vector_iso_values + + +class OutputsIsoSurfaces(_Outputs): + """Intermediate class used to get outputs from + iso_surfaces operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> # Connect inputs : op.inputs. ... + >>> result_meshes = op.outputs.meshes() + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(iso_surfaces._spec().outputs, op) + self._meshes = Output(iso_surfaces._spec().output_pin(0), 0, op) + self._outputs.append(self._meshes) + self._fields_container = Output(iso_surfaces._spec().output_pin(1), 1, op) + self._outputs.append(self._fields_container) + + @property + def meshes(self): + """Allows to get meshes output of the operator + + Returns + ---------- + my_meshes : MeshesContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> # Connect inputs : op.inputs. ... + >>> result_meshes = op.outputs.meshes() + """ # noqa: E501 + return self._meshes + + @property + def fields_container(self): + """Allows to get fields_container output of the operator + + Returns + ---------- + my_fields_container : FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mesh.iso_surfaces() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ # noqa: E501 + return self._fields_container diff --git a/src/ansys/dpf/core/operators/result/mapdl_section.py b/src/ansys/dpf/core/operators/result/mapdl_section.py index 1b990330be..fb27afc5b0 100644 --- a/src/ansys/dpf/core/operators/result/mapdl_section.py +++ b/src/ansys/dpf/core/operators/result/mapdl_section.py @@ -14,7 +14,7 @@ class mapdl_section(Operator): """Read the values of the section properties for a given section property field (property field that contains section information for each element of a mesh). The following keys can be used: Thickness, - NumLayers.For layered elements, the following keys can be used: + NumLayers. For layered elements, the following keys can be used: Thickness, MatID, Orientation, NumIntPoints. Parameters @@ -101,7 +101,7 @@ def _spec(): description = """Read the values of the section properties for a given section property field (property field that contains section information for each element of a mesh). The following keys can be - used: Thickness, NumLayers.For layered elements, the + used: Thickness, NumLayers. For layered elements, the following keys can be used: Thickness, MatID, Orientation, NumIntPoints.""" spec = Specification( diff --git a/src/ansys/dpf/core/operators/utility/assemble_scalars_to_matrices_fc.py b/src/ansys/dpf/core/operators/utility/assemble_scalars_to_matrices_fc.py index 2edc5adfdc..3355501e16 100644 --- a/src/ansys/dpf/core/operators/utility/assemble_scalars_to_matrices_fc.py +++ b/src/ansys/dpf/core/operators/utility/assemble_scalars_to_matrices_fc.py @@ -11,19 +11,20 @@ class assemble_scalars_to_matrices_fc(Operator): - """Take nine scalar fields and assemble them as a 3x3 matrix field. + """Take nine scalar fields container and assemble them as a 3x3 matrix + fields. Parameters ---------- - fields_container : FieldsContainer, optional - yy : Field, optional - zz : Field, optional - xy : Field, optional - yz : Field, optional - xz : Field, optional - yx : Field, optional - zy : Field, optional - zx : Field, optional + xx : FieldsContainer, optional + yy : FieldsContainer, optional + zz : FieldsContainer, optional + xy : FieldsContainer, optional + yz : FieldsContainer, optional + xz : FieldsContainer, optional + yx : FieldsContainer, optional + zy : FieldsContainer, optional + zx : FieldsContainer, optional Examples @@ -34,28 +35,28 @@ class assemble_scalars_to_matrices_fc(Operator): >>> op = dpf.operators.utility.assemble_scalars_to_matrices_fc() >>> # Make input connections - >>> my_fields_container = dpf.FieldsContainer() - >>> op.inputs.fields_container.connect(my_fields_container) - >>> my_yy = dpf.Field() + >>> my_xx = dpf.FieldsContainer() + >>> op.inputs.xx.connect(my_xx) + >>> my_yy = dpf.FieldsContainer() >>> op.inputs.yy.connect(my_yy) - >>> my_zz = dpf.Field() + >>> my_zz = dpf.FieldsContainer() >>> op.inputs.zz.connect(my_zz) - >>> my_xy = dpf.Field() + >>> my_xy = dpf.FieldsContainer() >>> op.inputs.xy.connect(my_xy) - >>> my_yz = dpf.Field() + >>> my_yz = dpf.FieldsContainer() >>> op.inputs.yz.connect(my_yz) - >>> my_xz = dpf.Field() + >>> my_xz = dpf.FieldsContainer() >>> op.inputs.xz.connect(my_xz) - >>> my_yx = dpf.Field() + >>> my_yx = dpf.FieldsContainer() >>> op.inputs.yx.connect(my_yx) - >>> my_zy = dpf.Field() + >>> my_zy = dpf.FieldsContainer() >>> op.inputs.zy.connect(my_zy) - >>> my_zx = dpf.Field() + >>> my_zx = dpf.FieldsContainer() >>> op.inputs.zx.connect(my_zx) >>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.utility.assemble_scalars_to_matrices_fc( - ... fields_container=my_fields_container, + ... xx=my_xx, ... yy=my_yy, ... zz=my_zz, ... xy=my_xy, @@ -72,7 +73,7 @@ class assemble_scalars_to_matrices_fc(Operator): def __init__( self, - fields_container=None, + xx=None, yy=None, zz=None, xy=None, @@ -89,8 +90,8 @@ def __init__( ) self._inputs = InputsAssembleScalarsToMatricesFc(self) self._outputs = OutputsAssembleScalarsToMatricesFc(self) - if fields_container is not None: - self.inputs.fields_container.connect(fields_container) + if xx is not None: + self.inputs.xx.connect(xx) if yy is not None: self.inputs.yy.connect(yy) if zz is not None: @@ -110,63 +111,62 @@ def __init__( @staticmethod def _spec(): - description = ( - """Take nine scalar fields and assemble them as a 3x3 matrix field.""" - ) + description = """Take nine scalar fields container and assemble them as a 3x3 matrix + fields.""" spec = Specification( description=description, map_input_pin_spec={ 0: PinSpecification( - name="fields_container", + name="xx", type_names=["fields_container"], optional=True, document="""""", ), 1: PinSpecification( name="yy", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), 2: PinSpecification( name="zz", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), 3: PinSpecification( name="xy", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), 4: PinSpecification( name="yz", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), 5: PinSpecification( name="xz", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), 6: PinSpecification( name="yx", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), 7: PinSpecification( name="zy", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), 8: PinSpecification( name="zx", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), @@ -229,32 +229,32 @@ class InputsAssembleScalarsToMatricesFc(_Inputs): -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.utility.assemble_scalars_to_matrices_fc() - >>> my_fields_container = dpf.FieldsContainer() - >>> op.inputs.fields_container.connect(my_fields_container) - >>> my_yy = dpf.Field() + >>> my_xx = dpf.FieldsContainer() + >>> op.inputs.xx.connect(my_xx) + >>> my_yy = dpf.FieldsContainer() >>> op.inputs.yy.connect(my_yy) - >>> my_zz = dpf.Field() + >>> my_zz = dpf.FieldsContainer() >>> op.inputs.zz.connect(my_zz) - >>> my_xy = dpf.Field() + >>> my_xy = dpf.FieldsContainer() >>> op.inputs.xy.connect(my_xy) - >>> my_yz = dpf.Field() + >>> my_yz = dpf.FieldsContainer() >>> op.inputs.yz.connect(my_yz) - >>> my_xz = dpf.Field() + >>> my_xz = dpf.FieldsContainer() >>> op.inputs.xz.connect(my_xz) - >>> my_yx = dpf.Field() + >>> my_yx = dpf.FieldsContainer() >>> op.inputs.yx.connect(my_yx) - >>> my_zy = dpf.Field() + >>> my_zy = dpf.FieldsContainer() >>> op.inputs.zy.connect(my_zy) - >>> my_zx = dpf.Field() + >>> my_zx = dpf.FieldsContainer() >>> op.inputs.zx.connect(my_zx) """ def __init__(self, op: Operator): super().__init__(assemble_scalars_to_matrices_fc._spec().inputs, op) - self._fields_container = Input( + self._xx = Input( assemble_scalars_to_matrices_fc._spec().input_pin(0), 0, op, -1 ) - self._inputs.append(self._fields_container) + self._inputs.append(self._xx) self._yy = Input( assemble_scalars_to_matrices_fc._spec().input_pin(1), 1, op, -1 ) @@ -289,22 +289,22 @@ def __init__(self, op: Operator): self._inputs.append(self._zx) @property - def fields_container(self): - """Allows to connect fields_container input to the operator. + def xx(self): + """Allows to connect xx input to the operator. Parameters ---------- - my_fields_container : FieldsContainer + my_xx : FieldsContainer Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.utility.assemble_scalars_to_matrices_fc() - >>> op.inputs.fields_container.connect(my_fields_container) + >>> op.inputs.xx.connect(my_xx) >>> # or - >>> op.inputs.fields_container(my_fields_container) + >>> op.inputs.xx(my_xx) """ - return self._fields_container + return self._xx @property def yy(self): @@ -312,7 +312,7 @@ def yy(self): Parameters ---------- - my_yy : Field + my_yy : FieldsContainer Examples -------- @@ -330,7 +330,7 @@ def zz(self): Parameters ---------- - my_zz : Field + my_zz : FieldsContainer Examples -------- @@ -348,7 +348,7 @@ def xy(self): Parameters ---------- - my_xy : Field + my_xy : FieldsContainer Examples -------- @@ -366,7 +366,7 @@ def yz(self): Parameters ---------- - my_yz : Field + my_yz : FieldsContainer Examples -------- @@ -384,7 +384,7 @@ def xz(self): Parameters ---------- - my_xz : Field + my_xz : FieldsContainer Examples -------- @@ -402,7 +402,7 @@ def yx(self): Parameters ---------- - my_yx : Field + my_yx : FieldsContainer Examples -------- @@ -420,7 +420,7 @@ def zy(self): Parameters ---------- - my_zy : Field + my_zy : FieldsContainer Examples -------- @@ -438,7 +438,7 @@ def zx(self): Parameters ---------- - my_zx : Field + my_zx : FieldsContainer Examples -------- diff --git a/src/ansys/dpf/core/operators/utility/assemble_scalars_to_vectors_fc.py b/src/ansys/dpf/core/operators/utility/assemble_scalars_to_vectors_fc.py index 9a2e172e22..c17b6f3744 100644 --- a/src/ansys/dpf/core/operators/utility/assemble_scalars_to_vectors_fc.py +++ b/src/ansys/dpf/core/operators/utility/assemble_scalars_to_vectors_fc.py @@ -11,13 +11,14 @@ class assemble_scalars_to_vectors_fc(Operator): - """Takes three scalar fields and assembles them as a 3D vector field. + """Takes three scalar fields container and assembles them as a 3D vector + fields container. Parameters ---------- - fields_container : FieldsContainer, optional - y : Field, optional - z : Field, optional + x : FieldsContainer, optional + y : FieldsContainer, optional + z : FieldsContainer, optional Examples @@ -28,16 +29,16 @@ class assemble_scalars_to_vectors_fc(Operator): >>> op = dpf.operators.utility.assemble_scalars_to_vectors_fc() >>> # Make input connections - >>> my_fields_container = dpf.FieldsContainer() - >>> op.inputs.fields_container.connect(my_fields_container) - >>> my_y = dpf.Field() + >>> my_x = dpf.FieldsContainer() + >>> op.inputs.x.connect(my_x) + >>> my_y = dpf.FieldsContainer() >>> op.inputs.y.connect(my_y) - >>> my_z = dpf.Field() + >>> my_z = dpf.FieldsContainer() >>> op.inputs.z.connect(my_z) >>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.utility.assemble_scalars_to_vectors_fc( - ... fields_container=my_fields_container, + ... x=my_x, ... y=my_y, ... z=my_z, ... ) @@ -46,14 +47,14 @@ class assemble_scalars_to_vectors_fc(Operator): >>> result_fields_container = op.outputs.fields_container() """ - def __init__(self, fields_container=None, y=None, z=None, config=None, server=None): + def __init__(self, x=None, y=None, z=None, config=None, server=None): super().__init__( name="assemble_scalars_to_vectors_fc", config=config, server=server ) self._inputs = InputsAssembleScalarsToVectorsFc(self) self._outputs = OutputsAssembleScalarsToVectorsFc(self) - if fields_container is not None: - self.inputs.fields_container.connect(fields_container) + if x is not None: + self.inputs.x.connect(x) if y is not None: self.inputs.y.connect(y) if z is not None: @@ -61,27 +62,26 @@ def __init__(self, fields_container=None, y=None, z=None, config=None, server=No @staticmethod def _spec(): - description = ( - """Takes three scalar fields and assembles them as a 3D vector field.""" - ) + description = """Takes three scalar fields container and assembles them as a 3D vector + fields container.""" spec = Specification( description=description, map_input_pin_spec={ 0: PinSpecification( - name="fields_container", + name="x", type_names=["fields_container"], optional=True, document="""""", ), 1: PinSpecification( name="y", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), 2: PinSpecification( name="z", - type_names=["field"], + type_names=["fields_container"], optional=True, document="""""", ), @@ -144,42 +144,40 @@ class InputsAssembleScalarsToVectorsFc(_Inputs): -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.utility.assemble_scalars_to_vectors_fc() - >>> my_fields_container = dpf.FieldsContainer() - >>> op.inputs.fields_container.connect(my_fields_container) - >>> my_y = dpf.Field() + >>> my_x = dpf.FieldsContainer() + >>> op.inputs.x.connect(my_x) + >>> my_y = dpf.FieldsContainer() >>> op.inputs.y.connect(my_y) - >>> my_z = dpf.Field() + >>> my_z = dpf.FieldsContainer() >>> op.inputs.z.connect(my_z) """ def __init__(self, op: Operator): super().__init__(assemble_scalars_to_vectors_fc._spec().inputs, op) - self._fields_container = Input( - assemble_scalars_to_vectors_fc._spec().input_pin(0), 0, op, -1 - ) - self._inputs.append(self._fields_container) + self._x = Input(assemble_scalars_to_vectors_fc._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._x) self._y = Input(assemble_scalars_to_vectors_fc._spec().input_pin(1), 1, op, -1) self._inputs.append(self._y) self._z = Input(assemble_scalars_to_vectors_fc._spec().input_pin(2), 2, op, -1) self._inputs.append(self._z) @property - def fields_container(self): - """Allows to connect fields_container input to the operator. + def x(self): + """Allows to connect x input to the operator. Parameters ---------- - my_fields_container : FieldsContainer + my_x : FieldsContainer Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.utility.assemble_scalars_to_vectors_fc() - >>> op.inputs.fields_container.connect(my_fields_container) + >>> op.inputs.x.connect(my_x) >>> # or - >>> op.inputs.fields_container(my_fields_container) + >>> op.inputs.x(my_x) """ - return self._fields_container + return self._x @property def y(self): @@ -187,7 +185,7 @@ def y(self): Parameters ---------- - my_y : Field + my_y : FieldsContainer Examples -------- @@ -205,7 +203,7 @@ def z(self): Parameters ---------- - my_z : Field + my_z : FieldsContainer Examples -------- diff --git a/src/ansys/dpf/core/operators/utility/compute_time_scoping.py b/src/ansys/dpf/core/operators/utility/compute_time_scoping.py index 23ef5c3078..aa3b8499b2 100644 --- a/src/ansys/dpf/core/operators/utility/compute_time_scoping.py +++ b/src/ansys/dpf/core/operators/utility/compute_time_scoping.py @@ -16,12 +16,14 @@ class compute_time_scoping(Operator): Parameters ---------- - time_freq_values : float or Field + time_freq_values : float or Field or TimeFreqSupport List of frequencies or times needed. to specify load steps, put a field (and not a list) in input with a scoping located on "timefreq_steps". step : int, optional + interpolation_type : int, optional + 1:ramped' or 2:stepped', default is ramped time_freq_support : TimeFreqSupport @@ -37,6 +39,8 @@ class compute_time_scoping(Operator): >>> op.inputs.time_freq_values.connect(my_time_freq_values) >>> my_step = int() >>> op.inputs.step.connect(my_step) + >>> my_interpolation_type = int() + >>> op.inputs.interpolation_type.connect(my_interpolation_type) >>> my_time_freq_support = dpf.TimeFreqSupport() >>> op.inputs.time_freq_support.connect(my_time_freq_support) @@ -44,6 +48,7 @@ class compute_time_scoping(Operator): >>> op = dpf.operators.utility.compute_time_scoping( ... time_freq_values=my_time_freq_values, ... step=my_step, + ... interpolation_type=my_interpolation_type, ... time_freq_support=my_time_freq_support, ... ) @@ -56,6 +61,7 @@ def __init__( self, time_freq_values=None, step=None, + interpolation_type=None, time_freq_support=None, config=None, server=None, @@ -67,6 +73,8 @@ def __init__( self.inputs.time_freq_values.connect(time_freq_values) if step is not None: self.inputs.step.connect(step) + if interpolation_type is not None: + self.inputs.interpolation_type.connect(interpolation_type) if time_freq_support is not None: self.inputs.time_freq_support.connect(time_freq_support) @@ -79,7 +87,12 @@ def _spec(): map_input_pin_spec={ 0: PinSpecification( name="time_freq_values", - type_names=["double", "vector", "field"], + type_names=[ + "double", + "vector", + "field", + "time_freq_support", + ], optional=False, document="""List of frequencies or times needed. to specify load steps, put a field (and @@ -92,6 +105,12 @@ def _spec(): optional=True, document="""""", ), + 4: PinSpecification( + name="interpolation_type", + type_names=["int32"], + optional=True, + document="""1:ramped' or 2:stepped', default is ramped""", + ), 8: PinSpecification( name="time_freq_support", type_names=["time_freq_support"], @@ -165,6 +184,8 @@ class InputsComputeTimeScoping(_Inputs): >>> op.inputs.time_freq_values.connect(my_time_freq_values) >>> my_step = int() >>> op.inputs.step.connect(my_step) + >>> my_interpolation_type = int() + >>> op.inputs.interpolation_type.connect(my_interpolation_type) >>> my_time_freq_support = dpf.TimeFreqSupport() >>> op.inputs.time_freq_support.connect(my_time_freq_support) """ @@ -177,6 +198,10 @@ def __init__(self, op: Operator): self._inputs.append(self._time_freq_values) self._step = Input(compute_time_scoping._spec().input_pin(2), 2, op, -1) self._inputs.append(self._step) + self._interpolation_type = Input( + compute_time_scoping._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._interpolation_type) self._time_freq_support = Input( compute_time_scoping._spec().input_pin(8), 8, op, -1 ) @@ -193,7 +218,7 @@ def time_freq_values(self): Parameters ---------- - my_time_freq_values : float or Field + my_time_freq_values : float or Field or TimeFreqSupport Examples -------- @@ -223,6 +248,26 @@ def step(self): """ return self._step + @property + def interpolation_type(self): + """Allows to connect interpolation_type input to the operator. + + 1:ramped' or 2:stepped', default is ramped + + Parameters + ---------- + my_interpolation_type : int + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.compute_time_scoping() + >>> op.inputs.interpolation_type.connect(my_interpolation_type) + >>> # or + >>> op.inputs.interpolation_type(my_interpolation_type) + """ + return self._interpolation_type + @property def time_freq_support(self): """Allows to connect time_freq_support input to the operator. diff --git a/src/ansys/dpf/core/operators/utility/make_time_freq_support_chunk_for_each.py b/src/ansys/dpf/core/operators/utility/make_time_freq_support_chunk_for_each.py new file mode 100644 index 0000000000..c544911104 --- /dev/null +++ b/src/ansys/dpf/core/operators/utility/make_time_freq_support_chunk_for_each.py @@ -0,0 +1,684 @@ +""" +make_time_freq_support_chunk_for_each +===================================== +Autogenerated DPF operator classes. +""" +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification + + +class make_time_freq_support_chunk_for_each(Operator): + """Splits a time freq support into chunks depending on evaluated result + properties,mesh size and max number of bytes accepted and calls + 'make_for_each_range' to generate a range that can be consumed by + the for_each operator + + Parameters + ---------- + target_time_freq_support : TimeFreqSupport + List of time freq support to potentially + split in chunks. + operator_to_iterate : Operator + Operator that must be reconnected with the + range values. + pin_index : int + abstract_meshed_region : MeshedRegion + The number of nodes (for "nodal" results) or + number of elements (for "elemental" + results) is used to compute the + chunk. + chunk_config : DataTree + A data tree with an int attribute + "max_num_bytes", an int attribute + "dimensionality" (average result size + by entity), a string attribute + "location" ("nodal" or"elemental") is + expected. + producer_op11 : Operator + producer_op12 : Operator + output_pin_of_producer_op11 : int + output_pin_of_producer_op12 : int + input_pin_of_consumer_op11 : int + input_pin_of_consumer_op12 : int + consumer_op11 : Operator + consumer_op12 : Operator + + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + + >>> # Make input connections + >>> my_target_time_freq_support = dpf.TimeFreqSupport() + >>> op.inputs.target_time_freq_support.connect(my_target_time_freq_support) + >>> my_operator_to_iterate = dpf.Operator() + >>> op.inputs.operator_to_iterate.connect(my_operator_to_iterate) + >>> my_pin_index = int() + >>> op.inputs.pin_index.connect(my_pin_index) + >>> my_abstract_meshed_region = dpf.MeshedRegion() + >>> op.inputs.abstract_meshed_region.connect(my_abstract_meshed_region) + >>> my_chunk_config = dpf.DataTree() + >>> op.inputs.chunk_config.connect(my_chunk_config) + >>> my_producer_op11 = dpf.Operator() + >>> op.inputs.producer_op11.connect(my_producer_op11) + >>> my_producer_op12 = dpf.Operator() + >>> op.inputs.producer_op12.connect(my_producer_op12) + >>> my_output_pin_of_producer_op11 = int() + >>> op.inputs.output_pin_of_producer_op11.connect(my_output_pin_of_producer_op11) + >>> my_output_pin_of_producer_op12 = int() + >>> op.inputs.output_pin_of_producer_op12.connect(my_output_pin_of_producer_op12) + >>> my_input_pin_of_consumer_op11 = int() + >>> op.inputs.input_pin_of_consumer_op11.connect(my_input_pin_of_consumer_op11) + >>> my_input_pin_of_consumer_op12 = int() + >>> op.inputs.input_pin_of_consumer_op12.connect(my_input_pin_of_consumer_op12) + >>> my_consumer_op11 = dpf.Operator() + >>> op.inputs.consumer_op11.connect(my_consumer_op11) + >>> my_consumer_op12 = dpf.Operator() + >>> op.inputs.consumer_op12.connect(my_consumer_op12) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each( + ... target_time_freq_support=my_target_time_freq_support, + ... operator_to_iterate=my_operator_to_iterate, + ... pin_index=my_pin_index, + ... abstract_meshed_region=my_abstract_meshed_region, + ... chunk_config=my_chunk_config, + ... producer_op11=my_producer_op11, + ... producer_op12=my_producer_op12, + ... output_pin_of_producer_op11=my_output_pin_of_producer_op11, + ... output_pin_of_producer_op12=my_output_pin_of_producer_op12, + ... input_pin_of_consumer_op11=my_input_pin_of_consumer_op11, + ... input_pin_of_consumer_op12=my_input_pin_of_consumer_op12, + ... consumer_op11=my_consumer_op11, + ... consumer_op12=my_consumer_op12, + ... ) + + >>> # Get output data + >>> result_chunks = op.outputs.chunks() + """ + + def __init__( + self, + target_time_freq_support=None, + operator_to_iterate=None, + pin_index=None, + abstract_meshed_region=None, + chunk_config=None, + producer_op11=None, + producer_op12=None, + output_pin_of_producer_op11=None, + output_pin_of_producer_op12=None, + input_pin_of_consumer_op11=None, + input_pin_of_consumer_op12=None, + consumer_op11=None, + consumer_op12=None, + config=None, + server=None, + ): + super().__init__( + name="mechanical::make_time_freq_support_chunk_for_each", + config=config, + server=server, + ) + self._inputs = InputsMakeTimeFreqSupportChunkForEach(self) + self._outputs = OutputsMakeTimeFreqSupportChunkForEach(self) + if target_time_freq_support is not None: + self.inputs.target_time_freq_support.connect(target_time_freq_support) + if operator_to_iterate is not None: + self.inputs.operator_to_iterate.connect(operator_to_iterate) + if pin_index is not None: + self.inputs.pin_index.connect(pin_index) + if abstract_meshed_region is not None: + self.inputs.abstract_meshed_region.connect(abstract_meshed_region) + if chunk_config is not None: + self.inputs.chunk_config.connect(chunk_config) + if producer_op11 is not None: + self.inputs.producer_op11.connect(producer_op11) + if producer_op12 is not None: + self.inputs.producer_op12.connect(producer_op12) + if output_pin_of_producer_op11 is not None: + self.inputs.output_pin_of_producer_op11.connect(output_pin_of_producer_op11) + if output_pin_of_producer_op12 is not None: + self.inputs.output_pin_of_producer_op12.connect(output_pin_of_producer_op12) + if input_pin_of_consumer_op11 is not None: + self.inputs.input_pin_of_consumer_op11.connect(input_pin_of_consumer_op11) + if input_pin_of_consumer_op12 is not None: + self.inputs.input_pin_of_consumer_op12.connect(input_pin_of_consumer_op12) + if consumer_op11 is not None: + self.inputs.consumer_op11.connect(consumer_op11) + if consumer_op12 is not None: + self.inputs.consumer_op12.connect(consumer_op12) + + @staticmethod + def _spec(): + description = """Splits a time freq support into chunks depending on evaluated result + properties,mesh size and max number of bytes accepted and + calls "make_for_each_range" to generate a range that can + be consumed by the for_each operator""" + spec = Specification( + description=description, + map_input_pin_spec={ + 0: PinSpecification( + name="target_time_freq_support", + type_names=["time_freq_support"], + optional=False, + document="""List of time freq support to potentially + split in chunks.""", + ), + 1: PinSpecification( + name="operator_to_iterate", + type_names=["operator"], + optional=False, + document="""Operator that must be reconnected with the + range values.""", + ), + 2: PinSpecification( + name="pin_index", + type_names=["int32"], + optional=False, + document="""""", + ), + 7: PinSpecification( + name="abstract_meshed_region", + type_names=["abstract_meshed_region"], + optional=False, + document="""The number of nodes (for "nodal" results) or + number of elements (for "elemental" + results) is used to compute the + chunk.""", + ), + 200: PinSpecification( + name="chunk_config", + type_names=["abstract_data_tree"], + optional=False, + document="""A data tree with an int attribute + "max_num_bytes", an int attribute + "dimensionality" (average result size + by entity), a string attribute + "location" ("nodal" or"elemental") is + expected.""", + ), + 1000: PinSpecification( + name="producer_op1", + type_names=["operator"], + optional=False, + document="""""", + ), + 1001: PinSpecification( + name="producer_op1", + type_names=["operator"], + optional=False, + document="""""", + ), + 1001: PinSpecification( + name="output_pin_of_producer_op1", + type_names=["int32"], + optional=False, + document="""""", + ), + 1002: PinSpecification( + name="output_pin_of_producer_op1", + type_names=["int32"], + optional=False, + document="""""", + ), + 1002: PinSpecification( + name="input_pin_of_consumer_op1", + type_names=["int32"], + optional=False, + document="""""", + ), + 1003: PinSpecification( + name="input_pin_of_consumer_op1", + type_names=["int32"], + optional=False, + document="""""", + ), + 1003: PinSpecification( + name="consumer_op1", + type_names=["operator"], + optional=False, + document="""""", + ), + 1004: PinSpecification( + name="consumer_op1", + type_names=["operator"], + optional=False, + document="""""", + ), + }, + map_output_pin_spec={ + 0: PinSpecification( + name="chunks", + optional=False, + document="""To connect to "producer_consumer_for_each" + operator on pin 0""", + ), + }, + ) + return spec + + @staticmethod + def default_config(server=None): + """Returns the default config of the operator. + + This config can then be changed to the user needs and be used to + instantiate the operator. The Configuration allows to customize + how the operation will be processed by the operator. + + Parameters + ---------- + server : server.DPFServer, optional + Server with channel connected to the remote or local instance. When + ``None``, attempts to use the global server. + """ + return Operator.default_config( + name="mechanical::make_time_freq_support_chunk_for_each", server=server + ) + + @property + def inputs(self): + """Enables to connect inputs to the operator + + Returns + -------- + inputs : InputsMakeTimeFreqSupportChunkForEach + """ + return super().inputs + + @property + def outputs(self): + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs : OutputsMakeTimeFreqSupportChunkForEach + """ + return super().outputs + + +class InputsMakeTimeFreqSupportChunkForEach(_Inputs): + """Intermediate class used to connect user inputs to + make_time_freq_support_chunk_for_each operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> my_target_time_freq_support = dpf.TimeFreqSupport() + >>> op.inputs.target_time_freq_support.connect(my_target_time_freq_support) + >>> my_operator_to_iterate = dpf.Operator() + >>> op.inputs.operator_to_iterate.connect(my_operator_to_iterate) + >>> my_pin_index = int() + >>> op.inputs.pin_index.connect(my_pin_index) + >>> my_abstract_meshed_region = dpf.MeshedRegion() + >>> op.inputs.abstract_meshed_region.connect(my_abstract_meshed_region) + >>> my_chunk_config = dpf.DataTree() + >>> op.inputs.chunk_config.connect(my_chunk_config) + >>> my_producer_op11 = dpf.Operator() + >>> op.inputs.producer_op11.connect(my_producer_op11) + >>> my_producer_op12 = dpf.Operator() + >>> op.inputs.producer_op12.connect(my_producer_op12) + >>> my_output_pin_of_producer_op11 = int() + >>> op.inputs.output_pin_of_producer_op11.connect(my_output_pin_of_producer_op11) + >>> my_output_pin_of_producer_op12 = int() + >>> op.inputs.output_pin_of_producer_op12.connect(my_output_pin_of_producer_op12) + >>> my_input_pin_of_consumer_op11 = int() + >>> op.inputs.input_pin_of_consumer_op11.connect(my_input_pin_of_consumer_op11) + >>> my_input_pin_of_consumer_op12 = int() + >>> op.inputs.input_pin_of_consumer_op12.connect(my_input_pin_of_consumer_op12) + >>> my_consumer_op11 = dpf.Operator() + >>> op.inputs.consumer_op11.connect(my_consumer_op11) + >>> my_consumer_op12 = dpf.Operator() + >>> op.inputs.consumer_op12.connect(my_consumer_op12) + """ + + def __init__(self, op: Operator): + super().__init__(make_time_freq_support_chunk_for_each._spec().inputs, op) + self._target_time_freq_support = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._target_time_freq_support) + self._operator_to_iterate = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._operator_to_iterate) + self._pin_index = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._pin_index) + self._abstract_meshed_region = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(7), 7, op, -1 + ) + self._inputs.append(self._abstract_meshed_region) + self._chunk_config = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(200), 200, op, -1 + ) + self._inputs.append(self._chunk_config) + self._producer_op11 = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1000), 1000, op, 0 + ) + self._inputs.append(self._producer_op11) + self._producer_op12 = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1001), 1001, op, 1 + ) + self._inputs.append(self._producer_op12) + self._output_pin_of_producer_op11 = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1001), 1001, op, 0 + ) + self._inputs.append(self._output_pin_of_producer_op11) + self._output_pin_of_producer_op12 = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1002), 1002, op, 1 + ) + self._inputs.append(self._output_pin_of_producer_op12) + self._input_pin_of_consumer_op11 = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1002), 1002, op, 0 + ) + self._inputs.append(self._input_pin_of_consumer_op11) + self._input_pin_of_consumer_op12 = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1003), 1003, op, 1 + ) + self._inputs.append(self._input_pin_of_consumer_op12) + self._consumer_op11 = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1003), 1003, op, 0 + ) + self._inputs.append(self._consumer_op11) + self._consumer_op12 = Input( + make_time_freq_support_chunk_for_each._spec().input_pin(1004), 1004, op, 1 + ) + self._inputs.append(self._consumer_op12) + + @property + def target_time_freq_support(self): + """Allows to connect target_time_freq_support input to the operator. + + List of time freq support to potentially + split in chunks. + + Parameters + ---------- + my_target_time_freq_support : TimeFreqSupport + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.target_time_freq_support.connect(my_target_time_freq_support) + >>> # or + >>> op.inputs.target_time_freq_support(my_target_time_freq_support) + """ + return self._target_time_freq_support + + @property + def operator_to_iterate(self): + """Allows to connect operator_to_iterate input to the operator. + + Operator that must be reconnected with the + range values. + + Parameters + ---------- + my_operator_to_iterate : Operator + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.operator_to_iterate.connect(my_operator_to_iterate) + >>> # or + >>> op.inputs.operator_to_iterate(my_operator_to_iterate) + """ + return self._operator_to_iterate + + @property + def pin_index(self): + """Allows to connect pin_index input to the operator. + + Parameters + ---------- + my_pin_index : int + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.pin_index.connect(my_pin_index) + >>> # or + >>> op.inputs.pin_index(my_pin_index) + """ + return self._pin_index + + @property + def abstract_meshed_region(self): + """Allows to connect abstract_meshed_region input to the operator. + + The number of nodes (for "nodal" results) or + number of elements (for "elemental" + results) is used to compute the + chunk. + + Parameters + ---------- + my_abstract_meshed_region : MeshedRegion + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.abstract_meshed_region.connect(my_abstract_meshed_region) + >>> # or + >>> op.inputs.abstract_meshed_region(my_abstract_meshed_region) + """ + return self._abstract_meshed_region + + @property + def chunk_config(self): + """Allows to connect chunk_config input to the operator. + + A data tree with an int attribute + "max_num_bytes", an int attribute + "dimensionality" (average result size + by entity), a string attribute + "location" ("nodal" or"elemental") is + expected. + + Parameters + ---------- + my_chunk_config : DataTree + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.chunk_config.connect(my_chunk_config) + >>> # or + >>> op.inputs.chunk_config(my_chunk_config) + """ + return self._chunk_config + + @property + def producer_op11(self): + """Allows to connect producer_op11 input to the operator. + + Parameters + ---------- + my_producer_op11 : Operator + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.producer_op11.connect(my_producer_op11) + >>> # or + >>> op.inputs.producer_op11(my_producer_op11) + """ + return self._producer_op11 + + @property + def producer_op12(self): + """Allows to connect producer_op12 input to the operator. + + Parameters + ---------- + my_producer_op12 : Operator + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.producer_op12.connect(my_producer_op12) + >>> # or + >>> op.inputs.producer_op12(my_producer_op12) + """ + return self._producer_op12 + + @property + def output_pin_of_producer_op11(self): + """Allows to connect output_pin_of_producer_op11 input to the operator. + + Parameters + ---------- + my_output_pin_of_producer_op11 : int + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.output_pin_of_producer_op11.connect(my_output_pin_of_producer_op11) + >>> # or + >>> op.inputs.output_pin_of_producer_op11(my_output_pin_of_producer_op11) + """ + return self._output_pin_of_producer_op11 + + @property + def output_pin_of_producer_op12(self): + """Allows to connect output_pin_of_producer_op12 input to the operator. + + Parameters + ---------- + my_output_pin_of_producer_op12 : int + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.output_pin_of_producer_op12.connect(my_output_pin_of_producer_op12) + >>> # or + >>> op.inputs.output_pin_of_producer_op12(my_output_pin_of_producer_op12) + """ + return self._output_pin_of_producer_op12 + + @property + def input_pin_of_consumer_op11(self): + """Allows to connect input_pin_of_consumer_op11 input to the operator. + + Parameters + ---------- + my_input_pin_of_consumer_op11 : int + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.input_pin_of_consumer_op11.connect(my_input_pin_of_consumer_op11) + >>> # or + >>> op.inputs.input_pin_of_consumer_op11(my_input_pin_of_consumer_op11) + """ + return self._input_pin_of_consumer_op11 + + @property + def input_pin_of_consumer_op12(self): + """Allows to connect input_pin_of_consumer_op12 input to the operator. + + Parameters + ---------- + my_input_pin_of_consumer_op12 : int + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.input_pin_of_consumer_op12.connect(my_input_pin_of_consumer_op12) + >>> # or + >>> op.inputs.input_pin_of_consumer_op12(my_input_pin_of_consumer_op12) + """ + return self._input_pin_of_consumer_op12 + + @property + def consumer_op11(self): + """Allows to connect consumer_op11 input to the operator. + + Parameters + ---------- + my_consumer_op11 : Operator + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.consumer_op11.connect(my_consumer_op11) + >>> # or + >>> op.inputs.consumer_op11(my_consumer_op11) + """ + return self._consumer_op11 + + @property + def consumer_op12(self): + """Allows to connect consumer_op12 input to the operator. + + Parameters + ---------- + my_consumer_op12 : Operator + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> op.inputs.consumer_op12.connect(my_consumer_op12) + >>> # or + >>> op.inputs.consumer_op12(my_consumer_op12) + """ + return self._consumer_op12 + + +class OutputsMakeTimeFreqSupportChunkForEach(_Outputs): + """Intermediate class used to get outputs from + make_time_freq_support_chunk_for_each operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> # Connect inputs : op.inputs. ... + >>> result_chunks = op.outputs.chunks() + """ + + def __init__(self, op: Operator): + super().__init__(make_time_freq_support_chunk_for_each._spec().outputs, op) + self._chunks = Output( + make_time_freq_support_chunk_for_each._spec().output_pin(0), 0, op + ) + self._outputs.append(self._chunks) + + @property + def chunks(self): + """Allows to get chunks output of the operator + + Returns + ---------- + my_chunks : + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.utility.make_time_freq_support_chunk_for_each() + >>> # Connect inputs : op.inputs. ... + >>> result_chunks = op.outputs.chunks() + """ # noqa: E501 + return self._chunks diff --git a/src/ansys/dpf/core/vtk_helper.py b/src/ansys/dpf/core/vtk_helper.py index d082926016..14030b163c 100644 --- a/src/ansys/dpf/core/vtk_helper.py +++ b/src/ansys/dpf/core/vtk_helper.py @@ -1,7 +1,6 @@ import numpy as np import pyvista as pv import ansys.dpf.core as dpf - from ansys.dpf.core import errors from vtk import ( VTK_HEXAHEDRON, @@ -209,14 +208,6 @@ def dpf_mesh_to_vtk_py(mesh, nodes, as_linear): insert_ind = np.cumsum(elem_size) insert_ind = np.hstack(([0], insert_ind))[:-1] - # if not as_linear: - # # Pre-handle semi-parabolic elements - # semi_mask = connectivity.data == -1 - # if semi_mask.any(): - # # Modify -1 connectivity values - # repeated_data_pointers = connectivity._data_pointer.repeat(repeats=elem_size) - # connectivity.data[semi_mask] = connectivity.data[repeated_data_pointers[semi_mask]] - # partition cells in vtk format cells = np.insert(connectivity.data, insert_ind, elem_size) diff --git a/src/ansys/dpf/gate/__init__.py b/src/ansys/dpf/gate/__init__.py new file mode 100644 index 0000000000..aff94addd0 --- /dev/null +++ b/src/ansys/dpf/gate/__init__.py @@ -0,0 +1,87 @@ +from .generated import dpf_data_tree_capi +from .generated import field_mapping_capi +from .generated import generic_data_container_capi +from .generated import data_processing_capi +from .generated import collection_capi +from .generated import remote_workflow_capi +from .generated import data_processing_abstract_api +from .generated import operator_abstract_api +from .generated import any_abstract_api +from .generated import external_data_abstract_api +from .generated import cyclic_support_abstract_api +from .generated import time_freq_support_abstract_api +from .generated import unit_capi +from .generated import f_e_model_capi +from .generated import dpf_vector_capi +from .generated import meshed_region_capi +from .generated import operator_specification_capi +from .generated import session_abstract_api +from .generated import session_capi +from .generated import unit_abstract_api +from .generated import data_processing_error_capi +from .generated import capi +from .generated import any_capi +from .generated import operator_config_abstract_api +from .generated import label_space_abstract_api +from .generated import operator_config_capi +from .generated import streams_capi +from .generated import field_capi +from .generated import generic_support_capi +from .generated import operator_specification_abstract_api +from .generated import result_definition_capi +from .generated import workflow_abstract_api +from .generated import result_info_abstract_api +from .generated import external_operator_capi +from .generated import data_base_abstract_api +from .generated import result_info_capi +from .generated import scoping_abstract_api +from .generated import fields_container_capi +from .generated import materials_container_capi +from .generated import data_sources_capi +from .generated import generic_data_container_abstract_api +from .generated import fields_container_abstract_api +from .generated import support_query_abstract_api +from .generated import time_freq_support_capi +from .generated import field_definition_capi +from .generated import result_definition_abstract_api +from .generated import collection_abstract_api +from .generated import scoping_capi +from .generated import data_sources_abstract_api +from .generated import generic_support_abstract_api +from .generated import string_field_abstract_api +from .generated import tmp_dir_abstract_api +from .generated import data_processing_error_abstract_api +from .generated import data_base_capi +from .generated import tmp_dir_capi +from .generated import meshed_region_abstract_api +from .generated import field_abstract_api +from .generated import streams_abstract_api +from .generated import string_field_capi +from .generated import remote_workflow_abstract_api +from .generated import workflow_capi +from .generated import field_mapping_abstract_api +from .generated import field_definition_abstract_api +from .generated import specification_externalization_capi +from .generated import specification_externalization_abstract_api +from .generated import label_space_capi +from .generated import remote_operator_capi +from .generated import custom_type_field_capi +from .generated import remote_operator_abstract_api +from .generated import property_field_abstract_api +from .generated import serialization_stream_abstract_api +from .generated import dpf_vector_abstract_api +from .generated import custom_type_field_abstract_api +from .generated import support_query_capi +from .generated import materials_container_abstract_api +from .generated import cyclic_support_capi +from .generated import support_capi +from .generated import dpf_data_tree_abstract_api +from .generated import client_abstract_api +from .generated import external_data_capi +from .generated import property_field_capi +from .generated import serialization_stream_capi +from .generated import client_capi +from .generated import f_e_model_abstract_api +from .generated import operator_capi +from .generated import external_operator_abstract_api +from .generated import support_abstract_api diff --git a/src/ansys/dpf/gate/_version.py b/src/ansys/dpf/gate/_version.py new file mode 100644 index 0000000000..e62d53dcaa --- /dev/null +++ b/src/ansys/dpf/gate/_version.py @@ -0,0 +1,7 @@ +"""Version for ansys-dpf-gate""" +# major, minor, patch +version_info = 0, 4, "2.dev0" +__ansys_version__ = "241" + +# Nice string for the version +__version__ = ".".join(map(str, version_info)) diff --git a/src/ansys/dpf/gate/any_grpcapi.py b/src/ansys/dpf/gate/any_grpcapi.py new file mode 100644 index 0000000000..79fcaa5139 --- /dev/null +++ b/src/ansys/dpf/gate/any_grpcapi.py @@ -0,0 +1,151 @@ +from ansys.dpf.gate import errors, data_processing_grpcapi +from ansys.dpf.gate.generated import any_abstract_api, any_capi + + +# ------------------------------------------------------------------------------- +# Any +# ------------------------------------------------------------------------------ + + +def _get_stub(server): + return server.get_stub(AnyGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class AnyGRPCAPI(any_abstract_api.AnyAbstractAPI): + STUBNAME = "any_stub" + + @staticmethod + def init_any_environment(object): + from ansys.grpc.dpf import dpf_any_pb2_grpc + object._server.create_stub_if_necessary(AnyGRPCAPI.STUBNAME, + dpf_any_pb2_grpc.DpfAnyServiceStub) + data_processing_grpcapi.DataProcessingGRPCAPI.init_data_processing_environment(object) + object._deleter_func = (data_processing_grpcapi._get_stub(object._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def _type_to_message_type(): + from ansys.grpc.dpf import base_pb2 + from ansys.dpf.core import ( + field, + property_field, + generic_data_container, + string_field, + scoping, + data_tree, + ) + + return [(int, base_pb2.Type.INT), + (str, base_pb2.Type.STRING), + (float, base_pb2.Type.DOUBLE), + (field.Field, base_pb2.Type.FIELD), + (property_field.PropertyField, base_pb2.Type.PROPERTY_FIELD), + (string_field.StringField, base_pb2.Type.STRING_FIELD), + (generic_data_container.GenericDataContainer, base_pb2.Type.GENERIC_DATA_CONTAINER), + (scoping.Scoping, base_pb2.Type.SCOPING), + (data_tree.DataTree, base_pb2.Type.DATA_TREE), + ] + + @staticmethod + def _get_as(any): + from ansys.grpc.dpf import dpf_any_pb2 + request = dpf_any_pb2.GetAsRequest() + + request.any.CopyFrom(any._internal_obj) + + for type_tuple in AnyGRPCAPI._type_to_message_type(): + if any._internal_type == type_tuple[0]: + request.type = type_tuple[1] + return _get_stub(any._server.client).GetAs(request) + + @staticmethod + def any_get_as_int(any): + return AnyGRPCAPI._get_as(any).int_val + + @staticmethod + def any_get_as_string(any): + return AnyGRPCAPI._get_as(any).string_val + + @staticmethod + def any_get_as_double(any): + return AnyGRPCAPI._get_as(any).double_val + + @staticmethod + def any_get_as_field(any): + return AnyGRPCAPI._get_as(any).field + + @staticmethod + def any_get_as_property_field(any): + return AnyGRPCAPI._get_as(any).field + + @staticmethod + def any_get_as_string_field(any): + return AnyGRPCAPI._get_as(any).field + + @staticmethod + def any_get_as_generic_data_container(any): + return AnyGRPCAPI._get_as(any).generic_data_container + + @staticmethod + def any_get_as_scoping(any): + return AnyGRPCAPI._get_as(any).scoping + + @staticmethod + def any_get_as_data_tree(any): + return AnyGRPCAPI._get_as(any).data_tree + + @staticmethod + def _new_from(any, client=None): + from ansys.grpc.dpf import dpf_any_pb2 + request = dpf_any_pb2.CreateRequest() + + if isinstance(any, int): + request.int_val = any + elif isinstance(any, str): + request.string_val = any + elif isinstance(any, float): + request.double_val = any + else: + request.id.CopyFrom(any._internal_obj.id) + + for type_tuple in AnyGRPCAPI._type_to_message_type(): + if isinstance(any, type_tuple[0]): + request.type = type_tuple[1] + return _get_stub(client).Create(request) + + @staticmethod + def any_new_from_int_on_client(client, any): + return AnyGRPCAPI._new_from(any, client) + + @staticmethod + def any_new_from_string_on_client(client, any): + return AnyGRPCAPI._new_from(any, client) + + @staticmethod + def any_new_from_double_on_client(client, any): + return AnyGRPCAPI._new_from(any, client) + + @staticmethod + def any_new_from_field(any): + return AnyGRPCAPI._new_from(any, any._server) + + @staticmethod + def any_new_from_property_field(any): + return AnyGRPCAPI._new_from(any, any._server) + + @staticmethod + def any_new_from_string_field(any): + return AnyGRPCAPI._new_from(any, any._server) + + @staticmethod + def any_new_from_generic_data_container(any): + return AnyGRPCAPI._new_from(any, any._server) + + @staticmethod + def any_new_from_scoping(any): + return AnyGRPCAPI._new_from(any, any._server) + + @staticmethod + def any_new_from_data_tree(any): + return AnyGRPCAPI._new_from(any, any._server) + diff --git a/src/ansys/dpf/gate/collection_grpcapi.py b/src/ansys/dpf/gate/collection_grpcapi.py new file mode 100644 index 0000000000..f9684b408f --- /dev/null +++ b/src/ansys/dpf/gate/collection_grpcapi.py @@ -0,0 +1,267 @@ +from typing import NamedTuple +import numpy as np +import weakref + +from ansys.dpf.gate.generated import collection_abstract_api +from ansys.dpf.gate import object_handler, data_processing_grpcapi, grpc_stream_helpers, errors + +#------------------------------------------------------------------------------- +# Collection +#------------------------------------------------------------------------------- + +def _get_stub(server): + return server.get_stub(CollectionGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class CollectionGRPCAPI(collection_abstract_api.CollectionAbstractAPI): + STUBNAME = "collection_stub" + + @staticmethod + def init_collection_environment(object): + from ansys.grpc.dpf import collection_pb2, collection_pb2_grpc + if not hasattr(object, "_server"): + server = object + elif isinstance(object._server, weakref.ref): + server = object._server() + else: + server = object._server + server.create_stub_if_necessary( + CollectionGRPCAPI.STUBNAME, collection_pb2_grpc.CollectionServiceStub) + + object._deleter_func = (_get_stub(server).Delete, lambda obj: obj._internal_obj if isinstance(obj,collection_pb2.Collection) else None) + + @staticmethod + def collection_of_scoping_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + return CollectionGRPCAPI.collection_new_on_client(client, base_pb2.Type.Value("SCOPING")) + + @staticmethod + def collection_of_field_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + return CollectionGRPCAPI.collection_new_on_client(client, base_pb2.Type.Value("FIELD")) + + @staticmethod + def collection_of_mesh_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + return CollectionGRPCAPI.collection_new_on_client(client, base_pb2.Type.Value("MESHED_REGION")) + + @staticmethod + def collection_of_int_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + return CollectionGRPCAPI.collection_new_on_client(client, base_pb2.Type.Value("INT")) + + @staticmethod + def collection_of_double_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + return CollectionGRPCAPI.collection_new_on_client(client, base_pb2.Type.Value("DOUBLE")) + + @staticmethod + def collection_of_string_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + return CollectionGRPCAPI.collection_new_on_client(client, base_pb2.Type.Value("STRING")) + + @staticmethod + def collection_new_on_client(client, type): + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.CollectionRequest() + request.type = type + return _get_stub(client).Create(request) + + @staticmethod + def collection_add_label(collection, label): + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.UpdateLabelsRequest() + request.collection.CopyFrom(collection._internal_obj) + new_label = collection_pb2.NewLabel(label=label) + request.labels.extend([new_label]) + _get_stub(collection._server).UpdateLabels(request) + + @staticmethod + def collection_add_label_with_default_value(collection, label, value): + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.UpdateLabelsRequest() + request.collection.CopyFrom(collection._internal_obj) + new_label = collection_pb2.NewLabel(label=label) + new_label.default_value.default_value = value + request.labels.extend([new_label]) + _get_stub(collection._server).UpdateLabels(request) + + @staticmethod + def collection_get_num_labels(collection): + return len(CollectionGRPCAPI._list(collection).labels.labels) + + @staticmethod + def collection_get_label(collection, labelIndex): + return CollectionGRPCAPI._list(collection).labels.labels[labelIndex] + + @staticmethod + def collection_get_size(collection): + if isinstance(collection._internal_obj, list): + return len(collection._internal_obj) + return CollectionGRPCAPI._list(collection).count_entries + + @staticmethod + def _list(collection): + list_stub = _get_stub(collection._server).List(collection._internal_obj) + return list_stub + + @staticmethod + def collection_get_num_obj_for_label_space(collection, space): + return len(CollectionGRPCAPI._collection_get_entries(collection, space)) + + @staticmethod + def collection_get_obj_by_index_for_label_space(collection, space, index): + return data_processing_grpcapi.DataProcessingGRPCAPI.data_processing_duplicate_object_reference( + CollectionGRPCAPI._collection_get_entries(collection, space)[index].entry + ) + + @staticmethod + def collection_get_obj_by_index(collection, index): + return data_processing_grpcapi.DataProcessingGRPCAPI.data_processing_duplicate_object_reference( + CollectionGRPCAPI._collection_get_entries(collection, index)[0].entry + ) + + @staticmethod + def collection_get_obj_label_space_by_index(collection, index): + return CollectionGRPCAPI._collection_get_entries(collection, index)[0].label_space + + @staticmethod + def _collection_get_entries(collection, label_space_or_index): + from ansys.grpc.dpf import collection_pb2, scoping_pb2, field_pb2, meshed_region_pb2, base_pb2 + request = collection_pb2.EntryRequest() + request.collection.CopyFrom(collection._internal_obj) + + if isinstance(label_space_or_index, int): + request.index = label_space_or_index + else: + request.label_space.CopyFrom(label_space_or_index._internal_obj) + + out = _get_stub(collection._server).GetEntries(request) + list_out = [] + for obj in out.entries: + label_space = {} + if obj.HasField("label_space"): + for key in obj.label_space.label_space: + label_space[key] = obj.label_space.label_space[key] + if obj.HasField("dpf_type"): + if collection._internal_obj.type == base_pb2.Type.Value("SCOPING"): + entry = object_handler.ObjHandler(data_processing_grpcapi.DataProcessingGRPCAPI, scoping_pb2.Scoping()) + elif collection._internal_obj.type == base_pb2.Type.Value("FIELD"): + entry = object_handler.ObjHandler(data_processing_grpcapi.DataProcessingGRPCAPI, field_pb2.Field()) + elif collection._internal_obj.type == base_pb2.Type.Value("MESHED_REGION"): + entry = object_handler.ObjHandler(data_processing_grpcapi.DataProcessingGRPCAPI, meshed_region_pb2.MeshedRegion()) + obj.dpf_type.Unpack(entry._internal_obj) + entry._server = collection._server + list_out.append(_CollectionEntry(label_space, entry)) + + return list_out + + @staticmethod + def collection_get_label_scoping(collection, label): + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.LabelScopingRequest() + request.collection.CopyFrom(collection._internal_obj) + request.label = label + scoping_message = _get_stub(collection._server).GetLabelScoping(request) + return scoping_message.label_scoping + + @staticmethod + def collection_add_entry(collection, labelspace, obj): + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.UpdateRequest() + request.collection.CopyFrom(collection._internal_obj) + if hasattr(obj, "_message"): + #TO DO: remove + request.entry.dpf_type.Pack(obj._message) + else: + request.entry.dpf_type.Pack(obj._internal_obj) + request.label_space.CopyFrom(labelspace._internal_obj) + _get_stub(collection._server).UpdateEntry(request) + + @staticmethod + def _collection_set_data_as_integral_type(collection, data, size): + from ansys.grpc.dpf import collection_pb2 + metadata = [(u"size_bytes", f"{size * data.itemsize}")] + request = collection_pb2.UpdateAllDataRequest() + request.collection.CopyFrom(collection._internal_obj) + _get_stub(collection._server).UpdateAllData(grpc_stream_helpers._data_chunk_yielder(request, data), metadata=metadata) + + @staticmethod + def collection_set_data_as_int(collection, data, size): + CollectionGRPCAPI._collection_set_data_as_integral_type(collection, data, size) + + @staticmethod + def collection_set_data_as_double(collection, data, size): + CollectionGRPCAPI._collection_set_data_as_integral_type(collection, data, size) + + @staticmethod + def collection_set_support(collection, label, support): + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.UpdateSupportRequest() + request.collection.CopyFrom(collection._internal_obj) + request.time_freq_support.CopyFrom(support._internal_obj) + request.label = label + _get_stub(collection._server).UpdateSupport(request) + + @staticmethod + def collection_get_support(collection, label): + from ansys.grpc.dpf import collection_pb2, base_pb2 + request = collection_pb2.SupportRequest() + request.collection.CopyFrom(collection._internal_obj) + request.type = base_pb2.Type.Value("TIME_FREQ_SUPPORT") + message = _get_stub(collection._server).GetSupport(request) + return message + + @staticmethod + def collection_get_data_as_int(collection, size): + if not collection._server.meet_version("3.0"): + raise errors.DpfVersionNotSupported("3.0") + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.GetAllDataRequest() + request.collection.CopyFrom(collection._internal_obj) + data_type = u"int" + dtype = np.int32 + service = _get_stub(collection._server).GetAllData(request, metadata=[(u"float_or_double", data_type)]) + return grpc_stream_helpers._data_get_chunk_(dtype, service) + + @staticmethod + def collection_get_data_as_double(collection, size): + if not collection._server.meet_version("3.0"): + raise errors.DpfVersionNotSupported("3.0") + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.GetAllDataRequest() + request.collection.CopyFrom(collection._internal_obj) + data_type = u"double" + dtype = np.float64 + service = _get_stub(collection._server).GetAllData(request, metadata=[(u"float_or_double", data_type)]) + return grpc_stream_helpers._data_get_chunk_(dtype, service) + + @staticmethod + def collection_get_string_entry(collection, index): + if isinstance(collection._internal_obj, list): + return collection._internal_obj[index] + from ansys.grpc.dpf import collection_pb2 + request = collection_pb2.EntryRequest() + request.collection.CopyFrom(collection._internal_obj) + request.index = index + response = _get_stub(collection._server).GetEntries(request) + return response.entries[0] + + @staticmethod + def collection_of_string_new_local(client): + return [] + + @staticmethod + def collection_add_string_entry(collection, obj): + if isinstance(collection._internal_obj, list): + return collection._internal_obj.append(obj) + else: + raise NotImplementedError + + +class _CollectionEntry(NamedTuple): + label_space: dict + entry: object + + diff --git a/src/ansys/dpf/gate/common.py b/src/ansys/dpf/gate/common.py new file mode 100644 index 0000000000..178bb8851d --- /dev/null +++ b/src/ansys/dpf/gate/common.py @@ -0,0 +1,97 @@ +import abc + + +class locations: + """Contains strings for scoping and field locations. + + Attributes + ----------- + none = "none" + + elemental = "Elemental" + data is one per element + + elemental_nodal = "ElementalNodal" + one per node per element + + nodal = "Nodal" + one per node + + time_freq = "TimeFreq_sets" + one per time set + + overall = "overall" + applies everywhere + + time_freq_step = "TimeFreq_steps" + one per time step + + faces = "Faces" + one per face + + zone = "zone" + one per zone + + elemental_and_faces = "ElementalAndFaces" + data available in elements and faces of the model + """ + + none = "none" + + # data is one per element + elemental = "Elemental" + + # one per node per element + elemental_nodal = "ElementalNodal" + + # one per node + nodal = "Nodal" + + # one per time set + time_freq = "TimeFreq_sets" + + # applies everywhere + overall = "overall" + + # one per time step + time_freq_step = "TimeFreq_steps" + + # one per face + faces = "Faces" + + # one per zone + zone = "zone" + + # data available in elements and faces of the model + elemental_and_faces = "ElementalAndFaces" + + +elemental_property_type_dict = { + "eltype": "ELEMENT_TYPE", + "elshape": "ELEMENT_SHAPE", + "mat": "MATERIAL", + "connectivity": "CONNECTIVITY", +} + + +nodal_property_type_dict = { + "coordinates": "COORDINATES", + "reverse_connectivity": "NODAL_CONNECTIVITY", +} + +class ProgressBarBase: + def __init__(self, text, tot_size=None): + self.current = 0 + self.tot_size = tot_size + pass + + def start(self): + pass + + @abc.abstractmethod + def update(self, current_value): + pass + + def finish(self): + if self.tot_size is not None and self.current != self.tot_size: + self.update(self.tot_size) \ No newline at end of file diff --git a/src/ansys/dpf/gate/custom_type_field_grpcapi.py b/src/ansys/dpf/gate/custom_type_field_grpcapi.py new file mode 100644 index 0000000000..3720d4c50c --- /dev/null +++ b/src/ansys/dpf/gate/custom_type_field_grpcapi.py @@ -0,0 +1,114 @@ +from builtins import isinstance + +import numpy as np +from ansys.dpf.gate.generated import custom_type_field_abstract_api +from ansys.dpf.gate import errors, field_grpcapi, grpc_stream_helpers + +api_to_call = field_grpcapi.FieldGRPCAPI + +# ------------------------------------------------------------------------------- +# CustomTypeField +# ------------------------------------------------------------------------------- + +@errors.protect_grpc_class +class CustomTypeFieldGRPCAPI(custom_type_field_abstract_api.CustomTypeFieldAbstractAPI): + @staticmethod + def init_custom_type_field_environment(object): + api_to_call.init_field_environment(object) + + @staticmethod + def cscustom_type_field_get_data(field, data): + return api_to_call.csfield_get_data(field, data) + + @staticmethod + def cscustom_type_field_get_data_pointer(field, np_array): + return api_to_call.csfield_get_data_pointer(field, np_array) + + @staticmethod + def cscustom_type_field_get_entity_data(field, EntityIndex): + out = api_to_call.csfield_get_entity_data(field, EntityIndex) + if out is not None: + return np.frombuffer(out, dtype=field._type) + + @staticmethod + def cscustom_type_field_get_entity_data_by_id(field, EntityId): + out = api_to_call.csfield_get_entity_data_by_id(field, EntityId) + if out is not None: + return np.frombuffer(out, dtype=field._type) + + @staticmethod + def cscustom_type_field_get_cscoping(field): + return api_to_call.csfield_get_cscoping(field) + + @staticmethod + def cscustom_type_field_get_number_elementary_data(field): + return api_to_call.csfield_get_number_elementary_data(field) + + @staticmethod + def cscustom_type_field_get_number_of_components(field): + return api_to_call.csfield_get_number_of_components(field) + + @staticmethod + def cscustom_type_field_get_data_size(field): + return api_to_call.csfield_get_data_size(field) + + @staticmethod + def cscustom_type_field_set_data(field, size, data): + if not isinstance(data, (np.ndarray, np.generic)): + data = np.ndarray(data) + data = data.view(np.byte) + metadata = [("size_bytes", f"{data.size}")] + return api_to_call.csfield_raw_set_data(field, data, metadata) + + @staticmethod + def cscustom_type_field_set_data_pointer(field, size, data): + return api_to_call.csfield_set_data_pointer(field, size, data) + + @staticmethod + def cscustom_type_field_set_cscoping(field, scoping): + return api_to_call.csfield_set_cscoping(field, scoping) + + @staticmethod + def cscustom_type_field_push_back(field, EntityId, size, data): + return api_to_call.csfield_push_back(field, EntityId, size, data) + + @staticmethod + def cscustom_type_field_resize(field, dataSize, scopingSize): + return api_to_call.csfield_resize(field, dataSize, scopingSize) + + @staticmethod + def cscustom_type_field_get_type(field, type, unitarySize): + type.set( + field._internal_obj.custom_type_def.unitary_datatype + ) + unitarySize.set( + field._internal_obj.custom_type_def.num_bytes_unitary_data + ) + + @staticmethod + def cscustom_type_field_get_shared_field_definition(field): + return api_to_call.csfield_get_shared_field_definition(field) + + @staticmethod + def cscustom_type_field_get_support(field): + return api_to_call.csfield_get_support(field) + + @staticmethod + def cscustom_type_field_set_field_definition(field, field_definition): + api_to_call.csfield_set_field_definition(field, field_definition) + + @staticmethod + def cscustom_type_field_set_support(field, support): + api_to_call.csfield_set_support(field, support) + + @staticmethod + def cscustom_type_field_new_on_client(client, type, unitarySize, numEntities, numUnitaryData): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.FieldRequest() + request.size.scoping_size = numEntities + request.size.data_size = numUnitaryData + request.datatype = "custom" + request.custom_type_def.num_bytes_unitary_data = unitarySize + request.custom_type_def.unitary_datatype = type + return field_grpcapi._get_stub(client).Create(request) + diff --git a/src/ansys/dpf/gate/cyclic_support_grpcapi.py b/src/ansys/dpf/gate/cyclic_support_grpcapi.py new file mode 100644 index 0000000000..cc89e4d031 --- /dev/null +++ b/src/ansys/dpf/gate/cyclic_support_grpcapi.py @@ -0,0 +1,102 @@ +from ansys.dpf.gate.generated import cyclic_support_abstract_api +from ansys.dpf.gate.data_processing_grpcapi import DataProcessingGRPCAPI +from ansys.dpf.gate.object_handler import ObjHandler +from ansys.dpf.gate import errors + +# ------------------------------------------------------------------------------- +# CyclicSupport +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(CyclicSupportGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class CyclicSupportGRPCAPI(cyclic_support_abstract_api.CyclicSupportAbstractAPI): + STUBNAME = "cyclic_support_stub" + + @staticmethod + def init_cyclic_support_environment(support): + from ansys.grpc.dpf import cyclic_support_pb2_grpc + support._server.create_stub_if_necessary(CyclicSupportGRPCAPI.STUBNAME, + cyclic_support_pb2_grpc.CyclicSupportServiceStub) + + support._deleter_func = (_get_stub(support._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def list(support): + from types import SimpleNamespace + server = support._server + api = DataProcessingGRPCAPI + + # Get the ListResponse from the server + list_response = _get_stub(support._server).List(support._internal_obj) + + # Wrap the ListResponse in a flat response with ObjHandlers to prevent memory leaks + response = SimpleNamespace(num_stages=ObjHandler(api, list_response.num_stages, server)) + # add attributes to response + setattr(response, "num_stages", list_response.num_stages) + for i_stage in range(list_response.num_stages): + setattr(response, "num_sectors_"+str(i_stage), + list_response.stage_infos[i_stage].num_sectors) + setattr(response, "base_elements_scoping_"+str(i_stage), + ObjHandler(api, list_response.stage_infos[i_stage].base_elements_scoping, + server)) + setattr(response, "base_nodes_scoping_"+str(i_stage), + ObjHandler(api, list_response.stage_infos[i_stage].base_nodes_scoping, server)) + setattr(response, "sectors_for_expansion_"+str(i_stage), + ObjHandler(api, list_response.stage_infos[i_stage].sectors_for_expansion, + server)) + return response + + @staticmethod + def cyclic_support_get_num_sectors(support, i_stage): + return getattr(CyclicSupportGRPCAPI.list(support), + "num_sectors_"+str(i_stage)) + + @staticmethod + def cyclic_support_get_num_stages(support): + return getattr(CyclicSupportGRPCAPI.list(support), + "num_stages") + + @staticmethod + def cyclic_support_get_sectors_scoping(support, i_stage): + return getattr(CyclicSupportGRPCAPI.list(support), + "sectors_for_expansion_"+str(i_stage)).get_ownership() + + @staticmethod + def cyclic_support_get_base_nodes_scoping(support, i_stage): + return getattr(CyclicSupportGRPCAPI.list(support), + "base_nodes_scoping_"+str(i_stage)).get_ownership() + + @staticmethod + def cyclic_support_get_base_elements_scoping(support, i_stage): + return getattr(CyclicSupportGRPCAPI.list(support), + "base_elements_scoping_"+str(i_stage)).get_ownership() + + @staticmethod + def get_expanded_ids(support, request): + return _get_stub(support._server).GetExpandedIds(request).expanded_ids + + @staticmethod + def init_get_expanded_ids(support, i_stage, sectorsScoping): + from ansys.grpc.dpf import cyclic_support_pb2 + request = cyclic_support_pb2.GetExpandedIdsRequest() + request.support.CopyFrom(support._internal_obj) + request.stage_num = i_stage + if sectorsScoping: + request.sectors_to_expand.CopyFrom(sectorsScoping._internal_obj) + return request + + @staticmethod + def cyclic_support_get_expanded_node_ids(support, baseNodeId, i_stage, sectorsScoping): + request = CyclicSupportGRPCAPI.init_get_expanded_ids(support, i_stage, sectorsScoping) + request.node_id = baseNodeId + return CyclicSupportGRPCAPI.get_expanded_ids(support, request) + + @staticmethod + def cyclic_support_get_expanded_element_ids(support, baseElementId, i_stage, sectorsScoping): + request = CyclicSupportGRPCAPI.init_get_expanded_ids(support, i_stage, sectorsScoping) + request.element_id = baseElementId + return CyclicSupportGRPCAPI.get_expanded_ids(support, request) diff --git a/src/ansys/dpf/gate/data_processing_grpcapi.py b/src/ansys/dpf/gate/data_processing_grpcapi.py new file mode 100644 index 0000000000..475f6cbb38 --- /dev/null +++ b/src/ansys/dpf/gate/data_processing_grpcapi.py @@ -0,0 +1,389 @@ +import copy +import re +import weakref + +from ansys.dpf.gate.generated import data_processing_abstract_api +from ansys.dpf.gate import errors, object_handler, misc + + +# ------------------------------------------------------------------------------- +# DataProcessing +# ------------------------------------------------------------------------------- + +def _get_stub(server): + from ansys.grpc.dpf import base_pb2_grpc + server.create_stub_if_necessary(DataProcessingGRPCAPI.STUBNAME, base_pb2_grpc.BaseServiceStub) + return server.get_stub(DataProcessingGRPCAPI.STUBNAME) + + +def _get_server_info_response(client): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.ServerInfoRequest() + try: + response = _get_stub(client).GetServerInfo(request) + except Exception as e: + raise IOError(f"Unable to recover information from the server:\n{str(e)}") + return response + + +@errors.protect_grpc_class +class DataProcessingYielderHelper: + @staticmethod + def file_chunk_yielder(file_path, to_server_file_path, use_tmp_dir=False): + import os + from ansys.grpc.dpf import base_pb2 + request = base_pb2.UploadFileRequest() + request.server_file_path = to_server_file_path + request.use_temp_dir = use_tmp_dir + + tot_size = os.path.getsize(file_path) * 1e-3 + + need_progress_bar = tot_size > 10000 and misc.COMMON_PROGRESS_BAR is not None + if need_progress_bar: + bar = misc.COMMON_PROGRESS_BAR("Uploading...", "KB", tot_size) + bar.start() + i = 0 + with open(file_path, "rb") as f: + while True: + piece = f.read(misc.client_config()["streaming_buffer_size"]) + if len(piece) == 0: + break + request.data.data = piece + yield request + i += len(piece) * 1e-3 + if need_progress_bar: + try: + bar.update(min(i, tot_size)) + except: + pass + + if need_progress_bar: + try: + bar.finish() + except: + pass + + +@errors.protect_grpc_class +class DataProcessingGRPCAPI(data_processing_abstract_api.DataProcessingAbstractAPI): + STUBNAME = "core_stub" + + @staticmethod + def init_data_processing_environment(object): + from ansys.grpc.dpf import base_pb2_grpc + if not hasattr(object, "_server"): + object.create_stub_if_necessary(DataProcessingGRPCAPI.STUBNAME, + base_pb2_grpc.BaseServiceStub) + elif isinstance(object._server, weakref.ref): + object._server().create_stub_if_necessary(DataProcessingGRPCAPI.STUBNAME, + base_pb2_grpc.BaseServiceStub) + else: + object._server.create_stub_if_necessary(DataProcessingGRPCAPI.STUBNAME, + base_pb2_grpc.BaseServiceStub) + + @staticmethod + def bind_delete_server_func(object): + from ansys.grpc.dpf import base_pb2 + object._preparing_shutdown_func = ( + _get_stub(object).PrepareShutdown, base_pb2.Empty() + ) + if hasattr(_get_stub(object), "ReleaseServer"): + object._shutdown_func = ( + _get_stub(object).ReleaseServer, base_pb2.Empty() + ) + else: + object._shutdown_func = ( + None, None + ) + + @staticmethod + def finish_data_processing_environment(object): + pass + + @staticmethod + def data_processing_delete_shared_object(data): + if not data._server.meet_version("4.0"): + # using the scoping API (same backend call than base_pb2.DeleteRequest()) + from ansys.grpc.dpf import scoping_pb2 + from ansys.dpf.gate import scoping_grpcapi + request = scoping_pb2.Scoping() + if isinstance(data._internal_obj.id, int): + request.id = data._internal_obj.id + else: + request.id.CopyFrom(data._internal_obj.id) + scoping_grpcapi.ScopingGRPCAPI.init_scoping_environment(data) + scoping_grpcapi._get_stub(data._server).Delete(request) + else: + from ansys.grpc.dpf import base_pb2 + request = base_pb2.DeleteRequest() + if isinstance(data, list): + for obj in data: + request.dpf_type_id.append(obj._internal_obj.id) + _get_stub(data[0]._server).Delete(request) + else: + request.dpf_type_id.append(data._internal_obj.id) + _get_stub(data._server).Delete(request) + + @staticmethod + def data_processing_duplicate_object_reference(base): + from ansys.grpc.dpf import base_pb2 + if not hasattr(base_pb2, "DuplicateRefRequest"): + if isinstance(base, object_handler.ObjHandler): + return base.get_ownership() + return base._internal_obj + request = base_pb2.DuplicateRefRequest() + request.dpf_type_id.CopyFrom(base._internal_obj.id) + to_return = copy.deepcopy(base._internal_obj) + to_return.id.CopyFrom(_get_stub(base._server).DuplicateRef(request).new_dpf_type_id) + return to_return + + @staticmethod + def data_processing_initialize_with_context_on_client(client, context, + dataProcessingCore_xml_path): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.InitializationRequest() + request.context = context + request.xml = dataProcessingCore_xml_path + request.force_reinit = False + _get_stub(client).Initialize(request) + + @staticmethod + def data_processing_apply_context_on_client(client, context, dataProcessingCore_xml_path): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.InitializationRequest() + request.context = context + request.xml = dataProcessingCore_xml_path + request.force_reinit = True + response = _get_stub(client).Initialize(request) + if response.error.ok != True: + raise errors.DPFServerException(response.error.error_message) + + @staticmethod + def data_processing_release_on_client(client, context): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.InitializationRequest() + request.context = -context + _get_stub(client).Initialize(request) + + @staticmethod + def data_processing_load_library_on_client(sLibraryKey, sDllPath, sloader_symbol, client): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.PluginRequest() + request.name = sLibraryKey + request.dllPath = sDllPath + request.symbol = sloader_symbol + try: + _get_stub(client).Load(request) + except Exception as e: + raise errors.DPFServerException( + f'Unable to load library "{sDllPath}". File may not exist or' + f" is missing dependencies:\n{str(e)}" + ) + + @staticmethod + def data_processing_get_os_on_client(client): + response = _get_server_info_response(client) + if hasattr(response, "properties"): + return response.properties["os"] + else: + return None + + @staticmethod + def data_processing_get_server_ip_and_port(client, port): + response = _get_server_info_response(client) + port.set(response.port) + return response.ip + + @staticmethod + def data_processing_process_id_on_client(client): + response = _get_server_info_response(client) + return response.processId + + @staticmethod + def data_processing_get_server_version_on_client(client, major, minor): + response = _get_server_info_response(client) + major.set(response.majorVersion) + minor.set(response.minorVersion) + + @staticmethod + def data_processing_description_string(data): + try: + data_obj = data._internal_obj + from ansys.grpc.dpf import base_pb2, collection_pb2 + request = base_pb2.DescribeRequest() + if isinstance(data_obj.id, int): + request.dpf_type_id = data_obj.id + else: + request.dpf_type_id = data_obj.id.id + serv_to_test = data._server + if not serv_to_test: + return "" + client = None + if serv_to_test.has_client(): + client = serv_to_test.client + else: + return "" + if isinstance(data_obj, collection_pb2.Collection): + from ansys.dpf.gate import collection_grpcapi + collection_grpcapi.CollectionGRPCAPI.init_collection_environment(data) + response = collection_grpcapi._get_stub(data._server.client).Describe(request) + else: + response = _get_stub(client).Describe(request) + return response.description + except: + return "" + + @staticmethod + def data_processing_upload_file(client, file_path, to_server_file_path, use_tmp_dir): + to_return = _get_stub(client).UploadFile( + DataProcessingYielderHelper.file_chunk_yielder( + file_path=file_path, to_server_file_path=to_server_file_path, + use_tmp_dir=use_tmp_dir + ) + ).server_file_path + return to_return + + @staticmethod + def data_processing_release_server(client): + from ansys.grpc.dpf import base_pb2 + _get_stub(client).ReleaseServer(base_pb2.Empty()) + + @staticmethod + def data_processing_prepare_shutdown(client): + from ansys.grpc.dpf import base_pb2 + _get_stub(client).PrepareShutdown(base_pb2.Empty()) + + @staticmethod + def data_processing_list_operators_as_collection_on_client(client): + from ansys.grpc.dpf import operator_pb2 + from ansys.dpf.gate import operator_grpcapi + service = operator_grpcapi._get_stub(client).ListAllOperators( + operator_pb2.ListAllOperatorsRequest()) + arr = [] + for chunk in service: + arr.extend(re.split(r'[\x00-\x08]', chunk.array.decode('utf-8'))) + return arr + + @staticmethod + def data_processing_get_global_config_as_data_tree_on_client(client): + from ansys.grpc.dpf import base_pb2, data_tree_pb2 + id = _get_stub(client).GetConfig(base_pb2.Empty()).runtime_core_config_data_tree_id + out = data_tree_pb2.DataTree() + out.id.CopyFrom(id) + return out + + @staticmethod + def data_processing_get_client_config_as_data_tree(): + return misc.client_config() + + @staticmethod + def data_processing_download_file(client, server_file_path, to_client_file_path): + from ansys.grpc.dpf import base_pb2 + import sys + request = base_pb2.DownloadFileRequest() + request.server_file_path = server_file_path + chunks = _get_stub(client).DownloadFile(request) + bar = None + tot_size = sys.float_info.max + from ansys.dpf.gate import misc + _progress_bar_is_available = False + if misc.COMMON_PROGRESS_BAR is not None: + _progress_bar_is_available = True + for i in range(0, len(chunks.initial_metadata())): + if chunks.initial_metadata()[i].key == u"size_tot": + tot_size = int(chunks.initial_metadata()[i].value) * 1E-3 + if _progress_bar_is_available: + bar = misc.COMMON_PROGRESS_BAR("Downloading...", + unit="KB", + tot_size=tot_size) + if not bar and _progress_bar_is_available: + bar = misc.COMMON_PROGRESS_BAR("Downloading...", unit="KB") + bar.start() + i = 0 + with open(to_client_file_path, "wb") as f: + for chunk in chunks: + f.write(chunk.data.data) + i += len(chunk.data.data) * 1e-3 + try: + if bar is not None: + bar.update(min(i, tot_size)) + except: + pass + if bar is not None: + bar.finish() + + @staticmethod + def data_processing_download_files(client, server_file_path, to_client_file_path, + specific_extension): + from ansys.grpc.dpf import base_pb2 + import os + import pathlib + request = base_pb2.DownloadFileRequest() + request.server_file_path = server_file_path + chunks = _get_stub(client).DownloadFile(request) + from ansys.dpf.gate import misc + _progress_bar_is_available = False + if misc.COMMON_PROGRESS_BAR: + _progress_bar_is_available = True + num_files = 1 + if chunks.initial_metadata()[0].key == "num_files": + num_files = int(chunks.initial_metadata()[0].value) + if _progress_bar_is_available: + bar = misc.COMMON_PROGRESS_BAR("Downloading...", unit="files", tot_size=num_files) + bar.start() + server_path = "" + import ntpath + client_paths = [] + f = None + for chunk in chunks: + if chunk.data.server_file_path != server_path: + server_path = chunk.data.server_file_path + if ( + specific_extension == None + or not specific_extension + or pathlib.Path(server_path).suffix == "." + specific_extension + ): + s1 = len(server_path.split("\\")) + s2 = len(server_path.split("/")) + if s2 > s1: + separator = "/" + elif s1 > s2: + separator = "\\" + server_subpath = server_path.replace( + server_file_path + separator, "" + ) + subdir = "" + split = server_subpath.split(separator) + n = len(split) + i = 0 + to_client_folder_path_copy = to_client_file_path + if n > 1: + while i < (n - 1): + subdir = split[i] + subdir_path = os.path.join( + to_client_folder_path_copy, subdir + ) + if not os.path.exists(subdir_path): + os.mkdir(subdir_path) + to_client_folder_path_copy = subdir_path + i += 1 + cient_path = os.path.join( + to_client_folder_path_copy, ntpath.basename(server_path) + ) + client_paths.append(cient_path) + f = open(cient_path, "wb") + try: + if bar is not None: + bar.update(len(client_paths)) + except: + pass + else: + f = None + if f is not None: + f.write(chunk.data.data) + try: + if bar is not None: + bar.finish() + except: + pass + return client_paths diff --git a/src/ansys/dpf/gate/data_sources_grpcapi.py b/src/ansys/dpf/gate/data_sources_grpcapi.py new file mode 100644 index 0000000000..0ee2e775ff --- /dev/null +++ b/src/ansys/dpf/gate/data_sources_grpcapi.py @@ -0,0 +1,166 @@ +from ansys.dpf.gate.generated import data_sources_abstract_api +from ansys.dpf.gate import errors +# ------------------------------------------------------------------------------- +# DataSources +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(DataSourcesGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class DataSourcesGRPCAPI(data_sources_abstract_api.DataSourcesAbstractAPI): + STUBNAME = "data_sources_stub" + + @staticmethod + def init_data_sources_environment(obj): + from ansys.grpc.dpf import data_sources_pb2_grpc + obj._server.create_stub_if_necessary(DataSourcesGRPCAPI.STUBNAME, + data_sources_pb2_grpc.DataSourcesServiceStub) + obj._deleter_func = (_get_stub(obj._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def data_sources_new_on_client(server): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.Empty() + return _get_stub(server).Create(request) + + @staticmethod + def data_sources_delete(dataSources): + _get_stub(dataSources._server).Delete(dataSources._internal_obj) + + @staticmethod + def data_sources_set_result_file_path_utf8(dataSources, name): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateRequest() + request.result_path = True + request.path = name + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(dataSources._server).Update(request) + + @staticmethod + def data_sources_set_result_file_path_with_key_utf8(dataSources, name, sKey): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateRequest() + request.result_path = True + request.key = sKey + request.path = name + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(dataSources._server).Update(request) + + @staticmethod + def data_sources_set_domain_result_file_path_utf8(dataSources, name, id): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateRequest() + request.result_path = True + request.domain.domain_path = True + request.domain.domain_id = id + request.path = name + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(dataSources._server).Update(request) + + @staticmethod + def data_sources_add_file_path_utf8(dataSources, name): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateRequest() + request.path = name + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(dataSources._server).Update(request) + + @staticmethod + def data_sources_add_file_path_with_key_utf8(dataSources, name, sKey): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateRequest() + request.key = sKey + request.path = name + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(dataSources._server).Update(request) + + @staticmethod + def data_sources_add_domain_file_path_with_key_utf8(dataSources, name, sKey, id): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateRequest() + request.key = sKey + request.path = name + request.domain.domain_path = True + request.domain.domain_id = id + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(dataSources._server).Update(request) + + @staticmethod + def data_sources_add_file_path_for_specified_result_utf8(dataSources, name, sKey, sResultKey): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateRequest() + request.key = sKey + request.result_key = sResultKey + request.path = name + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(dataSources._server).Update(request) + + @staticmethod + def data_sources_add_upstream_data_sources(dataSources, upstreamDataSources): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateUpstreamRequest() + request.upstream_data_sources.CopyFrom(upstreamDataSources._internal_obj) + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(dataSources._server).UpdateUpstream(request) + + @staticmethod + def data_sources_add_upstream_data_sources_for_specified_result(dataSources, + upstreamDataSources, + sResultKey): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateUpstreamRequest() + request.upstream_data_sources.CopyFrom(upstreamDataSources._internal_obj) + request.data_sources.CopyFrom(dataSources._internal_obj) + request.result_key = sResultKey + _get_stub(dataSources._server).UpdateUpstream(request) + + @staticmethod + def data_sources_add_upstream_domain_data_sources(dataSources, upstreamDataSources, id): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateUpstreamRequest() + request.upstream_data_sources.CopyFrom(upstreamDataSources._internal_obj) + request.data_sources.CopyFrom(dataSources._internal_obj) + request.domain.domain_path = True + request.domain.domain_id = id + _get_stub(dataSources._server).UpdateUpstream(request) + + @staticmethod + def data_sources_register_namespace(dataSources, result_key, ns): + from ansys.grpc.dpf import data_sources_pb2 + request = data_sources_pb2.UpdateNamespaceRequest() + request.data_sources.CopyFrom(dataSources._internal_obj) + request.key = result_key + request.namespace = ns + _get_stub(dataSources._server).UpdateNamespace(request) + + @staticmethod + def data_sources_get_result_key(dataSources): + response = _get_stub(dataSources._server).List(dataSources._internal_obj) + return response.result_key + + @staticmethod + def data_sources_get_num_keys(dataSources): + response = _get_stub(dataSources._server).List(dataSources._internal_obj) + if dataSources._server.meet_version("4.0"): + return len(response.keys) + else: + return len(list(response.paths.keys())) + + @staticmethod + def data_sources_get_key(dataSources, index, num_path): + response = _get_stub(dataSources._server).List(dataSources._internal_obj) + if dataSources._server.meet_version("4.0"): + num_path.set(len(response.paths[response.keys[index]].paths)) + return response.keys[index] + else : + keys = list(response.paths.keys()) + num_path.set(len(response.paths[keys[index]].paths)) + return keys[index] + + @staticmethod + def data_sources_get_path(dataSources, key, index): + response = _get_stub(dataSources._server).List(dataSources._internal_obj) + return list(response.paths[key].paths)[index] diff --git a/src/ansys/dpf/gate/dpf_array.py b/src/ansys/dpf/gate/dpf_array.py new file mode 100644 index 0000000000..399c9d3e8f --- /dev/null +++ b/src/ansys/dpf/gate/dpf_array.py @@ -0,0 +1,42 @@ +import numpy as np + + +class DPFArray(np.ndarray): + """Overload of numpy ndarray `_ + managing DPFVector (memory owner of vector data in DPF C APIs) memory and updates. + + Parameters + ---------- + vec : DPFVectorBase + DPFVector instance to manage and optionally update when the DPFArray is deleted or committed. + """ + + def __new__( + cls, + vec + ): + """Allocate the array.""" + try: + obj = vec.np_array.view(cls) + except NotImplementedError as e: + raise TypeError(e.args) + vec.start_checking_modification() + obj.vec = vec + return obj + + def __array_finalize__(self, obj): + """Finalize array (associate with parent metadata).""" + if np.shares_memory(self, obj): + self.vec = getattr(obj, 'vec', None) + else: + self.vec = None + + def commit(self): + """Updates the data server side when necessary""" + if self.vec is not None: + self.vec.commit() + + # def __setitem__(self, key, value): + # super().__setitem__(key, value) + # if self.vec: + # self.vec._modified = True diff --git a/src/ansys/dpf/gate/dpf_data_tree_grpcapi.py b/src/ansys/dpf/gate/dpf_data_tree_grpcapi.py new file mode 100644 index 0000000000..f3d60ff9ef --- /dev/null +++ b/src/ansys/dpf/gate/dpf_data_tree_grpcapi.py @@ -0,0 +1,216 @@ +import types +from ansys.dpf.gate.generated import dpf_data_tree_abstract_api +from ansys.dpf.gate import errors, utils + + +#------------------------------------------------------------------------------- +# DpfDataTree +#------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(DpfDataTreeGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class DpfDataTreeGRPCAPI(dpf_data_tree_abstract_api.DpfDataTreeAbstractAPI): + STUBNAME = "data_tree_stub" + + @staticmethod + def init_dpf_data_tree_environment(object): + from ansys.grpc.dpf import data_tree_pb2_grpc + object._server.create_stub_if_necessary(DpfDataTreeGRPCAPI.STUBNAME, + data_tree_pb2_grpc.DataTreeServiceStub) + object._deleter_func = (_get_stub(object._server).Delete, lambda obj: obj._internal_obj if not isinstance(obj._internal_obj, (dict, list)) else None) + + @staticmethod + def dpf_data_tree_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + return _get_stub(client).Create(base_pb2.Empty()) + + @staticmethod + def _dpf_data_tree_get_attribute(data_tree, attribute_name, value, type): + if isinstance(data_tree._internal_obj, dict): + value.set(data_tree._internal_obj[attribute_name]) + return + from ansys.grpc.dpf import data_tree_pb2, base_pb2 + request = data_tree_pb2.GetRequest() + request.data_tree.CopyFrom(data_tree._internal_obj) + stype = base_pb2.Type.Value(type.upper()) + request.data.append(data_tree_pb2.SingleDataRequest(name=attribute_name, type=stype)) + data = _get_stub(data_tree._server).Get(request).data[0] + if data.HasField("string"): + value.set_str(data.string) + elif data.HasField("int"): + value.set(data.int) + elif data.HasField("double"): + value.set(data.double) + elif data.HasField("vec_int"): + value.set(data.vec_int.rep_int) + elif data.HasField("vec_double"): + value.set(data.vec_double.rep_double) + elif data.HasField("vec_string"): + value.set(data.vec_string.rep_string) + elif data.HasField("data_tree"): + return #DataTree(data_tree=data.data_tree, server=self._server) + # use dpf_data_tree_get_sub_tree + + @staticmethod + def dpf_data_tree_get_int_attribute(data_tree, attribute_name, value): + DpfDataTreeGRPCAPI._dpf_data_tree_get_attribute( + data_tree, attribute_name, value, "int" + ) + + @staticmethod + def dpf_data_tree_get_double_attribute(data_tree, attribute_name, value): + DpfDataTreeGRPCAPI._dpf_data_tree_get_attribute( + data_tree, attribute_name, value, "double" + ) + + @staticmethod + def dpf_data_tree_get_string_attribute(data_tree, attribute_name, data, size): + DpfDataTreeGRPCAPI._dpf_data_tree_get_attribute( + data_tree, attribute_name, data, "string" + ) + + @staticmethod + def dpf_data_tree_get_vec_int_attribute(data_tree, attribute_name, data, size): + DpfDataTreeGRPCAPI._dpf_data_tree_get_attribute( + data_tree, attribute_name, data, "vec_int" + ) + + @staticmethod + def dpf_data_tree_get_vec_double_attribute(data_tree, attribute_name, data, size): + DpfDataTreeGRPCAPI._dpf_data_tree_get_attribute( + data_tree, attribute_name, data, "vec_double" + ) + + @staticmethod + def dpf_data_tree_get_string_collection_attribute(data_tree, attribute_name): + from ansys.grpc.dpf import data_tree_pb2, base_pb2 + request = data_tree_pb2.GetRequest() + request.data_tree.CopyFrom(data_tree._internal_obj) + stype = base_pb2.Type.Value("VEC_STRING") + request.data.append(data_tree_pb2.SingleDataRequest(name=attribute_name, type=stype)) + data = _get_stub(data_tree._server).Get(request).data[0] + if data.HasField("vec_string"): + return list(data.vec_string.rep_string) + + @staticmethod + def dpf_data_tree_get_sub_tree(data_tree, sub_tree_name): + from ansys.grpc.dpf import data_tree_pb2, base_pb2 + request = data_tree_pb2.GetRequest() + request.data_tree.CopyFrom(data_tree._internal_obj) + stype = base_pb2.Type.Value("DATA_TREE") + request.data.append(data_tree_pb2.SingleDataRequest(name=sub_tree_name, type=stype)) + data = _get_stub(data_tree._server).Get(request).data[0] + if data.HasField("data_tree"): + return data.data_tree + + @staticmethod + def _set_attribute_init(data_tree, attribute_name): + if isinstance(data_tree._internal_obj, dict): + request = types.SimpleNamespace( + data_tree=data_tree._internal_obj, + data=[], + ) + data = types.SimpleNamespace() + else: + from ansys.grpc.dpf import data_tree_pb2 + request = data_tree_pb2.UpdateRequest() + request.data_tree.CopyFrom(data_tree._internal_obj) + data = data_tree_pb2.Data() + data.name = attribute_name + request.data.append(data) + return request + + @staticmethod + def _set_attribute_finish(data_tree, request): + if isinstance(data_tree._internal_obj, dict): + if hasattr(request.data[0], "int"): + data_tree._internal_obj[request.data[0].name]=request.data[0].int + elif hasattr(request.data[0], "string"): + data_tree._internal_obj[request.data[0].name]=request.data[0].string + else: + _get_stub(data_tree._server).Update(request) + + @staticmethod + def dpf_data_tree_set_int_attribute(data_tree, attribute_name, value): + request = DpfDataTreeGRPCAPI._set_attribute_init(data_tree, attribute_name) + request.data[0].int = value + DpfDataTreeGRPCAPI._set_attribute_finish(data_tree, request) + + @staticmethod + def dpf_data_tree_set_vec_int_attribute(data_tree, attribute_name, value, size): + request = DpfDataTreeGRPCAPI._set_attribute_init(data_tree, attribute_name) + request.data[0].vec_int.rep_int.extend(value) + DpfDataTreeGRPCAPI._set_attribute_finish(data_tree, request) + + @staticmethod + def dpf_data_tree_set_double_attribute(data_tree, attribute_name, value): + request = DpfDataTreeGRPCAPI._set_attribute_init(data_tree, attribute_name) + request.data[0].double = value + DpfDataTreeGRPCAPI._set_attribute_finish(data_tree, request) + + @staticmethod + def dpf_data_tree_set_vec_double_attribute(data_tree, attribute_name, value, size): + request = DpfDataTreeGRPCAPI._set_attribute_init(data_tree, attribute_name) + request.data[0].vec_double.rep_double.extend(value) + DpfDataTreeGRPCAPI._set_attribute_finish(data_tree, request) + + @staticmethod + def dpf_data_tree_set_string_collection_attribute(data_tree, attribute_name, collection): + request = DpfDataTreeGRPCAPI._set_attribute_init(data_tree, attribute_name) + request.data[0].vec_string.rep_string.extend(collection._internal_obj) + DpfDataTreeGRPCAPI._set_attribute_finish(data_tree, request) + + @staticmethod + def dpf_data_tree_set_string_attribute(data_tree, attribute_name, data, size): + request = DpfDataTreeGRPCAPI._set_attribute_init(data_tree, attribute_name) + request.data[0].string = data + DpfDataTreeGRPCAPI._set_attribute_finish(data_tree, request) + + @staticmethod + def dpf_data_tree_set_sub_tree_attribute(data_tree, attribute_name, data): + request = DpfDataTreeGRPCAPI._set_attribute_init(data_tree, attribute_name) + request.data[0].data_tree.CopyFrom(data._internal_obj) + DpfDataTreeGRPCAPI._set_attribute_finish(data_tree, request) + + @staticmethod + def dpf_data_tree_has_attribute(data_tree, attribute_name): + if isinstance(data_tree._internal_obj, dict): + return attribute_name in data_tree._internal_obj + from ansys.grpc.dpf import data_tree_pb2 + request = data_tree_pb2.HasRequest() + request.data_tree.CopyFrom(data_tree._internal_obj) + request.names.append(attribute_name) + return _get_stub(data_tree._server).Has(request).has_each_name[attribute_name] + + @staticmethod + def dpf_data_tree_get_string_collection_attribute(data_tree, attribute_name): + from ansys.grpc.dpf import data_tree_pb2, base_pb2 + request = data_tree_pb2.GetRequest() + request.data_tree.CopyFrom(data_tree._internal_obj) + stype = base_pb2.Type.Value("VEC_STRING") + request.data.append(data_tree_pb2.SingleDataRequest(name=attribute_name, type=stype)) + data = _get_stub(data_tree._server).Get(request).data[0] + if data.HasField("vec_string"): + return list(data.vec_string.rep_string) + + @staticmethod + def dpf_data_tree_get_available_attributes_names_in_string_collection(data_tree): + from ansys.grpc.dpf import data_tree_pb2, base_pb2 + request = data_tree_pb2.ListRequest() + request.data_tree.CopyFrom(data_tree._internal_obj) + attribute_names = _get_stub(data_tree._server).List(request).attribute_names + + return utils.to_array(attribute_names) + + @staticmethod + def dpf_data_tree_get_available_sub_tree_names_in_string_collection(data_tree): + from ansys.grpc.dpf import data_tree_pb2, base_pb2 + request = data_tree_pb2.ListRequest() + request.data_tree.CopyFrom(data_tree._internal_obj) + sub_tree_names = _get_stub(data_tree._server).List(request).sub_tree_names + + return utils.to_array(sub_tree_names) diff --git a/src/ansys/dpf/gate/dpf_vector.py b/src/ansys/dpf/gate/dpf_vector.py new file mode 100644 index 0000000000..57f3dd6021 --- /dev/null +++ b/src/ansys/dpf/gate/dpf_vector.py @@ -0,0 +1,321 @@ +import copy +import ctypes +import numpy as np +from ansys.dpf.gate.generated import dpf_vector_capi +from ansys.dpf.gate.integral_types import MutableListInt32, MutableInt32, MutableListDouble, \ + MutableListString, MutableListChar + + +def get_size_of_list(list): + if isinstance(list, (np.generic, np.ndarray)): + return list.size + elif not hasattr(list, '__iter__'): + return 1 + return len(list) + + +class DPFVectorBase: + """ + Base class of DPF vector. + In the init, creates an instance of DPFVector in the client CLayer. + The class make thr usage of CAPI calls more friendly by wrapping ctypes and setting + parameters by reference possible. + + Parameters + ---------- + client: object having _internal_obj attribute and a shared CLayer Client instance, optional + Enables DPFClientAPI to choose the right API to use. + + api: DpfVectorAbstractAPI, optional + """ + + def __init__(self, client, api): + self.dpf_vector_api = api + self._modified = False + self._check_changes = True + try: + if not client: + self._internal_obj = self.dpf_vector_api.dpf_vector_new() + self._check_changes = False + else: + self._internal_obj = self.dpf_vector_api.dpf_vector_new_for_object(client) + except AttributeError: + raise NotImplementedError + + @property + def internal_size(self) -> MutableInt32: + """ + Returns + ------- + size: MutableInt32 + Custom int object which can be changed by reference. + """ + return self._array.internal_size + + def start_checking_modification(self) -> None: + """ + Takes a deep copy of the current data as a numpy array + in self._initial_data, if self._check_changes is set to True. + In that case, at deletion, the current data is compared to the initial one + and the data is updated server side if it has changed. + + Notes + ----- + self._check_changes is set to True by default when a client is added at the class init + + """ + if self._check_changes: + self._initial_data = copy.deepcopy(self.np_array) + + def has_changed(self): + """ + If self._check_changes is set to True, compares the initial data computed in + ```start_checking_modification``` to the current one. + + Notes + ----- + self._check_changes is set to True by default when a client is added at the class init + """ + if self._check_changes: + if self._modified or not np.allclose(self._initial_data, self.np_array): + self._modified = True + return self._modified + + + @property + def np_array(self) -> np.ndarray: + """ + Returns + ------- + numpy.ndarray + numpy array to the internal data (with no data copy) + + Warnings + -------- + Memory of the DPFVector is not managed in this object. Use a ```DPFArray``` instead. + """ + if not self._array.pointer or self.size==0: + return np.empty((0,), dtype=self._array.np_type) + return np.ctypeslib.as_array(self._array.pointer, shape=(self.size,)) + + @property + def size(self) -> int: + """Size of the data array (returns a copy)""" + return int(self.internal_size) + + def start_checking_modification(self) -> None: + """ + Takes a deep copy of the current data as a numpy array + in self._initial_data, if self._check_changes is set to True. + In that case, at deletion, the current data is compared to the initial one + and the data is updated server side if it has changed. + + Notes + ----- + self._check_changes is set to True by default when a client is added at the class init + + """ + if self._check_changes: + self._initial_data = copy.deepcopy(self.np_array) + + def has_changed(self): + """ + If self._check_changes is set to True, compares the initial data computed in + ```start_checking_modification``` to the current one. + + Notes + ----- + self._check_changes is set to True by default when a client is added at the class init + """ + if self._check_changes: + if self._modified or not np.allclose(self._initial_data, self.np_array): + self._modified = True + return self._modified + + def __del__(self): + try: + self.dpf_vector_api.dpf_vector_delete(self) + except: + pass + + +class DPFVectorInt(DPFVectorBase): + def __init__(self, client=None, api=dpf_vector_capi.DpfVectorCAPI): + super().__init__(client, api) + self._array = MutableListInt32() + + @property + def internal_data(self) -> MutableListInt32: + """ + Returns + ------- + internal_data: MutableListInt32 + Custom int list object which can be changed by reference and which is compatible with ctypes + """ + return self._array + + def commit(self) -> None: + """Updates the data server side when necessary: + if self._check_changes is set to True, compares the initial data computed in + ```start_checking_modification``` (which should have been called beforehand) to the current one. + """ + self.dpf_vector_api.dpf_vector_int_commit(self, self.internal_data, self.internal_size, self.has_changed()) + + def __del__(self): + try: + if self._array: + self.dpf_vector_api.dpf_vector_int_free(self, self.internal_data, self.internal_size, self.has_changed()) + except: + pass + super().__del__() + + +class DPFVectorDouble(DPFVectorBase): + def __init__(self, client=None, api=dpf_vector_capi.DpfVectorCAPI): + super().__init__(client, api) + self._array = MutableListDouble() + + @property + def internal_data(self) -> MutableListDouble: + """ + Returns + ------- + internal_data: MutableListDouble + Custom double list object which can be changed by reference and which is compatible with ctypes + """ + return self._array + + def commit(self) -> None: + """Updates the data server side when necessary: + if self._check_changes is set to True, compares the initial data computed in + ```start_checking_modification``` (which should have been called beforehand) to the current one. + """ + self.dpf_vector_api.dpf_vector_double_commit(self, self.internal_data, self.internal_size, self.has_changed()) + + def __del__(self): + try: + if self._array: + self.dpf_vector_api.dpf_vector_double_free(self, self.internal_data, self.internal_size, self.has_changed()) + except: + pass + super().__del__() + + +class DPFVectorCustomType(DPFVectorBase): + def __init__(self, unitary_type, client=None, api=dpf_vector_capi.DpfVectorCAPI): + self.type = unitary_type + super().__init__(client, api) + self._array = MutableListChar() + + @property + def internal_data(self) -> MutableListChar: + """ + Returns + ------- + internal_data: MutableListDouble + Custom double list object which can be changed by reference and which is compatible with ctypes + """ + return self._array + + def commit(self) -> None: + """Updates the data server side when necessary: + if self._check_changes is set to True, compares the initial data computed in + ```start_checking_modification``` (which should have been called beforehand) to the current one. + """ + self.dpf_vector_api.dpf_vector_char_commit(self, self.internal_data, self.size*self.type.itemsize, self.has_changed()) + + @property + def size(self) -> int: + """Size of the data array (returns a copy)""" + return int(self.internal_size) + + @property + def np_array(self) -> np.ndarray: + """ + Returns + ------- + numpy.ndarray + numpy array to the internal data (with no data copy) + + Warnings + -------- + Memory of the DPFVector is not managed in this object. Use a ```DPFArray``` instead. + """ + if not self._array.pointer or self.size==0: + return np.empty((0,), dtype=self._array.np_type) + return np.ctypeslib.as_array( + ctypes.cast(self._array.pointer, ctypes.POINTER(np.ctypeslib.as_ctypes_type(self.type))), + shape=(self.size,) + ) + + def __del__(self): + try: + if self._array: + self.dpf_vector_api.dpf_vector_char_free(self, self.internal_data, self.size*self.type.itemsize, self.has_changed()) + except: + pass + super().__del__() + + +class DPFVectorString(DPFVectorBase): + def __init__(self, client=None, api=dpf_vector_capi.DpfVectorCAPI): + super().__init__(client, api) + self._array = MutableListString() + + @property + def internal_data(self) -> MutableListString: + """ + Returns + ------- + internal_data: MutableListDouble + Custom double list object which can be changed by reference and which is compatible with ctypes + """ + return self._array + + def __del__(self): + try: + if self._array: + self.dpf_vector_api.dpf_vector_char_ptr_free(self, self.internal_data, self.internal_size, self.has_changed()) + except: + pass + super().__del__() + + def __len__(self): + return int(self._array.internal_size) + + def __getitem__(self, i): + return self._array[i].decode("utf8") + + def __iter__(self): + self.n = 0 + return self + + def __next__(self): + if self.n < len(self): + self.n += 1 + return self.__getitem__(self.n-1) + else: + raise StopIteration + + def __eq__(self, other): + if get_size_of_list(other) != len(self): + return False + for d, dother in zip(self, other): + if d != dother: + return False + return True + + def __ne__(self, other): + return not self.__eq__(other) + + def __str__(self): + out = f"DPFVectorString[" + for i in range(min(5, len(self)-1)): + out += f"'{self[i]}', " + if len(self)>2: + out += "..., " + if len(self) >= 2: + out += f"'{self[len(self)-1]}'" + out += "]" + return out + diff --git a/src/ansys/dpf/gate/errors.py b/src/ansys/dpf/gate/errors.py new file mode 100644 index 0000000000..4b152008dc --- /dev/null +++ b/src/ansys/dpf/gate/errors.py @@ -0,0 +1,72 @@ +import types +from functools import wraps + +class DPFServerException(Exception): + """Error raised when the DPF server has encountered an error.""" + + def __init__(self, msg=""): + Exception.__init__(self, msg) + + +class DPFServerNullObject(Exception): + """Error raised when the DPF server cannot find an object.""" + + def __init__(self, msg=""): + Exception.__init__(self, msg) + + +class DpfVersionNotSupported(RuntimeError): + """Error raised when the dpf-core/grpc-dpf python features are not + supported by the DPF gRPC server version.""" + + def __init__(self, version, msg=None): + if msg is None: + msg = "Feature not supported. Upgrade the server to " + msg += str(version) + msg += " version (or above)." + RuntimeError.__init__(self, msg) + + +def protect_grpc(func): + """Capture gRPC exceptions and return a more succinct error message.""" + + @wraps(func) + def wrapper(*args, **kwargs): + """Capture gRPC exceptions.""" + from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous + try: + out = func(*args, **kwargs) + except (_InactiveRpcError, _MultiThreadedRendezvous) as error: + details = error.details() + if "object is null in the dataBase" in details: + raise DPFServerNullObject(details) from None + elif "Unable to open the following file" in details: + raise DPFServerException( + "The result file could not be found or could not be opened, the server raised an error message: \n" + details) from None + raise DPFServerException(details) from None + + return out + + return wrapper + + + +def protect_grpc_class(cls): + """Add a protect_grpc decorator on all functions, class methods and static methods of a + class having this decorator to capture gRPC exceptions and return a more succinct error message. + """ + for name, member in vars(cls).items(): + # Good old function object, just decorate it + if isinstance(member, (types.FunctionType, types.BuiltinFunctionType)): + setattr(cls, name, protect_grpc(member)) + continue + + # Static and class methods: do the dark magic + if isinstance(member, (classmethod, staticmethod)): + inner_func = member.__func__ + method_type = type(member) + decorated = method_type(protect_grpc(inner_func)) + setattr(cls, name, decorated) + continue + + return cls diff --git a/src/ansys/dpf/gate/field_definition_grpcapi.py b/src/ansys/dpf/gate/field_definition_grpcapi.py new file mode 100644 index 0000000000..e585204a59 --- /dev/null +++ b/src/ansys/dpf/gate/field_definition_grpcapi.py @@ -0,0 +1,93 @@ +from ansys.dpf.gate.generated import field_definition_abstract_api +from ansys.dpf.gate import errors +#------------------------------------------------------------------------------- +# FieldDefinition +#------------------------------------------------------------------------------- + +def _get_stub(server): + return server.get_stub(FieldDefinitionGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class FieldDefinitionGRPCAPI(field_definition_abstract_api.FieldDefinitionAbstractAPI): + STUBNAME = "field_def_stub" + + @staticmethod + def init_field_definition_environment(object): + from ansys.grpc.dpf import field_definition_pb2_grpc + object._server.create_stub_if_necessary(FieldDefinitionGRPCAPI.STUBNAME, field_definition_pb2_grpc.FieldDefinitionServiceStub) + object._deleter_func = (_get_stub(object._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def csfield_definition_fill_unit(fieldDef, symbol, size, homogeneity, factor, shift): + symbol.set_str(_get_stub(fieldDef._server).List(fieldDef._internal_obj).unit.symbol) + + @staticmethod + def csfield_definition_get_shell_layers(fieldDef): + return _get_stub(fieldDef._server).List(fieldDef._internal_obj).shell_layers - 1 + + @staticmethod + def csfield_definition_fill_location(fieldDef, location, size): + out = _get_stub(fieldDef._server).List(fieldDef._internal_obj) + location.set_str(out.location.location) + + @staticmethod + def csfield_definition_fill_name(fieldDef, name, size): + out = _get_stub(fieldDef._server).List(fieldDef._internal_obj) + if hasattr(out, "name"): + name.set_str(out.name.string) + + @staticmethod + def csfield_definition_fill_dimensionality(fieldDef, dim, nature, size_vsize): + val = _get_stub(fieldDef._server).List( + fieldDef._internal_obj + ).dimensionnality # typo exists on server side + nature.set(val.nature) + dim.set(val.size) + + @staticmethod + def csfield_definition_set_unit(fieldDef, symbol, dummy, dummy1, dummy2, dummy3): + FieldDefinitionGRPCAPI._modify_field_def(fieldDef, unit=symbol) + + @staticmethod + def csfield_definition_set_shell_layers(fieldDef, shellLayers): + FieldDefinitionGRPCAPI._modify_field_def(fieldDef, shell_layer=shellLayers+1) + + @staticmethod + def csfield_definition_set_location(fieldDef, location): + FieldDefinitionGRPCAPI._modify_field_def(fieldDef, location=location) + + @staticmethod + def csfield_definition_set_name(fieldDef, name): + FieldDefinitionGRPCAPI._modify_field_def(fieldDef, name=name) + + @staticmethod + def csfield_definition_set_dimensionality(fieldDef, dim, ptrSize, size_vsize): + FieldDefinitionGRPCAPI._modify_field_def(fieldDef, dimensionality=(dim,ptrSize)) + + @staticmethod + def field_definition_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.Empty() + return _get_stub(client).Create(request) + + @staticmethod + def _modify_field_def( + fieldDef, unit=None, location=None, dimensionality=None, shell_layer=None, name=None + ): + from ansys.grpc.dpf import field_definition_pb2 + request = field_definition_pb2.FieldDefinitionUpdateRequest() + request.field_definition.CopyFrom(fieldDef._internal_obj) + if unit != None: + request.unit_symbol.symbol = unit + if location != None: + request.location.location = location + if dimensionality != None: + request.dimensionnality.size.extend(dimensionality[1]) + request.dimensionnality.nature = dimensionality[0] + if shell_layer != None: + request.shell_layers = shell_layer + if name != None: + request.name.string = name + + _get_stub(fieldDef._server).Update(request) diff --git a/src/ansys/dpf/gate/field_grpcapi.py b/src/ansys/dpf/gate/field_grpcapi.py new file mode 100644 index 0000000000..e348ff9cb8 --- /dev/null +++ b/src/ansys/dpf/gate/field_grpcapi.py @@ -0,0 +1,307 @@ +import types +import numpy as np +from ansys.dpf.gate.generated import field_abstract_api +from ansys.dpf.gate import grpc_stream_helpers, errors + +# ------------------------------------------------------------------------------- +# Field +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(FieldGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class FieldGRPCAPI(field_abstract_api.FieldAbstractAPI): + STUBNAME = "field_stub" + + @staticmethod + def init_field_environment(object): + from ansys.grpc.dpf import field_pb2_grpc + if hasattr(object, "_server"): + server = object._server + else: + server = object + server.create_stub_if_necessary(FieldGRPCAPI.STUBNAME, field_pb2_grpc.FieldServiceStub) + object._deleter_func = (_get_stub(server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def field_new_with1_ddimensionnality_on_client(client, fieldDimensionality, numComp, + numEntitiesToReserve, location): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.FieldRequest() + request.nature = fieldDimensionality + request.location.location = location + request.size.scoping_size = fieldDimensionality + request.dimensionality.size.append(numComp) + return _get_stub(client).Create(request) + + @staticmethod + def field_new_with2_ddimensionnality_on_client(client, fieldDimensionality, numCompN, numCompM, + numEntitiesToReserve, location): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.FieldRequest() + request.nature = fieldDimensionality + request.location.location = location + request.size.scoping_size = fieldDimensionality + request.dimensionality.size.append(numCompN) + request.dimensionality.size.append(numCompM) + return _get_stub(client).Create(request) + + @staticmethod + def csfield_get_number_elementary_data(field): + from ansys.grpc.dpf import base_pb2, field_pb2 + request = field_pb2.CountRequest() + request.entity = base_pb2.NUM_ELEMENTARY_DATA + request.field.CopyFrom(field._internal_obj) + return _get_stub(field._server).Count(request).count + + @staticmethod + def csfield_get_number_of_components(field): + from ansys.grpc.dpf import base_pb2, field_pb2 + request = field_pb2.CountRequest() + request.entity = base_pb2.NUM_COMPONENT + request.field.CopyFrom(field._internal_obj) + return _get_stub(field._server).Count(request).count + + @staticmethod + def csfield_get_data_size(field): + from ansys.grpc.dpf import base_pb2, field_pb2 + if field._server.meet_version("4.0"): + request = field_pb2.CountRequest() + request.entity = base_pb2.NUM_DATA + request.field.CopyFrom(field._internal_obj) + return _get_stub(field._server).Count(request).count + else: + return FieldGRPCAPI.csfield_get_number_of_components(field) * \ + FieldGRPCAPI.csfield_get_number_elementary_data(field) + + @staticmethod + def csfield_set_cscoping(field, scoping): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.UpdateScopingRequest() + request.scoping.CopyFrom(scoping._internal_obj) + request.field.CopyFrom(field._internal_obj) + _get_stub(field._server).UpdateScoping(request) + + @staticmethod + def csfield_get_cscoping(field): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.GetRequest() + request.field.CopyFrom(field._internal_obj) + return _get_stub(field._server).GetScoping(request).scoping + + @staticmethod + def csfield_get_entity_data(field, EntityIndex): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.GetElementaryDataRequest() + request.field.CopyFrom(field._internal_obj) + request.index = EntityIndex + list_message =_get_stub(field._server).GetElementaryData( + request, metadata=[(b"float_or_double", b"double")] + ) + data = [] + if list_message.elemdata_containers.data.HasField("datadouble"): + data = list_message.elemdata_containers.data.datadouble.rep_double + elif list_message.elemdata_containers.data.HasField("dataint"): + data = list_message.elemdata_containers.data.dataint.rep_int + elif list_message.elemdata_containers.data.HasField("datastring"): + data = list_message.elemdata_containers.data.datastring.rep_string + elif list_message.elemdata_containers.data.HasField("databyte"): + return list_message.elemdata_containers.data.databyte.rep_bytes + + return np.array(data) + + @staticmethod + def csfield_push_back(field, EntityId, size, data): + from ansys.grpc.dpf import field_pb2 + if isinstance(data, (np.ndarray, np.generic)): + data = data.reshape(data.size) + elif not hasattr(data, "__iter__"): + data = np.array([data]) + elif size > 0 and isinstance(data[0], list): + data = np.array(data).flatten() + request = field_pb2.AddDataRequest() + if field._internal_obj.datatype == "int": + request.elemdata_containers.data.dataint.rep_int.extend( + data.tolist() if not isinstance(data, list) else data + ) + elif field._internal_obj.datatype == "string": + request.elemdata_containers.data.datastring.rep_string.extend(data.tolist()) + elif field._internal_obj.datatype == "custom": + request.elemdata_containers.data.databyte.rep_bytes= bytes(data.view(np.byte)) + else: + request.elemdata_containers.data.datadouble.rep_double.extend( + data.tolist() if not isinstance(data, list) else data + ) + request.elemdata_containers.scoping_id = EntityId + + request.field.CopyFrom(field._internal_obj) + _get_stub(field._server).AddData(request) + + @staticmethod + def csfield_get_data_pointer(field, np_array): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.ListRequest() + request.field.CopyFrom(field._internal_obj) + service = _get_stub(field._server).ListDataPointer(request) + dtype = np.int32 + return grpc_stream_helpers._data_get_chunk_(dtype, service, np_array) + + @staticmethod + def csfield_set_data_pointer(field, size, data): + from ansys.grpc.dpf import field_pb2 + if isinstance(data, (np.ndarray, np.generic)): + data = np.array(data.reshape(data.size), dtype=np.int32) + else: + data = np.array(data, dtype=np.int32) + if data.size == 0: + return + metadata = [("size_int", f"{size}")] + request = field_pb2.UpdateDataRequest() + request.field.CopyFrom(field._internal_obj) + _get_stub(field._server).UpdateDataPointer( + grpc_stream_helpers._data_chunk_yielder(request, data), metadata=metadata) + + @staticmethod + def csfield_get_data(field, np_array): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.ListRequest() + request.field.CopyFrom(field._internal_obj) + data_type="" + if field._internal_obj.datatype == "int": + data_type = "int" + dtype = np.int32 + elif field._internal_obj.datatype == "custom": + dtype = field._type + else: + data_type = "double" + dtype = np.float64 + service = _get_stub(field._server).List(request, metadata=[("float_or_double", data_type)]) + return grpc_stream_helpers._data_get_chunk_(dtype, service, np_array) + + @staticmethod + def csfield_raw_set_data(field, data, metadata): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.UpdateDataRequest() + request.field.CopyFrom(field._internal_obj) + _get_stub(field._server).UpdateData( + grpc_stream_helpers._data_chunk_yielder(request, data), metadata=metadata + ) + + @staticmethod + def csfield_set_data(field, size, data): + from ansys.grpc.dpf import field_pb2 + if isinstance(data, (np.ndarray, np.generic)): + data = np.array(data.reshape(data.size), dtype=float) + else: + data = np.array(data, dtype=float) + metadata = [("float_or_double", "double"), ("size_double", f"{size}")] + FieldGRPCAPI.csfield_raw_set_data(field, data, metadata) + + @staticmethod + def csfield_resize(field, dataSize, scopingSize): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.UpdateSizeRequest() + request.field.CopyFrom(field._internal_obj) + request.size.scoping_size = scopingSize + request.size.data_size = dataSize + _get_stub(field._server).UpdateSize(request) + + @staticmethod + def csfield_get_shared_field_definition(field): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.GetRequest() + request.field.CopyFrom(field._internal_obj) + return _get_stub(field._server).GetFieldDefinition(request).field_definition + + @staticmethod + def csfield_set_field_definition(field, field_definition): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.UpdateFieldDefinitionRequest() + request.field_def.CopyFrom(field_definition._internal_obj) + request.field.CopyFrom(field._internal_obj) + _get_stub(field._server).UpdateFieldDefinition(request) + + @staticmethod + def csfield_get_support_as_meshed_region(field): + from ansys.grpc.dpf import field_pb2, base_pb2, meshed_region_pb2 + request = field_pb2.SupportRequest() + request.field.CopyFrom(field._internal_obj) + request.type = base_pb2.Type.Value("MESHED_REGION") + try: + message = _get_stub(field._server).GetSupport(request) + out = meshed_region_pb2.MeshedRegion() + if isinstance(out.id, int): + out.id = message.id + else: + out.id.CopyFrom(message.id) + return out + except: + raise RuntimeError( + "The field's support is not a mesh. " + "Try to retrieve the time frequency support." + ) + + @staticmethod + def csfield_get_support(field): + from ansys.grpc.dpf import field_pb2, base_pb2 + request = field_pb2.SupportRequest() + request.field.CopyFrom(field._internal_obj) + request.type = base_pb2.Type.Value("SUPPORT") + try: + message = _get_stub(field._server).GetSupport(request) + return message + except: + raise RuntimeError( + "Could not get the field's support." + ) + + + @staticmethod + def csfield_get_support_as_time_freq_support(field): + from ansys.grpc.dpf import field_pb2, base_pb2 + request = field_pb2.SupportRequest() + request.field.CopyFrom(field._internal_obj) + request.type = base_pb2.Type.Value("TIME_FREQ_SUPPORT") + try: + message = _get_stub(field._server).GetSupport(request) + return message + except: + raise RuntimeError( + "The field's support is not a timefreqsupport. Try a mesh." + ) + + @staticmethod + def csfield_set_meshed_region_as_support(field, support): + from ansys.grpc.dpf import field_pb2, base_pb2 + request = field_pb2.SetSupportRequest() + request.field.CopyFrom(field._internal_obj) + request.support.type = base_pb2.Type.Value("MESHED_REGION") + if isinstance(request.support.id, int): + request.support.id = support._internal_obj.id + else: + request.support.id.id = support._internal_obj.id.id + _get_stub(field._server).SetSupport(request) + + @staticmethod + def csfield_set_support(field, support): + from ansys.grpc.dpf import field_pb2, base_pb2 + request = field_pb2.SetSupportRequest() + request.field.CopyFrom(field._internal_obj) + request.support.type = base_pb2.Type.Value("TIME_FREQ_SUPPORT") + if isinstance(request.support.id, int): + request.support.id = support._internal_obj.id + else: + request.support.id.id = support._internal_obj.id.id + _get_stub(field._server).SetSupport(request) + + @staticmethod + def csfield_get_name(field): + from ansys.grpc.dpf import field_pb2 + from ansys.dpf.gate import data_processing_grpcapi + request = field_pb2.GetRequest() + request.field.CopyFrom(field._internal_obj) + out = _get_stub(field._server).GetFieldDefinition(request) + return out.name diff --git a/src/ansys/dpf/gate/generated/any_abstract_api.py b/src/ansys/dpf/gate/generated/any_abstract_api.py new file mode 100644 index 0000000000..4031af7351 --- /dev/null +++ b/src/ansys/dpf/gate/generated/any_abstract_api.py @@ -0,0 +1,233 @@ +#------------------------------------------------------------------------------- +# Any +#------------------------------------------------------------------------------- + +class AnyAbstractAPI: + @staticmethod + def init_any_environment(object): + pass + + @staticmethod + def finish_any_environment(object): + pass + + @staticmethod + def any_wrapped_type_string(data): + raise NotImplementedError + + @staticmethod + def any_object_is_of_type(data, type_name): + raise NotImplementedError + + @staticmethod + def any_unwrap_to_real_type(dpf_object): + raise NotImplementedError + + @staticmethod + def any_get_as_fields_container(any): + raise NotImplementedError + + @staticmethod + def any_get_as_scopings_container(any): + raise NotImplementedError + + @staticmethod + def any_get_as_field(any): + raise NotImplementedError + + @staticmethod + def any_get_as_scoping(any): + raise NotImplementedError + + @staticmethod + def any_get_as_data_sources(any): + raise NotImplementedError + + @staticmethod + def any_get_as_meshes_container(any): + raise NotImplementedError + + @staticmethod + def any_get_as_string(any): + raise NotImplementedError + + @staticmethod + def any_get_as_int(any): + raise NotImplementedError + + @staticmethod + def any_get_as_double(any): + raise NotImplementedError + + @staticmethod + def any_get_as_int_collection(any): + raise NotImplementedError + + @staticmethod + def any_get_as_double_collection(any): + raise NotImplementedError + + @staticmethod + def any_get_as_cyclic_support(any): + raise NotImplementedError + + @staticmethod + def any_get_as_workflow(any): + raise NotImplementedError + + @staticmethod + def any_get_as_time_freq_support(any): + raise NotImplementedError + + @staticmethod + def any_get_as_meshed_region(any): + raise NotImplementedError + + @staticmethod + def any_get_as_result_info(any): + raise NotImplementedError + + @staticmethod + def any_get_as_materials_container(any): + raise NotImplementedError + + @staticmethod + def any_get_as_streams(any): + raise NotImplementedError + + @staticmethod + def any_get_as_property_field(any): + raise NotImplementedError + + @staticmethod + def any_get_as_data_tree(any): + raise NotImplementedError + + @staticmethod + def any_get_as_operator(any): + raise NotImplementedError + + @staticmethod + def any_get_as_string_field(any): + raise NotImplementedError + + @staticmethod + def any_get_as_generic_data_container(any): + raise NotImplementedError + + @staticmethod + def any_get_as_custom_type_fields_container(any): + raise NotImplementedError + + @staticmethod + def any_make_obj_as_any(dpf_object): + raise NotImplementedError + + @staticmethod + def any_new_from_int(any): + raise NotImplementedError + + @staticmethod + def any_new_from_string(any): + raise NotImplementedError + + @staticmethod + def any_new_from_double(any): + raise NotImplementedError + + @staticmethod + def any_new_from_fields_container(any): + raise NotImplementedError + + @staticmethod + def any_new_from_scopings_container(any): + raise NotImplementedError + + @staticmethod + def any_new_from_field(any): + raise NotImplementedError + + @staticmethod + def any_new_from_scoping(any): + raise NotImplementedError + + @staticmethod + def any_new_from_data_sources(any): + raise NotImplementedError + + @staticmethod + def any_new_from_meshes_container(any): + raise NotImplementedError + + @staticmethod + def any_new_from_int_collection(any): + raise NotImplementedError + + @staticmethod + def any_new_from_double_collection(any): + raise NotImplementedError + + @staticmethod + def any_new_from_cyclic_support(any): + raise NotImplementedError + + @staticmethod + def any_new_from_workflow(any): + raise NotImplementedError + + @staticmethod + def any_new_from_time_freq_support(any): + raise NotImplementedError + + @staticmethod + def any_new_from_meshed_region(any): + raise NotImplementedError + + @staticmethod + def any_new_from_result_info(any): + raise NotImplementedError + + @staticmethod + def any_new_from_materials_container(any): + raise NotImplementedError + + @staticmethod + def any_new_from_streams(any): + raise NotImplementedError + + @staticmethod + def any_new_from_property_field(any): + raise NotImplementedError + + @staticmethod + def any_new_from_data_tree(any): + raise NotImplementedError + + @staticmethod + def any_new_from_operator(any): + raise NotImplementedError + + @staticmethod + def any_new_from_string_field(any): + raise NotImplementedError + + @staticmethod + def any_new_from_generic_data_container(any): + raise NotImplementedError + + @staticmethod + def any_new_from_custom_type_fields_container(any): + raise NotImplementedError + + @staticmethod + def any_new_from_int_on_client(client, value): + raise NotImplementedError + + @staticmethod + def any_new_from_string_on_client(client, any): + raise NotImplementedError + + @staticmethod + def any_new_from_double_on_client(client, any): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/any_capi.py b/src/ansys/dpf/gate/generated/any_capi.py new file mode 100644 index 0000000000..67ea76ed0c --- /dev/null +++ b/src/ansys/dpf/gate/generated/any_capi.py @@ -0,0 +1,518 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import any_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Any +#------------------------------------------------------------------------------- + +class AnyCAPI(any_abstract_api.AnyAbstractAPI): + + @staticmethod + def init_any_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def any_wrapped_type_string(data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_WrappedTypeString(data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def any_object_is_of_type(data, type_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_ObjectIsOfType(data._internal_obj if data is not None else None, utils.to_char_ptr(type_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_unwrap_to_real_type(dpf_object): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_unwrap_to_real_type(dpf_object._internal_obj if dpf_object is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_fields_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_FieldsContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_scopings_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_ScopingsContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_field(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_Field(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_scoping(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_Scoping(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_data_sources(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_DataSources(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_meshes_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_MeshesContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_string(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_String(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def any_get_as_int(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_Int(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_double(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_Double(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_int_collection(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_IntCollection(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_double_collection(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_DoubleCollection(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_cyclic_support(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_CyclicSupport(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_workflow(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_Workflow(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_time_freq_support(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_timeFreqSupport(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_meshed_region(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_meshedRegion(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_result_info(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_resultInfo(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_materials_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_MaterialsContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_streams(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_streams(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_property_field(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_propertyField(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_data_tree(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_DataTree(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_operator(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_Operator(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_string_field(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_StringField(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_generic_data_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_GenericDataContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_get_as_custom_type_fields_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_CustomTypeFieldsContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_make_obj_as_any(dpf_object): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_makeObj_asAny(dpf_object._internal_obj if dpf_object is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_int(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_Int(utils.to_int32(any), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_string(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_String(utils.to_char_ptr(any), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_double(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_Double(ctypes.c_double(any) if isinstance(any, float) else any, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_fields_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_FieldsContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_scopings_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_ScopingsContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_field(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_Field(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_scoping(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_Scoping(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_data_sources(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_DataSources(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_meshes_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_MeshesContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_int_collection(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_IntCollection(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_double_collection(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_DoubleCollection(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_cyclic_support(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_CyclicSupport(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_workflow(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_Workflow(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_time_freq_support(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_timeFreqSupport(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_meshed_region(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_meshedRegion(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_result_info(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_resultInfo(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_materials_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_MaterialsContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_streams(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_streams(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_property_field(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_propertyField(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_data_tree(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_DataTree(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_operator(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_Operator(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_string_field(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_StringField(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_generic_data_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_GenericDataContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_custom_type_fields_container(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_CustomTypeFieldsContainer(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_int_on_client(client, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_Int_on_client(client._internal_obj if client is not None else None, utils.to_int32(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_string_on_client(client, any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_String_on_client(client._internal_obj if client is not None else None, utils.to_char_ptr(any), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def any_new_from_double_on_client(client, any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_newFrom_Double_on_client(client._internal_obj if client is not None else None, ctypes.c_double(any) if isinstance(any, float) else any, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/capi.py b/src/ansys/dpf/gate/generated/capi.py new file mode 100644 index 0000000000..3bc20167b1 --- /dev/null +++ b/src/ansys/dpf/gate/generated/capi.py @@ -0,0 +1,4569 @@ +import ctypes +#------------------------------------------------------------------------------- +# Callbacks +#------------------------------------------------------------------------------- +UnknwonTypeDestructor = ctypes.CFUNCTYPE(None, ctypes.c_void_p) +ReleaseFileCallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p) +DeleteCallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p) +ExternalDataDeleter = ctypes.CFUNCTYPE(None, ctypes.c_void_p) +OperatorCallBack = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_void_p) +OperatorMainCallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p) +StringCallback = ctypes.CFUNCTYPE(None, ctypes.c_char_p) +StringIntCallback = ctypes.CFUNCTYPE(None, ctypes.c_char_p, ctypes.c_int) +IntIntCallback = ctypes.CFUNCTYPE(None, ctypes.c_int, ctypes.c_int) +GenericCallBackType = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_int, ctypes.c_char_p) + +def load_api(path): + global dll + dll = ctypes.cdll.LoadLibrary(path) + + #------------------------------------------------------------------------------- + # Any + #------------------------------------------------------------------------------- + if hasattr(dll, "Any_WrappedTypeString"): + dll.Any_WrappedTypeString.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_WrappedTypeString.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Any_ObjectIsOfType"): + dll.Any_ObjectIsOfType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_ObjectIsOfType.restype = ctypes.c_bool + + if hasattr(dll, "Any_unwrap_to_real_type"): + dll.Any_unwrap_to_real_type.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_unwrap_to_real_type.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_FieldsContainer"): + dll.Any_getAs_FieldsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_FieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_ScopingsContainer"): + dll.Any_getAs_ScopingsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_ScopingsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_Field"): + dll.Any_getAs_Field.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_Field.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_Scoping"): + dll.Any_getAs_Scoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_Scoping.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_DataSources"): + dll.Any_getAs_DataSources.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_DataSources.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_MeshesContainer"): + dll.Any_getAs_MeshesContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_MeshesContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_String"): + dll.Any_getAs_String.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_String.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Any_getAs_Int"): + dll.Any_getAs_Int.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_Int.restype = ctypes.c_int32 + + if hasattr(dll, "Any_getAs_Double"): + dll.Any_getAs_Double.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_Double.restype = ctypes.c_double + + if hasattr(dll, "Any_getAs_IntCollection"): + dll.Any_getAs_IntCollection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_IntCollection.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_DoubleCollection"): + dll.Any_getAs_DoubleCollection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_DoubleCollection.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_CyclicSupport"): + dll.Any_getAs_CyclicSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_CyclicSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_Workflow"): + dll.Any_getAs_Workflow.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_Workflow.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_timeFreqSupport"): + dll.Any_getAs_timeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_timeFreqSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_meshedRegion"): + dll.Any_getAs_meshedRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_meshedRegion.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_resultInfo"): + dll.Any_getAs_resultInfo.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_resultInfo.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_MaterialsContainer"): + dll.Any_getAs_MaterialsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_MaterialsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_streams"): + dll.Any_getAs_streams.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_streams.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_propertyField"): + dll.Any_getAs_propertyField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_propertyField.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_DataTree"): + dll.Any_getAs_DataTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_DataTree.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_Operator"): + dll.Any_getAs_Operator.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_Operator.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_StringField"): + dll.Any_getAs_StringField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_StringField.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_GenericDataContainer"): + dll.Any_getAs_GenericDataContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_GenericDataContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_getAs_CustomTypeFieldsContainer"): + dll.Any_getAs_CustomTypeFieldsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_CustomTypeFieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_makeObj_asAny"): + dll.Any_makeObj_asAny.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_makeObj_asAny.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_Int"): + dll.Any_newFrom_Int.argtypes = (ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_Int.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_String"): + dll.Any_newFrom_String.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_String.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_Double"): + dll.Any_newFrom_Double.argtypes = (ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_Double.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_FieldsContainer"): + dll.Any_newFrom_FieldsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_FieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_ScopingsContainer"): + dll.Any_newFrom_ScopingsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_ScopingsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_Field"): + dll.Any_newFrom_Field.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_Field.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_Scoping"): + dll.Any_newFrom_Scoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_Scoping.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_DataSources"): + dll.Any_newFrom_DataSources.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_DataSources.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_MeshesContainer"): + dll.Any_newFrom_MeshesContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_MeshesContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_IntCollection"): + dll.Any_newFrom_IntCollection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_IntCollection.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_DoubleCollection"): + dll.Any_newFrom_DoubleCollection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_DoubleCollection.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_CyclicSupport"): + dll.Any_newFrom_CyclicSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_CyclicSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_Workflow"): + dll.Any_newFrom_Workflow.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_Workflow.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_timeFreqSupport"): + dll.Any_newFrom_timeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_timeFreqSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_meshedRegion"): + dll.Any_newFrom_meshedRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_meshedRegion.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_resultInfo"): + dll.Any_newFrom_resultInfo.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_resultInfo.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_MaterialsContainer"): + dll.Any_newFrom_MaterialsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_MaterialsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_streams"): + dll.Any_newFrom_streams.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_streams.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_propertyField"): + dll.Any_newFrom_propertyField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_propertyField.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_DataTree"): + dll.Any_newFrom_DataTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_DataTree.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_Operator"): + dll.Any_newFrom_Operator.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_Operator.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_StringField"): + dll.Any_newFrom_StringField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_StringField.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_GenericDataContainer"): + dll.Any_newFrom_GenericDataContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_GenericDataContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_CustomTypeFieldsContainer"): + dll.Any_newFrom_CustomTypeFieldsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_CustomTypeFieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_Int_on_client"): + dll.Any_newFrom_Int_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_Int_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_String_on_client"): + dll.Any_newFrom_String_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_String_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Any_newFrom_Double_on_client"): + dll.Any_newFrom_Double_on_client.argtypes = (ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_newFrom_Double_on_client.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # Client + #------------------------------------------------------------------------------- + if hasattr(dll, "Client_new"): + dll.Client_new.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Client_new.restype = ctypes.c_void_p + + if hasattr(dll, "Client_new_full_address"): + dll.Client_new_full_address.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Client_new_full_address.restype = ctypes.c_void_p + + if hasattr(dll, "Client_get_full_address"): + dll.Client_get_full_address.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Client_get_full_address.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Client_get_protocol_name"): + dll.Client_get_protocol_name.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Client_get_protocol_name.restype = ctypes.POINTER(ctypes.c_char) + + #------------------------------------------------------------------------------- + # Collection + #------------------------------------------------------------------------------- + if hasattr(dll, "Collection_OfIntNew"): + dll.Collection_OfIntNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfIntNew.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfDoubleNew"): + dll.Collection_OfDoubleNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfDoubleNew.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfStringNew"): + dll.Collection_OfStringNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfStringNew.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_GetDataAsInt"): + dll.Collection_GetDataAsInt.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetDataAsInt.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "Collection_GetDataAsDouble"): + dll.Collection_GetDataAsDouble.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetDataAsDouble.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "Collection_AddIntEntry"): + dll.Collection_AddIntEntry.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_AddIntEntry.restype = None + + if hasattr(dll, "Collection_AddDoubleEntry"): + dll.Collection_AddDoubleEntry.argtypes = (ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_AddDoubleEntry.restype = None + + if hasattr(dll, "Collection_AddStringEntry"): + dll.Collection_AddStringEntry.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_AddStringEntry.restype = None + + if hasattr(dll, "Collection_SetIntEntry"): + dll.Collection_SetIntEntry.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetIntEntry.restype = None + + if hasattr(dll, "Collection_SetDoubleEntry"): + dll.Collection_SetDoubleEntry.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetDoubleEntry.restype = None + + if hasattr(dll, "Collection_SetStringEntry"): + dll.Collection_SetStringEntry.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetStringEntry.restype = None + + if hasattr(dll, "Collection_GetIntEntry"): + dll.Collection_GetIntEntry.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetIntEntry.restype = ctypes.c_int32 + + if hasattr(dll, "Collection_GetDoubleEntry"): + dll.Collection_GetDoubleEntry.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetDoubleEntry.restype = ctypes.c_double + + if hasattr(dll, "Collection_GetStringEntry"): + dll.Collection_GetStringEntry.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetStringEntry.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Collection_SetDataAsInt"): + dll.Collection_SetDataAsInt.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetDataAsInt.restype = None + + if hasattr(dll, "Collection_SetDataAsDouble"): + dll.Collection_SetDataAsDouble.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetDataAsDouble.restype = None + + if hasattr(dll, "Collection_GetDataAsInt_For_DpfVector"): + dll.Collection_GetDataAsInt_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetDataAsInt_For_DpfVector.restype = None + + if hasattr(dll, "Collection_GetDataAsDouble_For_DpfVector"): + dll.Collection_GetDataAsDouble_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetDataAsDouble_For_DpfVector.restype = None + + if hasattr(dll, "Collection_OfScopingNew"): + dll.Collection_OfScopingNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfScopingNew.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfFieldNew"): + dll.Collection_OfFieldNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfFieldNew.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfMeshNew"): + dll.Collection_OfMeshNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfMeshNew.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfCustomTypeFieldNew"): + dll.Collection_OfCustomTypeFieldNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfCustomTypeFieldNew.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_GetNumLabels"): + dll.Collection_GetNumLabels.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetNumLabels.restype = ctypes.c_int32 + + if hasattr(dll, "Collection_GetLabel"): + dll.Collection_GetLabel.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetLabel.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Collection_AddLabel"): + dll.Collection_AddLabel.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_AddLabel.restype = None + + if hasattr(dll, "Collection_AddLabelWithDefaultValue"): + dll.Collection_AddLabelWithDefaultValue.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_AddLabelWithDefaultValue.restype = None + + if hasattr(dll, "Collection_AddEntry"): + dll.Collection_AddEntry.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_AddEntry.restype = None + + if hasattr(dll, "Collection_SetEntryByIndex"): + dll.Collection_SetEntryByIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetEntryByIndex.restype = None + + if hasattr(dll, "Collection_GetObjByIndex"): + dll.Collection_GetObjByIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetObjByIndex.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_GetObj"): + dll.Collection_GetObj.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetObj.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_GetObjLabelSpaceByIndex"): + dll.Collection_GetObjLabelSpaceByIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetObjLabelSpaceByIndex.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_GetNumObjForLabelSpace"): + dll.Collection_GetNumObjForLabelSpace.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetNumObjForLabelSpace.restype = ctypes.c_int32 + + if hasattr(dll, "Collection_GetObjByIndexForLabelSpace"): + dll.Collection_GetObjByIndexForLabelSpace.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetObjByIndexForLabelSpace.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_FillObjIndecesForLabelSpace"): + dll.Collection_FillObjIndecesForLabelSpace.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_FillObjIndecesForLabelSpace.restype = None + + if hasattr(dll, "Collection_GetLabelScoping"): + dll.Collection_GetLabelScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetLabelScoping.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_GetName"): + dll.Collection_GetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Collection_SetName"): + dll.Collection_SetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetName.restype = None + + if hasattr(dll, "Collection_GetId"): + dll.Collection_GetId.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetId.restype = ctypes.c_int32 + + if hasattr(dll, "Collection_SetId"): + dll.Collection_SetId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetId.restype = None + + if hasattr(dll, "Collection_delete"): + dll.Collection_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_delete.restype = None + + if hasattr(dll, "Collection_GetSize"): + dll.Collection_GetSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetSize.restype = ctypes.c_int32 + + if hasattr(dll, "Collection_reserve"): + dll.Collection_reserve.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_reserve.restype = None + + if hasattr(dll, "Collection_resize"): + dll.Collection_resize.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_resize.restype = None + + if hasattr(dll, "Collection_GetSupport"): + dll.Collection_GetSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_SetSupport"): + dll.Collection_SetSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_SetSupport.restype = None + + if hasattr(dll, "Collection_CreateSubCollection"): + dll.Collection_CreateSubCollection.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_CreateSubCollection.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfScopingNew_on_client"): + dll.Collection_OfScopingNew_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfScopingNew_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfFieldNew_on_client"): + dll.Collection_OfFieldNew_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfFieldNew_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfMeshNew_on_client"): + dll.Collection_OfMeshNew_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfMeshNew_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfScoping_getCopy"): + dll.Collection_OfScoping_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfScoping_getCopy.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfField_getCopy"): + dll.Collection_OfField_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfField_getCopy.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfMesh_getCopy"): + dll.Collection_OfMesh_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfMesh_getCopy.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfIntNew_on_client"): + dll.Collection_OfIntNew_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfIntNew_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfDoubleNew_on_client"): + dll.Collection_OfDoubleNew_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfDoubleNew_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfStringNew_on_client"): + dll.Collection_OfStringNew_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfStringNew_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfStringNew_local"): + dll.Collection_OfStringNew_local.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfStringNew_local.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # CyclicSupport + #------------------------------------------------------------------------------- + if hasattr(dll, "CyclicSupport_delete"): + dll.CyclicSupport_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_delete.restype = None + + if hasattr(dll, "CyclicSupport_getNumSectors"): + dll.CyclicSupport_getNumSectors.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getNumSectors.restype = ctypes.c_int32 + + if hasattr(dll, "CyclicSupport_getNumStages"): + dll.CyclicSupport_getNumStages.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getNumStages.restype = ctypes.c_int32 + + if hasattr(dll, "CyclicSupport_getSectorsScoping"): + dll.CyclicSupport_getSectorsScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getSectorsScoping.restype = ctypes.c_void_p + + if hasattr(dll, "CyclicSupport_getCyclicPhase"): + dll.CyclicSupport_getCyclicPhase.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getCyclicPhase.restype = ctypes.c_double + + if hasattr(dll, "CyclicSupport_getBaseNodesScoping"): + dll.CyclicSupport_getBaseNodesScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getBaseNodesScoping.restype = ctypes.c_void_p + + if hasattr(dll, "CyclicSupport_getBaseElementsScoping"): + dll.CyclicSupport_getBaseElementsScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getBaseElementsScoping.restype = ctypes.c_void_p + + if hasattr(dll, "CyclicSupport_getExpandedNodeIds"): + dll.CyclicSupport_getExpandedNodeIds.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getExpandedNodeIds.restype = ctypes.c_void_p + + if hasattr(dll, "CyclicSupport_getExpandedElementIds"): + dll.CyclicSupport_getExpandedElementIds.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getExpandedElementIds.restype = ctypes.c_void_p + + if hasattr(dll, "CyclicSupport_getCS"): + dll.CyclicSupport_getCS.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getCS.restype = ctypes.c_void_p + + if hasattr(dll, "CyclicSupport_getLowHighMap"): + dll.CyclicSupport_getLowHighMap.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getLowHighMap.restype = ctypes.c_void_p + + if hasattr(dll, "CyclicSupport_getHighLowMap"): + dll.CyclicSupport_getHighLowMap.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CyclicSupport_getHighLowMap.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # DataBase + #------------------------------------------------------------------------------- + if hasattr(dll, "DataBase_createAndHold"): + dll.DataBase_createAndHold.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_createAndHold.restype = ctypes.c_void_p + + if hasattr(dll, "DataBase_recordEntityByDbId"): + dll.DataBase_recordEntityByDbId.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_recordEntityByDbId.restype = ctypes.c_int32 + + if hasattr(dll, "DataBase_recordEntity"): + dll.DataBase_recordEntity.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_recordEntity.restype = ctypes.c_int32 + + if hasattr(dll, "DataBase_eraseEntity"): + dll.DataBase_eraseEntity.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_eraseEntity.restype = None + + if hasattr(dll, "DataBase_eraseEntityByDbId"): + dll.DataBase_eraseEntityByDbId.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_eraseEntityByDbId.restype = None + + if hasattr(dll, "DataBase_releaseEntity"): + dll.DataBase_releaseEntity.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_releaseEntity.restype = ctypes.c_void_p + + if hasattr(dll, "DataBase_releaseByDbId"): + dll.DataBase_releaseByDbId.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_releaseByDbId.restype = ctypes.c_void_p + + if hasattr(dll, "DataBase_getEntity"): + dll.DataBase_getEntity.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_getEntity.restype = ctypes.c_void_p + + if hasattr(dll, "DataBase_getByDbId"): + dll.DataBase_getByDbId.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_getByDbId.restype = ctypes.c_void_p + + if hasattr(dll, "DataBase_delete"): + dll.DataBase_delete.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_delete.restype = None + + if hasattr(dll, "DataBase_eraseAllHeldEntities"): + dll.DataBase_eraseAllHeldEntities.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataBase_eraseAllHeldEntities.restype = None + + #------------------------------------------------------------------------------- + # DataProcessing + #------------------------------------------------------------------------------- + if hasattr(dll, "DataProcessing_initialization"): + dll.DataProcessing_initialization.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_initialization.restype = None + + if hasattr(dll, "DataProcessing_release"): + dll.DataProcessing_release.argtypes = (ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_release.restype = ctypes.c_int32 + + if hasattr(dll, "dataProcessing_initializeWithContext"): + dll.dataProcessing_initializeWithContext.argtypes = (ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.dataProcessing_initializeWithContext.restype = ctypes.c_int32 + + if hasattr(dll, "dataProcessing_applyContext"): + dll.dataProcessing_applyContext.argtypes = (ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.dataProcessing_applyContext.restype = ctypes.c_int32 + + if hasattr(dll, "DataProcessing_set_debug_trace"): + dll.DataProcessing_set_debug_trace.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_set_debug_trace.restype = None + + if hasattr(dll, "DataProcessing_set_trace_section"): + dll.DataProcessing_set_trace_section.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_set_trace_section.restype = None + + if hasattr(dll, "DataProcessing_load_library"): + dll.DataProcessing_load_library.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_load_library.restype = None + + if hasattr(dll, "DataProcessing_available_operators"): + dll.DataProcessing_available_operators.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_available_operators.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataProcessing_duplicate_object_reference"): + dll.DataProcessing_duplicate_object_reference.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_duplicate_object_reference.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_objects_holds_same_data"): + dll.DataProcessing_objects_holds_same_data.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_objects_holds_same_data.restype = ctypes.c_bool + + if hasattr(dll, "DataProcessing_wrap_unknown"): + dll.DataProcessing_wrap_unknown.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t, ) + dll.DataProcessing_wrap_unknown.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_unwrap_unknown"): + dll.DataProcessing_unwrap_unknown.argtypes = (ctypes.c_void_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_unwrap_unknown.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_delete_shared_object"): + dll.DataProcessing_delete_shared_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_delete_shared_object.restype = None + + if hasattr(dll, "DataProcessing_unknown_has_given_hash"): + dll.DataProcessing_unknown_has_given_hash.argtypes = (ctypes.c_void_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_unknown_has_given_hash.restype = ctypes.c_bool + + if hasattr(dll, "DataProcessing_descriptionString"): + dll.DataProcessing_descriptionString.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_descriptionString.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataProcessing_deleteString"): + dll.DataProcessing_deleteString.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_deleteString.restype = None + + if hasattr(dll, "DataProcessing_String_post_event"): + dll.DataProcessing_String_post_event.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_String_post_event.restype = None + + if hasattr(dll, "DataProcessing_list_operators_as_collection"): + dll.DataProcessing_list_operators_as_collection.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_list_operators_as_collection.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_free_ints"): + dll.DataProcessing_free_ints.argtypes = (ctypes.POINTER(ctypes.c_int32), ) + dll.DataProcessing_free_ints.restype = None + + if hasattr(dll, "DataProcessing_free_doubles"): + dll.DataProcessing_free_doubles.argtypes = (ctypes.POINTER(ctypes.c_double), ) + dll.DataProcessing_free_doubles.restype = None + + if hasattr(dll, "DataProcessing_serialize"): + dll.DataProcessing_serialize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_serialize.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_deserialize"): + dll.DataProcessing_deserialize.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_deserialize.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_getGlobalConfigAsDataTree"): + dll.DataProcessing_getGlobalConfigAsDataTree.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_getGlobalConfigAsDataTree.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_getServerVersion"): + dll.DataProcessing_getServerVersion.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_getServerVersion.restype = None + + if hasattr(dll, "DataProcessing_getOs"): + dll.DataProcessing_getOs.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_getOs.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataProcessing_ProcessId"): + dll.DataProcessing_ProcessId.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_ProcessId.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_initialization_on_client"): + dll.DataProcessing_initialization_on_client.argtypes = (ctypes.c_void_p, ) + dll.DataProcessing_initialization_on_client.restype = None + + if hasattr(dll, "DataProcessing_release_on_client"): + dll.DataProcessing_release_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_release_on_client.restype = ctypes.c_int32 + + if hasattr(dll, "dataProcessing_initializeWithContext_on_client"): + dll.dataProcessing_initializeWithContext_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.dataProcessing_initializeWithContext_on_client.restype = ctypes.c_int32 + + if hasattr(dll, "dataProcessing_applyContext_on_client"): + dll.dataProcessing_applyContext_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.dataProcessing_applyContext_on_client.restype = ctypes.c_int32 + + if hasattr(dll, "DataProcessing_load_library_on_client"): + dll.DataProcessing_load_library_on_client.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_load_library_on_client.restype = None + + if hasattr(dll, "DataProcessing_get_id_of_duplicate_object_reference"): + dll.DataProcessing_get_id_of_duplicate_object_reference.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_get_id_of_duplicate_object_reference.restype = ctypes.c_int32 + + if hasattr(dll, "DataProcessing_release_obj_by_id_in_db"): + dll.DataProcessing_release_obj_by_id_in_db.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_release_obj_by_id_in_db.restype = None + + if hasattr(dll, "DataProcessing_deleteString_for_object"): + dll.DataProcessing_deleteString_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_deleteString_for_object.restype = None + + if hasattr(dll, "DataProcessing_get_client"): + dll.DataProcessing_get_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_get_client.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_prepare_shutdown"): + dll.DataProcessing_prepare_shutdown.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_prepare_shutdown.restype = None + + if hasattr(dll, "DataProcessing_release_server"): + dll.DataProcessing_release_server.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_release_server.restype = None + + if hasattr(dll, "DataProcessing_String_post_event_for_object"): + dll.DataProcessing_String_post_event_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_String_post_event_for_object.restype = None + + if hasattr(dll, "DataProcessing_free_ints_for_object"): + dll.DataProcessing_free_ints_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ) + dll.DataProcessing_free_ints_for_object.restype = None + + if hasattr(dll, "DataProcessing_free_doubles_for_object"): + dll.DataProcessing_free_doubles_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_double), ) + dll.DataProcessing_free_doubles_for_object.restype = None + + if hasattr(dll, "DataProcessing_deserialize_on_client"): + dll.DataProcessing_deserialize_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_deserialize_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_getGlobalConfigAsDataTree_on_client"): + dll.DataProcessing_getGlobalConfigAsDataTree_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_getGlobalConfigAsDataTree_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_getClientConfigAsDataTree"): + dll.DataProcessing_getClientConfigAsDataTree.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_getClientConfigAsDataTree.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_getServerVersion_on_client"): + dll.DataProcessing_getServerVersion_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_getServerVersion_on_client.restype = None + + if hasattr(dll, "DataProcessing_getServerIpAndPort"): + dll.DataProcessing_getServerIpAndPort.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_getServerIpAndPort.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataProcessing_getOs_on_client"): + dll.DataProcessing_getOs_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_getOs_on_client.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataProcessing_DownloadFile"): + dll.DataProcessing_DownloadFile.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_DownloadFile.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataProcessing_DownloadFiles"): + dll.DataProcessing_DownloadFiles.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_DownloadFiles.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_list_operators_as_collection_on_client"): + dll.DataProcessing_list_operators_as_collection_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_list_operators_as_collection_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_UploadFile"): + dll.DataProcessing_UploadFile.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_UploadFile.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataProcessing_ProcessId_on_client"): + dll.DataProcessing_ProcessId_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_ProcessId_on_client.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # DataProcessingError + #------------------------------------------------------------------------------- + if hasattr(dll, "DataProcessing_parse_error"): + dll.DataProcessing_parse_error.argtypes = (ctypes.c_int32, ctypes.c_wchar_p, ) + dll.DataProcessing_parse_error.restype = ctypes.c_void_p + + if hasattr(dll, "DataProcessing_parse_error_to_str"): + dll.DataProcessing_parse_error_to_str.argtypes = (ctypes.c_int32, ctypes.c_wchar_p, ) + dll.DataProcessing_parse_error_to_str.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DpfError_new"): + dll.DpfError_new.argtypes = None + dll.DpfError_new.restype = ctypes.c_void_p + + if hasattr(dll, "DpfError_set_throw"): + dll.DpfError_set_throw.argtypes = (ctypes.c_void_p, ctypes.c_bool, ) + dll.DpfError_set_throw.restype = None + + if hasattr(dll, "DpfError_set_code"): + dll.DpfError_set_code.argtypes = (ctypes.c_void_p, ctypes.c_int32, ) + dll.DpfError_set_code.restype = None + + if hasattr(dll, "DpfError_set_message_text"): + dll.DpfError_set_message_text.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ) + dll.DpfError_set_message_text.restype = None + + if hasattr(dll, "DpfError_set_message_template"): + dll.DpfError_set_message_template.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ) + dll.DpfError_set_message_template.restype = None + + if hasattr(dll, "DpfError_set_message_id"): + dll.DpfError_set_message_id.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ) + dll.DpfError_set_message_id.restype = None + + if hasattr(dll, "DpfError_delete"): + dll.DpfError_delete.argtypes = (ctypes.c_void_p, ) + dll.DpfError_delete.restype = None + + if hasattr(dll, "DpfError_duplicate"): + dll.DpfError_duplicate.argtypes = (ctypes.c_void_p, ) + dll.DpfError_duplicate.restype = ctypes.c_void_p + + if hasattr(dll, "DpfError_code"): + dll.DpfError_code.argtypes = (ctypes.c_void_p, ) + dll.DpfError_code.restype = ctypes.c_int32 + + if hasattr(dll, "DpfError_to_throw"): + dll.DpfError_to_throw.argtypes = (ctypes.c_void_p, ) + dll.DpfError_to_throw.restype = ctypes.c_bool + + if hasattr(dll, "DpfError_message_text"): + dll.DpfError_message_text.argtypes = (ctypes.c_void_p, ) + dll.DpfError_message_text.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DpfError_message_template"): + dll.DpfError_message_template.argtypes = (ctypes.c_void_p, ) + dll.DpfError_message_template.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DpfError_message_id"): + dll.DpfError_message_id.argtypes = (ctypes.c_void_p, ) + dll.DpfError_message_id.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataProcessing_parse_error_to_str_for_object"): + dll.DataProcessing_parse_error_to_str_for_object.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_wchar_p, ) + dll.DataProcessing_parse_error_to_str_for_object.restype = ctypes.POINTER(ctypes.c_char) + + #------------------------------------------------------------------------------- + # DataSources + #------------------------------------------------------------------------------- + if hasattr(dll, "DataSources_new"): + dll.DataSources_new.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_new.restype = ctypes.c_void_p + + if hasattr(dll, "DataSources_delete"): + dll.DataSources_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_delete.restype = None + + if hasattr(dll, "DataSources_SetResultFilePath"): + dll.DataSources_SetResultFilePath.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_SetResultFilePath.restype = None + + if hasattr(dll, "DataSources_SetResultFilePathWithKey"): + dll.DataSources_SetResultFilePathWithKey.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_SetResultFilePathWithKey.restype = None + + if hasattr(dll, "DataSources_SetDomainResultFilePathWithKey"): + dll.DataSources_SetDomainResultFilePathWithKey.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_SetDomainResultFilePathWithKey.restype = None + + if hasattr(dll, "DataSources_AddFilePath"): + dll.DataSources_AddFilePath.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddFilePath.restype = None + + if hasattr(dll, "DataSources_AddFilePathWithKey"): + dll.DataSources_AddFilePathWithKey.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddFilePathWithKey.restype = None + + if hasattr(dll, "DataSources_AddFilePathForSpecifiedResult"): + dll.DataSources_AddFilePathForSpecifiedResult.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddFilePathForSpecifiedResult.restype = None + + if hasattr(dll, "DataSources_SetResultFilePathUtf8"): + dll.DataSources_SetResultFilePathUtf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_SetResultFilePathUtf8.restype = None + + if hasattr(dll, "DataSources_SetResultFilePathWithKeyUtf8"): + dll.DataSources_SetResultFilePathWithKeyUtf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_SetResultFilePathWithKeyUtf8.restype = None + + if hasattr(dll, "DataSources_SetDomainResultFilePathUtf8"): + dll.DataSources_SetDomainResultFilePathUtf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_SetDomainResultFilePathUtf8.restype = None + + if hasattr(dll, "DataSources_SetDomainResultFilePathWithKeyUtf8"): + dll.DataSources_SetDomainResultFilePathWithKeyUtf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_SetDomainResultFilePathWithKeyUtf8.restype = None + + if hasattr(dll, "DataSources_AddFilePathUtf8"): + dll.DataSources_AddFilePathUtf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddFilePathUtf8.restype = None + + if hasattr(dll, "DataSources_AddFilePathWithKeyUtf8"): + dll.DataSources_AddFilePathWithKeyUtf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddFilePathWithKeyUtf8.restype = None + + if hasattr(dll, "DataSources_AddDomainFilePathWithKeyUtf8"): + dll.DataSources_AddDomainFilePathWithKeyUtf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddDomainFilePathWithKeyUtf8.restype = None + + if hasattr(dll, "DataSources_AddFilePathForSpecifiedResultUtf8"): + dll.DataSources_AddFilePathForSpecifiedResultUtf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddFilePathForSpecifiedResultUtf8.restype = None + + if hasattr(dll, "DataSources_AddUpstreamDataSources"): + dll.DataSources_AddUpstreamDataSources.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddUpstreamDataSources.restype = None + + if hasattr(dll, "DataSources_AddUpstreamDataSourcesForSpecifiedResult"): + dll.DataSources_AddUpstreamDataSourcesForSpecifiedResult.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddUpstreamDataSourcesForSpecifiedResult.restype = None + + if hasattr(dll, "DataSources_AddUpstreamDomainDataSources"): + dll.DataSources_AddUpstreamDomainDataSources.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_AddUpstreamDomainDataSources.restype = None + + if hasattr(dll, "DataSources_GetResultKey"): + dll.DataSources_GetResultKey.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetResultKey.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataSources_GetResultKeyByIndex"): + dll.DataSources_GetResultKeyByIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetResultKeyByIndex.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataSources_GetNumResultKeys"): + dll.DataSources_GetNumResultKeys.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetNumResultKeys.restype = ctypes.c_int32 + + if hasattr(dll, "DataSources_GetNumKeys"): + dll.DataSources_GetNumKeys.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetNumKeys.restype = ctypes.c_int32 + + if hasattr(dll, "DataSources_GetKey"): + dll.DataSources_GetKey.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetKey.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataSources_GetPath"): + dll.DataSources_GetPath.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetPath.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataSources_GetNamespace"): + dll.DataSources_GetNamespace.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetNamespace.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataSources_GetNewPathCollectionForKey"): + dll.DataSources_GetNewPathCollectionForKey.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetNewPathCollectionForKey.restype = ctypes.c_void_p + + if hasattr(dll, "DataSources_GetNewCollectionForResultsPath"): + dll.DataSources_GetNewCollectionForResultsPath.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetNewCollectionForResultsPath.restype = ctypes.c_void_p + + if hasattr(dll, "DataSources_GetSize"): + dll.DataSources_GetSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetSize.restype = ctypes.c_int32 + + if hasattr(dll, "DataSources_GetPathByPathIndex"): + dll.DataSources_GetPathByPathIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetPathByPathIndex.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataSources_GetKeyByPathIndex"): + dll.DataSources_GetKeyByPathIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetKeyByPathIndex.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "DataSources_GetLabelSpaceByPathIndex"): + dll.DataSources_GetLabelSpaceByPathIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_GetLabelSpaceByPathIndex.restype = ctypes.c_void_p + + if hasattr(dll, "DataSources_RegisterNamespace"): + dll.DataSources_RegisterNamespace.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_RegisterNamespace.restype = None + + if hasattr(dll, "DataSources_new_on_client"): + dll.DataSources_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "DataSources_getCopy"): + dll.DataSources_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataSources_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # DpfDataTree + #------------------------------------------------------------------------------- + if hasattr(dll, "DpfDataTree_new"): + dll.DpfDataTree_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_new.restype = ctypes.c_void_p + + if hasattr(dll, "DpfDataTree_delete"): + dll.DpfDataTree_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_delete.restype = None + + if hasattr(dll, "DpfDataTree_hasSubTree"): + dll.DpfDataTree_hasSubTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_hasSubTree.restype = ctypes.c_bool + + if hasattr(dll, "DpfDataTree_getSubTree"): + dll.DpfDataTree_getSubTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getSubTree.restype = ctypes.c_void_p + + if hasattr(dll, "DpfDataTree_makeSubTree"): + dll.DpfDataTree_makeSubTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_makeSubTree.restype = ctypes.c_void_p + + if hasattr(dll, "DpfDataTree_hasAttribute"): + dll.DpfDataTree_hasAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_hasAttribute.restype = ctypes.c_bool + + if hasattr(dll, "DpfDataTree_getAvailableAttributesNamesInStringCollection"): + dll.DpfDataTree_getAvailableAttributesNamesInStringCollection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getAvailableAttributesNamesInStringCollection.restype = ctypes.c_void_p + + if hasattr(dll, "DpfDataTree_getAvailableSubTreeNamesInStringCollection"): + dll.DpfDataTree_getAvailableSubTreeNamesInStringCollection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getAvailableSubTreeNamesInStringCollection.restype = ctypes.c_void_p + + if hasattr(dll, "DpfDataTree_getIntAttribute"): + dll.DpfDataTree_getIntAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getIntAttribute.restype = None + + if hasattr(dll, "DpfDataTree_getUnsignedIntAttribute"): + dll.DpfDataTree_getUnsignedIntAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getUnsignedIntAttribute.restype = None + + if hasattr(dll, "DpfDataTree_getDoubleAttribute"): + dll.DpfDataTree_getDoubleAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getDoubleAttribute.restype = None + + if hasattr(dll, "DpfDataTree_getStringAttribute"): + dll.DpfDataTree_getStringAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getStringAttribute.restype = None + + if hasattr(dll, "DpfDataTree_getVecIntAttribute"): + dll.DpfDataTree_getVecIntAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getVecIntAttribute.restype = None + + if hasattr(dll, "DpfDataTree_getVecDoubleAttribute"): + dll.DpfDataTree_getVecDoubleAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getVecDoubleAttribute.restype = None + + if hasattr(dll, "DpfDataTree_getStringCollectionAttribute"): + dll.DpfDataTree_getStringCollectionAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_getStringCollectionAttribute.restype = ctypes.c_void_p + + if hasattr(dll, "DpfDataTree_setIntAttribute"): + dll.DpfDataTree_setIntAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_setIntAttribute.restype = None + + if hasattr(dll, "DpfDataTree_setUnsignedIntAttribute"): + dll.DpfDataTree_setUnsignedIntAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_setUnsignedIntAttribute.restype = None + + if hasattr(dll, "DpfDataTree_setVecIntAttribute"): + dll.DpfDataTree_setVecIntAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_setVecIntAttribute.restype = None + + if hasattr(dll, "DpfDataTree_setDoubleAttribute"): + dll.DpfDataTree_setDoubleAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_setDoubleAttribute.restype = None + + if hasattr(dll, "DpfDataTree_setVecDoubleAttribute"): + dll.DpfDataTree_setVecDoubleAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_setVecDoubleAttribute.restype = None + + if hasattr(dll, "DpfDataTree_setStringCollectionAttribute"): + dll.DpfDataTree_setStringCollectionAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_setStringCollectionAttribute.restype = None + + if hasattr(dll, "DpfDataTree_setStringAttribute"): + dll.DpfDataTree_setStringAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_setStringAttribute.restype = None + + if hasattr(dll, "DpfDataTree_setSubTreeAttribute"): + dll.DpfDataTree_setSubTreeAttribute.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_setSubTreeAttribute.restype = None + + if hasattr(dll, "DpfDataTree_saveToTxt"): + dll.DpfDataTree_saveToTxt.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_saveToTxt.restype = None + + if hasattr(dll, "DpfDataTree_readFromText"): + dll.DpfDataTree_readFromText.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_readFromText.restype = None + + if hasattr(dll, "DpfDataTree_saveToJson"): + dll.DpfDataTree_saveToJson.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_saveToJson.restype = None + + if hasattr(dll, "DpfDataTree_readFromJson"): + dll.DpfDataTree_readFromJson.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_readFromJson.restype = None + + if hasattr(dll, "DpfDataTree_new_on_client"): + dll.DpfDataTree_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfDataTree_new_on_client.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # DpfVector + #------------------------------------------------------------------------------- + if hasattr(dll, "DpfVector_new"): + dll.DpfVector_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_new.restype = ctypes.c_void_p + + if hasattr(dll, "DpfVector_double_free"): + dll.DpfVector_double_free.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_double_free.restype = None + + if hasattr(dll, "DpfVector_char_free"): + dll.DpfVector_char_free.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_char_free.restype = None + + if hasattr(dll, "DpfVector_int_free"): + dll.DpfVector_int_free.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_int_free.restype = None + + if hasattr(dll, "DpfVector_char_ptr_free"): + dll.DpfVector_char_ptr_free.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(ctypes.c_char))), ctypes.POINTER(ctypes.c_int32), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_char_ptr_free.restype = None + + if hasattr(dll, "DpfVector_double_commit"): + dll.DpfVector_double_commit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_double_commit.restype = None + + if hasattr(dll, "DpfVector_int_commit"): + dll.DpfVector_int_commit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_int_commit.restype = None + + if hasattr(dll, "DpfVector_char_commit"): + dll.DpfVector_char_commit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_char_commit.restype = None + + if hasattr(dll, "DpfVector_char_ptr_commit"): + dll.DpfVector_char_ptr_commit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.c_int32, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_char_ptr_commit.restype = None + + if hasattr(dll, "DpfVector_delete"): + dll.DpfVector_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_delete.restype = None + + if hasattr(dll, "DpfString_free"): + dll.DpfString_free.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfString_free.restype = None + + if hasattr(dll, "DpfVector_duplicate_dpf_vector"): + dll.DpfVector_duplicate_dpf_vector.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_duplicate_dpf_vector.restype = ctypes.c_void_p + + if hasattr(dll, "DpfVector_new_for_object"): + dll.DpfVector_new_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfVector_new_for_object.restype = ctypes.c_void_p + + if hasattr(dll, "DpfString_free_for_object"): + dll.DpfString_free_for_object.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DpfString_free_for_object.restype = None + + #------------------------------------------------------------------------------- + # ExternalData + #------------------------------------------------------------------------------- + if hasattr(dll, "ExternalData_wrap"): + dll.ExternalData_wrap.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ) + dll.ExternalData_wrap.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalData_free"): + dll.ExternalData_free.argtypes = (ctypes.c_void_p, ) + dll.ExternalData_free.restype = None + + if hasattr(dll, "ExternalData_get"): + dll.ExternalData_get.argtypes = (ctypes.c_void_p, ) + dll.ExternalData_get.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # ExternalOperator + #------------------------------------------------------------------------------- + if hasattr(dll, "ExternalOperator_record"): + dll.ExternalOperator_record.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_record.restype = None + + if hasattr(dll, "ExternalOperator_recordWithAbstractCore"): + dll.ExternalOperator_recordWithAbstractCore.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_recordWithAbstractCore.restype = None + + if hasattr(dll, "ExternalOperator_recordWithAbstractCoreAndWrapper"): + dll.ExternalOperator_recordWithAbstractCoreAndWrapper.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_recordWithAbstractCoreAndWrapper.restype = None + + if hasattr(dll, "ExternalOperator_putStatus"): + dll.ExternalOperator_putStatus.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putStatus.restype = None + + if hasattr(dll, "ExternalOperator_putException"): + dll.ExternalOperator_putException.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ) + dll.ExternalOperator_putException.restype = None + + if hasattr(dll, "ExternalOperator_putOutCollection"): + dll.ExternalOperator_putOutCollection.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutCollection.restype = None + + if hasattr(dll, "ExternalOperator_getNumInputs"): + dll.ExternalOperator_getNumInputs.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getNumInputs.restype = ctypes.c_int32 + + if hasattr(dll, "ExternalOperator_hasInput"): + dll.ExternalOperator_hasInput.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_hasInput.restype = ctypes.c_bool + + if hasattr(dll, "ExternalOperator_getInField"): + dll.ExternalOperator_getInField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInField.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutField"): + dll.ExternalOperator_putOutField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutField.restype = None + + if hasattr(dll, "ExternalOperator_getInFieldsContainer"): + dll.ExternalOperator_getInFieldsContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInFieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInDataSources"): + dll.ExternalOperator_getInDataSources.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInDataSources.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutDataSources"): + dll.ExternalOperator_putOutDataSources.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutDataSources.restype = None + + if hasattr(dll, "ExternalOperator_getInScoping"): + dll.ExternalOperator_getInScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInScoping.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutScoping"): + dll.ExternalOperator_putOutScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutScoping.restype = None + + if hasattr(dll, "ExternalOperator_getInScopingsContainer"): + dll.ExternalOperator_getInScopingsContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInScopingsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInMeshedRegion"): + dll.ExternalOperator_getInMeshedRegion.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInMeshedRegion.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutMeshedRegion"): + dll.ExternalOperator_putOutMeshedRegion.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutMeshedRegion.restype = None + + if hasattr(dll, "ExternalOperator_getInTimeFreq"): + dll.ExternalOperator_getInTimeFreq.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInTimeFreq.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutTimeFreq"): + dll.ExternalOperator_putOutTimeFreq.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutTimeFreq.restype = None + + if hasattr(dll, "ExternalOperator_getInMeshesContainer"): + dll.ExternalOperator_getInMeshesContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInMeshesContainer.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInCustomTypeFieldsContainer"): + dll.ExternalOperator_getInCustomTypeFieldsContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInCustomTypeFieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInStreams"): + dll.ExternalOperator_getInStreams.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInStreams.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutStreams"): + dll.ExternalOperator_putOutStreams.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutStreams.restype = None + + if hasattr(dll, "ExternalOperator_getInPropertyField"): + dll.ExternalOperator_getInPropertyField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInPropertyField.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInGenericDataContainer"): + dll.ExternalOperator_getInGenericDataContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInGenericDataContainer.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutPropertyField"): + dll.ExternalOperator_putOutPropertyField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutPropertyField.restype = None + + if hasattr(dll, "ExternalOperator_getInSupport"): + dll.ExternalOperator_getInSupport.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInSupport.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInDataTree"): + dll.ExternalOperator_getInDataTree.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInDataTree.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInWorkflow"): + dll.ExternalOperator_getInWorkflow.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInWorkflow.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInOperator"): + dll.ExternalOperator_getInOperator.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInOperator.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInExternalData"): + dll.ExternalOperator_getInExternalData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInExternalData.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInAsAny"): + dll.ExternalOperator_getInAsAny.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInAsAny.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInRemoteWorkflow"): + dll.ExternalOperator_getInRemoteWorkflow.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInRemoteWorkflow.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInRemoteOperator"): + dll.ExternalOperator_getInRemoteOperator.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInRemoteOperator.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInStringField"): + dll.ExternalOperator_getInStringField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInStringField.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInCustomTypeField"): + dll.ExternalOperator_getInCustomTypeField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInCustomTypeField.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_getInLabelSpace"): + dll.ExternalOperator_getInLabelSpace.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInLabelSpace.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutRemoteWorkflow"): + dll.ExternalOperator_putOutRemoteWorkflow.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutRemoteWorkflow.restype = None + + if hasattr(dll, "ExternalOperator_putOutOperator"): + dll.ExternalOperator_putOutOperator.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutOperator.restype = None + + if hasattr(dll, "ExternalOperator_putOutSupport"): + dll.ExternalOperator_putOutSupport.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutSupport.restype = None + + if hasattr(dll, "ExternalOperator_putOutAsAny"): + dll.ExternalOperator_putOutAsAny.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutAsAny.restype = None + + if hasattr(dll, "ExternalOperator_getInBool"): + dll.ExternalOperator_getInBool.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInBool.restype = ctypes.c_bool + + if hasattr(dll, "ExternalOperator_putOutBool"): + dll.ExternalOperator_putOutBool.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutBool.restype = None + + if hasattr(dll, "ExternalOperator_getInInt"): + dll.ExternalOperator_getInInt.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInInt.restype = ctypes.c_int32 + + if hasattr(dll, "ExternalOperator_putOutInt"): + dll.ExternalOperator_putOutInt.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutInt.restype = None + + if hasattr(dll, "ExternalOperator_getInDouble"): + dll.ExternalOperator_getInDouble.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInDouble.restype = ctypes.c_double + + if hasattr(dll, "ExternalOperator_putOutDouble"): + dll.ExternalOperator_putOutDouble.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutDouble.restype = None + + if hasattr(dll, "ExternalOperator_getInLongLong"): + dll.ExternalOperator_getInLongLong.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInLongLong.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutLongLong"): + dll.ExternalOperator_putOutLongLong.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutLongLong.restype = None + + if hasattr(dll, "ExternalOperator_getInString"): + dll.ExternalOperator_getInString.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInString.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ExternalOperator_putOutString"): + dll.ExternalOperator_putOutString.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutString.restype = None + + if hasattr(dll, "ExternalOperator_getInVecInt"): + dll.ExternalOperator_getInVecInt.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInVecInt.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "ExternalOperator_putOutVecint"): + dll.ExternalOperator_putOutVecint.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutVecint.restype = None + + if hasattr(dll, "ExternalOperator_getInVecDouble"): + dll.ExternalOperator_getInVecDouble.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInVecDouble.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "ExternalOperator_getInVecStringAsCollection"): + dll.ExternalOperator_getInVecStringAsCollection.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getInVecStringAsCollection.restype = ctypes.c_void_p + + if hasattr(dll, "ExternalOperator_putOutDataTree"): + dll.ExternalOperator_putOutDataTree.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutDataTree.restype = None + + if hasattr(dll, "ExternalOperator_putOutWorkflow"): + dll.ExternalOperator_putOutWorkflow.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutWorkflow.restype = None + + if hasattr(dll, "ExternalOperator_putOutGenericDataContainer"): + dll.ExternalOperator_putOutGenericDataContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutGenericDataContainer.restype = None + + if hasattr(dll, "ExternalOperator_putOutResultInfo"): + dll.ExternalOperator_putOutResultInfo.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutResultInfo.restype = None + + if hasattr(dll, "ExternalOperator_putOutStringField"): + dll.ExternalOperator_putOutStringField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutStringField.restype = None + + if hasattr(dll, "ExternalOperator_putOutCustomTypeField"): + dll.ExternalOperator_putOutCustomTypeField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutCustomTypeField.restype = None + + if hasattr(dll, "ExternalOperator_putOutExternalData"): + dll.ExternalOperator_putOutExternalData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutExternalData.restype = None + + if hasattr(dll, "ExternalOperator_putOutCollectionAsVector"): + dll.ExternalOperator_putOutCollectionAsVector.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_putOutCollectionAsVector.restype = None + + if hasattr(dll, "ExternalOperator_pinIsOfType"): + dll.ExternalOperator_pinIsOfType.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_pinIsOfType.restype = ctypes.c_bool + + if hasattr(dll, "ExternalOperator_delegateRun"): + dll.ExternalOperator_delegateRun.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_delegateRun.restype = None + + if hasattr(dll, "ExternalOperator_connectAllInputsToOperator"): + dll.ExternalOperator_connectAllInputsToOperator.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_connectAllInputsToOperator.restype = None + + if hasattr(dll, "ExternalOperator_getOperatorName"): + dll.ExternalOperator_getOperatorName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getOperatorName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ExternalOperator_getOperatorConfig"): + dll.ExternalOperator_getOperatorConfig.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ExternalOperator_getOperatorConfig.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # FEModel + #------------------------------------------------------------------------------- + if hasattr(dll, "FEModel_new"): + dll.FEModel_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_new.restype = ctypes.c_void_p + + if hasattr(dll, "FEModel_new_withResultFile"): + dll.FEModel_new_withResultFile.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_new_withResultFile.restype = ctypes.c_void_p + + if hasattr(dll, "FEModel_new_empty"): + dll.FEModel_new_empty.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_new_empty.restype = ctypes.c_void_p + + if hasattr(dll, "FEModel_delete"): + dll.FEModel_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_delete.restype = None + + if hasattr(dll, "FEModel_SetResultFilePath"): + dll.FEModel_SetResultFilePath.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_SetResultFilePath.restype = None + + if hasattr(dll, "FEModel_AddResult"): + dll.FEModel_AddResult.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_AddResult.restype = ctypes.c_void_p + + if hasattr(dll, "FEModel_AddPrimaryResult"): + dll.FEModel_AddPrimaryResult.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_AddPrimaryResult.restype = ctypes.c_void_p + + if hasattr(dll, "FEModel_AddResultWithScoping"): + dll.FEModel_AddResultWithScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_AddResultWithScoping.restype = ctypes.c_void_p + + if hasattr(dll, "FEModel_DeleteResult"): + dll.FEModel_DeleteResult.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_DeleteResult.restype = None + + if hasattr(dll, "FEModel_GetMeshRegion"): + dll.FEModel_GetMeshRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_GetMeshRegion.restype = ctypes.c_void_p + + if hasattr(dll, "FEModel_GetTimeFreqSupport"): + dll.FEModel_GetTimeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_GetTimeFreqSupport.restype = ctypes.c_void_p + + if hasattr(dll, "FEModel_GetSupportQuery"): + dll.FEModel_GetSupportQuery.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FEModel_GetSupportQuery.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # Field + #------------------------------------------------------------------------------- + if hasattr(dll, "Field_Delete"): + dll.Field_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_Delete.restype = None + + if hasattr(dll, "Field_GetData"): + dll.Field_GetData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetData.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "Field_GetDataPointer"): + dll.Field_GetDataPointer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetDataPointer.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "Field_GetScoping"): + dll.Field_GetScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetScoping.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "Field_GetScopingToDataPointerCopy"): + dll.Field_GetScopingToDataPointerCopy.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetScopingToDataPointerCopy.restype = None + + if hasattr(dll, "Field_GetEntityData"): + dll.Field_GetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetEntityData.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "Field_GetEntityDataById"): + dll.Field_GetEntityDataById.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetEntityDataById.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "Field_GetUnit"): + dll.Field_GetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetUnit.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Field_GetLocation"): + dll.Field_GetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Field_GetNumberElementaryData"): + dll.Field_GetNumberElementaryData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetNumberElementaryData.restype = ctypes.c_int32 + + if hasattr(dll, "Field_GetNumberElementaryDataByIndex"): + dll.Field_GetNumberElementaryDataByIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetNumberElementaryDataByIndex.restype = ctypes.c_int32 + + if hasattr(dll, "Field_GetNumberElementaryDataById"): + dll.Field_GetNumberElementaryDataById.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetNumberElementaryDataById.restype = ctypes.c_int32 + + if hasattr(dll, "Field_GetNumberOfComponents"): + dll.Field_GetNumberOfComponents.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetNumberOfComponents.restype = ctypes.c_int32 + + if hasattr(dll, "Field_GetNumberOfEntities"): + dll.Field_GetNumberOfEntities.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetNumberOfEntities.restype = ctypes.c_int32 + + if hasattr(dll, "Field_ElementaryDataSize"): + dll.Field_ElementaryDataSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_ElementaryDataSize.restype = ctypes.c_int32 + + if hasattr(dll, "Field_GetDataSize"): + dll.Field_GetDataSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetDataSize.restype = ctypes.c_int32 + + if hasattr(dll, "Field_GetEShellLayers"): + dll.Field_GetEShellLayers.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_GetEShellLayers.restype = ctypes.c_int32 + + if hasattr(dll, "Field_PushBack"): + dll.Field_PushBack.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_PushBack.restype = None + + if hasattr(dll, "CSField_Delete"): + dll.CSField_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_Delete.restype = None + + if hasattr(dll, "CSField_GetData"): + dll.CSField_GetData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetData.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "CSField_SetData"): + dll.CSField_SetData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetData.restype = None + + if hasattr(dll, "CSField_SetDataPointer"): + dll.CSField_SetDataPointer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetDataPointer.restype = None + + if hasattr(dll, "CSField_SetEntityData"): + dll.CSField_SetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetEntityData.restype = None + + if hasattr(dll, "CSField_SetSupport"): + dll.CSField_SetSupport.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetSupport.restype = None + + if hasattr(dll, "CSField_SetUnit"): + dll.CSField_SetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetUnit.restype = None + + if hasattr(dll, "CSField_SetLocation"): + dll.CSField_SetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetLocation.restype = None + + if hasattr(dll, "CSField_SetMeshedRegionAsSupport"): + dll.CSField_SetMeshedRegionAsSupport.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetMeshedRegionAsSupport.restype = None + + if hasattr(dll, "CSField_UpdateEntityDataByEntityIndex"): + dll.CSField_UpdateEntityDataByEntityIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_UpdateEntityDataByEntityIndex.restype = None + + if hasattr(dll, "CSField_PushBack"): + dll.CSField_PushBack.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_PushBack.restype = None + + if hasattr(dll, "CSField_GetScoping"): + dll.CSField_GetScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetScoping.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "CSField_GetDataPtr"): + dll.CSField_GetDataPtr.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetDataPtr.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "CSField_GetCScoping"): + dll.CSField_GetCScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetCScoping.restype = ctypes.c_void_p + + if hasattr(dll, "CSField_GetSharedFieldDefinition"): + dll.CSField_GetSharedFieldDefinition.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetSharedFieldDefinition.restype = ctypes.c_void_p + + if hasattr(dll, "CSField_GetFieldDefinition"): + dll.CSField_GetFieldDefinition.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetFieldDefinition.restype = ctypes.c_void_p + + if hasattr(dll, "CSField_GetSupport"): + dll.CSField_GetSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetSupport.restype = ctypes.c_void_p + + if hasattr(dll, "CSField_GetDataPointer"): + dll.CSField_GetDataPointer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetDataPointer.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "CSField_SetFieldDefinition"): + dll.CSField_SetFieldDefinition.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetFieldDefinition.restype = None + + if hasattr(dll, "CSField_SetFastAccessFieldDefinition"): + dll.CSField_SetFastAccessFieldDefinition.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetFastAccessFieldDefinition.restype = None + + if hasattr(dll, "CSField_SetScoping"): + dll.CSField_SetScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetScoping.restype = None + + if hasattr(dll, "CSField_SetCScoping"): + dll.CSField_SetCScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetCScoping.restype = None + + if hasattr(dll, "CSField_GetEntityData"): + dll.CSField_GetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetEntityData.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "CSField_GetEntityDataById"): + dll.CSField_GetEntityDataById.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetEntityDataById.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "CSField_GetUnit"): + dll.CSField_GetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetUnit.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSField_GetLocation"): + dll.CSField_GetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSField_GetNumberElementaryData"): + dll.CSField_GetNumberElementaryData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetNumberElementaryData.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_GetNumberElementaryDataByIndex"): + dll.CSField_GetNumberElementaryDataByIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetNumberElementaryDataByIndex.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_GetNumberElementaryDataById"): + dll.CSField_GetNumberElementaryDataById.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetNumberElementaryDataById.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_GetNumberEntities"): + dll.CSField_GetNumberEntities.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetNumberEntities.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_ElementaryDataSize"): + dll.CSField_ElementaryDataSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_ElementaryDataSize.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_GetDataSize"): + dll.CSField_GetDataSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetDataSize.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_GetEShellLayers"): + dll.CSField_GetEShellLayers.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetEShellLayers.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_SetEShellLayers"): + dll.CSField_SetEShellLayers.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetEShellLayers.restype = None + + if hasattr(dll, "CSField_ResizeData"): + dll.CSField_ResizeData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_ResizeData.restype = None + + if hasattr(dll, "CSField_GetNumberOfComponents"): + dll.CSField_GetNumberOfComponents.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetNumberOfComponents.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_Resize"): + dll.CSField_Resize.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_Resize.restype = None + + if hasattr(dll, "CSField_Reserve"): + dll.CSField_Reserve.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_Reserve.restype = None + + if hasattr(dll, "CSField_GetName"): + dll.CSField_GetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSField_SetName"): + dll.CSField_SetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetName.restype = None + + if hasattr(dll, "CSField_GetSupportAsMeshedRegion"): + dll.CSField_GetSupportAsMeshedRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetSupportAsMeshedRegion.restype = ctypes.c_void_p + + if hasattr(dll, "CSField_GetSupportAsTimeFreqSupport"): + dll.CSField_GetSupportAsTimeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetSupportAsTimeFreqSupport.restype = ctypes.c_void_p + + if hasattr(dll, "CSField_GetEntityId"): + dll.CSField_GetEntityId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetEntityId.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_GetEntityIndex"): + dll.CSField_GetEntityIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetEntityIndex.restype = ctypes.c_int32 + + if hasattr(dll, "CSField_GetData_For_DpfVector"): + dll.CSField_GetData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetData_For_DpfVector.restype = None + + if hasattr(dll, "CSField_GetDataPointer_For_DpfVector"): + dll.CSField_GetDataPointer_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetDataPointer_For_DpfVector.restype = None + + if hasattr(dll, "CSField_GetEntityData_For_DpfVector"): + dll.CSField_GetEntityData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetEntityData_For_DpfVector.restype = None + + if hasattr(dll, "CSField_GetEntityDataById_For_DpfVector"): + dll.CSField_GetEntityDataById_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_GetEntityDataById_For_DpfVector.restype = None + + if hasattr(dll, "Field_new"): + dll.Field_new.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_new.restype = ctypes.c_void_p + + if hasattr(dll, "Field_newWithTransformation"): + dll.Field_newWithTransformation.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_newWithTransformation.restype = ctypes.c_void_p + + if hasattr(dll, "Field_newWith1DDimensionnality"): + dll.Field_newWith1DDimensionnality.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_newWith1DDimensionnality.restype = ctypes.c_void_p + + if hasattr(dll, "Field_newWith2DDimensionnality"): + dll.Field_newWith2DDimensionnality.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_newWith2DDimensionnality.restype = ctypes.c_void_p + + if hasattr(dll, "Field_getCopy"): + dll.Field_getCopy.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_bool, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_getCopy.restype = ctypes.c_void_p + + if hasattr(dll, "Field_CloneToDifferentDimension"): + dll.Field_CloneToDifferentDimension.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_CloneToDifferentDimension.restype = ctypes.c_void_p + + if hasattr(dll, "CSField_cursor"): + dll.CSField_cursor.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_cursor.restype = ctypes.c_bool + + if hasattr(dll, "Field_fast_access_ptr"): + dll.Field_fast_access_ptr.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_fast_access_ptr.restype = ctypes.c_void_p + + if hasattr(dll, "Field_fast_cursor"): + dll.Field_fast_cursor.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_double)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ) + dll.Field_fast_cursor.restype = ctypes.c_bool + + if hasattr(dll, "Field_new_on_client"): + dll.Field_new_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Field_newWith1DDimensionnality_on_client"): + dll.Field_newWith1DDimensionnality_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_newWith1DDimensionnality_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Field_newWith2DDimensionnality_on_client"): + dll.Field_newWith2DDimensionnality_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_newWith2DDimensionnality_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Field_getCopy_on_client"): + dll.Field_getCopy_on_client.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Field_getCopy_on_client.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # FieldMapping + #------------------------------------------------------------------------------- + if hasattr(dll, "Mapping_Delete"): + dll.Mapping_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Mapping_Delete.restype = None + + if hasattr(dll, "Mapping_Map"): + dll.Mapping_Map.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Mapping_Map.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # FieldDefinition + #------------------------------------------------------------------------------- + if hasattr(dll, "FieldDefinition_new"): + dll.FieldDefinition_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_new.restype = ctypes.c_void_p + + if hasattr(dll, "FieldDefinition_wrap"): + dll.FieldDefinition_wrap.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_wrap.restype = ctypes.c_void_p + + if hasattr(dll, "FieldDefinition_Delete"): + dll.FieldDefinition_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_Delete.restype = None + + if hasattr(dll, "FieldDefinition_GetFastAccessPtr"): + dll.FieldDefinition_GetFastAccessPtr.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_GetFastAccessPtr.restype = ctypes.c_void_p + + if hasattr(dll, "FieldDefinition_GetUnit"): + dll.FieldDefinition_GetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_GetUnit.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "FieldDefinition_FillUnit"): + dll.FieldDefinition_FillUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_FillUnit.restype = None + + if hasattr(dll, "FieldDefinition_GetShellLayers"): + dll.FieldDefinition_GetShellLayers.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_GetShellLayers.restype = ctypes.c_int32 + + if hasattr(dll, "FieldDefinition_GetLocation"): + dll.FieldDefinition_GetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_GetLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "FieldDefinition_FillLocation"): + dll.FieldDefinition_FillLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_FillLocation.restype = None + + if hasattr(dll, "FieldDefinition_GetDimensionality"): + dll.FieldDefinition_GetDimensionality.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_GetDimensionality.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "FieldDefinition_FillDimensionality"): + dll.FieldDefinition_FillDimensionality.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_FillDimensionality.restype = None + + if hasattr(dll, "FieldDefinition_SetUnit"): + dll.FieldDefinition_SetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ctypes.c_double, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_SetUnit.restype = None + + if hasattr(dll, "FieldDefinition_SetShellLayers"): + dll.FieldDefinition_SetShellLayers.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_SetShellLayers.restype = None + + if hasattr(dll, "FieldDefinition_SetLocation"): + dll.FieldDefinition_SetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_SetLocation.restype = None + + if hasattr(dll, "FieldDefinition_SetDimensionality"): + dll.FieldDefinition_SetDimensionality.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_SetDimensionality.restype = None + + if hasattr(dll, "CSFieldDefinition_GetUnit"): + dll.CSFieldDefinition_GetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_GetUnit.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSFieldDefinition_FillUnit"): + dll.CSFieldDefinition_FillUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_FillUnit.restype = None + + if hasattr(dll, "CSFieldDefinition_GetShellLayers"): + dll.CSFieldDefinition_GetShellLayers.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_GetShellLayers.restype = ctypes.c_int32 + + if hasattr(dll, "CSFieldDefinition_GetLocation"): + dll.CSFieldDefinition_GetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_GetLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSFieldDefinition_FillLocation"): + dll.CSFieldDefinition_FillLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_FillLocation.restype = None + + if hasattr(dll, "CSFieldDefinition_GetDimensionality"): + dll.CSFieldDefinition_GetDimensionality.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_GetDimensionality.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "CSFieldDefinition_FillDimensionality"): + dll.CSFieldDefinition_FillDimensionality.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_FillDimensionality.restype = None + + if hasattr(dll, "CSFieldDefinition_SetUnit"): + dll.CSFieldDefinition_SetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ctypes.c_double, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_SetUnit.restype = None + + if hasattr(dll, "CSFieldDefinition_SetShellLayers"): + dll.CSFieldDefinition_SetShellLayers.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_SetShellLayers.restype = None + + if hasattr(dll, "CSFieldDefinition_SetLocation"): + dll.CSFieldDefinition_SetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_SetLocation.restype = None + + if hasattr(dll, "CSFieldDefinition_SetDimensionality"): + dll.CSFieldDefinition_SetDimensionality.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_SetDimensionality.restype = None + + if hasattr(dll, "CSFieldDefinition_SetQuantityType"): + dll.CSFieldDefinition_SetQuantityType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_SetQuantityType.restype = None + + if hasattr(dll, "CSFieldDefinition_GetNumAvailableQuantityTypes"): + dll.CSFieldDefinition_GetNumAvailableQuantityTypes.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_GetNumAvailableQuantityTypes.restype = ctypes.c_int32 + + if hasattr(dll, "CSFieldDefinition_GetQuantityType"): + dll.CSFieldDefinition_GetQuantityType.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_GetQuantityType.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSFieldDefinition_IsOfQuantityType"): + dll.CSFieldDefinition_IsOfQuantityType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_IsOfQuantityType.restype = ctypes.c_bool + + if hasattr(dll, "CSFieldDefinition_GetName"): + dll.CSFieldDefinition_GetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_GetName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSFieldDefinition_SetName"): + dll.CSFieldDefinition_SetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_SetName.restype = None + + if hasattr(dll, "CSFieldDefinition_FillName"): + dll.CSFieldDefinition_FillName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSFieldDefinition_FillName.restype = None + + if hasattr(dll, "Dimensionality_GetNumComp"): + dll.Dimensionality_GetNumComp.argtypes = (ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Dimensionality_GetNumComp.restype = ctypes.c_int32 + + if hasattr(dll, "FieldDefinition_new_on_client"): + dll.FieldDefinition_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldDefinition_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Dimensionality_GetNumComp_for_object"): + dll.Dimensionality_GetNumComp_for_object.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Dimensionality_GetNumComp_for_object.restype = ctypes.c_int32 + + #------------------------------------------------------------------------------- + # FieldsContainer + #------------------------------------------------------------------------------- + if hasattr(dll, "FieldsContainer_new"): + dll.FieldsContainer_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldsContainer_new.restype = ctypes.c_void_p + + if hasattr(dll, "FieldsContainer_Delete"): + dll.FieldsContainer_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldsContainer_Delete.restype = None + + if hasattr(dll, "FieldsContainer_at"): + dll.FieldsContainer_at.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldsContainer_at.restype = ctypes.c_void_p + + if hasattr(dll, "FieldsContainer_setField"): + dll.FieldsContainer_setField.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldsContainer_setField.restype = None + + if hasattr(dll, "FieldsContainer_GetScoping"): + dll.FieldsContainer_GetScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldsContainer_GetScoping.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "FieldsContainer_numFields"): + dll.FieldsContainer_numFields.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.FieldsContainer_numFields.restype = ctypes.c_int32 + + #------------------------------------------------------------------------------- + # LabelSpace + #------------------------------------------------------------------------------- + if hasattr(dll, "LabelSpace_new"): + dll.LabelSpace_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_new.restype = ctypes.c_void_p + + if hasattr(dll, "LabelSpace_delete"): + dll.LabelSpace_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_delete.restype = None + + if hasattr(dll, "LabelSpace_AddData"): + dll.LabelSpace_AddData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_AddData.restype = None + + if hasattr(dll, "LabelSpace_SetData"): + dll.LabelSpace_SetData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_SetData.restype = None + + if hasattr(dll, "LabelSpace_EraseData"): + dll.LabelSpace_EraseData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_EraseData.restype = None + + if hasattr(dll, "LabelSpace_GetSize"): + dll.LabelSpace_GetSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_GetSize.restype = ctypes.c_int32 + + if hasattr(dll, "LabelSpace_MergeWith"): + dll.LabelSpace_MergeWith.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_MergeWith.restype = None + + if hasattr(dll, "LabelSpace_GetLabelsValue"): + dll.LabelSpace_GetLabelsValue.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_GetLabelsValue.restype = ctypes.c_int32 + + if hasattr(dll, "LabelSpace_GetLabelsName"): + dll.LabelSpace_GetLabelsName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_GetLabelsName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "LabelSpace_HasLabel"): + dll.LabelSpace_HasLabel.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_HasLabel.restype = ctypes.c_bool + + if hasattr(dll, "LabelSpace_At"): + dll.LabelSpace_At.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_At.restype = ctypes.c_int32 + + if hasattr(dll, "ListLabelSpaces_new"): + dll.ListLabelSpaces_new.argtypes = (ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ListLabelSpaces_new.restype = ctypes.c_void_p + + if hasattr(dll, "ListLabelSpaces_pushback"): + dll.ListLabelSpaces_pushback.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ListLabelSpaces_pushback.restype = None + + if hasattr(dll, "ListLabelSpaces_size"): + dll.ListLabelSpaces_size.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ListLabelSpaces_size.restype = ctypes.c_int32 + + if hasattr(dll, "ListLabelSpaces_at"): + dll.ListLabelSpaces_at.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ListLabelSpaces_at.restype = ctypes.c_void_p + + if hasattr(dll, "LabelSpace_new_for_object"): + dll.LabelSpace_new_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.LabelSpace_new_for_object.restype = ctypes.c_void_p + + if hasattr(dll, "ListLabelSpaces_new_for_object"): + dll.ListLabelSpaces_new_for_object.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ListLabelSpaces_new_for_object.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # MaterialsContainer + #------------------------------------------------------------------------------- + if hasattr(dll, "MaterialsContainer_delete"): + dll.MaterialsContainer_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_delete.restype = None + + if hasattr(dll, "MaterialsContainer_GetDpfMatIds"): + dll.MaterialsContainer_GetDpfMatIds.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetDpfMatIds.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "MaterialsContainer_GetVUUIDAtDpfMatId"): + dll.MaterialsContainer_GetVUUIDAtDpfMatId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetVUUIDAtDpfMatId.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "MaterialsContainer_GetNumOfMaterials"): + dll.MaterialsContainer_GetNumOfMaterials.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetNumOfMaterials.restype = ctypes.c_int32 + + if hasattr(dll, "MaterialsContainer_GetNumAvailablePropertiesAtVUUID"): + dll.MaterialsContainer_GetNumAvailablePropertiesAtVUUID.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetNumAvailablePropertiesAtVUUID.restype = ctypes.c_int32 + + if hasattr(dll, "MaterialsContainer_GetPropertyScriptingNameOfDpfMatIdAtIndex"): + dll.MaterialsContainer_GetPropertyScriptingNameOfDpfMatIdAtIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetPropertyScriptingNameOfDpfMatIdAtIndex.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "MaterialsContainer_GetNumAvailablePropertiesAtDpfMatId"): + dll.MaterialsContainer_GetNumAvailablePropertiesAtDpfMatId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetNumAvailablePropertiesAtDpfMatId.restype = ctypes.c_int32 + + if hasattr(dll, "MaterialsContainer_GetMaterialPhysicNameAtVUUID"): + dll.MaterialsContainer_GetMaterialPhysicNameAtVUUID.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetMaterialPhysicNameAtVUUID.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "MaterialsContainer_GetMaterialPhysicNameAtDpfMatId"): + dll.MaterialsContainer_GetMaterialPhysicNameAtDpfMatId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetMaterialPhysicNameAtDpfMatId.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "MaterialsContainer_GetDpfMatIdAtMaterialPhysicName"): + dll.MaterialsContainer_GetDpfMatIdAtMaterialPhysicName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetDpfMatIdAtMaterialPhysicName.restype = ctypes.c_int32 + + if hasattr(dll, "MaterialsContainer_GetDpfMatIdAtVUUID"): + dll.MaterialsContainer_GetDpfMatIdAtVUUID.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MaterialsContainer_GetDpfMatIdAtVUUID.restype = ctypes.c_int32 + + #------------------------------------------------------------------------------- + # MeshedRegion + #------------------------------------------------------------------------------- + if hasattr(dll, "MeshedRegion_New"): + dll.MeshedRegion_New.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_New.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_Delete"): + dll.MeshedRegion_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_Delete.restype = None + + if hasattr(dll, "MeshedRegion_Reserve"): + dll.MeshedRegion_Reserve.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_Reserve.restype = None + + if hasattr(dll, "MeshedRegion_GetNumNodes"): + dll.MeshedRegion_GetNumNodes.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNumNodes.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetNumElements"): + dll.MeshedRegion_GetNumElements.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNumElements.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetNumFaces"): + dll.MeshedRegion_GetNumFaces.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNumFaces.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetSharedNodesScoping"): + dll.MeshedRegion_GetSharedNodesScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetSharedNodesScoping.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_GetSharedElementsScoping"): + dll.MeshedRegion_GetSharedElementsScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetSharedElementsScoping.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_GetSharedFacesScoping"): + dll.MeshedRegion_GetSharedFacesScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetSharedFacesScoping.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_GetUnit"): + dll.MeshedRegion_GetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetUnit.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "MeshedRegion_GetHasSolidRegion"): + dll.MeshedRegion_GetHasSolidRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetHasSolidRegion.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetHasShellRegion"): + dll.MeshedRegion_GetHasShellRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetHasShellRegion.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetHasSkinRegion"): + dll.MeshedRegion_GetHasSkinRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetHasSkinRegion.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetHasOnlySkinElements"): + dll.MeshedRegion_GetHasOnlySkinElements.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetHasOnlySkinElements.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetHasPointRegion"): + dll.MeshedRegion_GetHasPointRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetHasPointRegion.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetHasBeamRegion"): + dll.MeshedRegion_GetHasBeamRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetHasBeamRegion.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetHasPolygons"): + dll.MeshedRegion_GetHasPolygons.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetHasPolygons.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetHasPolyhedrons"): + dll.MeshedRegion_GetHasPolyhedrons.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetHasPolyhedrons.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetNodeId"): + dll.MeshedRegion_GetNodeId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNodeId.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetNodeIndex"): + dll.MeshedRegion_GetNodeIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNodeIndex.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetElementId"): + dll.MeshedRegion_GetElementId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetElementId.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetElementIndex"): + dll.MeshedRegion_GetElementIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetElementIndex.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetNumNodesOfElement"): + dll.MeshedRegion_GetNumNodesOfElement.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNumNodesOfElement.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetNumCornerNodesOfElement"): + dll.MeshedRegion_GetNumCornerNodesOfElement.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNumCornerNodesOfElement.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetAdjacentNodesOfMidNodeInElement"): + dll.MeshedRegion_GetAdjacentNodesOfMidNodeInElement.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetAdjacentNodesOfMidNodeInElement.restype = None + + if hasattr(dll, "MeshedRegion_GetNodeIdOfElement"): + dll.MeshedRegion_GetNodeIdOfElement.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNodeIdOfElement.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetNodeCoord"): + dll.MeshedRegion_GetNodeCoord.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNodeCoord.restype = ctypes.c_double + + if hasattr(dll, "MeshedRegion_GetElementType"): + dll.MeshedRegion_GetElementType.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetElementType.restype = None + + if hasattr(dll, "MeshedRegion_GetElementShape"): + dll.MeshedRegion_GetElementShape.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetElementShape.restype = None + + if hasattr(dll, "MeshedRegion_SetUnit"): + dll.MeshedRegion_SetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_SetUnit.restype = None + + if hasattr(dll, "MeshedRegion_GetNumAvailableNamedSelection"): + dll.MeshedRegion_GetNumAvailableNamedSelection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNumAvailableNamedSelection.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetNamedSelectionName"): + dll.MeshedRegion_GetNamedSelectionName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNamedSelectionName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "MeshedRegion_GetNamedSelectionScoping"): + dll.MeshedRegion_GetNamedSelectionScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNamedSelectionScoping.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_AddNode"): + dll.MeshedRegion_AddNode.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_AddNode.restype = None + + if hasattr(dll, "MeshedRegion_AddElement"): + dll.MeshedRegion_AddElement.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_AddElement.restype = None + + if hasattr(dll, "MeshedRegion_AddElementByShape"): + dll.MeshedRegion_AddElementByShape.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_AddElementByShape.restype = None + + if hasattr(dll, "MeshedRegion_GetPropertyField"): + dll.MeshedRegion_GetPropertyField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetPropertyField.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_HasPropertyField"): + dll.MeshedRegion_HasPropertyField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_HasPropertyField.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_GetNumAvailablePropertyField"): + dll.MeshedRegion_GetNumAvailablePropertyField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetNumAvailablePropertyField.restype = ctypes.c_int32 + + if hasattr(dll, "MeshedRegion_GetPropertyFieldName"): + dll.MeshedRegion_GetPropertyFieldName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetPropertyFieldName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "MeshedRegion_GetCoordinatesField"): + dll.MeshedRegion_GetCoordinatesField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_GetCoordinatesField.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_FillName"): + dll.MeshedRegion_FillName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_FillName.restype = None + + if hasattr(dll, "MeshedRegion_SetName"): + dll.MeshedRegion_SetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_SetName.restype = None + + if hasattr(dll, "MeshedRegion_SetPropertyField"): + dll.MeshedRegion_SetPropertyField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_SetPropertyField.restype = None + + if hasattr(dll, "MeshedRegion_SetCoordinatesField"): + dll.MeshedRegion_SetCoordinatesField.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_SetCoordinatesField.restype = None + + if hasattr(dll, "MeshedRegion_SetNamedSelectionScoping"): + dll.MeshedRegion_SetNamedSelectionScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_SetNamedSelectionScoping.restype = None + + if hasattr(dll, "MeshedRegion_cursor"): + dll.MeshedRegion_cursor.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_cursor.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_fast_access_ptr"): + dll.MeshedRegion_fast_access_ptr.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_fast_access_ptr.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_fast_add_node"): + dll.MeshedRegion_fast_add_node.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ) + dll.MeshedRegion_fast_add_node.restype = None + + if hasattr(dll, "MeshedRegion_fast_add_element"): + dll.MeshedRegion_fast_add_element.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ) + dll.MeshedRegion_fast_add_element.restype = None + + if hasattr(dll, "MeshedRegion_fast_reserve"): + dll.MeshedRegion_fast_reserve.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ) + dll.MeshedRegion_fast_reserve.restype = None + + if hasattr(dll, "MeshedRegion_fast_cursor"): + dll.MeshedRegion_fast_cursor.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ) + dll.MeshedRegion_fast_cursor.restype = ctypes.c_bool + + if hasattr(dll, "MeshedRegion_New_on_client"): + dll.MeshedRegion_New_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_New_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "MeshedRegion_getCopy"): + dll.MeshedRegion_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.MeshedRegion_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # Operator + #------------------------------------------------------------------------------- + if hasattr(dll, "Operator_new"): + dll.Operator_new.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_new.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getSpecificationIfAny"): + dll.Operator_getSpecificationIfAny.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getSpecificationIfAny.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_delete"): + dll.Operator_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_delete.restype = None + + if hasattr(dll, "Operator_record_instance"): + dll.Operator_record_instance.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_record_instance.restype = None + + if hasattr(dll, "Operator_record_with_new_name"): + dll.Operator_record_with_new_name.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_record_with_new_name.restype = None + + if hasattr(dll, "Operator_set_config"): + dll.Operator_set_config.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_set_config.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_get_config"): + dll.Operator_get_config.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_get_config.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_ById"): + dll.Operator_ById.argtypes = (ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_ById.restype = ctypes.c_void_p + + if hasattr(dll, "Get_Operator_Id"): + dll.Get_Operator_Id.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Get_Operator_Id.restype = ctypes.c_int32 + + if hasattr(dll, "dpf_operator_ByName"): + dll.dpf_operator_ByName.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.dpf_operator_ByName.restype = ctypes.c_void_p + + if hasattr(dll, "dpf_Operator_delete"): + dll.dpf_Operator_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.dpf_Operator_delete.restype = None + + if hasattr(dll, "Operator_connect_int"): + dll.Operator_connect_int.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_int.restype = None + + if hasattr(dll, "Operator_connect_bool"): + dll.Operator_connect_bool.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_bool.restype = None + + if hasattr(dll, "Operator_connect_double"): + dll.Operator_connect_double.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_double.restype = None + + if hasattr(dll, "Operator_connect_string"): + dll.Operator_connect_string.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_string.restype = None + + if hasattr(dll, "Operator_connect_Scoping"): + dll.Operator_connect_Scoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Scoping.restype = None + + if hasattr(dll, "Operator_connect_DataSources"): + dll.Operator_connect_DataSources.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_DataSources.restype = None + + if hasattr(dll, "Operator_connect_Field"): + dll.Operator_connect_Field.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Field.restype = None + + if hasattr(dll, "Operator_connect_Collection"): + dll.Operator_connect_Collection.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Collection.restype = None + + if hasattr(dll, "Operator_connect_MeshedRegion"): + dll.Operator_connect_MeshedRegion.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_MeshedRegion.restype = None + + if hasattr(dll, "Operator_connect_vector_int"): + dll.Operator_connect_vector_int.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_vector_int.restype = None + + if hasattr(dll, "Operator_connect_vector_double"): + dll.Operator_connect_vector_double.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_vector_double.restype = None + + if hasattr(dll, "Operator_connect_Collection_as_vector"): + dll.Operator_connect_Collection_as_vector.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Collection_as_vector.restype = None + + if hasattr(dll, "Operator_connect_operator_output"): + dll.Operator_connect_operator_output.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_operator_output.restype = None + + if hasattr(dll, "Operator_connect_Streams"): + dll.Operator_connect_Streams.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Streams.restype = None + + if hasattr(dll, "Operator_connect_PropertyField"): + dll.Operator_connect_PropertyField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_PropertyField.restype = None + + if hasattr(dll, "Operator_connect_StringField"): + dll.Operator_connect_StringField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_StringField.restype = None + + if hasattr(dll, "Operator_connect_CustomTypeField"): + dll.Operator_connect_CustomTypeField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_CustomTypeField.restype = None + + if hasattr(dll, "Operator_connect_Support"): + dll.Operator_connect_Support.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Support.restype = None + + if hasattr(dll, "Operator_connect_TimeFreqSupport"): + dll.Operator_connect_TimeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_TimeFreqSupport.restype = None + + if hasattr(dll, "Operator_connect_Workflow"): + dll.Operator_connect_Workflow.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Workflow.restype = None + + if hasattr(dll, "Operator_connect_CyclicSupport"): + dll.Operator_connect_CyclicSupport.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_CyclicSupport.restype = None + + if hasattr(dll, "Operator_connect_IAnsDispatch"): + dll.Operator_connect_IAnsDispatch.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_IAnsDispatch.restype = None + + if hasattr(dll, "Operator_connect_DataTree"): + dll.Operator_connect_DataTree.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_DataTree.restype = None + + if hasattr(dll, "Operator_connect_ExternalData"): + dll.Operator_connect_ExternalData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_ExternalData.restype = None + + if hasattr(dll, "Operator_connect_RemoteWorkflow"): + dll.Operator_connect_RemoteWorkflow.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_RemoteWorkflow.restype = None + + if hasattr(dll, "Operator_connect_Operator_as_input"): + dll.Operator_connect_Operator_as_input.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Operator_as_input.restype = None + + if hasattr(dll, "Operator_connect_Any"): + dll.Operator_connect_Any.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_Any.restype = None + + if hasattr(dll, "Operator_connect_LabelSpace"): + dll.Operator_connect_LabelSpace.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_LabelSpace.restype = None + + if hasattr(dll, "Operator_connect_GenericDataContainer"): + dll.Operator_connect_GenericDataContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_GenericDataContainer.restype = None + + if hasattr(dll, "Operator_connect_ResultInfo"): + dll.Operator_connect_ResultInfo.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_connect_ResultInfo.restype = None + + if hasattr(dll, "Operator_disconnect"): + dll.Operator_disconnect.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_disconnect.restype = None + + if hasattr(dll, "Operator_getoutput_FieldsContainer"): + dll.Operator_getoutput_FieldsContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_FieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_ScopingsContainer"): + dll.Operator_getoutput_ScopingsContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_ScopingsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_Field"): + dll.Operator_getoutput_Field.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_Field.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_Scoping"): + dll.Operator_getoutput_Scoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_Scoping.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_DataSources"): + dll.Operator_getoutput_DataSources.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_DataSources.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_FieldMapping"): + dll.Operator_getoutput_FieldMapping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_FieldMapping.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_MeshesContainer"): + dll.Operator_getoutput_MeshesContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_MeshesContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_CustomTypeFieldsContainer"): + dll.Operator_getoutput_CustomTypeFieldsContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_CustomTypeFieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_CyclicSupport"): + dll.Operator_getoutput_CyclicSupport.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_CyclicSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_Workflow"): + dll.Operator_getoutput_Workflow.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_Workflow.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_StringField"): + dll.Operator_getoutput_StringField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_StringField.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_CustomTypeField"): + dll.Operator_getoutput_CustomTypeField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_CustomTypeField.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_GenericDataContainer"): + dll.Operator_getoutput_GenericDataContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_GenericDataContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_string"): + dll.Operator_getoutput_string.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_string.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_getoutput_bytearray"): + dll.Operator_getoutput_bytearray.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_bytearray.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_getoutput_int"): + dll.Operator_getoutput_int.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_int.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_getoutput_double"): + dll.Operator_getoutput_double.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_double.restype = ctypes.c_double + + if hasattr(dll, "Operator_getoutput_bool"): + dll.Operator_getoutput_bool.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_bool.restype = ctypes.c_bool + + if hasattr(dll, "Operator_getoutput_timeFreqSupport"): + dll.Operator_getoutput_timeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_timeFreqSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_meshedRegion"): + dll.Operator_getoutput_meshedRegion.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_meshedRegion.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_resultInfo"): + dll.Operator_getoutput_resultInfo.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_resultInfo.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_MaterialsContainer"): + dll.Operator_getoutput_MaterialsContainer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_MaterialsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_streams"): + dll.Operator_getoutput_streams.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_streams.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_propertyField"): + dll.Operator_getoutput_propertyField.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_propertyField.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_anySupport"): + dll.Operator_getoutput_anySupport.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_anySupport.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_DataTree"): + dll.Operator_getoutput_DataTree.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_DataTree.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_Operator"): + dll.Operator_getoutput_Operator.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_Operator.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_ExternalData"): + dll.Operator_getoutput_ExternalData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_ExternalData.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_IntCollection"): + dll.Operator_getoutput_IntCollection.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_IntCollection.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_DoubleCollection"): + dll.Operator_getoutput_DoubleCollection.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_DoubleCollection.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getoutput_AsAny"): + dll.Operator_getoutput_AsAny.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getoutput_AsAny.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_has_output_when_evaluated"): + dll.Operator_has_output_when_evaluated.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_has_output_when_evaluated.restype = ctypes.c_bool + + if hasattr(dll, "Operator_status"): + dll.Operator_status.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_status.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_run"): + dll.Operator_run.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_run.restype = None + + if hasattr(dll, "Operator_invalidate"): + dll.Operator_invalidate.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_invalidate.restype = None + + if hasattr(dll, "Operator_derivate"): + dll.Operator_derivate.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_derivate.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_name"): + dll.Operator_name.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_name.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_get_status"): + dll.Operator_get_status.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_get_status.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_new_on_client"): + dll.Operator_new_on_client.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_getCopy"): + dll.Operator_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_getCopy.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_get_id_for_client"): + dll.Operator_get_id_for_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_get_id_for_client.restype = ctypes.c_int32 + + #------------------------------------------------------------------------------- + # OperatorConfig + #------------------------------------------------------------------------------- + if hasattr(dll, "OperatorConfig_default_new"): + dll.OperatorConfig_default_new.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_default_new.restype = ctypes.c_void_p + + if hasattr(dll, "OperatorConfig_empty_new"): + dll.OperatorConfig_empty_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_empty_new.restype = ctypes.c_void_p + + if hasattr(dll, "OperatorConfig_get_int"): + dll.OperatorConfig_get_int.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_get_int.restype = ctypes.c_int32 + + if hasattr(dll, "OperatorConfig_get_double"): + dll.OperatorConfig_get_double.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_get_double.restype = ctypes.c_double + + if hasattr(dll, "OperatorConfig_get_bool"): + dll.OperatorConfig_get_bool.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_get_bool.restype = ctypes.c_bool + + if hasattr(dll, "OperatorConfig_set_int"): + dll.OperatorConfig_set_int.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_set_int.restype = None + + if hasattr(dll, "OperatorConfig_set_double"): + dll.OperatorConfig_set_double.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_set_double.restype = None + + if hasattr(dll, "OperatorConfig_set_bool"): + dll.OperatorConfig_set_bool.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_set_bool.restype = None + + if hasattr(dll, "OperatorConfig_get_num_config"): + dll.OperatorConfig_get_num_config.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_get_num_config.restype = ctypes.c_int32 + + if hasattr(dll, "OperatorConfig_get_config_option_name"): + dll.OperatorConfig_get_config_option_name.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_get_config_option_name.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "OperatorConfig_get_config_option_printable_value"): + dll.OperatorConfig_get_config_option_printable_value.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_get_config_option_printable_value.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "OperatorConfig_has_option"): + dll.OperatorConfig_has_option.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_has_option.restype = ctypes.c_bool + + if hasattr(dll, "OperatorConfig_default_new_on_client"): + dll.OperatorConfig_default_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_default_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "OperatorConfig_empty_new_on_client"): + dll.OperatorConfig_empty_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.OperatorConfig_empty_new_on_client.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # OperatorSpecification + #------------------------------------------------------------------------------- + if hasattr(dll, "Operator_specification_new"): + dll.Operator_specification_new.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_new.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_empty_specification_new"): + dll.Operator_empty_specification_new.argtypes = None + dll.Operator_empty_specification_new.restype = ctypes.c_void_p + + if hasattr(dll, "Operator_specification_delete"): + dll.Operator_specification_delete.argtypes = (ctypes.c_void_p, ) + dll.Operator_specification_delete.restype = None + + if hasattr(dll, "Operator_specification_GetDescription"): + dll.Operator_specification_GetDescription.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetDescription.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_SetDescription"): + dll.Operator_specification_SetDescription.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_SetDescription.restype = None + + if hasattr(dll, "Operator_specification_SetProperty"): + dll.Operator_specification_SetProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_SetProperty.restype = None + + if hasattr(dll, "Operator_specification_GetNumPins"): + dll.Operator_specification_GetNumPins.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetNumPins.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_specification_GetPinName"): + dll.Operator_specification_GetPinName.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetPinName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_GetPinNumTypeNames"): + dll.Operator_specification_GetPinNumTypeNames.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetPinNumTypeNames.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_specification_FillPinNumbers"): + dll.Operator_specification_FillPinNumbers.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_FillPinNumbers.restype = None + + if hasattr(dll, "Operator_specification_GetPinTypeName"): + dll.Operator_specification_GetPinTypeName.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetPinTypeName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_IsPinOptional"): + dll.Operator_specification_IsPinOptional.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_IsPinOptional.restype = ctypes.c_bool + + if hasattr(dll, "Operator_specification_GetPinDocument"): + dll.Operator_specification_GetPinDocument.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetPinDocument.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_IsPinEllipsis"): + dll.Operator_specification_IsPinEllipsis.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_IsPinEllipsis.restype = ctypes.c_bool + + if hasattr(dll, "Operator_specification_GetProperties"): + dll.Operator_specification_GetProperties.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetProperties.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_GetNumProperties"): + dll.Operator_specification_GetNumProperties.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetNumProperties.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_specification_GetPropertyKey"): + dll.Operator_specification_GetPropertyKey.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetPropertyKey.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_SetPin"): + dll.Operator_specification_SetPin.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.c_bool, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_SetPin.restype = None + + if hasattr(dll, "Operator_specification_SetPinDerivedClass"): + dll.Operator_specification_SetPinDerivedClass.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.c_bool, ctypes.c_bool, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_SetPinDerivedClass.restype = None + + if hasattr(dll, "Operator_specification_AddBoolConfigOption"): + dll.Operator_specification_AddBoolConfigOption.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_bool, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_AddBoolConfigOption.restype = None + + if hasattr(dll, "Operator_specification_AddIntConfigOption"): + dll.Operator_specification_AddIntConfigOption.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_AddIntConfigOption.restype = None + + if hasattr(dll, "Operator_specification_AddDoubleConfigOption"): + dll.Operator_specification_AddDoubleConfigOption.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_double, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_AddDoubleConfigOption.restype = None + + if hasattr(dll, "Operator_specification_GetNumConfigOptions"): + dll.Operator_specification_GetNumConfigOptions.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetNumConfigOptions.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_specification_GetConfigName"): + dll.Operator_specification_GetConfigName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetConfigName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_GetConfigNumTypeNames"): + dll.Operator_specification_GetConfigNumTypeNames.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetConfigNumTypeNames.restype = ctypes.c_int32 + + if hasattr(dll, "Operator_specification_GetConfigTypeName"): + dll.Operator_specification_GetConfigTypeName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetConfigTypeName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_GetConfigPrintableDefaultValue"): + dll.Operator_specification_GetConfigPrintableDefaultValue.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetConfigPrintableDefaultValue.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_GetConfigDescription"): + dll.Operator_specification_GetConfigDescription.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetConfigDescription.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_GetPinDerivedClassTypeName"): + dll.Operator_specification_GetPinDerivedClassTypeName.argtypes = (ctypes.c_void_p, ctypes.c_bool, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_GetPinDerivedClassTypeName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Operator_specification_new_on_client"): + dll.Operator_specification_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Operator_specification_new_on_client.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # PropertyField + #------------------------------------------------------------------------------- + if hasattr(dll, "PropertyField_Delete"): + dll.PropertyField_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.PropertyField_Delete.restype = None + + if hasattr(dll, "PropertyField_GetData"): + dll.PropertyField_GetData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.PropertyField_GetData.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "PropertyField_GetDataPointer"): + dll.PropertyField_GetDataPointer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.PropertyField_GetDataPointer.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "PropertyField_GetScoping"): + dll.PropertyField_GetScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.PropertyField_GetScoping.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "PropertyField_GetEntityData"): + dll.PropertyField_GetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.PropertyField_GetEntityData.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "PropertyField_GetEntityDataById"): + dll.PropertyField_GetEntityDataById.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.PropertyField_GetEntityDataById.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "PropertyField_GetLocation"): + dll.PropertyField_GetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.PropertyField_GetLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSPropertyField_new"): + dll.CSPropertyField_new.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_new.restype = ctypes.c_void_p + + if hasattr(dll, "CSPropertyField_newWithTransformation"): + dll.CSPropertyField_newWithTransformation.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_newWithTransformation.restype = ctypes.c_void_p + + if hasattr(dll, "CSPropertyField_Delete"): + dll.CSPropertyField_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_Delete.restype = None + + if hasattr(dll, "CSPropertyField_GetData"): + dll.CSPropertyField_GetData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetData.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "CSPropertyField_GetData_For_DpfVector"): + dll.CSPropertyField_GetData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetData_For_DpfVector.restype = None + + if hasattr(dll, "CSPropertyField_GetDataPointer"): + dll.CSPropertyField_GetDataPointer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetDataPointer.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "CSPropertyField_GetDataPointer_For_DpfVector"): + dll.CSPropertyField_GetDataPointer_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetDataPointer_For_DpfVector.restype = None + + if hasattr(dll, "CSPropertyField_GetCScoping"): + dll.CSPropertyField_GetCScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetCScoping.restype = ctypes.c_void_p + + if hasattr(dll, "CSPropertyField_GetEntityData"): + dll.CSPropertyField_GetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetEntityData.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "CSPropertyField_GetEntityDataById"): + dll.CSPropertyField_GetEntityDataById.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetEntityDataById.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "CSPropertyField_GetNumberElementaryData"): + dll.CSPropertyField_GetNumberElementaryData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetNumberElementaryData.restype = ctypes.c_int32 + + if hasattr(dll, "CSPropertyField_ElementaryDataSize"): + dll.CSPropertyField_ElementaryDataSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_ElementaryDataSize.restype = ctypes.c_int32 + + if hasattr(dll, "CSPropertyField_PushBack"): + dll.CSPropertyField_PushBack.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_PushBack.restype = None + + if hasattr(dll, "CSPropertyField_SetData"): + dll.CSPropertyField_SetData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_SetData.restype = None + + if hasattr(dll, "CSPropertyField_SetDataPointer"): + dll.CSPropertyField_SetDataPointer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_SetDataPointer.restype = None + + if hasattr(dll, "CSPropertyField_SetScoping"): + dll.CSPropertyField_SetScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_SetScoping.restype = None + + if hasattr(dll, "CSPropertyField_SetCScoping"): + dll.CSPropertyField_SetCScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_SetCScoping.restype = None + + if hasattr(dll, "CSPropertyField_SetEntityData"): + dll.CSPropertyField_SetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_SetEntityData.restype = None + + if hasattr(dll, "CSPropertyField_Resize"): + dll.CSPropertyField_Resize.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_Resize.restype = None + + if hasattr(dll, "CSPropertyField_Reserve"): + dll.CSPropertyField_Reserve.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_Reserve.restype = None + + if hasattr(dll, "CSPropertyField_GetEntityData_For_DpfVector"): + dll.CSPropertyField_GetEntityData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetEntityData_For_DpfVector.restype = None + + if hasattr(dll, "CSPropertyField_GetEntityDataById_For_DpfVector"): + dll.CSPropertyField_GetEntityDataById_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetEntityDataById_For_DpfVector.restype = None + + if hasattr(dll, "CSProperty_GetDataFast"): + dll.CSProperty_GetDataFast.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSProperty_GetDataFast.restype = ctypes.c_bool + + if hasattr(dll, "CSPropertyField_GetLocation"): + dll.CSPropertyField_GetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSPropertyField_GetDataSize"): + dll.CSPropertyField_GetDataSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetDataSize.restype = ctypes.c_int32 + + if hasattr(dll, "CSPropertyField_GetEntityId"): + dll.CSPropertyField_GetEntityId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetEntityId.restype = ctypes.c_int32 + + if hasattr(dll, "CSPropertyField_GetEntityIndex"): + dll.CSPropertyField_GetEntityIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetEntityIndex.restype = ctypes.c_int32 + + if hasattr(dll, "CSPropertyField_GetFastAccessPtr"): + dll.CSPropertyField_GetFastAccessPtr.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_GetFastAccessPtr.restype = ctypes.c_void_p + + if hasattr(dll, "Property_GetDataFast"): + dll.Property_GetDataFast.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ) + dll.Property_GetDataFast.restype = ctypes.c_bool + + if hasattr(dll, "CSPropertyField_new_on_client"): + dll.CSPropertyField_new_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "CSPropertyField_getCopy"): + dll.CSPropertyField_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # RemoteWorkflow + #------------------------------------------------------------------------------- + if hasattr(dll, "RemoteWorkflow_new"): + dll.RemoteWorkflow_new.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.RemoteWorkflow_new.restype = ctypes.c_void_p + + if hasattr(dll, "RemoteWorkflow_get_workflow_id"): + dll.RemoteWorkflow_get_workflow_id.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.RemoteWorkflow_get_workflow_id.restype = ctypes.c_int32 + + if hasattr(dll, "RemoteWorkflow_get_streams"): + dll.RemoteWorkflow_get_streams.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.RemoteWorkflow_get_streams.restype = ctypes.c_void_p + + if hasattr(dll, "RemoteWorkFlow_delete"): + dll.RemoteWorkFlow_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.RemoteWorkFlow_delete.restype = None + + #------------------------------------------------------------------------------- + # RemoteOperator + #------------------------------------------------------------------------------- + if hasattr(dll, "RemoteOperator_new"): + dll.RemoteOperator_new.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.RemoteOperator_new.restype = ctypes.c_void_p + + if hasattr(dll, "RemoteOperator_get_streams"): + dll.RemoteOperator_get_streams.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.RemoteOperator_get_streams.restype = ctypes.c_void_p + + if hasattr(dll, "RemoteOperator_get_operator_id"): + dll.RemoteOperator_get_operator_id.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.RemoteOperator_get_operator_id.restype = ctypes.c_int32 + + if hasattr(dll, "RemoteOperator_hold_streams"): + dll.RemoteOperator_hold_streams.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.RemoteOperator_hold_streams.restype = None + + #------------------------------------------------------------------------------- + # ResultDefinition + #------------------------------------------------------------------------------- + if hasattr(dll, "ResultDefinition_new"): + dll.ResultDefinition_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_new.restype = ctypes.c_void_p + + if hasattr(dll, "ResultDefinition_delete"): + dll.ResultDefinition_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_delete.restype = None + + if hasattr(dll, "ResultDefinition_SetCriteria"): + dll.ResultDefinition_SetCriteria.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetCriteria.restype = None + + if hasattr(dll, "ResultDefinition_GetCriteria"): + dll.ResultDefinition_GetCriteria.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetCriteria.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultDefinition_SetSubCriteria"): + dll.ResultDefinition_SetSubCriteria.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetSubCriteria.restype = None + + if hasattr(dll, "ResultDefinition_GetSubCriteria"): + dll.ResultDefinition_GetSubCriteria.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetSubCriteria.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultDefinition_SetLocation"): + dll.ResultDefinition_SetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetLocation.restype = None + + if hasattr(dll, "ResultDefinition_GetLocation"): + dll.ResultDefinition_GetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultDefinition_SetFieldCSLocation"): + dll.ResultDefinition_SetFieldCSLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetFieldCSLocation.restype = None + + if hasattr(dll, "ResultDefinition_GetFieldCSLocation"): + dll.ResultDefinition_GetFieldCSLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetFieldCSLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultDefinition_SetUserCS"): + dll.ResultDefinition_SetUserCS.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetUserCS.restype = None + + if hasattr(dll, "ResultDefinition_GetUserCS"): + dll.ResultDefinition_GetUserCS.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetUserCS.restype = ctypes.POINTER(ctypes.c_double) + + if hasattr(dll, "ResultDefinition_SetMeshScoping"): + dll.ResultDefinition_SetMeshScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetMeshScoping.restype = None + + if hasattr(dll, "ResultDefinition_GetMeshScoping"): + dll.ResultDefinition_GetMeshScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetMeshScoping.restype = ctypes.c_void_p + + if hasattr(dll, "ResultDefinition_SetCyclicSectorsScoping"): + dll.ResultDefinition_SetCyclicSectorsScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetCyclicSectorsScoping.restype = None + + if hasattr(dll, "ResultDefinition_GetCyclicSectorsScoping"): + dll.ResultDefinition_GetCyclicSectorsScoping.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetCyclicSectorsScoping.restype = ctypes.c_void_p + + if hasattr(dll, "ResultDefinition_SetScopingByIds"): + dll.ResultDefinition_SetScopingByIds.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetScopingByIds.restype = None + + if hasattr(dll, "ResultDefinition_SetUnit"): + dll.ResultDefinition_SetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetUnit.restype = None + + if hasattr(dll, "ResultDefinition_GetUnit"): + dll.ResultDefinition_GetUnit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetUnit.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultDefinition_SetResultFilePath"): + dll.ResultDefinition_SetResultFilePath.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetResultFilePath.restype = None + + if hasattr(dll, "ResultDefinition_GetResultFilePath"): + dll.ResultDefinition_GetResultFilePath.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetResultFilePath.restype = ctypes.c_wchar_p + + if hasattr(dll, "ResultDefinition_SetIndexParam"): + dll.ResultDefinition_SetIndexParam.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetIndexParam.restype = None + + if hasattr(dll, "ResultDefinition_GetIndexParam"): + dll.ResultDefinition_GetIndexParam.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetIndexParam.restype = ctypes.c_bool + + if hasattr(dll, "ResultDefinition_SetCoefParam"): + dll.ResultDefinition_SetCoefParam.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_SetCoefParam.restype = None + + if hasattr(dll, "ResultDefinition_GetCoefParam"): + dll.ResultDefinition_GetCoefParam.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultDefinition_GetCoefParam.restype = ctypes.c_bool + + #------------------------------------------------------------------------------- + # ResultInfo + #------------------------------------------------------------------------------- + if hasattr(dll, "ResultInfo_new"): + dll.ResultInfo_new.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_new.restype = ctypes.c_void_p + + if hasattr(dll, "ResultInfo_delete"): + dll.ResultInfo_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_delete.restype = None + + if hasattr(dll, "ResultInfo_GetAnalysisType"): + dll.ResultInfo_GetAnalysisType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetAnalysisType.restype = ctypes.c_int32 + + if hasattr(dll, "ResultInfo_GetPhysicsType"): + dll.ResultInfo_GetPhysicsType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetPhysicsType.restype = ctypes.c_int32 + + if hasattr(dll, "ResultInfo_GetAnalysisTypeName"): + dll.ResultInfo_GetAnalysisTypeName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetAnalysisTypeName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetPhysicsTypeName"): + dll.ResultInfo_GetPhysicsTypeName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetPhysicsTypeName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetAnsysUnitSystemEnum"): + dll.ResultInfo_GetAnsysUnitSystemEnum.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetAnsysUnitSystemEnum.restype = ctypes.c_int32 + + if hasattr(dll, "ResultInfo_GetCustomUnitSystemStrings"): + dll.ResultInfo_GetCustomUnitSystemStrings.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetCustomUnitSystemStrings.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetUnitSystemName"): + dll.ResultInfo_GetUnitSystemName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetUnitSystemName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetNumberOfResults"): + dll.ResultInfo_GetNumberOfResults.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetNumberOfResults.restype = ctypes.c_int32 + + if hasattr(dll, "ResultInfo_GetResultNumberOfComponents"): + dll.ResultInfo_GetResultNumberOfComponents.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultNumberOfComponents.restype = ctypes.c_int32 + + if hasattr(dll, "ResultInfo_GetResultDimensionalityNature"): + dll.ResultInfo_GetResultDimensionalityNature.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultDimensionalityNature.restype = ctypes.c_int32 + + if hasattr(dll, "ResultInfo_GetResultHomogeneity"): + dll.ResultInfo_GetResultHomogeneity.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultHomogeneity.restype = ctypes.c_int32 + + if hasattr(dll, "ResultInfo_GetResultHomogeneityName"): + dll.ResultInfo_GetResultHomogeneityName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultHomogeneityName.restype = None + + if hasattr(dll, "ResultInfo_GetResultLocation"): + dll.ResultInfo_GetResultLocation.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultLocation.restype = None + + if hasattr(dll, "ResultInfo_GetResultDescription"): + dll.ResultInfo_GetResultDescription.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultDescription.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetResultName"): + dll.ResultInfo_GetResultName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetResultPhysicsName"): + dll.ResultInfo_GetResultPhysicsName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultPhysicsName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetResultScriptingName"): + dll.ResultInfo_GetResultScriptingName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultScriptingName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetResultUnitSymbol"): + dll.ResultInfo_GetResultUnitSymbol.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetResultUnitSymbol.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetNumberOfSubResults"): + dll.ResultInfo_GetNumberOfSubResults.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetNumberOfSubResults.restype = ctypes.c_int32 + + if hasattr(dll, "ResultInfo_GetSubResultName"): + dll.ResultInfo_GetSubResultName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetSubResultName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetSubResultOperatorName"): + dll.ResultInfo_GetSubResultOperatorName.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetSubResultOperatorName.restype = None + + if hasattr(dll, "ResultInfo_GetSubResultDescription"): + dll.ResultInfo_GetSubResultDescription.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetSubResultDescription.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetCyclicSupport"): + dll.ResultInfo_GetCyclicSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetCyclicSupport.restype = ctypes.c_void_p + + if hasattr(dll, "ResultInfo_GetCyclicSymmetryType"): + dll.ResultInfo_GetCyclicSymmetryType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetCyclicSymmetryType.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_HasCyclicSymmetry"): + dll.ResultInfo_HasCyclicSymmetry.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_HasCyclicSymmetry.restype = ctypes.c_bool + + if hasattr(dll, "ResultInfo_FillResultDimensionality"): + dll.ResultInfo_FillResultDimensionality.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_FillResultDimensionality.restype = None + + if hasattr(dll, "ResultInfo_GetSolverVersion"): + dll.ResultInfo_GetSolverVersion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetSolverVersion.restype = None + + if hasattr(dll, "ResultInfo_GetSolveDateAndTime"): + dll.ResultInfo_GetSolveDateAndTime.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetSolveDateAndTime.restype = None + + if hasattr(dll, "ResultInfo_GetUserName"): + dll.ResultInfo_GetUserName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetUserName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetJobName"): + dll.ResultInfo_GetJobName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetJobName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetProductName"): + dll.ResultInfo_GetProductName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetProductName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetMainTitle"): + dll.ResultInfo_GetMainTitle.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetMainTitle.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_SetUnitSystem"): + dll.ResultInfo_SetUnitSystem.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_SetUnitSystem.restype = None + + if hasattr(dll, "ResultInfo_SetCustomUnitSystem"): + dll.ResultInfo_SetCustomUnitSystem.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_SetCustomUnitSystem.restype = None + + if hasattr(dll, "ResultInfo_AddResult"): + dll.ResultInfo_AddResult.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_AddResult.restype = None + + if hasattr(dll, "ResultInfo_AddQualifiersForResult"): + dll.ResultInfo_AddQualifiersForResult.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_AddQualifiersForResult.restype = None + + if hasattr(dll, "ResultInfo_AddQualifiersForAllResults"): + dll.ResultInfo_AddQualifiersForAllResults.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_AddQualifiersForAllResults.restype = None + + if hasattr(dll, "ResultInfo_AddQualifiersSupport"): + dll.ResultInfo_AddQualifiersSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_AddQualifiersSupport.restype = None + + if hasattr(dll, "ResultInfo_GetQualifiersForResult"): + dll.ResultInfo_GetQualifiersForResult.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetQualifiersForResult.restype = ctypes.c_void_p + + if hasattr(dll, "ResultInfo_GetQualifierLabelSupport"): + dll.ResultInfo_GetQualifierLabelSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetQualifierLabelSupport.restype = ctypes.c_void_p + + if hasattr(dll, "ResultInfo_GetAvailableQualifierLabelsAsStringColl"): + dll.ResultInfo_GetAvailableQualifierLabelsAsStringColl.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetAvailableQualifierLabelsAsStringColl.restype = ctypes.c_void_p + + if hasattr(dll, "ResultInfo_AddStringProperty"): + dll.ResultInfo_AddStringProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_AddStringProperty.restype = None + + if hasattr(dll, "ResultInfo_AddIntProperty"): + dll.ResultInfo_AddIntProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_AddIntProperty.restype = None + + if hasattr(dll, "ResultInfo_GetStringProperty"): + dll.ResultInfo_GetStringProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetStringProperty.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "ResultInfo_GetIntProperty"): + dll.ResultInfo_GetIntProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.ResultInfo_GetIntProperty.restype = ctypes.c_int32 + + #------------------------------------------------------------------------------- + # Scoping + #------------------------------------------------------------------------------- + if hasattr(dll, "Scoping_new"): + dll.Scoping_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_new.restype = ctypes.c_void_p + + if hasattr(dll, "Scoping_new_WithData"): + dll.Scoping_new_WithData.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_new_WithData.restype = ctypes.c_void_p + + if hasattr(dll, "Scoping_delete"): + dll.Scoping_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_delete.restype = None + + if hasattr(dll, "Scoping_SetData"): + dll.Scoping_SetData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_SetData.restype = None + + if hasattr(dll, "Scoping_GetData"): + dll.Scoping_GetData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_GetData.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "Scoping_SetIds"): + dll.Scoping_SetIds.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_SetIds.restype = None + + if hasattr(dll, "Scoping_GetIds"): + dll.Scoping_GetIds.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_GetIds.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "Scoping_GetIds_For_DpfVector"): + dll.Scoping_GetIds_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_GetIds_For_DpfVector.restype = None + + if hasattr(dll, "Scoping_GetSize"): + dll.Scoping_GetSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_GetSize.restype = ctypes.c_int32 + + if hasattr(dll, "Scoping_SetLocation"): + dll.Scoping_SetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_SetLocation.restype = None + + if hasattr(dll, "Scoping_GetLocation"): + dll.Scoping_GetLocation.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_GetLocation.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "Scoping_SetEntity"): + dll.Scoping_SetEntity.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_SetEntity.restype = None + + if hasattr(dll, "Scoping_IdByIndex"): + dll.Scoping_IdByIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_IdByIndex.restype = ctypes.c_int32 + + if hasattr(dll, "Scoping_IndexById"): + dll.Scoping_IndexById.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_IndexById.restype = ctypes.c_int32 + + if hasattr(dll, "Scoping_Resize"): + dll.Scoping_Resize.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_Resize.restype = None + + if hasattr(dll, "Scoping_Reserve"): + dll.Scoping_Reserve.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_Reserve.restype = None + + if hasattr(dll, "Scoping_GetIdsHash"): + dll.Scoping_GetIdsHash.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_GetIdsHash.restype = ctypes.c_int32 + + if hasattr(dll, "Scoping_fast_access_ptr"): + dll.Scoping_fast_access_ptr.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_fast_access_ptr.restype = ctypes.c_void_p + + if hasattr(dll, "Scoping_fast_get_ids"): + dll.Scoping_fast_get_ids.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ) + dll.Scoping_fast_get_ids.restype = ctypes.POINTER(ctypes.c_int32) + + if hasattr(dll, "Scoping_fast_set_entity"): + dll.Scoping_fast_set_entity.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ) + dll.Scoping_fast_set_entity.restype = None + + if hasattr(dll, "Scoping_fast_id_by_index"): + dll.Scoping_fast_id_by_index.argtypes = (ctypes.c_void_p, ctypes.c_int32, ) + dll.Scoping_fast_id_by_index.restype = ctypes.c_int32 + + if hasattr(dll, "Scoping_fast_index_by_id"): + dll.Scoping_fast_index_by_id.argtypes = (ctypes.c_void_p, ctypes.c_int32, ) + dll.Scoping_fast_index_by_id.restype = ctypes.c_int32 + + if hasattr(dll, "Scoping_fast_get_size"): + dll.Scoping_fast_get_size.argtypes = (ctypes.c_void_p, ) + dll.Scoping_fast_get_size.restype = ctypes.c_int32 + + if hasattr(dll, "Scoping_new_on_client"): + dll.Scoping_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Scoping_getCopy"): + dll.Scoping_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # SerializationStream + #------------------------------------------------------------------------------- + if hasattr(dll, "SerializationStream_getOutputString"): + dll.SerializationStream_getOutputString.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SerializationStream_getOutputString.restype = ctypes.POINTER(ctypes.c_char) + + #------------------------------------------------------------------------------- + # Session + #------------------------------------------------------------------------------- + if hasattr(dll, "sessionNew"): + dll.sessionNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.sessionNew.restype = ctypes.c_void_p + + if hasattr(dll, "deleteSession"): + dll.deleteSession.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.deleteSession.restype = None + + if hasattr(dll, "getSessionId"): + dll.getSessionId.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.getSessionId.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "addWorkflow"): + dll.addWorkflow.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.addWorkflow.restype = None + + if hasattr(dll, "getWorkflow"): + dll.getWorkflow.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.getWorkflow.restype = ctypes.c_void_p + + if hasattr(dll, "getWorkflowByIndex"): + dll.getWorkflowByIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.getWorkflowByIndex.restype = ctypes.c_void_p + + if hasattr(dll, "flushWorkflows"): + dll.flushWorkflows.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.flushWorkflows.restype = None + + if hasattr(dll, "getNumWorkflow"): + dll.getNumWorkflow.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.getNumWorkflow.restype = ctypes.c_int32 + + if hasattr(dll, "setLogger"): + dll.setLogger.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.setLogger.restype = None + + if hasattr(dll, "setEventSystem"): + dll.setEventSystem.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.setEventSystem.restype = None + + if hasattr(dll, "addBreakpoint"): + dll.addBreakpoint.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.addBreakpoint.restype = ctypes.c_int32 + + if hasattr(dll, "removeBreakpoint"): + dll.removeBreakpoint.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.removeBreakpoint.restype = None + + if hasattr(dll, "resume"): + dll.resume.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.resume.restype = None + + if hasattr(dll, "addEventHandler"): + dll.addEventHandler.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.addEventHandler.restype = None + + if hasattr(dll, "createSignalEmitterInSession"): + dll.createSignalEmitterInSession.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.createSignalEmitterInSession.restype = ctypes.c_void_p + + if hasattr(dll, "addExternalEventHandler"): + dll.addExternalEventHandler.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.addExternalEventHandler.restype = None + + if hasattr(dll, "NotifyExternalEventHandlerDestruction"): + dll.NotifyExternalEventHandlerDestruction.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.NotifyExternalEventHandlerDestruction.restype = None + + if hasattr(dll, "addWorkflowWithoutIdentifier"): + dll.addWorkflowWithoutIdentifier.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.addWorkflowWithoutIdentifier.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "emitSignal"): + dll.emitSignal.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.emitSignal.restype = None + + if hasattr(dll, "addEventHandlerType"): + dll.addEventHandlerType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.addEventHandlerType.restype = ctypes.c_bool + + if hasattr(dll, "addSignalEmitterType"): + dll.addSignalEmitterType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.addSignalEmitterType.restype = ctypes.c_bool + + if hasattr(dll, "sessionNew_on_client"): + dll.sessionNew_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.sessionNew_on_client.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # SpecificationExternalization + #------------------------------------------------------------------------------- + if hasattr(dll, "Specification_xml_export"): + dll.Specification_xml_export.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Specification_xml_export.restype = None + + if hasattr(dll, "Specification_xml_import"): + dll.Specification_xml_import.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Specification_xml_import.restype = None + + if hasattr(dll, "setSpecificationInCore"): + dll.setSpecificationInCore.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.setSpecificationInCore.restype = None + + #------------------------------------------------------------------------------- + # Streams + #------------------------------------------------------------------------------- + if hasattr(dll, "Streams_delete"): + dll.Streams_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_delete.restype = None + + if hasattr(dll, "Streams_ReleaseHandles"): + dll.Streams_ReleaseHandles.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_ReleaseHandles.restype = None + + if hasattr(dll, "Streams_new"): + dll.Streams_new.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_new.restype = ctypes.c_void_p + + if hasattr(dll, "Streams_addExternalStream"): + dll.Streams_addExternalStream.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_addExternalStream.restype = None + + if hasattr(dll, "Streams_getExternalStream"): + dll.Streams_getExternalStream.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_getExternalStream.restype = ctypes.c_void_p + + if hasattr(dll, "Streams_addExternalStreamWithLabelSpace"): + dll.Streams_addExternalStreamWithLabelSpace.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_addExternalStreamWithLabelSpace.restype = None + + if hasattr(dll, "Streams_getExternalStreamWithLabelSpace"): + dll.Streams_getExternalStreamWithLabelSpace.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_getExternalStreamWithLabelSpace.restype = ctypes.c_void_p + + if hasattr(dll, "Streams_getDataSources"): + dll.Streams_getDataSources.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_getDataSources.restype = ctypes.c_void_p + + if hasattr(dll, "Streams_getCopy"): + dll.Streams_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Streams_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # StringField + #------------------------------------------------------------------------------- + if hasattr(dll, "StringField_Delete"): + dll.StringField_Delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.StringField_Delete.restype = None + + if hasattr(dll, "StringField_GetEntityData"): + dll.StringField_GetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.StringField_GetEntityData.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "StringField_GetNumberEntities"): + dll.StringField_GetNumberEntities.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.StringField_GetNumberEntities.restype = ctypes.c_int32 + + if hasattr(dll, "CSStringField_new"): + dll.CSStringField_new.argtypes = (ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_new.restype = ctypes.c_void_p + + if hasattr(dll, "CSStringField_GetData_For_DpfVector"): + dll.CSStringField_GetData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(ctypes.c_char))), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_GetData_For_DpfVector.restype = None + + if hasattr(dll, "CSStringField_GetEntityData_For_DpfVector"): + dll.CSStringField_GetEntityData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(ctypes.c_char))), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_GetEntityData_For_DpfVector.restype = None + + if hasattr(dll, "CSStringField_GetEntityDataById_For_DpfVector"): + dll.CSStringField_GetEntityDataById_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(ctypes.c_char))), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_GetEntityDataById_For_DpfVector.restype = None + + if hasattr(dll, "CSStringField_GetCScoping"): + dll.CSStringField_GetCScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_GetCScoping.restype = ctypes.c_void_p + + if hasattr(dll, "CSStringField_GetDataSize"): + dll.CSStringField_GetDataSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_GetDataSize.restype = ctypes.c_int32 + + if hasattr(dll, "CSStringField_SetData"): + dll.CSStringField_SetData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_SetData.restype = None + + if hasattr(dll, "CSStringField_SetCScoping"): + dll.CSStringField_SetCScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_SetCScoping.restype = None + + if hasattr(dll, "CSStringField_PushBack"): + dll.CSStringField_PushBack.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_PushBack.restype = None + + if hasattr(dll, "CSStringField_Resize"): + dll.CSStringField_Resize.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_Resize.restype = None + + if hasattr(dll, "CSStringField_Reserve"): + dll.CSStringField_Reserve.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_Reserve.restype = None + + if hasattr(dll, "CSStringField_new_on_client"): + dll.CSStringField_new_on_client.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "CSStringField_getCopy"): + dll.CSStringField_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # CustomTypeField + #------------------------------------------------------------------------------- + if hasattr(dll, "CSCustomTypeField_new"): + dll.CSCustomTypeField_new.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_new.restype = ctypes.c_void_p + + if hasattr(dll, "CSCustomTypeField_GetData_For_DpfVector"): + dll.CSCustomTypeField_GetData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetData_For_DpfVector.restype = None + + if hasattr(dll, "CSCustomTypeField_GetDataPointer_For_DpfVector"): + dll.CSCustomTypeField_GetDataPointer_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetDataPointer_For_DpfVector.restype = None + + if hasattr(dll, "CSCustomTypeField_GetEntityData_For_DpfVector"): + dll.CSCustomTypeField_GetEntityData_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetEntityData_For_DpfVector.restype = None + + if hasattr(dll, "CSCustomTypeField_GetEntityDataById_For_DpfVector"): + dll.CSCustomTypeField_GetEntityDataById_For_DpfVector.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetEntityDataById_For_DpfVector.restype = None + + if hasattr(dll, "CSCustomTypeField_GetCScoping"): + dll.CSCustomTypeField_GetCScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetCScoping.restype = ctypes.c_void_p + + if hasattr(dll, "CSCustomTypeField_GetNumberElementaryData"): + dll.CSCustomTypeField_GetNumberElementaryData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetNumberElementaryData.restype = ctypes.c_int32 + + if hasattr(dll, "CSCustomTypeField_GetNumberOfComponents"): + dll.CSCustomTypeField_GetNumberOfComponents.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetNumberOfComponents.restype = ctypes.c_int32 + + if hasattr(dll, "CSCustomTypeField_GetDataSize"): + dll.CSCustomTypeField_GetDataSize.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetDataSize.restype = ctypes.c_int32 + + if hasattr(dll, "CSCustomTypeField_GetNumberEntities"): + dll.CSCustomTypeField_GetNumberEntities.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetNumberEntities.restype = ctypes.c_int32 + + if hasattr(dll, "CSCustomTypeField_SetData"): + dll.CSCustomTypeField_SetData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetData.restype = None + + if hasattr(dll, "CSCustomTypeField_SetDataPointer"): + dll.CSCustomTypeField_SetDataPointer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetDataPointer.restype = None + + if hasattr(dll, "CSCustomTypeField_SetCScoping"): + dll.CSCustomTypeField_SetCScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetCScoping.restype = None + + if hasattr(dll, "CSCustomTypeField_PushBack"): + dll.CSCustomTypeField_PushBack.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_PushBack.restype = None + + if hasattr(dll, "CSCustomTypeField_Resize"): + dll.CSCustomTypeField_Resize.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_Resize.restype = None + + if hasattr(dll, "CSCustomTypeField_Reserve"): + dll.CSCustomTypeField_Reserve.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_Reserve.restype = None + + if hasattr(dll, "CSCustomTypeField_GetType"): + dll.CSCustomTypeField_GetType.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetType.restype = None + + if hasattr(dll, "CSCustomTypeField_GetSharedFieldDefinition"): + dll.CSCustomTypeField_GetSharedFieldDefinition.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetSharedFieldDefinition.restype = ctypes.c_void_p + + if hasattr(dll, "CSCustomTypeField_GetSupport"): + dll.CSCustomTypeField_GetSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetSupport.restype = ctypes.c_void_p + + if hasattr(dll, "CSCustomTypeField_SetFieldDefinition"): + dll.CSCustomTypeField_SetFieldDefinition.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetFieldDefinition.restype = None + + if hasattr(dll, "CSCustomTypeField_SetSupport"): + dll.CSCustomTypeField_SetSupport.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetSupport.restype = None + + if hasattr(dll, "CSCustomTypeField_SetEntityData"): + dll.CSCustomTypeField_SetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetEntityData.restype = None + + if hasattr(dll, "CSCustomTypeField_GetName"): + dll.CSCustomTypeField_GetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetName.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "CSCustomTypeField_SetName"): + dll.CSCustomTypeField_SetName.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetName.restype = None + + if hasattr(dll, "CSCustomTypeField_GetEntityId"): + dll.CSCustomTypeField_GetEntityId.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetEntityId.restype = ctypes.c_int32 + + if hasattr(dll, "CSCustomTypeField_GetEntityIndex"): + dll.CSCustomTypeField_GetEntityIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_GetEntityIndex.restype = ctypes.c_int32 + + if hasattr(dll, "CSCustomTypeField_new_on_client"): + dll.CSCustomTypeField_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "CSCustomTypeField_getCopy"): + dll.CSCustomTypeField_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # Support + #------------------------------------------------------------------------------- + if hasattr(dll, "Support_delete"): + dll.Support_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_delete.restype = None + + if hasattr(dll, "Support_isDomainMeshSupport"): + dll.Support_isDomainMeshSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_isDomainMeshSupport.restype = ctypes.c_bool + + if hasattr(dll, "Support_setAsDomainMeshSupport"): + dll.Support_setAsDomainMeshSupport.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_setAsDomainMeshSupport.restype = None + + if hasattr(dll, "Support_getAsMeshedSupport"): + dll.Support_getAsMeshedSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getAsMeshedSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Support_getAsCyclicSupport"): + dll.Support_getAsCyclicSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getAsCyclicSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Support_getAsTimeFreqSupport"): + dll.Support_getAsTimeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getAsTimeFreqSupport.restype = ctypes.c_void_p + + if hasattr(dll, "Support_getFieldSupportByProperty"): + dll.Support_getFieldSupportByProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getFieldSupportByProperty.restype = ctypes.c_void_p + + if hasattr(dll, "Support_getPropertyFieldSupportByProperty"): + dll.Support_getPropertyFieldSupportByProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getPropertyFieldSupportByProperty.restype = ctypes.c_void_p + + if hasattr(dll, "Support_getStringFieldSupportByProperty"): + dll.Support_getStringFieldSupportByProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getStringFieldSupportByProperty.restype = ctypes.c_void_p + + if hasattr(dll, "Support_getPropertyNamesAsStringCollForFields"): + dll.Support_getPropertyNamesAsStringCollForFields.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getPropertyNamesAsStringCollForFields.restype = ctypes.c_void_p + + if hasattr(dll, "Support_getPropertyNamesAsStringCollForPropertyFields"): + dll.Support_getPropertyNamesAsStringCollForPropertyFields.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getPropertyNamesAsStringCollForPropertyFields.restype = ctypes.c_void_p + + if hasattr(dll, "Support_getPropertyNamesAsStringCollForStringFields"): + dll.Support_getPropertyNamesAsStringCollForStringFields.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Support_getPropertyNamesAsStringCollForStringFields.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # GenericSupport + #------------------------------------------------------------------------------- + if hasattr(dll, "GenericSupport_new"): + dll.GenericSupport_new.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericSupport_new.restype = ctypes.c_void_p + + if hasattr(dll, "GenericSupport_setFieldSupportOfProperty"): + dll.GenericSupport_setFieldSupportOfProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericSupport_setFieldSupportOfProperty.restype = None + + if hasattr(dll, "GenericSupport_setPropertyFieldSupportOfProperty"): + dll.GenericSupport_setPropertyFieldSupportOfProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericSupport_setPropertyFieldSupportOfProperty.restype = None + + if hasattr(dll, "GenericSupport_setStringFieldSupportOfProperty"): + dll.GenericSupport_setStringFieldSupportOfProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericSupport_setStringFieldSupportOfProperty.restype = None + + if hasattr(dll, "GenericSupport_new_on_client"): + dll.GenericSupport_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericSupport_new_on_client.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # GenericDataContainer + #------------------------------------------------------------------------------- + if hasattr(dll, "GenericDataContainer_new"): + dll.GenericDataContainer_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericDataContainer_new.restype = ctypes.c_void_p + + if hasattr(dll, "GenericDataContainer_getPropertyAny"): + dll.GenericDataContainer_getPropertyAny.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericDataContainer_getPropertyAny.restype = ctypes.c_void_p + + if hasattr(dll, "GenericDataContainer_setPropertyAny"): + dll.GenericDataContainer_setPropertyAny.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericDataContainer_setPropertyAny.restype = None + + if hasattr(dll, "GenericDataContainer_getPropertyTypes"): + dll.GenericDataContainer_getPropertyTypes.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericDataContainer_getPropertyTypes.restype = ctypes.c_void_p + + if hasattr(dll, "GenericDataContainer_getPropertyNames"): + dll.GenericDataContainer_getPropertyNames.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericDataContainer_getPropertyNames.restype = ctypes.c_void_p + + if hasattr(dll, "GenericDataContainer_new_on_client"): + dll.GenericDataContainer_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericDataContainer_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "GenericDataContainer_getCopy"): + dll.GenericDataContainer_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.GenericDataContainer_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # SupportQuery + #------------------------------------------------------------------------------- + if hasattr(dll, "SupportQuery_AllEntities"): + dll.SupportQuery_AllEntities.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SupportQuery_AllEntities.restype = ctypes.c_void_p + + if hasattr(dll, "SupportQuery_ScopingByProperty"): + dll.SupportQuery_ScopingByProperty.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SupportQuery_ScopingByProperty.restype = ctypes.c_void_p + + if hasattr(dll, "SupportQuery_RescopingByProperty"): + dll.SupportQuery_RescopingByProperty.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SupportQuery_RescopingByProperty.restype = ctypes.c_void_p + + if hasattr(dll, "SupportQuery_ScopingByNamedSelection"): + dll.SupportQuery_ScopingByNamedSelection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SupportQuery_ScopingByNamedSelection.restype = ctypes.c_void_p + + if hasattr(dll, "SupportQuery_TransposeScoping"): + dll.SupportQuery_TransposeScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SupportQuery_TransposeScoping.restype = ctypes.c_void_p + + if hasattr(dll, "SupportQuery_TopologyByScoping"): + dll.SupportQuery_TopologyByScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SupportQuery_TopologyByScoping.restype = ctypes.c_void_p + + if hasattr(dll, "SupportQuery_DataByScoping"): + dll.SupportQuery_DataByScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SupportQuery_DataByScoping.restype = ctypes.c_void_p + + if hasattr(dll, "SupportQuery_StringField"): + dll.SupportQuery_StringField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.SupportQuery_StringField.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # TimeFreqSupport + #------------------------------------------------------------------------------- + if hasattr(dll, "TimeFreqSupport_new"): + dll.TimeFreqSupport_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_new.restype = ctypes.c_void_p + + if hasattr(dll, "TimeFreqSupport_delete"): + dll.TimeFreqSupport_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_delete.restype = None + + if hasattr(dll, "TimeFreqSupport_GetNumberSets"): + dll.TimeFreqSupport_GetNumberSets.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetNumberSets.restype = ctypes.c_int32 + + if hasattr(dll, "TimeFreqSupport_GetNumberSingularSets"): + dll.TimeFreqSupport_GetNumberSingularSets.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetNumberSingularSets.restype = ctypes.c_int32 + + if hasattr(dll, "TimeFreqSupport_SetSharedTimeFreqs"): + dll.TimeFreqSupport_SetSharedTimeFreqs.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_SetSharedTimeFreqs.restype = None + + if hasattr(dll, "TimeFreqSupport_SetSharedImaginaryFreqs"): + dll.TimeFreqSupport_SetSharedImaginaryFreqs.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_SetSharedImaginaryFreqs.restype = None + + if hasattr(dll, "TimeFreqSupport_SetSharedRpms"): + dll.TimeFreqSupport_SetSharedRpms.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_SetSharedRpms.restype = None + + if hasattr(dll, "TimeFreqSupport_SetHarmonicIndices"): + dll.TimeFreqSupport_SetHarmonicIndices.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_SetHarmonicIndices.restype = None + + if hasattr(dll, "TimeFreqSupport_GetSharedTimeFreqs"): + dll.TimeFreqSupport_GetSharedTimeFreqs.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetSharedTimeFreqs.restype = ctypes.c_void_p + + if hasattr(dll, "TimeFreqSupport_GetSharedImaginaryFreqs"): + dll.TimeFreqSupport_GetSharedImaginaryFreqs.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetSharedImaginaryFreqs.restype = ctypes.c_void_p + + if hasattr(dll, "TimeFreqSupport_GetSharedRpms"): + dll.TimeFreqSupport_GetSharedRpms.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetSharedRpms.restype = ctypes.c_void_p + + if hasattr(dll, "TimeFreqSupport_GetSharedHarmonicIndices"): + dll.TimeFreqSupport_GetSharedHarmonicIndices.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetSharedHarmonicIndices.restype = ctypes.c_void_p + + if hasattr(dll, "TimeFreqSupport_GetSharedHarmonicIndicesScoping"): + dll.TimeFreqSupport_GetSharedHarmonicIndicesScoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetSharedHarmonicIndicesScoping.restype = ctypes.c_void_p + + if hasattr(dll, "TimeFreqSupport_GetTimeFreqCummulativeIndexByValue"): + dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByValue.argtypes = (ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByValue.restype = ctypes.c_int32 + + if hasattr(dll, "TimeFreqSupport_GetTimeFreqCummulativeIndexByValueAndLoadStep"): + dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByValueAndLoadStep.argtypes = (ctypes.c_void_p, ctypes.c_double, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByValueAndLoadStep.restype = ctypes.c_int32 + + if hasattr(dll, "TimeFreqSupport_GetTimeFreqCummulativeIndexByStep"): + dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByStep.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByStep.restype = ctypes.c_int32 + + if hasattr(dll, "TimeFreqSupport_GetImaginaryFreqsCummulativeIndex"): + dll.TimeFreqSupport_GetImaginaryFreqsCummulativeIndex.argtypes = (ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetImaginaryFreqsCummulativeIndex.restype = ctypes.c_int32 + + if hasattr(dll, "TimeFreqSupport_GetTimeFreqByStep"): + dll.TimeFreqSupport_GetTimeFreqByStep.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetTimeFreqByStep.restype = ctypes.c_double + + if hasattr(dll, "TimeFreqSupport_GetImaginaryFreqByStep"): + dll.TimeFreqSupport_GetImaginaryFreqByStep.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetImaginaryFreqByStep.restype = ctypes.c_double + + if hasattr(dll, "TimeFreqSupport_GetTimeFreqByCumulIndex"): + dll.TimeFreqSupport_GetTimeFreqByCumulIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetTimeFreqByCumulIndex.restype = ctypes.c_double + + if hasattr(dll, "TimeFreqSupport_GetImaginaryFreqByCumulIndex"): + dll.TimeFreqSupport_GetImaginaryFreqByCumulIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetImaginaryFreqByCumulIndex.restype = ctypes.c_double + + if hasattr(dll, "TimeFreqSupport_GetCyclicHarmonicIndex"): + dll.TimeFreqSupport_GetCyclicHarmonicIndex.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetCyclicHarmonicIndex.restype = ctypes.c_int32 + + if hasattr(dll, "TimeFreqSupport_GetStepAndSubStep"): + dll.TimeFreqSupport_GetStepAndSubStep.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_GetStepAndSubStep.restype = ctypes.c_int32 + + if hasattr(dll, "TimeFreqSupport_new_on_client"): + dll.TimeFreqSupport_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "TimeFreqSupport_getCopy"): + dll.TimeFreqSupport_getCopy.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TimeFreqSupport_getCopy.restype = ctypes.c_void_p + + #------------------------------------------------------------------------------- + # TmpDir + #------------------------------------------------------------------------------- + if hasattr(dll, "TmpDir_getDir"): + dll.TmpDir_getDir.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TmpDir_getDir.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "TmpDir_erase"): + dll.TmpDir_erase.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TmpDir_erase.restype = None + + if hasattr(dll, "TmpDir_getDir_on_client"): + dll.TmpDir_getDir_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.TmpDir_getDir_on_client.restype = ctypes.POINTER(ctypes.c_char) + + #------------------------------------------------------------------------------- + # Unit + #------------------------------------------------------------------------------- + if hasattr(dll, "Unit_GetHomogeneity"): + dll.Unit_GetHomogeneity.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_GetHomogeneity.restype = ctypes.c_int32 + + if hasattr(dll, "Unit_GetConversionFactor"): + dll.Unit_GetConversionFactor.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_GetConversionFactor.restype = ctypes.c_double + + if hasattr(dll, "Unit_GetConversionShift"): + dll.Unit_GetConversionShift.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_GetConversionShift.restype = ctypes.c_double + + if hasattr(dll, "Unit_AreHomogeneous"): + dll.Unit_AreHomogeneous.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_AreHomogeneous.restype = ctypes.c_bool + + if hasattr(dll, "Unit_getSymbol"): + dll.Unit_getSymbol.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_getSymbol.restype = ctypes.c_int32 + + if hasattr(dll, "Unit_GetHomogeneity_for_object"): + dll.Unit_GetHomogeneity_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_GetHomogeneity_for_object.restype = ctypes.c_int32 + + if hasattr(dll, "Unit_GetConversionFactor_for_object"): + dll.Unit_GetConversionFactor_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_GetConversionFactor_for_object.restype = ctypes.c_double + + if hasattr(dll, "Unit_GetConversionShift_for_object"): + dll.Unit_GetConversionShift_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_GetConversionShift_for_object.restype = ctypes.c_double + + if hasattr(dll, "Unit_AreHomogeneous_for_object"): + dll.Unit_AreHomogeneous_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_AreHomogeneous_for_object.restype = ctypes.c_bool + + if hasattr(dll, "Unit_getSymbol_for_object"): + dll.Unit_getSymbol_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Unit_getSymbol_for_object.restype = ctypes.c_int32 + + #------------------------------------------------------------------------------- + # Workflow + #------------------------------------------------------------------------------- + if hasattr(dll, "WorkFlow_new"): + dll.WorkFlow_new.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_new.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getCopy"): + dll.WorkFlow_getCopy.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getCopy.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_create_from_text"): + dll.WorkFlow_create_from_text.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_create_from_text.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getCopy_on_other_client"): + dll.WorkFlow_getCopy_on_other_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getCopy_on_other_client.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_delete"): + dll.WorkFlow_delete.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_delete.restype = None + + if hasattr(dll, "WorkFlow_record_instance"): + dll.WorkFlow_record_instance.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_record_instance.restype = ctypes.c_int32 + + if hasattr(dll, "WorkFlow_replace_instance_at_id"): + dll.WorkFlow_replace_instance_at_id.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_replace_instance_at_id.restype = ctypes.c_bool + + if hasattr(dll, "WorkFlow_erase_instance"): + dll.WorkFlow_erase_instance.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_erase_instance.restype = ctypes.c_bool + + if hasattr(dll, "WorkFlow_get_record_id"): + dll.WorkFlow_get_record_id.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_get_record_id.restype = ctypes.c_int32 + + if hasattr(dll, "WorkFlow_get_by_identifier"): + dll.WorkFlow_get_by_identifier.argtypes = (ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_get_by_identifier.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_get_first_op"): + dll.WorkFlow_get_first_op.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_get_first_op.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_get_last_op"): + dll.WorkFlow_get_last_op.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_get_last_op.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_discover_operators"): + dll.WorkFlow_discover_operators.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_discover_operators.restype = None + + if hasattr(dll, "WorkFlow_chain_with"): + dll.WorkFlow_chain_with.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_chain_with.restype = None + + if hasattr(dll, "WorkFlow_chain_with_specified_names"): + dll.WorkFlow_chain_with_specified_names.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_chain_with_specified_names.restype = None + + if hasattr(dll, "Workflow_create_connection_map"): + dll.Workflow_create_connection_map.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Workflow_create_connection_map.restype = ctypes.c_void_p + + if hasattr(dll, "Workflow_add_entry_connection_map"): + dll.Workflow_add_entry_connection_map.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Workflow_add_entry_connection_map.restype = None + + if hasattr(dll, "WorkFlow_connect_with"): + dll.WorkFlow_connect_with.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_with.restype = None + + if hasattr(dll, "WorkFlow_connect_with_specified_names"): + dll.WorkFlow_connect_with_specified_names.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_with_specified_names.restype = None + + if hasattr(dll, "WorkFlow_add_operator"): + dll.WorkFlow_add_operator.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_add_operator.restype = None + + if hasattr(dll, "WorkFlow_number_of_operators"): + dll.WorkFlow_number_of_operators.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_number_of_operators.restype = ctypes.c_int32 + + if hasattr(dll, "WorkFlow_operator_name_by_index"): + dll.WorkFlow_operator_name_by_index.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_operator_name_by_index.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "WorkFlow_set_name_input_pin"): + dll.WorkFlow_set_name_input_pin.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_set_name_input_pin.restype = None + + if hasattr(dll, "WorkFlow_set_name_output_pin"): + dll.WorkFlow_set_name_output_pin.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_set_name_output_pin.restype = None + + if hasattr(dll, "WorkFlow_rename_input_pin"): + dll.WorkFlow_rename_input_pin.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_rename_input_pin.restype = None + + if hasattr(dll, "WorkFlow_rename_output_pin"): + dll.WorkFlow_rename_output_pin.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_rename_output_pin.restype = None + + if hasattr(dll, "WorkFlow_erase_input_pin"): + dll.WorkFlow_erase_input_pin.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_erase_input_pin.restype = None + + if hasattr(dll, "WorkFlow_erase_output_pin"): + dll.WorkFlow_erase_output_pin.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_erase_output_pin.restype = None + + if hasattr(dll, "WorkFlow_has_input_pin"): + dll.WorkFlow_has_input_pin.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_has_input_pin.restype = ctypes.c_bool + + if hasattr(dll, "WorkFlow_has_output_pin"): + dll.WorkFlow_has_output_pin.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_has_output_pin.restype = ctypes.c_bool + + if hasattr(dll, "WorkFlow_number_of_input"): + dll.WorkFlow_number_of_input.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_number_of_input.restype = ctypes.c_int32 + + if hasattr(dll, "WorkFlow_number_of_output"): + dll.WorkFlow_number_of_output.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_number_of_output.restype = ctypes.c_int32 + + if hasattr(dll, "WorkFlow_input_by_index"): + dll.WorkFlow_input_by_index.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_input_by_index.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "WorkFlow_output_by_index"): + dll.WorkFlow_output_by_index.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_output_by_index.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "WorkFlow_number_of_symbol"): + dll.WorkFlow_number_of_symbol.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_number_of_symbol.restype = ctypes.c_int32 + + if hasattr(dll, "WorkFlow_symbol_by_index"): + dll.WorkFlow_symbol_by_index.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_symbol_by_index.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "WorkFlow_generate_all_derivatives_for"): + dll.WorkFlow_generate_all_derivatives_for.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_generate_all_derivatives_for.restype = None + + if hasattr(dll, "WorkFlow_generate_derivatives_for"): + dll.WorkFlow_generate_derivatives_for.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_generate_derivatives_for.restype = None + + if hasattr(dll, "WorkFlow_write_swf"): + dll.WorkFlow_write_swf.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_write_swf.restype = None + + if hasattr(dll, "WorkFlow_load_swf"): + dll.WorkFlow_load_swf.argtypes = (ctypes.c_void_p, ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_load_swf.restype = None + + if hasattr(dll, "WorkFlow_write_swf_utf8"): + dll.WorkFlow_write_swf_utf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_write_swf_utf8.restype = None + + if hasattr(dll, "WorkFlow_load_swf_utf8"): + dll.WorkFlow_load_swf_utf8.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_load_swf_utf8.restype = None + + if hasattr(dll, "WorkFlow_write_to_text"): + dll.WorkFlow_write_to_text.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_write_to_text.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "WorkFlow_connect_int"): + dll.WorkFlow_connect_int.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_int.restype = None + + if hasattr(dll, "WorkFlow_connect_bool"): + dll.WorkFlow_connect_bool.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_bool, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_bool.restype = None + + if hasattr(dll, "WorkFlow_connect_double"): + dll.WorkFlow_connect_double.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_double, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_double.restype = None + + if hasattr(dll, "WorkFlow_connect_string"): + dll.WorkFlow_connect_string.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_string.restype = None + + if hasattr(dll, "WorkFlow_connect_Scoping"): + dll.WorkFlow_connect_Scoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_Scoping.restype = None + + if hasattr(dll, "WorkFlow_connect_DataSources"): + dll.WorkFlow_connect_DataSources.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_DataSources.restype = None + + if hasattr(dll, "WorkFlow_connect_Streams"): + dll.WorkFlow_connect_Streams.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_Streams.restype = None + + if hasattr(dll, "WorkFlow_connect_Field"): + dll.WorkFlow_connect_Field.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_Field.restype = None + + if hasattr(dll, "WorkFlow_connect_Collection"): + dll.WorkFlow_connect_Collection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_Collection.restype = None + + if hasattr(dll, "WorkFlow_connect_Collection_as_vector"): + dll.WorkFlow_connect_Collection_as_vector.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_Collection_as_vector.restype = None + + if hasattr(dll, "WorkFlow_connect_MeshedRegion"): + dll.WorkFlow_connect_MeshedRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_MeshedRegion.restype = None + + if hasattr(dll, "WorkFlow_connect_PropertyField"): + dll.WorkFlow_connect_PropertyField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_PropertyField.restype = None + + if hasattr(dll, "WorkFlow_connect_StringField"): + dll.WorkFlow_connect_StringField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_StringField.restype = None + + if hasattr(dll, "WorkFlow_connect_CustomTypeField"): + dll.WorkFlow_connect_CustomTypeField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_CustomTypeField.restype = None + + if hasattr(dll, "WorkFlow_connect_Support"): + dll.WorkFlow_connect_Support.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_Support.restype = None + + if hasattr(dll, "WorkFlow_connect_CyclicSupport"): + dll.WorkFlow_connect_CyclicSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_CyclicSupport.restype = None + + if hasattr(dll, "WorkFlow_connect_TimeFreqSupport"): + dll.WorkFlow_connect_TimeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_TimeFreqSupport.restype = None + + if hasattr(dll, "WorkFlow_connect_Workflow"): + dll.WorkFlow_connect_Workflow.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_Workflow.restype = None + + if hasattr(dll, "WorkFlow_connect_RemoteWorkflow"): + dll.WorkFlow_connect_RemoteWorkflow.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_RemoteWorkflow.restype = None + + if hasattr(dll, "WorkFlow_connect_vector_int"): + dll.WorkFlow_connect_vector_int.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_vector_int.restype = None + + if hasattr(dll, "WorkFlow_connect_vector_double"): + dll.WorkFlow_connect_vector_double.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_double), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_vector_double.restype = None + + if hasattr(dll, "WorkFlow_connect_operator_output"): + dll.WorkFlow_connect_operator_output.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_operator_output.restype = None + + if hasattr(dll, "WorkFlow_connect_ExternalData"): + dll.WorkFlow_connect_ExternalData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_ExternalData.restype = None + + if hasattr(dll, "WorkFlow_connect_DataTree"): + dll.WorkFlow_connect_DataTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_DataTree.restype = None + + if hasattr(dll, "WorkFlow_connect_Any"): + dll.WorkFlow_connect_Any.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_Any.restype = None + + if hasattr(dll, "WorkFlow_connect_LabelSpace"): + dll.WorkFlow_connect_LabelSpace.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_LabelSpace.restype = None + + if hasattr(dll, "WorkFlow_connect_GenericDataContainer"): + dll.WorkFlow_connect_GenericDataContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_connect_GenericDataContainer.restype = None + + if hasattr(dll, "WorkFlow_getoutput_FieldsContainer"): + dll.WorkFlow_getoutput_FieldsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_FieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_ScopingsContainer"): + dll.WorkFlow_getoutput_ScopingsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_ScopingsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_Field"): + dll.WorkFlow_getoutput_Field.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_Field.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_Scoping"): + dll.WorkFlow_getoutput_Scoping.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_Scoping.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_timeFreqSupport"): + dll.WorkFlow_getoutput_timeFreqSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_timeFreqSupport.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_meshesContainer"): + dll.WorkFlow_getoutput_meshesContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_meshesContainer.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_meshedRegion"): + dll.WorkFlow_getoutput_meshedRegion.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_meshedRegion.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_resultInfo"): + dll.WorkFlow_getoutput_resultInfo.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_resultInfo.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_propertyField"): + dll.WorkFlow_getoutput_propertyField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_propertyField.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_anySupport"): + dll.WorkFlow_getoutput_anySupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_anySupport.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_CyclicSupport"): + dll.WorkFlow_getoutput_CyclicSupport.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_CyclicSupport.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_DataSources"): + dll.WorkFlow_getoutput_DataSources.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_DataSources.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_Streams"): + dll.WorkFlow_getoutput_Streams.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_Streams.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_Workflow"): + dll.WorkFlow_getoutput_Workflow.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_Workflow.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_ExternalData"): + dll.WorkFlow_getoutput_ExternalData.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_ExternalData.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_as_any"): + dll.WorkFlow_getoutput_as_any.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_as_any.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_IntCollection"): + dll.WorkFlow_getoutput_IntCollection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_IntCollection.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_DoubleCollection"): + dll.WorkFlow_getoutput_DoubleCollection.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_DoubleCollection.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_Operator"): + dll.WorkFlow_getoutput_Operator.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_Operator.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_StringField"): + dll.WorkFlow_getoutput_StringField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_StringField.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_CustomTypeField"): + dll.WorkFlow_getoutput_CustomTypeField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_CustomTypeField.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_CustomTypeFieldsContainer"): + dll.WorkFlow_getoutput_CustomTypeFieldsContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_CustomTypeFieldsContainer.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_DataTree"): + dll.WorkFlow_getoutput_DataTree.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_DataTree.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_GenericDataContainer"): + dll.WorkFlow_getoutput_GenericDataContainer.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_GenericDataContainer.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getoutput_Unit"): + dll.WorkFlow_getoutput_Unit.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_Unit.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "WorkFlow_getoutput_string"): + dll.WorkFlow_getoutput_string.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_string.restype = ctypes.POINTER(ctypes.c_char) + + if hasattr(dll, "WorkFlow_getoutput_int"): + dll.WorkFlow_getoutput_int.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_int.restype = ctypes.c_int32 + + if hasattr(dll, "WorkFlow_getoutput_double"): + dll.WorkFlow_getoutput_double.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_double.restype = ctypes.c_double + + if hasattr(dll, "WorkFlow_getoutput_bool"): + dll.WorkFlow_getoutput_bool.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getoutput_bool.restype = ctypes.c_bool + + if hasattr(dll, "WorkFlow_has_output_when_evaluated"): + dll.WorkFlow_has_output_when_evaluated.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_has_output_when_evaluated.restype = ctypes.c_bool + + if hasattr(dll, "WorkFlow_add_tag"): + dll.WorkFlow_add_tag.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_add_tag.restype = None + + if hasattr(dll, "WorkFlow_has_tag"): + dll.WorkFlow_has_tag.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_has_tag.restype = ctypes.c_bool + + if hasattr(dll, "WorkFlow_export_graphviz"): + dll.WorkFlow_export_graphviz.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_export_graphviz.restype = ctypes.c_bool + + if hasattr(dll, "WorkFlow_export_json"): + dll.WorkFlow_export_json.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_export_json.restype = None + + if hasattr(dll, "WorkFlow_import_json"): + dll.WorkFlow_import_json.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_import_json.restype = None + + if hasattr(dll, "WorkFlow_make_from_template"): + dll.WorkFlow_make_from_template.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_make_from_template.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_template_exists"): + dll.WorkFlow_template_exists.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_template_exists.restype = ctypes.c_bool + + if hasattr(dll, "Workflow_get_operators_collection_for_input"): + dll.Workflow_get_operators_collection_for_input.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Workflow_get_operators_collection_for_input.restype = ctypes.c_void_p + + if hasattr(dll, "Workflow_get_operator_for_output"): + dll.Workflow_get_operator_for_output.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Workflow_get_operator_for_output.restype = ctypes.c_void_p + + if hasattr(dll, "Workflow_get_client_id"): + dll.Workflow_get_client_id.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Workflow_get_client_id.restype = ctypes.c_int32 + + if hasattr(dll, "WorkFlow_new_on_client"): + dll.WorkFlow_new_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_new_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_create_from_text_on_client"): + dll.WorkFlow_create_from_text_on_client.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_create_from_text_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_getCopy_on_client"): + dll.WorkFlow_getCopy_on_client.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_getCopy_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "WorkFlow_get_by_identifier_on_client"): + dll.WorkFlow_get_by_identifier_on_client.argtypes = (ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.WorkFlow_get_by_identifier_on_client.restype = ctypes.c_void_p + + if hasattr(dll, "Workflow_create_connection_map_for_object"): + dll.Workflow_create_connection_map_for_object.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Workflow_create_connection_map_for_object.restype = ctypes.c_void_p + + diff --git a/src/ansys/dpf/gate/generated/client_abstract_api.py b/src/ansys/dpf/gate/generated/client_abstract_api.py new file mode 100644 index 0000000000..09a3ad5026 --- /dev/null +++ b/src/ansys/dpf/gate/generated/client_abstract_api.py @@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------- +# Client +#------------------------------------------------------------------------------- + +class ClientAbstractAPI: + @staticmethod + def init_client_environment(object): + pass + + @staticmethod + def finish_client_environment(object): + pass + + @staticmethod + def client_new(ip, port): + raise NotImplementedError + + @staticmethod + def client_new_full_address(address): + raise NotImplementedError + + @staticmethod + def client_get_full_address(client): + raise NotImplementedError + + @staticmethod + def client_get_protocol_name(client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/client_capi.py b/src/ansys/dpf/gate/generated/client_capi.py new file mode 100644 index 0000000000..08b288e89d --- /dev/null +++ b/src/ansys/dpf/gate/generated/client_capi.py @@ -0,0 +1,59 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import client_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Client +#------------------------------------------------------------------------------- + +class ClientCAPI(client_abstract_api.ClientAbstractAPI): + + @staticmethod + def init_client_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def client_new(ip, port): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Client_new(utils.to_char_ptr(ip), utils.to_char_ptr(port), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def client_new_full_address(address): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Client_new_full_address(utils.to_char_ptr(address), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def client_get_full_address(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Client_get_full_address(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def client_get_protocol_name(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Client_get_protocol_name(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + diff --git a/src/ansys/dpf/gate/generated/collection_abstract_api.py b/src/ansys/dpf/gate/generated/collection_abstract_api.py new file mode 100644 index 0000000000..96e65aeecd --- /dev/null +++ b/src/ansys/dpf/gate/generated/collection_abstract_api.py @@ -0,0 +1,237 @@ +#------------------------------------------------------------------------------- +# Collection +#------------------------------------------------------------------------------- + +class CollectionAbstractAPI: + @staticmethod + def init_collection_environment(object): + pass + + @staticmethod + def finish_collection_environment(object): + pass + + @staticmethod + def collection_of_int_new(): + raise NotImplementedError + + @staticmethod + def collection_of_double_new(): + raise NotImplementedError + + @staticmethod + def collection_of_string_new(): + raise NotImplementedError + + @staticmethod + def collection_get_data_as_int(collection, size): + raise NotImplementedError + + @staticmethod + def collection_get_data_as_double(collection, size): + raise NotImplementedError + + @staticmethod + def collection_add_int_entry(collection, obj): + raise NotImplementedError + + @staticmethod + def collection_add_double_entry(collection, obj): + raise NotImplementedError + + @staticmethod + def collection_add_string_entry(collection, obj): + raise NotImplementedError + + @staticmethod + def collection_set_int_entry(collection, index, obj): + raise NotImplementedError + + @staticmethod + def collection_set_double_entry(collection, index, obj): + raise NotImplementedError + + @staticmethod + def collection_set_string_entry(collection, index, obj): + raise NotImplementedError + + @staticmethod + def collection_get_int_entry(collection, index): + raise NotImplementedError + + @staticmethod + def collection_get_double_entry(collection, index): + raise NotImplementedError + + @staticmethod + def collection_get_string_entry(collection, index): + raise NotImplementedError + + @staticmethod + def collection_set_data_as_int(collection, data, size): + raise NotImplementedError + + @staticmethod + def collection_set_data_as_double(collection, data, size): + raise NotImplementedError + + @staticmethod + def collection_get_data_as_int_for_dpf_vector(collection, out, data, size): + raise NotImplementedError + + @staticmethod + def collection_get_data_as_double_for_dpf_vector(collection, out, data, size): + raise NotImplementedError + + @staticmethod + def collection_of_scoping_new(): + raise NotImplementedError + + @staticmethod + def collection_of_field_new(): + raise NotImplementedError + + @staticmethod + def collection_of_mesh_new(): + raise NotImplementedError + + @staticmethod + def collection_of_custom_type_field_new(): + raise NotImplementedError + + @staticmethod + def collection_get_num_labels(collection): + raise NotImplementedError + + @staticmethod + def collection_get_label(collection, labelIndex): + raise NotImplementedError + + @staticmethod + def collection_add_label(collection, label): + raise NotImplementedError + + @staticmethod + def collection_add_label_with_default_value(collection, label, value): + raise NotImplementedError + + @staticmethod + def collection_add_entry(collection, labelspace, obj): + raise NotImplementedError + + @staticmethod + def collection_set_entry_by_index(collection, index, obj): + raise NotImplementedError + + @staticmethod + def collection_get_obj_by_index(collection, index): + raise NotImplementedError + + @staticmethod + def collection_get_obj(collection, space): + raise NotImplementedError + + @staticmethod + def collection_get_obj_label_space_by_index(collection, index): + raise NotImplementedError + + @staticmethod + def collection_get_num_obj_for_label_space(collection, space): + raise NotImplementedError + + @staticmethod + def collection_get_obj_by_index_for_label_space(collection, space, index): + raise NotImplementedError + + @staticmethod + def collection_fill_obj_indeces_for_label_space(collection, space, indices): + raise NotImplementedError + + @staticmethod + def collection_get_label_scoping(collection, label): + raise NotImplementedError + + @staticmethod + def collection_get_name(collection): + raise NotImplementedError + + @staticmethod + def collection_set_name(collection, name): + raise NotImplementedError + + @staticmethod + def collection_get_id(collection): + raise NotImplementedError + + @staticmethod + def collection_set_id(collection, id): + raise NotImplementedError + + @staticmethod + def collection_delete(collection): + raise NotImplementedError + + @staticmethod + def collection_get_size(collection): + raise NotImplementedError + + @staticmethod + def collection_reserve(collection, size): + raise NotImplementedError + + @staticmethod + def collection_resize(collection, size): + raise NotImplementedError + + @staticmethod + def collection_get_support(collection, label): + raise NotImplementedError + + @staticmethod + def collection_set_support(collection, label, support): + raise NotImplementedError + + @staticmethod + def collection_create_sub_collection(collection, space): + raise NotImplementedError + + @staticmethod + def collection_of_scoping_new_on_client(client): + raise NotImplementedError + + @staticmethod + def collection_of_field_new_on_client(client): + raise NotImplementedError + + @staticmethod + def collection_of_mesh_new_on_client(client): + raise NotImplementedError + + @staticmethod + def collection_of_scoping_get_copy(id, client): + raise NotImplementedError + + @staticmethod + def collection_of_field_get_copy(id, client): + raise NotImplementedError + + @staticmethod + def collection_of_mesh_get_copy(id, client): + raise NotImplementedError + + @staticmethod + def collection_of_int_new_on_client(client): + raise NotImplementedError + + @staticmethod + def collection_of_double_new_on_client(client): + raise NotImplementedError + + @staticmethod + def collection_of_string_new_on_client(client): + raise NotImplementedError + + @staticmethod + def collection_of_string_new_local(client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/collection_capi.py b/src/ansys/dpf/gate/generated/collection_capi.py new file mode 100644 index 0000000000..2c2e63e187 --- /dev/null +++ b/src/ansys/dpf/gate/generated/collection_capi.py @@ -0,0 +1,529 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import collection_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Collection +#------------------------------------------------------------------------------- + +class CollectionCAPI(collection_abstract_api.CollectionAbstractAPI): + + @staticmethod + def init_collection_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def collection_of_int_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfIntNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_double_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfDoubleNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_string_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfStringNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_data_as_int(collection, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetDataAsInt(collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_data_as_double(collection, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetDataAsDouble(collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_add_int_entry(collection, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_AddIntEntry(collection._internal_obj if collection is not None else None, utils.to_int32(obj), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_add_double_entry(collection, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_AddDoubleEntry(collection._internal_obj if collection is not None else None, ctypes.c_double(obj) if isinstance(obj, float) else obj, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_add_string_entry(collection, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_AddStringEntry(collection._internal_obj if collection is not None else None, utils.to_char_ptr(obj), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_set_int_entry(collection, index, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetIntEntry(collection._internal_obj if collection is not None else None, utils.to_int32(index), utils.to_int32(obj), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_set_double_entry(collection, index, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetDoubleEntry(collection._internal_obj if collection is not None else None, utils.to_int32(index), ctypes.c_double(obj) if isinstance(obj, float) else obj, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_set_string_entry(collection, index, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetStringEntry(collection._internal_obj if collection is not None else None, utils.to_int32(index), utils.to_char_ptr(obj), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_int_entry(collection, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetIntEntry(collection._internal_obj if collection is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_double_entry(collection, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetDoubleEntry(collection._internal_obj if collection is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_string_entry(collection, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetStringEntry(collection._internal_obj if collection is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def collection_set_data_as_int(collection, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetDataAsInt(collection._internal_obj if collection is not None else None, utils.to_int32_ptr(data), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_set_data_as_double(collection, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetDataAsDouble(collection._internal_obj if collection is not None else None, utils.to_double_ptr(data), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_data_as_int_for_dpf_vector(collection, out, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetDataAsInt_For_DpfVector(collection._internal_obj if collection is not None else None, out._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_data_as_double_for_dpf_vector(collection, out, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetDataAsDouble_For_DpfVector(collection._internal_obj if collection is not None else None, out._internal_obj, utils.to_double_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_scoping_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfScopingNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_field_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfFieldNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_mesh_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfMeshNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_custom_type_field_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfCustomTypeFieldNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_num_labels(collection): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetNumLabels(collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_label(collection, labelIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetLabel(collection._internal_obj if collection is not None else None, utils.to_int32(labelIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def collection_add_label(collection, label): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_AddLabel(collection._internal_obj if collection is not None else None, utils.to_char_ptr(label), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_add_label_with_default_value(collection, label, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_AddLabelWithDefaultValue(collection._internal_obj if collection is not None else None, utils.to_char_ptr(label), utils.to_int32(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_add_entry(collection, labelspace, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_AddEntry(collection._internal_obj if collection is not None else None, labelspace._internal_obj if labelspace is not None else None, obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_set_entry_by_index(collection, index, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetEntryByIndex(collection._internal_obj if collection is not None else None, utils.to_int32(index), obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_obj_by_index(collection, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetObjByIndex(collection._internal_obj if collection is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_obj(collection, space): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetObj(collection._internal_obj if collection is not None else None, space._internal_obj if space is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_obj_label_space_by_index(collection, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetObjLabelSpaceByIndex(collection._internal_obj if collection is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_num_obj_for_label_space(collection, space): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetNumObjForLabelSpace(collection._internal_obj if collection is not None else None, space._internal_obj if space is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_obj_by_index_for_label_space(collection, space, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetObjByIndexForLabelSpace(collection._internal_obj if collection is not None else None, space._internal_obj if space is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_fill_obj_indeces_for_label_space(collection, space, indices): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_FillObjIndecesForLabelSpace(collection._internal_obj if collection is not None else None, space._internal_obj if space is not None else None, utils.to_int32_ptr(indices), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_label_scoping(collection, label): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetLabelScoping(collection._internal_obj if collection is not None else None, utils.to_char_ptr(label), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_name(collection): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetName(collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def collection_set_name(collection, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetName(collection._internal_obj if collection is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_id(collection): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetId(collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_set_id(collection, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetId(collection._internal_obj if collection is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_delete(collection): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_delete(collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_size(collection): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetSize(collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_reserve(collection, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_reserve(collection._internal_obj if collection is not None else None, utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_resize(collection, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_resize(collection._internal_obj if collection is not None else None, utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_get_support(collection, label): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetSupport(collection._internal_obj if collection is not None else None, utils.to_char_ptr(label), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_set_support(collection, label, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_SetSupport(collection._internal_obj if collection is not None else None, utils.to_char_ptr(label), support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_create_sub_collection(collection, space): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_CreateSubCollection(collection._internal_obj if collection is not None else None, space._internal_obj if space is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_scoping_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfScopingNew_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_field_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfFieldNew_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_mesh_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfMeshNew_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_scoping_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfScoping_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_field_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfField_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_mesh_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfMesh_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_int_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfIntNew_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_double_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfDoubleNew_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_string_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfStringNew_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_string_new_local(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfStringNew_local(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/custom_type_field_abstract_api.py b/src/ansys/dpf/gate/generated/custom_type_field_abstract_api.py new file mode 100644 index 0000000000..176b892875 --- /dev/null +++ b/src/ansys/dpf/gate/generated/custom_type_field_abstract_api.py @@ -0,0 +1,125 @@ +#------------------------------------------------------------------------------- +# CustomTypeField +#------------------------------------------------------------------------------- + +class CustomTypeFieldAbstractAPI: + @staticmethod + def init_custom_type_field_environment(object): + pass + + @staticmethod + def finish_custom_type_field_environment(object): + pass + + @staticmethod + def cscustom_type_field_new(type, unitarySize, numEntities, numUnitaryData): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_data_for_dpf_vector(field, out, data, size): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_data_pointer_for_dpf_vector(field, out, data, size): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_entity_data_for_dpf_vector(dpf_object, out, data, size, EntityIndex): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_entity_data_by_id_for_dpf_vector(dpf_object, vec, data, size, EntityId): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_cscoping(field): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_number_elementary_data(field): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_number_of_components(field): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_data_size(field): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_number_entities(field): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_set_data(field, size, data): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_set_data_pointer(field, size, data): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_set_cscoping(field, scoping): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_push_back(field, EntityId, size, data): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_resize(field, dataSize, scopingSize): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_reserve(field, dataSize, scopingSize): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_type(field, type, unitarySize): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_shared_field_definition(field): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_support(field): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_set_field_definition(field, field_definition): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_set_support(field, support): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_set_entity_data(field, index, id, size, data): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_name(field): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_set_name(field, name): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_entity_id(field, index): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_entity_index(field, id): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_new_on_client(client, type, unitarySize, numEntities, numUnitaryData): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/custom_type_field_capi.py b/src/ansys/dpf/gate/generated/custom_type_field_capi.py new file mode 100644 index 0000000000..3dbcd671e5 --- /dev/null +++ b/src/ansys/dpf/gate/generated/custom_type_field_capi.py @@ -0,0 +1,273 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import custom_type_field_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# CustomTypeField +#------------------------------------------------------------------------------- + +class CustomTypeFieldCAPI(custom_type_field_abstract_api.CustomTypeFieldAbstractAPI): + + @staticmethod + def init_custom_type_field_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def cscustom_type_field_new(type, unitarySize, numEntities, numUnitaryData): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_new(utils.to_char_ptr(type), utils.to_int32(unitarySize), utils.to_int32(numEntities), utils.to_int32(numUnitaryData), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_data_for_dpf_vector(field, out, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetData_For_DpfVector(field._internal_obj if field is not None else None, out._internal_obj, utils.to_void_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_data_pointer_for_dpf_vector(field, out, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetDataPointer_For_DpfVector(field._internal_obj if field is not None else None, out._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_entity_data_for_dpf_vector(dpf_object, out, data, size, EntityIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetEntityData_For_DpfVector(dpf_object._internal_obj if dpf_object is not None else None, out._internal_obj, utils.to_void_ptr_ptr(data), utils.to_int32_ptr(size), utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_entity_data_by_id_for_dpf_vector(dpf_object, vec, data, size, EntityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetEntityDataById_For_DpfVector(dpf_object._internal_obj if dpf_object is not None else None, vec._internal_obj, utils.to_void_ptr_ptr(data), utils.to_int32_ptr(size), utils.to_int32(EntityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_cscoping(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetCScoping(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_number_elementary_data(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetNumberElementaryData(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_number_of_components(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetNumberOfComponents(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_data_size(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetDataSize(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_number_entities(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetNumberEntities(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_set_data(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetData(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_void_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_set_data_pointer(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetDataPointer(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_set_cscoping(field, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetCScoping(field._internal_obj if field is not None else None, scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_push_back(field, EntityId, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_PushBack(field._internal_obj if field is not None else None, utils.to_int32(EntityId), utils.to_int32(size), utils.to_void_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_resize(field, dataSize, scopingSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_Resize(field._internal_obj if field is not None else None, utils.to_int32(dataSize), utils.to_int32(scopingSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_reserve(field, dataSize, scopingSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_Reserve(field._internal_obj if field is not None else None, utils.to_int32(dataSize), utils.to_int32(scopingSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_type(field, type, unitarySize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetType(field._internal_obj if field is not None else None, utils.to_char_ptr(type), utils.to_int32_ptr(unitarySize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_shared_field_definition(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetSharedFieldDefinition(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_support(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetSupport(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_set_field_definition(field, field_definition): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetFieldDefinition(field._internal_obj if field is not None else None, field_definition._internal_obj if field_definition is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_set_support(field, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetSupport(field._internal_obj if field is not None else None, support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_set_entity_data(field, index, id, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetEntityData(field._internal_obj if field is not None else None, utils.to_int32(index), utils.to_int32(id), utils.to_int32(size), utils.to_void_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_name(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetName(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def cscustom_type_field_set_name(field, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetName(field._internal_obj if field is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_entity_id(field, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetEntityId(field._internal_obj if field is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_entity_index(field, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_GetEntityIndex(field._internal_obj if field is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_new_on_client(client, type, unitarySize, numEntities, numUnitaryData): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_new_on_client(client._internal_obj if client is not None else None, utils.to_char_ptr(type), utils.to_int32(unitarySize), utils.to_int32(numEntities), utils.to_int32(numUnitaryData), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/cyclic_support_abstract_api.py b/src/ansys/dpf/gate/generated/cyclic_support_abstract_api.py new file mode 100644 index 0000000000..740203d272 --- /dev/null +++ b/src/ansys/dpf/gate/generated/cyclic_support_abstract_api.py @@ -0,0 +1,61 @@ +#------------------------------------------------------------------------------- +# CyclicSupport +#------------------------------------------------------------------------------- + +class CyclicSupportAbstractAPI: + @staticmethod + def init_cyclic_support_environment(object): + pass + + @staticmethod + def finish_cyclic_support_environment(object): + pass + + @staticmethod + def cyclic_support_delete(support): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_num_sectors(support, istage): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_num_stages(support): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_sectors_scoping(support, istage): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_cyclic_phase(support): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_base_nodes_scoping(support, istage): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_base_elements_scoping(support, istage): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_expanded_node_ids(support, baseNodeId, istage, sectorsScoping): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_expanded_element_ids(support, baseElementId, istage, sectorsScoping): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_cs(support): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_low_high_map(support, istage): + raise NotImplementedError + + @staticmethod + def cyclic_support_get_high_low_map(support, istage): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/cyclic_support_capi.py b/src/ansys/dpf/gate/generated/cyclic_support_capi.py new file mode 100644 index 0000000000..0f0a7fe405 --- /dev/null +++ b/src/ansys/dpf/gate/generated/cyclic_support_capi.py @@ -0,0 +1,127 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import cyclic_support_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# CyclicSupport +#------------------------------------------------------------------------------- + +class CyclicSupportCAPI(cyclic_support_abstract_api.CyclicSupportAbstractAPI): + + @staticmethod + def init_cyclic_support_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def cyclic_support_delete(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_delete(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_num_sectors(support, istage): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getNumSectors(support._internal_obj if support is not None else None, utils.to_int32(istage), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_num_stages(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getNumStages(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_sectors_scoping(support, istage): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getSectorsScoping(support._internal_obj if support is not None else None, utils.to_int32(istage), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_cyclic_phase(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getCyclicPhase(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_base_nodes_scoping(support, istage): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getBaseNodesScoping(support._internal_obj if support is not None else None, utils.to_int32(istage), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_base_elements_scoping(support, istage): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getBaseElementsScoping(support._internal_obj if support is not None else None, utils.to_int32(istage), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_expanded_node_ids(support, baseNodeId, istage, sectorsScoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getExpandedNodeIds(support._internal_obj if support is not None else None, utils.to_int32(baseNodeId), utils.to_int32(istage), sectorsScoping._internal_obj if sectorsScoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_expanded_element_ids(support, baseElementId, istage, sectorsScoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getExpandedElementIds(support._internal_obj if support is not None else None, utils.to_int32(baseElementId), utils.to_int32(istage), sectorsScoping._internal_obj if sectorsScoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_cs(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getCS(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_low_high_map(support, istage): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getLowHighMap(support._internal_obj if support is not None else None, utils.to_int32(istage), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cyclic_support_get_high_low_map(support, istage): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CyclicSupport_getHighLowMap(support._internal_obj if support is not None else None, utils.to_int32(istage), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/data_base_abstract_api.py b/src/ansys/dpf/gate/generated/data_base_abstract_api.py new file mode 100644 index 0000000000..a127ba3db3 --- /dev/null +++ b/src/ansys/dpf/gate/generated/data_base_abstract_api.py @@ -0,0 +1,57 @@ +#------------------------------------------------------------------------------- +# DataBase +#------------------------------------------------------------------------------- + +class DataBaseAbstractAPI: + @staticmethod + def init_data_base_environment(object): + pass + + @staticmethod + def finish_data_base_environment(object): + pass + + @staticmethod + def data_base_create_and_hold(id): + raise NotImplementedError + + @staticmethod + def data_base_record_entity_by_db_id(dbid, obj): + raise NotImplementedError + + @staticmethod + def data_base_record_entity(db, obj): + raise NotImplementedError + + @staticmethod + def data_base_erase_entity(db, entityId): + raise NotImplementedError + + @staticmethod + def data_base_erase_entity_by_db_id(dbid, entityId): + raise NotImplementedError + + @staticmethod + def data_base_release_entity(db, entityId): + raise NotImplementedError + + @staticmethod + def data_base_release_by_db_id(dbid, entityId): + raise NotImplementedError + + @staticmethod + def data_base_get_entity(db, entityId): + raise NotImplementedError + + @staticmethod + def data_base_get_by_db_id(dbid, entityId): + raise NotImplementedError + + @staticmethod + def data_base_delete(dbid): + raise NotImplementedError + + @staticmethod + def data_base_erase_all_held_entities(db): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/data_base_capi.py b/src/ansys/dpf/gate/generated/data_base_capi.py new file mode 100644 index 0000000000..06867d3ac5 --- /dev/null +++ b/src/ansys/dpf/gate/generated/data_base_capi.py @@ -0,0 +1,118 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import data_base_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# DataBase +#------------------------------------------------------------------------------- + +class DataBaseCAPI(data_base_abstract_api.DataBaseAbstractAPI): + + @staticmethod + def init_data_base_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def data_base_create_and_hold(id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_createAndHold(utils.to_char_ptr(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_record_entity_by_db_id(dbid, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_recordEntityByDbId(utils.to_char_ptr(dbid), obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_record_entity(db, obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_recordEntity(db, obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_erase_entity(db, entityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_eraseEntity(db, utils.to_int32(entityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_erase_entity_by_db_id(dbid, entityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_eraseEntityByDbId(utils.to_char_ptr(dbid), utils.to_int32(entityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_release_entity(db, entityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_releaseEntity(db, utils.to_int32(entityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_release_by_db_id(dbid, entityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_releaseByDbId(utils.to_char_ptr(dbid), utils.to_int32(entityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_get_entity(db, entityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_getEntity(db, utils.to_int32(entityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_get_by_db_id(dbid, entityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_getByDbId(utils.to_char_ptr(dbid), utils.to_int32(entityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_delete(dbid): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_delete(utils.to_char_ptr(dbid), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_base_erase_all_held_entities(db): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataBase_eraseAllHeldEntities(db, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/data_processing_abstract_api.py b/src/ansys/dpf/gate/generated/data_processing_abstract_api.py new file mode 100644 index 0000000000..89281a8600 --- /dev/null +++ b/src/ansys/dpf/gate/generated/data_processing_abstract_api.py @@ -0,0 +1,217 @@ +#------------------------------------------------------------------------------- +# DataProcessing +#------------------------------------------------------------------------------- + +class DataProcessingAbstractAPI: + @staticmethod + def init_data_processing_environment(object): + pass + + @staticmethod + def finish_data_processing_environment(object): + pass + + @staticmethod + def data_processing_initialization(): + raise NotImplementedError + + @staticmethod + def data_processing_release(context): + raise NotImplementedError + + @staticmethod + def data_processing_initialize_with_context(context, dataProcessingCore_xml_path): + raise NotImplementedError + + @staticmethod + def data_processing_apply_context(context, dataProcessingCore_xml_path): + raise NotImplementedError + + @staticmethod + def data_processing_set_debug_trace(text): + raise NotImplementedError + + @staticmethod + def data_processing_set_trace_section(text): + raise NotImplementedError + + @staticmethod + def data_processing_load_library(name, dllPath, symbol): + raise NotImplementedError + + @staticmethod + def data_processing_available_operators(): + raise NotImplementedError + + @staticmethod + def data_processing_duplicate_object_reference(base): + raise NotImplementedError + + @staticmethod + def data_processing_objects_holds_same_data(a, b): + raise NotImplementedError + + @staticmethod + def data_processing_wrap_unknown(data, destructor, type_hash): + raise NotImplementedError + + @staticmethod + def data_processing_unwrap_unknown(data, expected_type_hash): + raise NotImplementedError + + @staticmethod + def data_processing_delete_shared_object(data): + raise NotImplementedError + + @staticmethod + def data_processing_unknown_has_given_hash(data, expected_type_hash): + raise NotImplementedError + + @staticmethod + def data_processing_description_string(data): + raise NotImplementedError + + @staticmethod + def data_processing_delete_string(var1): + raise NotImplementedError + + @staticmethod + def data_processing_string_post_event(output): + raise NotImplementedError + + @staticmethod + def data_processing_list_operators_as_collection(): + raise NotImplementedError + + @staticmethod + def data_processing_free_ints(data): + raise NotImplementedError + + @staticmethod + def data_processing_free_doubles(data): + raise NotImplementedError + + @staticmethod + def data_processing_serialize(obj): + raise NotImplementedError + + @staticmethod + def data_processing_deserialize(data, dataSize): + raise NotImplementedError + + @staticmethod + def data_processing_get_global_config_as_data_tree(): + raise NotImplementedError + + @staticmethod + def data_processing_get_server_version(major, minor): + raise NotImplementedError + + @staticmethod + def data_processing_get_os(): + raise NotImplementedError + + @staticmethod + def data_processing_process_id(): + raise NotImplementedError + + @staticmethod + def data_processing_initialization_on_client(client): + raise NotImplementedError + + @staticmethod + def data_processing_release_on_client(client, context): + raise NotImplementedError + + @staticmethod + def data_processing_initialize_with_context_on_client(client, context, dataProcessingCore_xml_path): + raise NotImplementedError + + @staticmethod + def data_processing_apply_context_on_client(client, context, dataProcessingCore_xml_path): + raise NotImplementedError + + @staticmethod + def data_processing_load_library_on_client(sLibraryKey, sDllPath, sloader_symbol, client): + raise NotImplementedError + + @staticmethod + def data_processing_get_id_of_duplicate_object_reference(base): + raise NotImplementedError + + @staticmethod + def data_processing_release_obj_by_id_in_db(id, client, bAsync): + raise NotImplementedError + + @staticmethod + def data_processing_delete_string_for_object(api_to_use, var1): + raise NotImplementedError + + @staticmethod + def data_processing_get_client(base): + raise NotImplementedError + + @staticmethod + def data_processing_prepare_shutdown(client): + raise NotImplementedError + + @staticmethod + def data_processing_release_server(client): + raise NotImplementedError + + @staticmethod + def data_processing_string_post_event_for_object(api_to_use, output): + raise NotImplementedError + + @staticmethod + def data_processing_free_ints_for_object(api_to_use, data): + raise NotImplementedError + + @staticmethod + def data_processing_free_doubles_for_object(api_to_use, data): + raise NotImplementedError + + @staticmethod + def data_processing_deserialize_on_client(client, data, dataSize): + raise NotImplementedError + + @staticmethod + def data_processing_get_global_config_as_data_tree_on_client(client): + raise NotImplementedError + + @staticmethod + def data_processing_get_client_config_as_data_tree(): + raise NotImplementedError + + @staticmethod + def data_processing_get_server_version_on_client(client, major, minor): + raise NotImplementedError + + @staticmethod + def data_processing_get_server_ip_and_port(client, port): + raise NotImplementedError + + @staticmethod + def data_processing_get_os_on_client(client): + raise NotImplementedError + + @staticmethod + def data_processing_download_file(client, server_file_path, to_client_file_path): + raise NotImplementedError + + @staticmethod + def data_processing_download_files(client, server_file_path, to_client_file_path, specific_extension): + raise NotImplementedError + + @staticmethod + def data_processing_list_operators_as_collection_on_client(client): + raise NotImplementedError + + @staticmethod + def data_processing_upload_file(client, file_path, to_server_file_path, use_tmp_dir): + raise NotImplementedError + + @staticmethod + def data_processing_process_id_on_client(client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/data_processing_capi.py b/src/ansys/dpf/gate/generated/data_processing_capi.py new file mode 100644 index 0000000000..82254849a2 --- /dev/null +++ b/src/ansys/dpf/gate/generated/data_processing_capi.py @@ -0,0 +1,461 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import data_processing_abstract_api + + #------------------------------------------------------------------------------- +# DataProcessing +#------------------------------------------------------------------------------- + +class DataProcessingCAPI(data_processing_abstract_api.DataProcessingAbstractAPI): + + @staticmethod + def data_processing_initialization(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_initialization(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_release(context): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_release(utils.to_int32(context), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_initialize_with_context(context, dataProcessingCore_xml_path): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.dataProcessing_initializeWithContext(utils.to_int32(context), utils.to_char_ptr(dataProcessingCore_xml_path), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_apply_context(context, dataProcessingCore_xml_path): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.dataProcessing_applyContext(utils.to_int32(context), utils.to_char_ptr(dataProcessingCore_xml_path), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_set_debug_trace(text): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_set_debug_trace(utils.to_char_ptr(text), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_set_trace_section(text): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_set_trace_section(utils.to_char_ptr(text), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_load_library(name, dllPath, symbol): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_load_library(utils.to_char_ptr(name), utils.to_char_ptr(dllPath), utils.to_char_ptr(symbol), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_available_operators(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_available_operators(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_processing_duplicate_object_reference(base): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_duplicate_object_reference(base._internal_obj if base is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_objects_holds_same_data(a, b): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_objects_holds_same_data(a._internal_obj if a is not None else None, b._internal_obj if b is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_wrap_unknown(data, destructor, type_hash): + res = capi.dll.DataProcessing_wrap_unknown(data, destructor, type_hash) + return res + + @staticmethod + def data_processing_unwrap_unknown(data, expected_type_hash): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_unwrap_unknown(data._internal_obj if data is not None else None, expected_type_hash, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_delete_shared_object(data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_delete_shared_object(data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_unknown_has_given_hash(data, expected_type_hash): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_unknown_has_given_hash(data._internal_obj if data is not None else None, expected_type_hash, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_description_string(data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_descriptionString(data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_processing_delete_string(var1): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_deleteString(utils.to_char_ptr(var1), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_string_post_event(output): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_String_post_event(utils.to_char_ptr(output), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_list_operators_as_collection(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_list_operators_as_collection(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_free_ints(data): + res = capi.dll.DataProcessing_free_ints(utils.to_int32_ptr(data)) + return res + + @staticmethod + def data_processing_free_doubles(data): + res = capi.dll.DataProcessing_free_doubles(utils.to_double_ptr(data)) + return res + + @staticmethod + def data_processing_serialize(obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_serialize(obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_deserialize(data, dataSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_deserialize(utils.to_char_ptr(data), dataSize, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_global_config_as_data_tree(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_getGlobalConfigAsDataTree(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_server_version(major, minor): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_getServerVersion(ctypes.byref(utils.to_int32(major)), ctypes.byref(utils.to_int32(minor)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_os(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_getOs(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_processing_process_id(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_ProcessId(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_initialization_on_client(client): + res = capi.dll.DataProcessing_initialization_on_client(client._internal_obj if client is not None else None) + return res + + @staticmethod + def data_processing_release_on_client(client, context): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_release_on_client(client._internal_obj if client is not None else None, utils.to_int32(context), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_initialize_with_context_on_client(client, context, dataProcessingCore_xml_path): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.dataProcessing_initializeWithContext_on_client(client._internal_obj if client is not None else None, utils.to_int32(context), utils.to_char_ptr(dataProcessingCore_xml_path), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_apply_context_on_client(client, context, dataProcessingCore_xml_path): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.dataProcessing_applyContext_on_client(client._internal_obj if client is not None else None, utils.to_int32(context), utils.to_char_ptr(dataProcessingCore_xml_path), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_load_library_on_client(sLibraryKey, sDllPath, sloader_symbol, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_load_library_on_client(utils.to_char_ptr(sLibraryKey), utils.to_char_ptr(sDllPath), utils.to_char_ptr(sloader_symbol), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_id_of_duplicate_object_reference(base): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_get_id_of_duplicate_object_reference(base._internal_obj if base is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_release_obj_by_id_in_db(id, client, bAsync): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_release_obj_by_id_in_db(utils.to_int32(id), client._internal_obj if client is not None else None, bAsync, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_delete_string_for_object(api_to_use, var1): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_deleteString_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_char_ptr(var1), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_client(base): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_get_client(base._internal_obj if base is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_prepare_shutdown(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_prepare_shutdown(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_release_server(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_release_server(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_string_post_event_for_object(api_to_use, output): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_String_post_event_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_char_ptr(output), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_free_ints_for_object(api_to_use, data): + res = capi.dll.DataProcessing_free_ints_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_int32_ptr(data)) + return res + + @staticmethod + def data_processing_free_doubles_for_object(api_to_use, data): + res = capi.dll.DataProcessing_free_doubles_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_double_ptr(data)) + return res + + @staticmethod + def data_processing_deserialize_on_client(client, data, dataSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_deserialize_on_client(client._internal_obj if client is not None else None, utils.to_char_ptr(data), dataSize, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_global_config_as_data_tree_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_getGlobalConfigAsDataTree_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_client_config_as_data_tree(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_getClientConfigAsDataTree(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_server_version_on_client(client, major, minor): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_getServerVersion_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(major)), ctypes.byref(utils.to_int32(minor)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_get_server_ip_and_port(client, port): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_getServerIpAndPort(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(port)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_processing_get_os_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_getOs_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_processing_download_file(client, server_file_path, to_client_file_path): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_DownloadFile(client._internal_obj if client is not None else None, utils.to_char_ptr(server_file_path), utils.to_char_ptr(to_client_file_path), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_processing_download_files(client, server_file_path, to_client_file_path, specific_extension): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_DownloadFiles(client._internal_obj if client is not None else None, utils.to_char_ptr(server_file_path), utils.to_char_ptr(to_client_file_path), utils.to_char_ptr(specific_extension), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_list_operators_as_collection_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_list_operators_as_collection_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_processing_upload_file(client, file_path, to_server_file_path, use_tmp_dir): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_UploadFile(client._internal_obj if client is not None else None, utils.to_char_ptr(file_path), utils.to_char_ptr(to_server_file_path), use_tmp_dir, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_processing_process_id_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_ProcessId_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/data_processing_error_abstract_api.py b/src/ansys/dpf/gate/generated/data_processing_error_abstract_api.py new file mode 100644 index 0000000000..950036763c --- /dev/null +++ b/src/ansys/dpf/gate/generated/data_processing_error_abstract_api.py @@ -0,0 +1,77 @@ +#------------------------------------------------------------------------------- +# DataProcessingError +#------------------------------------------------------------------------------- + +class DataProcessingErrorAbstractAPI: + @staticmethod + def init_data_processing_error_environment(object): + pass + + @staticmethod + def finish_data_processing_error_environment(object): + pass + + @staticmethod + def data_processing_parse_error(size, error_message): + raise NotImplementedError + + @staticmethod + def data_processing_parse_error_to_str(size, error_message): + raise NotImplementedError + + @staticmethod + def dpf_error_new(): + raise NotImplementedError + + @staticmethod + def dpf_error_set_throw(error, must_throw): + raise NotImplementedError + + @staticmethod + def dpf_error_set_code(error, code_value): + raise NotImplementedError + + @staticmethod + def dpf_error_set_message_text(error, code_value): + raise NotImplementedError + + @staticmethod + def dpf_error_set_message_template(error, code_value): + raise NotImplementedError + + @staticmethod + def dpf_error_set_message_id(error, code_value): + raise NotImplementedError + + @staticmethod + def dpf_error_delete(error): + raise NotImplementedError + + @staticmethod + def dpf_error_duplicate(error): + raise NotImplementedError + + @staticmethod + def dpf_error_code(error): + raise NotImplementedError + + @staticmethod + def dpf_error_to_throw(error): + raise NotImplementedError + + @staticmethod + def dpf_error_message_text(error): + raise NotImplementedError + + @staticmethod + def dpf_error_message_template(error): + raise NotImplementedError + + @staticmethod + def dpf_error_message_id(error): + raise NotImplementedError + + @staticmethod + def data_processing_parse_error_to_str_for_object(api_to_use, size, error_message): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/data_processing_error_capi.py b/src/ansys/dpf/gate/generated/data_processing_error_capi.py new file mode 100644 index 0000000000..51e802a23f --- /dev/null +++ b/src/ansys/dpf/gate/generated/data_processing_error_capi.py @@ -0,0 +1,109 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import data_processing_error_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# DataProcessingError +#------------------------------------------------------------------------------- + +class DataProcessingErrorCAPI(data_processing_error_abstract_api.DataProcessingErrorAbstractAPI): + + @staticmethod + def init_data_processing_error_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def data_processing_parse_error(size, error_message): + res = capi.dll.DataProcessing_parse_error(utils.to_int32(size), error_message) + return res + + @staticmethod + def data_processing_parse_error_to_str(size, error_message): + res = capi.dll.DataProcessing_parse_error_to_str(utils.to_int32(size), error_message) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def dpf_error_new(): + res = capi.dll.DpfError_new() + return res + + @staticmethod + def dpf_error_set_throw(error, must_throw): + res = capi.dll.DpfError_set_throw(error, must_throw) + return res + + @staticmethod + def dpf_error_set_code(error, code_value): + res = capi.dll.DpfError_set_code(error, utils.to_int32(code_value)) + return res + + @staticmethod + def dpf_error_set_message_text(error, code_value): + res = capi.dll.DpfError_set_message_text(error, utils.to_char_ptr(code_value)) + return res + + @staticmethod + def dpf_error_set_message_template(error, code_value): + res = capi.dll.DpfError_set_message_template(error, utils.to_char_ptr(code_value)) + return res + + @staticmethod + def dpf_error_set_message_id(error, code_value): + res = capi.dll.DpfError_set_message_id(error, utils.to_char_ptr(code_value)) + return res + + @staticmethod + def dpf_error_delete(error): + res = capi.dll.DpfError_delete(error) + return res + + @staticmethod + def dpf_error_duplicate(error): + res = capi.dll.DpfError_duplicate(error) + return res + + @staticmethod + def dpf_error_code(error): + res = capi.dll.DpfError_code(error) + return res + + @staticmethod + def dpf_error_to_throw(error): + res = capi.dll.DpfError_to_throw(error) + return res + + @staticmethod + def dpf_error_message_text(error): + res = capi.dll.DpfError_message_text(error) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def dpf_error_message_template(error): + res = capi.dll.DpfError_message_template(error) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def dpf_error_message_id(error): + res = capi.dll.DpfError_message_id(error) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_processing_parse_error_to_str_for_object(api_to_use, size, error_message): + res = capi.dll.DataProcessing_parse_error_to_str_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_int32(size), error_message) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + diff --git a/src/ansys/dpf/gate/generated/data_sources_abstract_api.py b/src/ansys/dpf/gate/generated/data_sources_abstract_api.py new file mode 100644 index 0000000000..808532d9b9 --- /dev/null +++ b/src/ansys/dpf/gate/generated/data_sources_abstract_api.py @@ -0,0 +1,153 @@ +#------------------------------------------------------------------------------- +# DataSources +#------------------------------------------------------------------------------- + +class DataSourcesAbstractAPI: + @staticmethod + def init_data_sources_environment(object): + pass + + @staticmethod + def finish_data_sources_environment(object): + pass + + @staticmethod + def data_sources_new(operatorName): + raise NotImplementedError + + @staticmethod + def data_sources_delete(dataSources): + raise NotImplementedError + + @staticmethod + def data_sources_set_result_file_path(dataSources, name): + raise NotImplementedError + + @staticmethod + def data_sources_set_result_file_path_with_key(dataSources, name, sKey): + raise NotImplementedError + + @staticmethod + def data_sources_set_domain_result_file_path_with_key(dataSources, name, sKey, id): + raise NotImplementedError + + @staticmethod + def data_sources_add_file_path(dataSources, name): + raise NotImplementedError + + @staticmethod + def data_sources_add_file_path_with_key(dataSources, name, sKey): + raise NotImplementedError + + @staticmethod + def data_sources_add_file_path_for_specified_result(dataSources, name, sKey, sResultKey): + raise NotImplementedError + + @staticmethod + def data_sources_set_result_file_path_utf8(dataSources, name): + raise NotImplementedError + + @staticmethod + def data_sources_set_result_file_path_with_key_utf8(dataSources, name, sKey): + raise NotImplementedError + + @staticmethod + def data_sources_set_domain_result_file_path_utf8(dataSources, name, id): + raise NotImplementedError + + @staticmethod + def data_sources_set_domain_result_file_path_with_key_utf8(dataSources, name, sKey, id): + raise NotImplementedError + + @staticmethod + def data_sources_add_file_path_utf8(dataSources, name): + raise NotImplementedError + + @staticmethod + def data_sources_add_file_path_with_key_utf8(dataSources, name, sKey): + raise NotImplementedError + + @staticmethod + def data_sources_add_domain_file_path_with_key_utf8(dataSources, name, sKey, id): + raise NotImplementedError + + @staticmethod + def data_sources_add_file_path_for_specified_result_utf8(dataSources, name, sKey, sResultKey): + raise NotImplementedError + + @staticmethod + def data_sources_add_upstream_data_sources(dataSources, upstreamDataSources): + raise NotImplementedError + + @staticmethod + def data_sources_add_upstream_data_sources_for_specified_result(dataSources, upstreamDataSources, sResultKey): + raise NotImplementedError + + @staticmethod + def data_sources_add_upstream_domain_data_sources(dataSources, upstreamDataSources, id): + raise NotImplementedError + + @staticmethod + def data_sources_get_result_key(dataSources): + raise NotImplementedError + + @staticmethod + def data_sources_get_result_key_by_index(dataSources, index): + raise NotImplementedError + + @staticmethod + def data_sources_get_num_result_keys(dataSources): + raise NotImplementedError + + @staticmethod + def data_sources_get_num_keys(dataSources): + raise NotImplementedError + + @staticmethod + def data_sources_get_key(dataSources, index, num_path): + raise NotImplementedError + + @staticmethod + def data_sources_get_path(dataSources, key, index): + raise NotImplementedError + + @staticmethod + def data_sources_get_namespace(dataSources, key): + raise NotImplementedError + + @staticmethod + def data_sources_get_new_path_collection_for_key(dataSources, key): + raise NotImplementedError + + @staticmethod + def data_sources_get_new_collection_for_results_path(dataSources): + raise NotImplementedError + + @staticmethod + def data_sources_get_size(dataSources): + raise NotImplementedError + + @staticmethod + def data_sources_get_path_by_path_index(dataSources, index): + raise NotImplementedError + + @staticmethod + def data_sources_get_key_by_path_index(dataSources, index): + raise NotImplementedError + + @staticmethod + def data_sources_get_label_space_by_path_index(dataSources, index): + raise NotImplementedError + + @staticmethod + def data_sources_register_namespace(dataSources, result_key, ns): + raise NotImplementedError + + @staticmethod + def data_sources_new_on_client(client): + raise NotImplementedError + + @staticmethod + def data_sources_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/data_sources_capi.py b/src/ansys/dpf/gate/generated/data_sources_capi.py new file mode 100644 index 0000000000..14aac3c859 --- /dev/null +++ b/src/ansys/dpf/gate/generated/data_sources_capi.py @@ -0,0 +1,348 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import data_sources_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# DataSources +#------------------------------------------------------------------------------- + +class DataSourcesCAPI(data_sources_abstract_api.DataSourcesAbstractAPI): + + @staticmethod + def init_data_sources_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def data_sources_new(operatorName): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_new(utils.to_char_ptr(operatorName), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_delete(dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_delete(dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_set_result_file_path(dataSources, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_SetResultFilePath(dataSources._internal_obj if dataSources is not None else None, name, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_set_result_file_path_with_key(dataSources, name, sKey): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_SetResultFilePathWithKey(dataSources._internal_obj if dataSources is not None else None, name, utils.to_char_ptr(sKey), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_set_domain_result_file_path_with_key(dataSources, name, sKey, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_SetDomainResultFilePathWithKey(dataSources._internal_obj if dataSources is not None else None, name, utils.to_char_ptr(sKey), utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_file_path(dataSources, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddFilePath(dataSources._internal_obj if dataSources is not None else None, name, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_file_path_with_key(dataSources, name, sKey): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddFilePathWithKey(dataSources._internal_obj if dataSources is not None else None, name, utils.to_char_ptr(sKey), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_file_path_for_specified_result(dataSources, name, sKey, sResultKey): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddFilePathForSpecifiedResult(dataSources._internal_obj if dataSources is not None else None, name, utils.to_char_ptr(sKey), utils.to_char_ptr(sResultKey), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_set_result_file_path_utf8(dataSources, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_SetResultFilePathUtf8(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_set_result_file_path_with_key_utf8(dataSources, name, sKey): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_SetResultFilePathWithKeyUtf8(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(name), utils.to_char_ptr(sKey), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_set_domain_result_file_path_utf8(dataSources, name, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_SetDomainResultFilePathUtf8(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(name), utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_set_domain_result_file_path_with_key_utf8(dataSources, name, sKey, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_SetDomainResultFilePathWithKeyUtf8(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(name), utils.to_char_ptr(sKey), utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_file_path_utf8(dataSources, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddFilePathUtf8(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_file_path_with_key_utf8(dataSources, name, sKey): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddFilePathWithKeyUtf8(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(name), utils.to_char_ptr(sKey), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_domain_file_path_with_key_utf8(dataSources, name, sKey, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddDomainFilePathWithKeyUtf8(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(name), utils.to_char_ptr(sKey), utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_file_path_for_specified_result_utf8(dataSources, name, sKey, sResultKey): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddFilePathForSpecifiedResultUtf8(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(name), utils.to_char_ptr(sKey), utils.to_char_ptr(sResultKey), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_upstream_data_sources(dataSources, upstreamDataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddUpstreamDataSources(dataSources._internal_obj if dataSources is not None else None, upstreamDataSources._internal_obj if upstreamDataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_upstream_data_sources_for_specified_result(dataSources, upstreamDataSources, sResultKey): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddUpstreamDataSourcesForSpecifiedResult(dataSources._internal_obj if dataSources is not None else None, upstreamDataSources._internal_obj if upstreamDataSources is not None else None, utils.to_char_ptr(sResultKey), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_add_upstream_domain_data_sources(dataSources, upstreamDataSources, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_AddUpstreamDomainDataSources(dataSources._internal_obj if dataSources is not None else None, upstreamDataSources._internal_obj if upstreamDataSources is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_get_result_key(dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetResultKey(dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_sources_get_result_key_by_index(dataSources, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetResultKeyByIndex(dataSources._internal_obj if dataSources is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_sources_get_num_result_keys(dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetNumResultKeys(dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_get_num_keys(dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetNumKeys(dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_get_key(dataSources, index, num_path): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetKey(dataSources._internal_obj if dataSources is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(num_path)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_sources_get_path(dataSources, key, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetPath(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(key), utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_sources_get_namespace(dataSources, key): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetNamespace(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(key), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_sources_get_new_path_collection_for_key(dataSources, key): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetNewPathCollectionForKey(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(key), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_get_new_collection_for_results_path(dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetNewCollectionForResultsPath(dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_get_size(dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetSize(dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_get_path_by_path_index(dataSources, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetPathByPathIndex(dataSources._internal_obj if dataSources is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_sources_get_key_by_path_index(dataSources, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetKeyByPathIndex(dataSources._internal_obj if dataSources is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def data_sources_get_label_space_by_path_index(dataSources, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_GetLabelSpaceByPathIndex(dataSources._internal_obj if dataSources is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_register_namespace(dataSources, result_key, ns): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_RegisterNamespace(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(result_key), utils.to_char_ptr(ns), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_new_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def data_sources_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataSources_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/dpf_data_tree_abstract_api.py b/src/ansys/dpf/gate/generated/dpf_data_tree_abstract_api.py new file mode 100644 index 0000000000..9532793948 --- /dev/null +++ b/src/ansys/dpf/gate/generated/dpf_data_tree_abstract_api.py @@ -0,0 +1,125 @@ +#------------------------------------------------------------------------------- +# DpfDataTree +#------------------------------------------------------------------------------- + +class DpfDataTreeAbstractAPI: + @staticmethod + def init_dpf_data_tree_environment(object): + pass + + @staticmethod + def finish_dpf_data_tree_environment(object): + pass + + @staticmethod + def dpf_data_tree_new(): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_delete(data_tree): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_has_sub_tree(data_tree, sub_tree_name): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_sub_tree(data_tree, sub_tree_name): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_make_sub_tree(data_tree, sub_tree_name): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_has_attribute(data_tree, attribute_name): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_available_attributes_names_in_string_collection(data_tree): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_available_sub_tree_names_in_string_collection(data_tree): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_int_attribute(data_tree, attribute_name, value): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_unsigned_int_attribute(data_tree, attribute_name, value): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_double_attribute(data_tree, attribute_name, value): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_string_attribute(data_tree, attribute_name, data, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_vec_int_attribute(data_tree, attribute_name, data, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_vec_double_attribute(data_tree, attribute_name, data, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_get_string_collection_attribute(data_tree, attribute_name): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_set_int_attribute(data_tree, attribute_name, value): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_set_unsigned_int_attribute(data_tree, attribute_name, value): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_set_vec_int_attribute(data_tree, attribute_name, value, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_set_double_attribute(data_tree, attribute_name, value): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_set_vec_double_attribute(data_tree, attribute_name, value, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_set_string_collection_attribute(data_tree, attribute_name, collection): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_set_string_attribute(data_tree, attribute_name, data, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_set_sub_tree_attribute(data_tree, attribute_name, data): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_save_to_txt(dataSources, text, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_read_from_text(dataSources, filename, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_save_to_json(dataSources, text, size): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_read_from_json(dataSources, filename): + raise NotImplementedError + + @staticmethod + def dpf_data_tree_new_on_client(client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/dpf_data_tree_capi.py b/src/ansys/dpf/gate/generated/dpf_data_tree_capi.py new file mode 100644 index 0000000000..988fe4a903 --- /dev/null +++ b/src/ansys/dpf/gate/generated/dpf_data_tree_capi.py @@ -0,0 +1,271 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import dpf_data_tree_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# DpfDataTree +#------------------------------------------------------------------------------- + +class DpfDataTreeCAPI(dpf_data_tree_abstract_api.DpfDataTreeAbstractAPI): + + @staticmethod + def init_dpf_data_tree_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def dpf_data_tree_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_delete(data_tree): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_delete(data_tree._internal_obj if data_tree is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_has_sub_tree(data_tree, sub_tree_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_hasSubTree(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(sub_tree_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_sub_tree(data_tree, sub_tree_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getSubTree(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(sub_tree_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_make_sub_tree(data_tree, sub_tree_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_makeSubTree(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(sub_tree_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_has_attribute(data_tree, attribute_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_hasAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_available_attributes_names_in_string_collection(data_tree): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getAvailableAttributesNamesInStringCollection(data_tree._internal_obj if data_tree is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_available_sub_tree_names_in_string_collection(data_tree): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getAvailableSubTreeNamesInStringCollection(data_tree._internal_obj if data_tree is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_int_attribute(data_tree, attribute_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getIntAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_int32_ptr(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_unsigned_int_attribute(data_tree, attribute_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getUnsignedIntAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_double_attribute(data_tree, attribute_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getDoubleAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_double_ptr(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_string_attribute(data_tree, attribute_name, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getStringAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_char_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_vec_int_attribute(data_tree, attribute_name, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getVecIntAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_vec_double_attribute(data_tree, attribute_name, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getVecDoubleAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_double_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_get_string_collection_attribute(data_tree, attribute_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_getStringCollectionAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_set_int_attribute(data_tree, attribute_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_setIntAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_int32(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_set_unsigned_int_attribute(data_tree, attribute_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_setUnsignedIntAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_set_vec_int_attribute(data_tree, attribute_name, value, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_setVecIntAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_int32_ptr(value), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_set_double_attribute(data_tree, attribute_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_setDoubleAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), ctypes.c_double(value) if isinstance(value, float) else value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_set_vec_double_attribute(data_tree, attribute_name, value, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_setVecDoubleAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_double_ptr(value), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_set_string_collection_attribute(data_tree, attribute_name, collection): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_setStringCollectionAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_set_string_attribute(data_tree, attribute_name, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_setStringAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), utils.to_char_ptr(data), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_set_sub_tree_attribute(data_tree, attribute_name, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_setSubTreeAttribute(data_tree._internal_obj if data_tree is not None else None, utils.to_char_ptr(attribute_name), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_save_to_txt(dataSources, text, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_saveToTxt(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr_ptr(text), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_read_from_text(dataSources, filename, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_readFromText(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(filename), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_save_to_json(dataSources, text, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_saveToJson(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr_ptr(text), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_read_from_json(dataSources, filename): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_readFromJson(dataSources._internal_obj if dataSources is not None else None, utils.to_char_ptr(filename), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_data_tree_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfDataTree_new_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/dpf_vector_abstract_api.py b/src/ansys/dpf/gate/generated/dpf_vector_abstract_api.py new file mode 100644 index 0000000000..0c363aedb9 --- /dev/null +++ b/src/ansys/dpf/gate/generated/dpf_vector_abstract_api.py @@ -0,0 +1,69 @@ +#------------------------------------------------------------------------------- +# DpfVector +#------------------------------------------------------------------------------- + +class DpfVectorAbstractAPI: + @staticmethod + def init_dpf_vector_environment(object): + pass + + @staticmethod + def finish_dpf_vector_environment(object): + pass + + @staticmethod + def dpf_vector_new(): + raise NotImplementedError + + @staticmethod + def dpf_vector_double_free(dpf_vector, data, size, modified): + raise NotImplementedError + + @staticmethod + def dpf_vector_char_free(dpf_vector, data, size, modified): + raise NotImplementedError + + @staticmethod + def dpf_vector_int_free(dpf_vector, data, size, modified): + raise NotImplementedError + + @staticmethod + def dpf_vector_char_ptr_free(dpf_vector, data, size, modified): + raise NotImplementedError + + @staticmethod + def dpf_vector_double_commit(dpf_vector, data, size, modified): + raise NotImplementedError + + @staticmethod + def dpf_vector_int_commit(dpf_vector, data, size, modified): + raise NotImplementedError + + @staticmethod + def dpf_vector_char_commit(dpf_vector, data, size, modified): + raise NotImplementedError + + @staticmethod + def dpf_vector_char_ptr_commit(dpf_vector, data, size, modified): + raise NotImplementedError + + @staticmethod + def dpf_vector_delete(dpf_vector): + raise NotImplementedError + + @staticmethod + def dpf_string_free(dpf_vector, data, size): + raise NotImplementedError + + @staticmethod + def dpf_vector_duplicate_dpf_vector(dpf_vector): + raise NotImplementedError + + @staticmethod + def dpf_vector_new_for_object(api_to_use): + raise NotImplementedError + + @staticmethod + def dpf_string_free_for_object(api_to_use, dpf_vector, data, size): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/dpf_vector_capi.py b/src/ansys/dpf/gate/generated/dpf_vector_capi.py new file mode 100644 index 0000000000..a281885744 --- /dev/null +++ b/src/ansys/dpf/gate/generated/dpf_vector_capi.py @@ -0,0 +1,145 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import dpf_vector_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# DpfVector +#------------------------------------------------------------------------------- + +class DpfVectorCAPI(dpf_vector_abstract_api.DpfVectorAbstractAPI): + + @staticmethod + def init_dpf_vector_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def dpf_vector_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_double_free(dpf_vector, data, size, modified): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_double_free(dpf_vector._internal_obj, utils.to_double_ptr_ptr(data), utils.to_int32_ptr(size), modified, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_char_free(dpf_vector, data, size, modified): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_char_free(dpf_vector._internal_obj, utils.to_char_ptr_ptr(data), utils.to_int32_ptr(size), modified, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_int_free(dpf_vector, data, size, modified): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_int_free(dpf_vector._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), modified, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_char_ptr_free(dpf_vector, data, size, modified): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_char_ptr_free(dpf_vector._internal_obj, utils.to_char_ptr_ptr_ptr(data), utils.to_int32_ptr(size), modified, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_double_commit(dpf_vector, data, size, modified): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_double_commit(dpf_vector._internal_obj, utils.to_double_ptr(data), utils.to_int32(size), modified, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_int_commit(dpf_vector, data, size, modified): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_int_commit(dpf_vector._internal_obj, utils.to_int32_ptr(data), utils.to_int32(size), modified, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_char_commit(dpf_vector, data, size, modified): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_char_commit(dpf_vector._internal_obj, utils.to_char_ptr(data), utils.to_int32(size), modified, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_char_ptr_commit(dpf_vector, data, size, modified): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_char_ptr_commit(dpf_vector._internal_obj, utils.to_char_ptr_ptr(data), utils.to_int32(size), modified, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_delete(dpf_vector): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_delete(dpf_vector._internal_obj, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_string_free(dpf_vector, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfString_free(dpf_vector, utils.to_char_ptr(data), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_duplicate_dpf_vector(dpf_vector): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_duplicate_dpf_vector(dpf_vector._internal_obj, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_vector_new_for_object(api_to_use): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfVector_new_for_object(api_to_use._internal_obj if api_to_use is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_string_free_for_object(api_to_use, dpf_vector, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DpfString_free_for_object(api_to_use._internal_obj if api_to_use is not None else None, dpf_vector, utils.to_char_ptr(data), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/external_data_abstract_api.py b/src/ansys/dpf/gate/generated/external_data_abstract_api.py new file mode 100644 index 0000000000..e392ee2776 --- /dev/null +++ b/src/ansys/dpf/gate/generated/external_data_abstract_api.py @@ -0,0 +1,25 @@ +#------------------------------------------------------------------------------- +# ExternalData +#------------------------------------------------------------------------------- + +class ExternalDataAbstractAPI: + @staticmethod + def init_external_data_environment(object): + pass + + @staticmethod + def finish_external_data_environment(object): + pass + + @staticmethod + def external_data_wrap(external_data, deleter): + raise NotImplementedError + + @staticmethod + def external_data_free(var1): + raise NotImplementedError + + @staticmethod + def external_data_get(external_data): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/external_data_capi.py b/src/ansys/dpf/gate/generated/external_data_capi.py new file mode 100644 index 0000000000..5dd77ecc94 --- /dev/null +++ b/src/ansys/dpf/gate/generated/external_data_capi.py @@ -0,0 +1,34 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import external_data_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# ExternalData +#------------------------------------------------------------------------------- + +class ExternalDataCAPI(external_data_abstract_api.ExternalDataAbstractAPI): + + @staticmethod + def init_external_data_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def external_data_wrap(external_data, deleter): + res = capi.dll.ExternalData_wrap(external_data, deleter) + return res + + @staticmethod + def external_data_free(var1): + res = capi.dll.ExternalData_free(var1._internal_obj if var1 is not None else None) + return res + + @staticmethod + def external_data_get(external_data): + res = capi.dll.ExternalData_get(external_data._internal_obj if external_data is not None else None) + return res + diff --git a/src/ansys/dpf/gate/generated/external_operator_abstract_api.py b/src/ansys/dpf/gate/generated/external_operator_abstract_api.py new file mode 100644 index 0000000000..368520c708 --- /dev/null +++ b/src/ansys/dpf/gate/generated/external_operator_abstract_api.py @@ -0,0 +1,289 @@ +#------------------------------------------------------------------------------- +# ExternalOperator +#------------------------------------------------------------------------------- + +class ExternalOperatorAbstractAPI: + @staticmethod + def init_external_operator_environment(object): + pass + + @staticmethod + def finish_external_operator_environment(object): + pass + + @staticmethod + def external_operator_record(operator_main, func, operator_identifier, spec): + raise NotImplementedError + + @staticmethod + def external_operator_record_with_abstract_core(operator_main, func, operator_identifier, spec, core): + raise NotImplementedError + + @staticmethod + def external_operator_record_with_abstract_core_and_wrapper(operator_main, func, operator_identifier, spec, core, wrapper): + raise NotImplementedError + + @staticmethod + def external_operator_put_status(operator_data, status): + raise NotImplementedError + + @staticmethod + def external_operator_put_exception(operator_data, error_code, message): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_collection(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_num_inputs(operator_data): + raise NotImplementedError + + @staticmethod + def external_operator_has_input(operator_data, index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_field(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_field(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_fields_container(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_data_sources(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_data_sources(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_scoping(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_scoping(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_scopings_container(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_meshed_region(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_meshed_region(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_time_freq(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_time_freq(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_meshes_container(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_custom_type_fields_container(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_streams(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_streams(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_property_field(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_generic_data_container(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_property_field(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_support(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_data_tree(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_workflow(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_operator(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_external_data(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_as_any(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_remote_workflow(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_remote_operator(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_string_field(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_custom_type_field(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_label_space(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_remote_workflow(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_operator(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_support(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_as_any(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_bool(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_bool(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_int(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_int(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_double(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_double(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_long_long(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_long_long(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_string(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_string(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_vec_int(operator_data, pin_index, size): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_vecint(operator_data, pin_index, data, size): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_vec_double(operator_data, pin_index, size): + raise NotImplementedError + + @staticmethod + def external_operator_get_in_vec_string_as_collection(operator_data, pin_index): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_data_tree(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_workflow(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_generic_data_container(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_result_info(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_string_field(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_custom_type_field(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_external_data(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_put_out_collection_as_vector(operator_data, pin_index, data): + raise NotImplementedError + + @staticmethod + def external_operator_pin_is_of_type(operator_data, pin_index, type_name): + raise NotImplementedError + + @staticmethod + def external_operator_delegate_run(operator_data, other_op, forwardInputs): + raise NotImplementedError + + @staticmethod + def external_operator_connect_all_inputs_to_operator(operator_data, other_op): + raise NotImplementedError + + @staticmethod + def external_operator_get_operator_name(operator_data): + raise NotImplementedError + + @staticmethod + def external_operator_get_operator_config(operator_data): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/external_operator_capi.py b/src/ansys/dpf/gate/generated/external_operator_capi.py new file mode 100644 index 0000000000..a2a6ea9376 --- /dev/null +++ b/src/ansys/dpf/gate/generated/external_operator_capi.py @@ -0,0 +1,640 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import external_operator_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# ExternalOperator +#------------------------------------------------------------------------------- + +class ExternalOperatorCAPI(external_operator_abstract_api.ExternalOperatorAbstractAPI): + + @staticmethod + def init_external_operator_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def external_operator_record(operator_main, func, operator_identifier, spec): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_record(utils.to_void_ptr(operator_main), func, utils.to_char_ptr(operator_identifier), spec._internal_obj if spec is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_record_with_abstract_core(operator_main, func, operator_identifier, spec, core): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_recordWithAbstractCore(utils.to_void_ptr(operator_main), func, utils.to_char_ptr(operator_identifier), spec._internal_obj if spec is not None else None, core, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_record_with_abstract_core_and_wrapper(operator_main, func, operator_identifier, spec, core, wrapper): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_recordWithAbstractCoreAndWrapper(utils.to_void_ptr(operator_main), func, utils.to_char_ptr(operator_identifier), spec._internal_obj if spec is not None else None, core, wrapper, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_status(operator_data, status): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putStatus(operator_data, utils.to_int32(status), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_exception(operator_data, error_code, message): + res = capi.dll.ExternalOperator_putException(operator_data, utils.to_int32(error_code), utils.to_char_ptr(message)) + return res + + @staticmethod + def external_operator_put_out_collection(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutCollection(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_num_inputs(operator_data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getNumInputs(operator_data, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_has_input(operator_data, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_hasInput(operator_data, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_field(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInField(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_field(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutField(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_fields_container(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInFieldsContainer(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_data_sources(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInDataSources(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_data_sources(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutDataSources(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_scoping(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInScoping(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_scoping(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutScoping(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_scopings_container(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInScopingsContainer(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_meshed_region(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInMeshedRegion(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_meshed_region(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutMeshedRegion(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_time_freq(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInTimeFreq(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_time_freq(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutTimeFreq(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_meshes_container(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInMeshesContainer(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_custom_type_fields_container(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInCustomTypeFieldsContainer(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_streams(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInStreams(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_streams(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutStreams(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_property_field(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInPropertyField(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_generic_data_container(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInGenericDataContainer(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_property_field(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutPropertyField(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_support(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInSupport(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_data_tree(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInDataTree(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_workflow(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInWorkflow(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_operator(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInOperator(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_external_data(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInExternalData(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_as_any(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInAsAny(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_remote_workflow(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInRemoteWorkflow(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_remote_operator(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInRemoteOperator(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_string_field(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInStringField(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_custom_type_field(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInCustomTypeField(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_label_space(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInLabelSpace(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_remote_workflow(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutRemoteWorkflow(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_operator(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutOperator(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_support(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutSupport(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_as_any(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutAsAny(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_bool(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInBool(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_bool(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutBool(operator_data, utils.to_int32(pin_index), data, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_int(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInInt(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_int(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutInt(operator_data, utils.to_int32(pin_index), utils.to_int32(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_double(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInDouble(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_double(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutDouble(operator_data, utils.to_int32(pin_index), ctypes.c_double(data) if isinstance(data, float) else data, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_long_long(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInLongLong(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_long_long(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutLongLong(operator_data, utils.to_int32(pin_index), data, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_string(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInString(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def external_operator_put_out_string(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutString(operator_data, utils.to_int32(pin_index), utils.to_char_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_vec_int(operator_data, pin_index, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInVecInt(operator_data, utils.to_int32(pin_index), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_vecint(operator_data, pin_index, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutVecint(operator_data, utils.to_int32(pin_index), utils.to_int32_ptr(data), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_vec_double(operator_data, pin_index, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInVecDouble(operator_data, utils.to_int32(pin_index), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_in_vec_string_as_collection(operator_data, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getInVecStringAsCollection(operator_data, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_data_tree(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutDataTree(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_workflow(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutWorkflow(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_generic_data_container(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutGenericDataContainer(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_result_info(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutResultInfo(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_string_field(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutStringField(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_custom_type_field(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutCustomTypeField(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_external_data(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutExternalData(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_put_out_collection_as_vector(operator_data, pin_index, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_putOutCollectionAsVector(operator_data, utils.to_int32(pin_index), data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_pin_is_of_type(operator_data, pin_index, type_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_pinIsOfType(operator_data, utils.to_int32(pin_index), utils.to_char_ptr(type_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_delegate_run(operator_data, other_op, forwardInputs): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_delegateRun(operator_data, other_op._internal_obj if other_op is not None else None, forwardInputs, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_connect_all_inputs_to_operator(operator_data, other_op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_connectAllInputsToOperator(operator_data, other_op._internal_obj if other_op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def external_operator_get_operator_name(operator_data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getOperatorName(operator_data, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def external_operator_get_operator_config(operator_data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ExternalOperator_getOperatorConfig(operator_data, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/f_e_model_abstract_api.py b/src/ansys/dpf/gate/generated/f_e_model_abstract_api.py new file mode 100644 index 0000000000..daca46ffcc --- /dev/null +++ b/src/ansys/dpf/gate/generated/f_e_model_abstract_api.py @@ -0,0 +1,61 @@ +#------------------------------------------------------------------------------- +# FEModel +#------------------------------------------------------------------------------- + +class FEModelAbstractAPI: + @staticmethod + def init_f_e_model_environment(object): + pass + + @staticmethod + def finish_f_e_model_environment(object): + pass + + @staticmethod + def femodel_new(): + raise NotImplementedError + + @staticmethod + def femodel_new_with_result_file(file_name): + raise NotImplementedError + + @staticmethod + def femodel_new_empty(): + raise NotImplementedError + + @staticmethod + def femodel_delete(feModel): + raise NotImplementedError + + @staticmethod + def femodel_set_result_file_path(feModel, name): + raise NotImplementedError + + @staticmethod + def femodel_add_result(feModel, resDef): + raise NotImplementedError + + @staticmethod + def femodel_add_primary_result(feModel, res): + raise NotImplementedError + + @staticmethod + def femodel_add_result_with_scoping(feModel, res, scoping): + raise NotImplementedError + + @staticmethod + def femodel_delete_result(feModel, result): + raise NotImplementedError + + @staticmethod + def femodel_get_mesh_region(feModel): + raise NotImplementedError + + @staticmethod + def femodel_get_time_freq_support(feModel): + raise NotImplementedError + + @staticmethod + def femodel_get_support_query(feModel): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/f_e_model_capi.py b/src/ansys/dpf/gate/generated/f_e_model_capi.py new file mode 100644 index 0000000000..acf4d965a4 --- /dev/null +++ b/src/ansys/dpf/gate/generated/f_e_model_capi.py @@ -0,0 +1,127 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import f_e_model_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# FEModel +#------------------------------------------------------------------------------- + +class FEModelCAPI(f_e_model_abstract_api.FEModelAbstractAPI): + + @staticmethod + def init_f_e_model_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def femodel_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_new_with_result_file(file_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_new_withResultFile(utils.to_char_ptr(file_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_new_empty(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_new_empty(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_delete(feModel): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_delete(feModel, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_set_result_file_path(feModel, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_SetResultFilePath(feModel, name, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_add_result(feModel, resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_AddResult(feModel, ctypes.byref(resDef), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_add_primary_result(feModel, res): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_AddPrimaryResult(feModel, utils.to_char_ptr(res), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_add_result_with_scoping(feModel, res, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_AddResultWithScoping(feModel, utils.to_char_ptr(res), scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_delete_result(feModel, result): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_DeleteResult(feModel, ctypes.byref(result), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_get_mesh_region(feModel): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_GetMeshRegion(feModel, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_get_time_freq_support(feModel): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_GetTimeFreqSupport(feModel, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def femodel_get_support_query(feModel): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FEModel_GetSupportQuery(feModel, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/field_abstract_api.py b/src/ansys/dpf/gate/generated/field_abstract_api.py new file mode 100644 index 0000000000..cf663196ee --- /dev/null +++ b/src/ansys/dpf/gate/generated/field_abstract_api.py @@ -0,0 +1,329 @@ +#------------------------------------------------------------------------------- +# Field +#------------------------------------------------------------------------------- + +class FieldAbstractAPI: + @staticmethod + def init_field_environment(object): + pass + + @staticmethod + def finish_field_environment(object): + pass + + @staticmethod + def field_delete(field): + raise NotImplementedError + + @staticmethod + def field_get_data(field, size): + raise NotImplementedError + + @staticmethod + def field_get_data_pointer(field, size): + raise NotImplementedError + + @staticmethod + def field_get_scoping(constfield, size): + raise NotImplementedError + + @staticmethod + def field_get_scoping_to_data_pointer_copy(field, scopingToDataPointer): + raise NotImplementedError + + @staticmethod + def field_get_entity_data(field, EntityIndex, size): + raise NotImplementedError + + @staticmethod + def field_get_entity_data_by_id(field, EntityId, size): + raise NotImplementedError + + @staticmethod + def field_get_unit(field): + raise NotImplementedError + + @staticmethod + def field_get_location(field): + raise NotImplementedError + + @staticmethod + def field_get_number_elementary_data(field): + raise NotImplementedError + + @staticmethod + def field_get_number_elementary_data_by_index(field, entityIndex): + raise NotImplementedError + + @staticmethod + def field_get_number_elementary_data_by_id(field, entityId): + raise NotImplementedError + + @staticmethod + def field_get_number_of_components(field): + raise NotImplementedError + + @staticmethod + def field_get_number_of_entities(field): + raise NotImplementedError + + @staticmethod + def field_elementary_data_size(field): + raise NotImplementedError + + @staticmethod + def field_get_data_size(field): + raise NotImplementedError + + @staticmethod + def field_get_eshell_layers(field): + raise NotImplementedError + + @staticmethod + def field_push_back(field, EntityId, size, data): + raise NotImplementedError + + @staticmethod + def csfield_delete(field): + raise NotImplementedError + + @staticmethod + def csfield_get_data(field, size): + raise NotImplementedError + + @staticmethod + def csfield_set_data(field, size, data): + raise NotImplementedError + + @staticmethod + def csfield_set_data_pointer(field, size, data): + raise NotImplementedError + + @staticmethod + def csfield_set_entity_data(field, index, id, size, data): + raise NotImplementedError + + @staticmethod + def csfield_set_support(field, support): + raise NotImplementedError + + @staticmethod + def csfield_set_unit(field, symbol): + raise NotImplementedError + + @staticmethod + def csfield_set_location(field, location): + raise NotImplementedError + + @staticmethod + def csfield_set_meshed_region_as_support(field, support): + raise NotImplementedError + + @staticmethod + def csfield_update_entity_data_by_entity_index(field, EntityIndex, size, data): + raise NotImplementedError + + @staticmethod + def csfield_push_back(field, EntityId, size, data): + raise NotImplementedError + + @staticmethod + def csfield_get_scoping(field, size): + raise NotImplementedError + + @staticmethod + def csfield_get_data_ptr(field, size): + raise NotImplementedError + + @staticmethod + def csfield_get_cscoping(field): + raise NotImplementedError + + @staticmethod + def csfield_get_shared_field_definition(field): + raise NotImplementedError + + @staticmethod + def csfield_get_field_definition(field): + raise NotImplementedError + + @staticmethod + def csfield_get_support(field): + raise NotImplementedError + + @staticmethod + def csfield_get_data_pointer(field, size): + raise NotImplementedError + + @staticmethod + def csfield_set_field_definition(field, field_definition): + raise NotImplementedError + + @staticmethod + def csfield_set_fast_access_field_definition(field, field_definition): + raise NotImplementedError + + @staticmethod + def csfield_set_scoping(field, size, data): + raise NotImplementedError + + @staticmethod + def csfield_set_cscoping(field, scoping): + raise NotImplementedError + + @staticmethod + def csfield_get_entity_data(field, EntityIndex, size): + raise NotImplementedError + + @staticmethod + def csfield_get_entity_data_by_id(field, EntityId, size): + raise NotImplementedError + + @staticmethod + def csfield_get_unit(field): + raise NotImplementedError + + @staticmethod + def csfield_get_location(field): + raise NotImplementedError + + @staticmethod + def csfield_get_number_elementary_data(field): + raise NotImplementedError + + @staticmethod + def csfield_get_number_elementary_data_by_index(field, entityIndex): + raise NotImplementedError + + @staticmethod + def csfield_get_number_elementary_data_by_id(field, entityId): + raise NotImplementedError + + @staticmethod + def csfield_get_number_entities(field): + raise NotImplementedError + + @staticmethod + def csfield_elementary_data_size(field): + raise NotImplementedError + + @staticmethod + def csfield_get_data_size(field): + raise NotImplementedError + + @staticmethod + def csfield_get_eshell_layers(field): + raise NotImplementedError + + @staticmethod + def csfield_set_eshell_layers(field, eshell_layer): + raise NotImplementedError + + @staticmethod + def csfield_resize_data(field, dataSize): + raise NotImplementedError + + @staticmethod + def csfield_get_number_of_components(field): + raise NotImplementedError + + @staticmethod + def csfield_resize(field, dataSize, scopingSize): + raise NotImplementedError + + @staticmethod + def csfield_reserve(field, dataSize, scopingSize): + raise NotImplementedError + + @staticmethod + def csfield_get_name(field): + raise NotImplementedError + + @staticmethod + def csfield_set_name(field, name): + raise NotImplementedError + + @staticmethod + def csfield_get_support_as_meshed_region(field): + raise NotImplementedError + + @staticmethod + def csfield_get_support_as_time_freq_support(field): + raise NotImplementedError + + @staticmethod + def csfield_get_entity_id(field, index): + raise NotImplementedError + + @staticmethod + def csfield_get_entity_index(field, id): + raise NotImplementedError + + @staticmethod + def csfield_get_data_for_dpf_vector(field, var1, data, size): + raise NotImplementedError + + @staticmethod + def csfield_get_data_pointer_for_dpf_vector(field, var1, data, size): + raise NotImplementedError + + @staticmethod + def csfield_get_entity_data_for_dpf_vector(dpf_object, out, data, size, EntityIndex): + raise NotImplementedError + + @staticmethod + def csfield_get_entity_data_by_id_for_dpf_vector(dpf_object, vec, data, size, EntityId): + raise NotImplementedError + + @staticmethod + def field_new(fieldDimensionnality, numEntities, location): + raise NotImplementedError + + @staticmethod + def field_new_with_transformation(fieldDimensionnality, numEntities, location, wf, input_name, output_name): + raise NotImplementedError + + @staticmethod + def field_new_with1_ddimensionnality(fieldDimensionnality, numComp, numEntitiesToReserve, location): + raise NotImplementedError + + @staticmethod + def field_new_with2_ddimensionnality(fieldDimensionnality, numCompN, numCompM, numEntitiesToReserve, location): + raise NotImplementedError + + @staticmethod + def field_get_copy(field, bAllocateData, bCopyData, bscopingHardCopy): + raise NotImplementedError + + @staticmethod + def field_clone_to_different_dimension(field, fieldDimensionnality, numCompN, numCompM, location): + raise NotImplementedError + + @staticmethod + def csfield_cursor(f, index, data, id, size, n_comp, data_index): + raise NotImplementedError + + @staticmethod + def field_fast_access_ptr(field): + raise NotImplementedError + + @staticmethod + def field_fast_cursor(f, index, data, id, size, n_comp, data_index): + raise NotImplementedError + + @staticmethod + def field_new_on_client(client, dimensions, reserved_number_of_entity, loc): + raise NotImplementedError + + @staticmethod + def field_new_with1_ddimensionnality_on_client(client, fieldDimensionnality, numComp, numEntitiesToReserve, location): + raise NotImplementedError + + @staticmethod + def field_new_with2_ddimensionnality_on_client(client, fieldDimensionnality, numCompN, numCompM, numEntitiesToReserve, location): + raise NotImplementedError + + @staticmethod + def field_get_copy_on_client(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/field_capi.py b/src/ansys/dpf/gate/generated/field_capi.py new file mode 100644 index 0000000000..e2b0f2adcd --- /dev/null +++ b/src/ansys/dpf/gate/generated/field_capi.py @@ -0,0 +1,736 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import field_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Field +#------------------------------------------------------------------------------- + +class FieldCAPI(field_abstract_api.FieldAbstractAPI): + + @staticmethod + def init_field_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def field_delete(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_Delete(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_data(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetData(field, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_data_pointer(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetDataPointer(field, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_scoping(constfield, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetScoping(constfield, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_scoping_to_data_pointer_copy(field, scopingToDataPointer): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetScopingToDataPointerCopy(field, utils.to_int32_ptr(scopingToDataPointer), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_entity_data(field, EntityIndex, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetEntityData(field, utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_entity_data_by_id(field, EntityId, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetEntityDataById(field, utils.to_int32(EntityId), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_unit(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetUnit(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def field_get_location(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetLocation(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def field_get_number_elementary_data(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetNumberElementaryData(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_number_elementary_data_by_index(field, entityIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetNumberElementaryDataByIndex(field, utils.to_int32(entityIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_number_elementary_data_by_id(field, entityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetNumberElementaryDataById(field, utils.to_int32(entityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_number_of_components(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetNumberOfComponents(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_number_of_entities(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetNumberOfEntities(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_elementary_data_size(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_ElementaryDataSize(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_data_size(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetDataSize(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_eshell_layers(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_GetEShellLayers(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_push_back(field, EntityId, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_PushBack(field, utils.to_int32(EntityId), utils.to_int32(size), utils.to_double_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_delete(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_Delete(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_data(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetData(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_data(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetData(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_double_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_data_pointer(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetDataPointer(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_entity_data(field, index, id, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetEntityData(field._internal_obj if field is not None else None, utils.to_int32(index), utils.to_int32(id), utils.to_int32(size), utils.to_double_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_support(field, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetSupport(field._internal_obj if field is not None else None, support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_unit(field, symbol): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetUnit(field._internal_obj if field is not None else None, utils.to_char_ptr(symbol), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_location(field, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetLocation(field._internal_obj if field is not None else None, utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_meshed_region_as_support(field, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetMeshedRegionAsSupport(field._internal_obj if field is not None else None, support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_update_entity_data_by_entity_index(field, EntityIndex, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_UpdateEntityDataByEntityIndex(field._internal_obj if field is not None else None, utils.to_int32(EntityIndex), utils.to_int32(size), utils.to_double_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_push_back(field, EntityId, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_PushBack(field._internal_obj if field is not None else None, utils.to_int32(EntityId), utils.to_int32(size), utils.to_double_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_scoping(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetScoping(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_data_ptr(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetDataPtr(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_cscoping(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetCScoping(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_shared_field_definition(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetSharedFieldDefinition(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_field_definition(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetFieldDefinition(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_support(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetSupport(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_data_pointer(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetDataPointer(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_field_definition(field, field_definition): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetFieldDefinition(field._internal_obj if field is not None else None, field_definition._internal_obj if field_definition is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_fast_access_field_definition(field, field_definition): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetFastAccessFieldDefinition(field._internal_obj if field is not None else None, field_definition, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_scoping(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetScoping(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_cscoping(field, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetCScoping(field._internal_obj if field is not None else None, scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_entity_data(field, EntityIndex, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetEntityData(field._internal_obj if field is not None else None, utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_entity_data_by_id(field, EntityId, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetEntityDataById(field._internal_obj if field is not None else None, utils.to_int32(EntityId), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_unit(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetUnit(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csfield_get_location(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetLocation(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csfield_get_number_elementary_data(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetNumberElementaryData(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_number_elementary_data_by_index(field, entityIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetNumberElementaryDataByIndex(field._internal_obj if field is not None else None, utils.to_int32(entityIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_number_elementary_data_by_id(field, entityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetNumberElementaryDataById(field._internal_obj if field is not None else None, utils.to_int32(entityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_number_entities(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetNumberEntities(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_elementary_data_size(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_ElementaryDataSize(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_data_size(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetDataSize(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_eshell_layers(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetEShellLayers(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_set_eshell_layers(field, eshell_layer): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetEShellLayers(field._internal_obj if field is not None else None, utils.to_int32(eshell_layer), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_resize_data(field, dataSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_ResizeData(field._internal_obj if field is not None else None, utils.to_int32(dataSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_number_of_components(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetNumberOfComponents(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_resize(field, dataSize, scopingSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_Resize(field._internal_obj if field is not None else None, utils.to_int32(dataSize), utils.to_int32(scopingSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_reserve(field, dataSize, scopingSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_Reserve(field._internal_obj if field is not None else None, utils.to_int32(dataSize), utils.to_int32(scopingSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_name(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetName(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csfield_set_name(field, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetName(field._internal_obj if field is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_support_as_meshed_region(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetSupportAsMeshedRegion(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_support_as_time_freq_support(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetSupportAsTimeFreqSupport(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_entity_id(field, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetEntityId(field._internal_obj if field is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_entity_index(field, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetEntityIndex(field._internal_obj if field is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_data_for_dpf_vector(field, var1, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetData_For_DpfVector(field._internal_obj if field is not None else None, var1._internal_obj, utils.to_double_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_data_pointer_for_dpf_vector(field, var1, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetDataPointer_For_DpfVector(field._internal_obj if field is not None else None, var1._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_entity_data_for_dpf_vector(dpf_object, out, data, size, EntityIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetEntityData_For_DpfVector(dpf_object._internal_obj if dpf_object is not None else None, out._internal_obj, utils.to_double_ptr_ptr(data), utils.to_int32_ptr(size), utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_get_entity_data_by_id_for_dpf_vector(dpf_object, vec, data, size, EntityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_GetEntityDataById_For_DpfVector(dpf_object._internal_obj if dpf_object is not None else None, vec._internal_obj, utils.to_double_ptr_ptr(data), utils.to_int32_ptr(size), utils.to_int32(EntityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_new(fieldDimensionnality, numEntities, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_new(utils.to_int32(fieldDimensionnality), utils.to_int32(numEntities), utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_new_with_transformation(fieldDimensionnality, numEntities, location, wf, input_name, output_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_newWithTransformation(utils.to_int32(fieldDimensionnality), utils.to_int32(numEntities), utils.to_char_ptr(location), wf._internal_obj if wf is not None else None, utils.to_char_ptr(input_name), utils.to_char_ptr(output_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_new_with1_ddimensionnality(fieldDimensionnality, numComp, numEntitiesToReserve, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_newWith1DDimensionnality(utils.to_int32(fieldDimensionnality), utils.to_int32(numComp), utils.to_int32(numEntitiesToReserve), utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_new_with2_ddimensionnality(fieldDimensionnality, numCompN, numCompM, numEntitiesToReserve, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_newWith2DDimensionnality(utils.to_int32(fieldDimensionnality), utils.to_int32(numCompN), utils.to_int32(numCompM), utils.to_int32(numEntitiesToReserve), utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_copy(field, bAllocateData, bCopyData, bscopingHardCopy): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_getCopy(field._internal_obj if field is not None else None, bAllocateData, bCopyData, bscopingHardCopy, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_clone_to_different_dimension(field, fieldDimensionnality, numCompN, numCompM, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_CloneToDifferentDimension(field._internal_obj if field is not None else None, utils.to_int32(fieldDimensionnality), utils.to_int32(numCompN), utils.to_int32(numCompM), utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_cursor(f, index, data, id, size, n_comp, data_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_cursor(f._internal_obj if f is not None else None, utils.to_int32(index), utils.to_double_ptr_ptr(data), utils.to_int32_ptr(id), utils.to_int32_ptr(size), utils.to_int32_ptr(n_comp), utils.to_int32_ptr(data_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_fast_access_ptr(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_fast_access_ptr(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_fast_cursor(f, index, data, id, size, n_comp, data_index): + res = capi.dll.Field_fast_cursor(f, utils.to_int32(index), utils.to_double_ptr_ptr(data), utils.to_int32_ptr(id), utils.to_int32_ptr(size), utils.to_int32_ptr(n_comp), utils.to_int32_ptr(data_index)) + return res + + @staticmethod + def field_new_on_client(client, dimensions, reserved_number_of_entity, loc): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_new_on_client(client._internal_obj if client is not None else None, utils.to_int32(dimensions), utils.to_int32(reserved_number_of_entity), utils.to_char_ptr(loc), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_new_with1_ddimensionnality_on_client(client, fieldDimensionnality, numComp, numEntitiesToReserve, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_newWith1DDimensionnality_on_client(client._internal_obj if client is not None else None, utils.to_int32(fieldDimensionnality), utils.to_int32(numComp), utils.to_int32(numEntitiesToReserve), utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_new_with2_ddimensionnality_on_client(client, fieldDimensionnality, numCompN, numCompM, numEntitiesToReserve, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_newWith2DDimensionnality_on_client(client._internal_obj if client is not None else None, utils.to_int32(fieldDimensionnality), utils.to_int32(numCompN), utils.to_int32(numCompM), utils.to_int32(numEntitiesToReserve), utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_get_copy_on_client(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Field_getCopy_on_client(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/field_definition_abstract_api.py b/src/ansys/dpf/gate/generated/field_definition_abstract_api.py new file mode 100644 index 0000000000..fb395f4e3b --- /dev/null +++ b/src/ansys/dpf/gate/generated/field_definition_abstract_api.py @@ -0,0 +1,157 @@ +#------------------------------------------------------------------------------- +# FieldDefinition +#------------------------------------------------------------------------------- + +class FieldDefinitionAbstractAPI: + @staticmethod + def init_field_definition_environment(object): + pass + + @staticmethod + def finish_field_definition_environment(object): + pass + + @staticmethod + def field_definition_new(): + raise NotImplementedError + + @staticmethod + def field_definition_wrap(var1): + raise NotImplementedError + + @staticmethod + def field_definition_delete(fielddef): + raise NotImplementedError + + @staticmethod + def field_definition_get_fast_access_ptr(fielddef): + raise NotImplementedError + + @staticmethod + def field_definition_get_unit(res, homogeneity, factor, shift): + raise NotImplementedError + + @staticmethod + def field_definition_fill_unit(fieldDef, symbol, size, homogeneity, factor, shift): + raise NotImplementedError + + @staticmethod + def field_definition_get_shell_layers(res): + raise NotImplementedError + + @staticmethod + def field_definition_get_location(res): + raise NotImplementedError + + @staticmethod + def field_definition_fill_location(fieldDef, location, size): + raise NotImplementedError + + @staticmethod + def field_definition_get_dimensionality(res, nature, size_vsize): + raise NotImplementedError + + @staticmethod + def field_definition_fill_dimensionality(res, dim, nature, size_vsize): + raise NotImplementedError + + @staticmethod + def field_definition_set_unit(fieldDef, symbol, ptrObject, homogeneity, factor, shift): + raise NotImplementedError + + @staticmethod + def field_definition_set_shell_layers(fieldDef, shellLayers): + raise NotImplementedError + + @staticmethod + def field_definition_set_location(fieldDef, location): + raise NotImplementedError + + @staticmethod + def field_definition_set_dimensionality(fieldDef, dim, ptrSize, size_vsize): + raise NotImplementedError + + @staticmethod + def csfield_definition_get_unit(res, homogeneity, factor, shift): + raise NotImplementedError + + @staticmethod + def csfield_definition_fill_unit(fieldDef, symbol, size, homogeneity, factor, shift): + raise NotImplementedError + + @staticmethod + def csfield_definition_get_shell_layers(res): + raise NotImplementedError + + @staticmethod + def csfield_definition_get_location(res): + raise NotImplementedError + + @staticmethod + def csfield_definition_fill_location(fieldDef, location, size): + raise NotImplementedError + + @staticmethod + def csfield_definition_get_dimensionality(res, nature, size_vsize): + raise NotImplementedError + + @staticmethod + def csfield_definition_fill_dimensionality(res, dim, nature, size_vsize): + raise NotImplementedError + + @staticmethod + def csfield_definition_set_unit(fieldDef, symbol, ptrObject, homogeneity, factor, shift): + raise NotImplementedError + + @staticmethod + def csfield_definition_set_shell_layers(fieldDef, shellLayers): + raise NotImplementedError + + @staticmethod + def csfield_definition_set_location(fieldDef, location): + raise NotImplementedError + + @staticmethod + def csfield_definition_set_dimensionality(fieldDef, dim, ptrSize, size_vsize): + raise NotImplementedError + + @staticmethod + def csfield_definition_set_quantity_type(fieldDef, quantityType): + raise NotImplementedError + + @staticmethod + def csfield_definition_get_num_available_quantity_types(fieldDef): + raise NotImplementedError + + @staticmethod + def csfield_definition_get_quantity_type(fieldDef, index): + raise NotImplementedError + + @staticmethod + def csfield_definition_is_of_quantity_type(fieldDef, quantityType): + raise NotImplementedError + + @staticmethod + def csfield_definition_get_name(res): + raise NotImplementedError + + @staticmethod + def csfield_definition_set_name(fieldDef, name): + raise NotImplementedError + + @staticmethod + def csfield_definition_fill_name(fieldDef, name, size): + raise NotImplementedError + + @staticmethod + def dimensionality_get_num_comp(nature, size, vsize): + raise NotImplementedError + + @staticmethod + def field_definition_new_on_client(client): + raise NotImplementedError + + @staticmethod + def dimensionality_get_num_comp_for_object(api_to_use, nature, size, vsize): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/field_definition_capi.py b/src/ansys/dpf/gate/generated/field_definition_capi.py new file mode 100644 index 0000000000..97ef4bae29 --- /dev/null +++ b/src/ansys/dpf/gate/generated/field_definition_capi.py @@ -0,0 +1,355 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import field_definition_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# FieldDefinition +#------------------------------------------------------------------------------- + +class FieldDefinitionCAPI(field_definition_abstract_api.FieldDefinitionAbstractAPI): + + @staticmethod + def init_field_definition_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def field_definition_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_wrap(var1): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_wrap(var1, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_delete(fielddef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_Delete(fielddef._internal_obj if fielddef is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_get_fast_access_ptr(fielddef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_GetFastAccessPtr(fielddef._internal_obj if fielddef is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_get_unit(res, homogeneity, factor, shift): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_GetUnit(res, ctypes.byref(utils.to_int32(homogeneity)), ctypes.byref(ctypes.c_double(factor) if isinstance(factor, float) else factor), ctypes.byref(ctypes.c_double(shift) if isinstance(shift, float) else shift), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def field_definition_fill_unit(fieldDef, symbol, size, homogeneity, factor, shift): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_FillUnit(fieldDef, utils.to_char_ptr(symbol), utils.to_int32_ptr(size), utils.to_int32_ptr(homogeneity), utils.to_double_ptr(factor), utils.to_double_ptr(shift), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_get_shell_layers(res): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_GetShellLayers(res, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_get_location(res): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_GetLocation(res, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def field_definition_fill_location(fieldDef, location, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_FillLocation(fieldDef, utils.to_char_ptr(location), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_get_dimensionality(res, nature, size_vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_GetDimensionality(res, ctypes.byref(utils.to_int32(nature)), ctypes.byref(utils.to_int32(size_vsize)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_fill_dimensionality(res, dim, nature, size_vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_FillDimensionality(res, utils.to_int32_ptr(dim), utils.to_int32_ptr(nature), utils.to_int32_ptr(size_vsize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_set_unit(fieldDef, symbol, ptrObject, homogeneity, factor, shift): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_SetUnit(fieldDef, utils.to_char_ptr(symbol), utils.to_double_ptr(ptrObject), utils.to_int32(homogeneity), ctypes.c_double(factor) if isinstance(factor, float) else factor, ctypes.c_double(shift) if isinstance(shift, float) else shift, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_set_shell_layers(fieldDef, shellLayers): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_SetShellLayers(fieldDef, utils.to_int32(shellLayers), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_set_location(fieldDef, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_SetLocation(fieldDef, utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_set_dimensionality(fieldDef, dim, ptrSize, size_vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_SetDimensionality(fieldDef, utils.to_int32(dim), utils.to_int32_ptr(ptrSize), utils.to_int32(size_vsize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_get_unit(res, homogeneity, factor, shift): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_GetUnit(res._internal_obj if res is not None else None, ctypes.byref(utils.to_int32(homogeneity)), ctypes.byref(ctypes.c_double(factor) if isinstance(factor, float) else factor), ctypes.byref(ctypes.c_double(shift) if isinstance(shift, float) else shift), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csfield_definition_fill_unit(fieldDef, symbol, size, homogeneity, factor, shift): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_FillUnit(fieldDef._internal_obj if fieldDef is not None else None, utils.to_char_ptr(symbol), utils.to_int32_ptr(size), utils.to_int32_ptr(homogeneity), utils.to_double_ptr(factor), utils.to_double_ptr(shift), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_get_shell_layers(res): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_GetShellLayers(res._internal_obj if res is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_get_location(res): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_GetLocation(res._internal_obj if res is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csfield_definition_fill_location(fieldDef, location, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_FillLocation(fieldDef._internal_obj if fieldDef is not None else None, utils.to_char_ptr(location), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_get_dimensionality(res, nature, size_vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_GetDimensionality(res._internal_obj if res is not None else None, ctypes.byref(utils.to_int32(nature)), ctypes.byref(utils.to_int32(size_vsize)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_fill_dimensionality(res, dim, nature, size_vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_FillDimensionality(res._internal_obj if res is not None else None, utils.to_int32_ptr(dim), utils.to_int32_ptr(nature), utils.to_int32_ptr(size_vsize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_set_unit(fieldDef, symbol, ptrObject, homogeneity, factor, shift): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_SetUnit(fieldDef._internal_obj if fieldDef is not None else None, utils.to_char_ptr(symbol), utils.to_double_ptr(ptrObject), utils.to_int32(homogeneity), ctypes.c_double(factor) if isinstance(factor, float) else factor, ctypes.c_double(shift) if isinstance(shift, float) else shift, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_set_shell_layers(fieldDef, shellLayers): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_SetShellLayers(fieldDef._internal_obj if fieldDef is not None else None, utils.to_int32(shellLayers), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_set_location(fieldDef, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_SetLocation(fieldDef._internal_obj if fieldDef is not None else None, utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_set_dimensionality(fieldDef, dim, ptrSize, size_vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_SetDimensionality(fieldDef._internal_obj if fieldDef is not None else None, utils.to_int32(dim), utils.to_int32_ptr(ptrSize), utils.to_int32(size_vsize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_set_quantity_type(fieldDef, quantityType): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_SetQuantityType(fieldDef._internal_obj if fieldDef is not None else None, utils.to_char_ptr(quantityType), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_get_num_available_quantity_types(fieldDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_GetNumAvailableQuantityTypes(fieldDef._internal_obj if fieldDef is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_get_quantity_type(fieldDef, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_GetQuantityType(fieldDef._internal_obj if fieldDef is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csfield_definition_is_of_quantity_type(fieldDef, quantityType): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_IsOfQuantityType(fieldDef._internal_obj if fieldDef is not None else None, utils.to_char_ptr(quantityType), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_get_name(res): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_GetName(res._internal_obj if res is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csfield_definition_set_name(fieldDef, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_SetName(fieldDef._internal_obj if fieldDef is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csfield_definition_fill_name(fieldDef, name, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSFieldDefinition_FillName(fieldDef._internal_obj if fieldDef is not None else None, utils.to_char_ptr(name), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dimensionality_get_num_comp(nature, size, vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Dimensionality_GetNumComp(utils.to_int32(nature), utils.to_int32_ptr(size), utils.to_int32(vsize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def field_definition_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldDefinition_new_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dimensionality_get_num_comp_for_object(api_to_use, nature, size, vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Dimensionality_GetNumComp_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_int32(nature), utils.to_int32_ptr(size), utils.to_int32(vsize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/field_mapping_abstract_api.py b/src/ansys/dpf/gate/generated/field_mapping_abstract_api.py new file mode 100644 index 0000000000..1ca82171fb --- /dev/null +++ b/src/ansys/dpf/gate/generated/field_mapping_abstract_api.py @@ -0,0 +1,21 @@ +#------------------------------------------------------------------------------- +# FieldMapping +#------------------------------------------------------------------------------- + +class FieldMappingAbstractAPI: + @staticmethod + def init_field_mapping_environment(object): + pass + + @staticmethod + def finish_field_mapping_environment(object): + pass + + @staticmethod + def mapping_delete(obj): + raise NotImplementedError + + @staticmethod + def mapping_map(obj, in_field): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/field_mapping_capi.py b/src/ansys/dpf/gate/generated/field_mapping_capi.py new file mode 100644 index 0000000000..47fbf4cdca --- /dev/null +++ b/src/ansys/dpf/gate/generated/field_mapping_capi.py @@ -0,0 +1,37 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import field_mapping_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# FieldMapping +#------------------------------------------------------------------------------- + +class FieldMappingCAPI(field_mapping_abstract_api.FieldMappingAbstractAPI): + + @staticmethod + def init_field_mapping_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def mapping_delete(obj): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Mapping_Delete(obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def mapping_map(obj, in_field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Mapping_Map(obj._internal_obj if obj is not None else None, in_field._internal_obj if in_field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/fields_container_abstract_api.py b/src/ansys/dpf/gate/generated/fields_container_abstract_api.py new file mode 100644 index 0000000000..210a7d29ae --- /dev/null +++ b/src/ansys/dpf/gate/generated/fields_container_abstract_api.py @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------- +# FieldsContainer +#------------------------------------------------------------------------------- + +class FieldsContainerAbstractAPI: + @staticmethod + def init_fields_container_environment(object): + pass + + @staticmethod + def finish_fields_container_environment(object): + pass + + @staticmethod + def fields_container_new(): + raise NotImplementedError + + @staticmethod + def fields_container_delete(fieldContainer): + raise NotImplementedError + + @staticmethod + def fields_container_at(fieldContainer, i, ic): + raise NotImplementedError + + @staticmethod + def fields_container_set_field(fieldContainer, field, fieldId, ic): + raise NotImplementedError + + @staticmethod + def fields_container_get_scoping(fieldContainer, ic, size): + raise NotImplementedError + + @staticmethod + def fields_container_num_fields(fieldContainer): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/fields_container_capi.py b/src/ansys/dpf/gate/generated/fields_container_capi.py new file mode 100644 index 0000000000..9014d85191 --- /dev/null +++ b/src/ansys/dpf/gate/generated/fields_container_capi.py @@ -0,0 +1,73 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import fields_container_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# FieldsContainer +#------------------------------------------------------------------------------- + +class FieldsContainerCAPI(fields_container_abstract_api.FieldsContainerAbstractAPI): + + @staticmethod + def init_fields_container_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def fields_container_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldsContainer_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def fields_container_delete(fieldContainer): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldsContainer_Delete(fieldContainer._internal_obj if fieldContainer is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def fields_container_at(fieldContainer, i, ic): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldsContainer_at(fieldContainer._internal_obj if fieldContainer is not None else None, utils.to_int32(i), utils.to_int32(ic), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def fields_container_set_field(fieldContainer, field, fieldId, ic): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldsContainer_setField(fieldContainer._internal_obj if fieldContainer is not None else None, field._internal_obj if field is not None else None, utils.to_int32(fieldId), utils.to_int32(ic), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def fields_container_get_scoping(fieldContainer, ic, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldsContainer_GetScoping(fieldContainer._internal_obj if fieldContainer is not None else None, utils.to_int32(ic), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def fields_container_num_fields(fieldContainer): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.FieldsContainer_numFields(fieldContainer._internal_obj if fieldContainer is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/generic_data_container_abstract_api.py b/src/ansys/dpf/gate/generated/generic_data_container_abstract_api.py new file mode 100644 index 0000000000..fc44f3b173 --- /dev/null +++ b/src/ansys/dpf/gate/generated/generic_data_container_abstract_api.py @@ -0,0 +1,41 @@ +#------------------------------------------------------------------------------- +# GenericDataContainer +#------------------------------------------------------------------------------- + +class GenericDataContainerAbstractAPI: + @staticmethod + def init_generic_data_container_environment(object): + pass + + @staticmethod + def finish_generic_data_container_environment(object): + pass + + @staticmethod + def generic_data_container_new(): + raise NotImplementedError + + @staticmethod + def generic_data_container_get_property_any(container, name): + raise NotImplementedError + + @staticmethod + def generic_data_container_set_property_any(container, name, any): + raise NotImplementedError + + @staticmethod + def generic_data_container_get_property_types(container): + raise NotImplementedError + + @staticmethod + def generic_data_container_get_property_names(container): + raise NotImplementedError + + @staticmethod + def generic_data_container_new_on_client(client): + raise NotImplementedError + + @staticmethod + def generic_data_container_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/generic_data_container_capi.py b/src/ansys/dpf/gate/generated/generic_data_container_capi.py new file mode 100644 index 0000000000..214d62f1e7 --- /dev/null +++ b/src/ansys/dpf/gate/generated/generic_data_container_capi.py @@ -0,0 +1,82 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import generic_data_container_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# GenericDataContainer +#------------------------------------------------------------------------------- + +class GenericDataContainerCAPI(generic_data_container_abstract_api.GenericDataContainerAbstractAPI): + + @staticmethod + def init_generic_data_container_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def generic_data_container_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericDataContainer_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_data_container_get_property_any(container, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericDataContainer_getPropertyAny(container._internal_obj if container is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_data_container_set_property_any(container, name, any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericDataContainer_setPropertyAny(container._internal_obj if container is not None else None, utils.to_char_ptr(name), any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_data_container_get_property_types(container): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericDataContainer_getPropertyTypes(container._internal_obj if container is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_data_container_get_property_names(container): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericDataContainer_getPropertyNames(container._internal_obj if container is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_data_container_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericDataContainer_new_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_data_container_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericDataContainer_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/generic_support_abstract_api.py b/src/ansys/dpf/gate/generated/generic_support_abstract_api.py new file mode 100644 index 0000000000..5e1ba1a3b0 --- /dev/null +++ b/src/ansys/dpf/gate/generated/generic_support_abstract_api.py @@ -0,0 +1,33 @@ +#------------------------------------------------------------------------------- +# GenericSupport +#------------------------------------------------------------------------------- + +class GenericSupportAbstractAPI: + @staticmethod + def init_generic_support_environment(object): + pass + + @staticmethod + def finish_generic_support_environment(object): + pass + + @staticmethod + def generic_support_new(name): + raise NotImplementedError + + @staticmethod + def generic_support_set_field_support_of_property(support, name, field): + raise NotImplementedError + + @staticmethod + def generic_support_set_property_field_support_of_property(support, name, field): + raise NotImplementedError + + @staticmethod + def generic_support_set_string_field_support_of_property(support, name, field): + raise NotImplementedError + + @staticmethod + def generic_support_new_on_client(client, name): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/generic_support_capi.py b/src/ansys/dpf/gate/generated/generic_support_capi.py new file mode 100644 index 0000000000..99e705217d --- /dev/null +++ b/src/ansys/dpf/gate/generated/generic_support_capi.py @@ -0,0 +1,64 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import generic_support_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# GenericSupport +#------------------------------------------------------------------------------- + +class GenericSupportCAPI(generic_support_abstract_api.GenericSupportAbstractAPI): + + @staticmethod + def init_generic_support_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def generic_support_new(name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericSupport_new(utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_support_set_field_support_of_property(support, name, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericSupport_setFieldSupportOfProperty(support._internal_obj if support is not None else None, utils.to_char_ptr(name), field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_support_set_property_field_support_of_property(support, name, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericSupport_setPropertyFieldSupportOfProperty(support._internal_obj if support is not None else None, utils.to_char_ptr(name), field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_support_set_string_field_support_of_property(support, name, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericSupport_setStringFieldSupportOfProperty(support._internal_obj if support is not None else None, utils.to_char_ptr(name), field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def generic_support_new_on_client(client, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.GenericSupport_new_on_client(client._internal_obj if client is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/label_space_abstract_api.py b/src/ansys/dpf/gate/generated/label_space_abstract_api.py new file mode 100644 index 0000000000..97187e7d0b --- /dev/null +++ b/src/ansys/dpf/gate/generated/label_space_abstract_api.py @@ -0,0 +1,81 @@ +#------------------------------------------------------------------------------- +# LabelSpace +#------------------------------------------------------------------------------- + +class LabelSpaceAbstractAPI: + @staticmethod + def init_label_space_environment(object): + pass + + @staticmethod + def finish_label_space_environment(object): + pass + + @staticmethod + def label_space_new(): + raise NotImplementedError + + @staticmethod + def label_space_delete(space): + raise NotImplementedError + + @staticmethod + def label_space_add_data(space, label, id): + raise NotImplementedError + + @staticmethod + def label_space_set_data(space, label, id): + raise NotImplementedError + + @staticmethod + def label_space_erase_data(space, label): + raise NotImplementedError + + @staticmethod + def label_space_get_size(space): + raise NotImplementedError + + @staticmethod + def label_space_merge_with(space, otherspace): + raise NotImplementedError + + @staticmethod + def label_space_get_labels_value(space, index): + raise NotImplementedError + + @staticmethod + def label_space_get_labels_name(space, index): + raise NotImplementedError + + @staticmethod + def label_space_has_label(space, label): + raise NotImplementedError + + @staticmethod + def label_space_at(space, label): + raise NotImplementedError + + @staticmethod + def list_label_spaces_new(reserved_size): + raise NotImplementedError + + @staticmethod + def list_label_spaces_pushback(list, space): + raise NotImplementedError + + @staticmethod + def list_label_spaces_size(list): + raise NotImplementedError + + @staticmethod + def list_label_spaces_at(list, index): + raise NotImplementedError + + @staticmethod + def label_space_new_for_object(api_to_use): + raise NotImplementedError + + @staticmethod + def list_label_spaces_new_for_object(api_to_use, reserved_size): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/label_space_capi.py b/src/ansys/dpf/gate/generated/label_space_capi.py new file mode 100644 index 0000000000..4512d55fed --- /dev/null +++ b/src/ansys/dpf/gate/generated/label_space_capi.py @@ -0,0 +1,174 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import label_space_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# LabelSpace +#------------------------------------------------------------------------------- + +class LabelSpaceCAPI(label_space_abstract_api.LabelSpaceAbstractAPI): + + @staticmethod + def init_label_space_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def label_space_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_delete(space): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_delete(space._internal_obj if space is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_add_data(space, label, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_AddData(space._internal_obj if space is not None else None, utils.to_char_ptr(label), utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_set_data(space, label, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_SetData(space._internal_obj if space is not None else None, utils.to_char_ptr(label), utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_erase_data(space, label): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_EraseData(space._internal_obj if space is not None else None, utils.to_char_ptr(label), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_get_size(space): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_GetSize(space._internal_obj if space is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_merge_with(space, otherspace): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_MergeWith(space._internal_obj if space is not None else None, otherspace._internal_obj if otherspace is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_get_labels_value(space, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_GetLabelsValue(space._internal_obj if space is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_get_labels_name(space, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_GetLabelsName(space._internal_obj if space is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def label_space_has_label(space, label): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_HasLabel(space._internal_obj if space is not None else None, utils.to_char_ptr(label), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_at(space, label): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_At(space._internal_obj if space is not None else None, utils.to_char_ptr(label), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def list_label_spaces_new(reserved_size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ListLabelSpaces_new(utils.to_int32(reserved_size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def list_label_spaces_pushback(list, space): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ListLabelSpaces_pushback(list._internal_obj if list is not None else None, space._internal_obj if space is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def list_label_spaces_size(list): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ListLabelSpaces_size(list._internal_obj if list is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def list_label_spaces_at(list, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ListLabelSpaces_at(list._internal_obj if list is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def label_space_new_for_object(api_to_use): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.LabelSpace_new_for_object(api_to_use._internal_obj if api_to_use is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def list_label_spaces_new_for_object(api_to_use, reserved_size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ListLabelSpaces_new_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_int32(reserved_size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/materials_container_abstract_api.py b/src/ansys/dpf/gate/generated/materials_container_abstract_api.py new file mode 100644 index 0000000000..527bbde2d7 --- /dev/null +++ b/src/ansys/dpf/gate/generated/materials_container_abstract_api.py @@ -0,0 +1,57 @@ +#------------------------------------------------------------------------------- +# MaterialsContainer +#------------------------------------------------------------------------------- + +class MaterialsContainerAbstractAPI: + @staticmethod + def init_materials_container_environment(object): + pass + + @staticmethod + def finish_materials_container_environment(object): + pass + + @staticmethod + def materials_container_delete(materialscontainer): + raise NotImplementedError + + @staticmethod + def materials_container_get_dpf_mat_ids(materialscontainer, size): + raise NotImplementedError + + @staticmethod + def materials_container_get_vuuidat_dpf_mat_id(materialscontainer, dpfMatId): + raise NotImplementedError + + @staticmethod + def materials_container_get_num_of_materials(materialscontainer): + raise NotImplementedError + + @staticmethod + def materials_container_get_num_available_properties_at_vuuid(materialscontainer, vuuid): + raise NotImplementedError + + @staticmethod + def materials_container_get_property_scripting_name_of_dpf_mat_id_at_index(materialscontainer, dpfmatID, idx): + raise NotImplementedError + + @staticmethod + def materials_container_get_num_available_properties_at_dpf_mat_id(materialscontainer, dpfmatID): + raise NotImplementedError + + @staticmethod + def materials_container_get_material_physic_name_at_vuuid(materialscontainer, vuuid): + raise NotImplementedError + + @staticmethod + def materials_container_get_material_physic_name_at_dpf_mat_id(materialscontainer, dpfmatID): + raise NotImplementedError + + @staticmethod + def materials_container_get_dpf_mat_id_at_material_physic_name(materialscontainer, physicname): + raise NotImplementedError + + @staticmethod + def materials_container_get_dpf_mat_id_at_vuuid(materialscontainer, vuuid): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/materials_container_capi.py b/src/ansys/dpf/gate/generated/materials_container_capi.py new file mode 100644 index 0000000000..07a03b5692 --- /dev/null +++ b/src/ansys/dpf/gate/generated/materials_container_capi.py @@ -0,0 +1,126 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import materials_container_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# MaterialsContainer +#------------------------------------------------------------------------------- + +class MaterialsContainerCAPI(materials_container_abstract_api.MaterialsContainerAbstractAPI): + + @staticmethod + def init_materials_container_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def materials_container_delete(materialscontainer): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_delete(materialscontainer._internal_obj if materialscontainer is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def materials_container_get_dpf_mat_ids(materialscontainer, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetDpfMatIds(materialscontainer._internal_obj if materialscontainer is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def materials_container_get_vuuidat_dpf_mat_id(materialscontainer, dpfMatId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetVUUIDAtDpfMatId(materialscontainer._internal_obj if materialscontainer is not None else None, utils.to_int32(dpfMatId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def materials_container_get_num_of_materials(materialscontainer): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetNumOfMaterials(materialscontainer._internal_obj if materialscontainer is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def materials_container_get_num_available_properties_at_vuuid(materialscontainer, vuuid): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetNumAvailablePropertiesAtVUUID(materialscontainer._internal_obj if materialscontainer is not None else None, utils.to_char_ptr(vuuid), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def materials_container_get_property_scripting_name_of_dpf_mat_id_at_index(materialscontainer, dpfmatID, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetPropertyScriptingNameOfDpfMatIdAtIndex(materialscontainer._internal_obj if materialscontainer is not None else None, utils.to_int32(dpfmatID), utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def materials_container_get_num_available_properties_at_dpf_mat_id(materialscontainer, dpfmatID): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetNumAvailablePropertiesAtDpfMatId(materialscontainer._internal_obj if materialscontainer is not None else None, utils.to_int32(dpfmatID), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def materials_container_get_material_physic_name_at_vuuid(materialscontainer, vuuid): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetMaterialPhysicNameAtVUUID(materialscontainer._internal_obj if materialscontainer is not None else None, utils.to_char_ptr(vuuid), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def materials_container_get_material_physic_name_at_dpf_mat_id(materialscontainer, dpfmatID): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetMaterialPhysicNameAtDpfMatId(materialscontainer._internal_obj if materialscontainer is not None else None, utils.to_int32(dpfmatID), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def materials_container_get_dpf_mat_id_at_material_physic_name(materialscontainer, physicname): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetDpfMatIdAtMaterialPhysicName(materialscontainer._internal_obj if materialscontainer is not None else None, utils.to_char_ptr(physicname), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def materials_container_get_dpf_mat_id_at_vuuid(materialscontainer, vuuid): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MaterialsContainer_GetDpfMatIdAtVUUID(materialscontainer._internal_obj if materialscontainer is not None else None, utils.to_char_ptr(vuuid), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/meshed_region_abstract_api.py b/src/ansys/dpf/gate/generated/meshed_region_abstract_api.py new file mode 100644 index 0000000000..32080b733d --- /dev/null +++ b/src/ansys/dpf/gate/generated/meshed_region_abstract_api.py @@ -0,0 +1,229 @@ +#------------------------------------------------------------------------------- +# MeshedRegion +#------------------------------------------------------------------------------- + +class MeshedRegionAbstractAPI: + @staticmethod + def init_meshed_region_environment(object): + pass + + @staticmethod + def finish_meshed_region_environment(object): + pass + + @staticmethod + def meshed_region_new(): + raise NotImplementedError + + @staticmethod + def meshed_region_delete(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_reserve(meshedRegion, numNodes, numElements): + raise NotImplementedError + + @staticmethod + def meshed_region_get_num_nodes(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_num_elements(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_num_faces(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_shared_nodes_scoping(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_shared_elements_scoping(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_shared_faces_scoping(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_unit(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_has_solid_region(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_has_shell_region(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_has_skin_region(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_has_only_skin_elements(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_has_point_region(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_has_beam_region(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_has_polygons(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_has_polyhedrons(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_node_id(meshedRegion, index): + raise NotImplementedError + + @staticmethod + def meshed_region_get_node_index(meshedRegion, id): + raise NotImplementedError + + @staticmethod + def meshed_region_get_element_id(meshedRegion, index): + raise NotImplementedError + + @staticmethod + def meshed_region_get_element_index(meshedRegion, id): + raise NotImplementedError + + @staticmethod + def meshed_region_get_num_nodes_of_element(meshedRegion, index): + raise NotImplementedError + + @staticmethod + def meshed_region_get_num_corner_nodes_of_element(meshedRegion, index): + raise NotImplementedError + + @staticmethod + def meshed_region_get_adjacent_nodes_of_mid_node_in_element(meshedRegion, eleIndex, indMidodInEle, indCornerNod1InEle, indCornerNod2InEle): + raise NotImplementedError + + @staticmethod + def meshed_region_get_node_id_of_element(meshedRegion, eidx, nidx): + raise NotImplementedError + + @staticmethod + def meshed_region_get_node_coord(meshedRegion, index, coordinate): + raise NotImplementedError + + @staticmethod + def meshed_region_get_element_type(meshedRegion, id, type, index): + raise NotImplementedError + + @staticmethod + def meshed_region_get_element_shape(meshedRegion, id, shape, index): + raise NotImplementedError + + @staticmethod + def meshed_region_set_unit(meshedRegion, unit): + raise NotImplementedError + + @staticmethod + def meshed_region_get_num_available_named_selection(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_named_selection_name(meshedRegion, index): + raise NotImplementedError + + @staticmethod + def meshed_region_get_named_selection_scoping(meshedRegion, name): + raise NotImplementedError + + @staticmethod + def meshed_region_add_node(meshedRegion, xyz, id): + raise NotImplementedError + + @staticmethod + def meshed_region_add_element(meshedRegion, id, size, conn, type): + raise NotImplementedError + + @staticmethod + def meshed_region_add_element_by_shape(meshedRegion, id, size, conn, shape): + raise NotImplementedError + + @staticmethod + def meshed_region_get_property_field(meshedRegion, property_type): + raise NotImplementedError + + @staticmethod + def meshed_region_has_property_field(meshedRegion, property_type): + raise NotImplementedError + + @staticmethod + def meshed_region_get_num_available_property_field(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_get_property_field_name(meshedRegion, index): + raise NotImplementedError + + @staticmethod + def meshed_region_get_coordinates_field(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_fill_name(field, name, size): + raise NotImplementedError + + @staticmethod + def meshed_region_set_name(field, name): + raise NotImplementedError + + @staticmethod + def meshed_region_set_property_field(meshedRegion, name, prop_field): + raise NotImplementedError + + @staticmethod + def meshed_region_set_coordinates_field(meshedRegion, field): + raise NotImplementedError + + @staticmethod + def meshed_region_set_named_selection_scoping(meshedRegion, name, scoping): + raise NotImplementedError + + @staticmethod + def meshed_region_cursor(f, index, data, id, el_type, size): + raise NotImplementedError + + @staticmethod + def meshed_region_fast_access_ptr(meshedRegion): + raise NotImplementedError + + @staticmethod + def meshed_region_fast_add_node(meshedRegion, xyz, id): + raise NotImplementedError + + @staticmethod + def meshed_region_fast_add_element(meshedRegion, id, size, conn, type): + raise NotImplementedError + + @staticmethod + def meshed_region_fast_reserve(meshedRegion, n_nodes, n_elements): + raise NotImplementedError + + @staticmethod + def meshed_region_fast_cursor(f, index, data, id, el_type, size): + raise NotImplementedError + + @staticmethod + def meshed_region_new_on_client(client): + raise NotImplementedError + + @staticmethod + def meshed_region_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/meshed_region_capi.py b/src/ansys/dpf/gate/generated/meshed_region_capi.py new file mode 100644 index 0000000000..388ab21577 --- /dev/null +++ b/src/ansys/dpf/gate/generated/meshed_region_capi.py @@ -0,0 +1,495 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import meshed_region_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# MeshedRegion +#------------------------------------------------------------------------------- + +class MeshedRegionCAPI(meshed_region_abstract_api.MeshedRegionAbstractAPI): + + @staticmethod + def init_meshed_region_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def meshed_region_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_New(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_delete(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_Delete(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_reserve(meshedRegion, numNodes, numElements): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_Reserve(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(numNodes), utils.to_int32(numElements), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_num_nodes(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNumNodes(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_num_elements(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNumElements(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_num_faces(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNumFaces(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_shared_nodes_scoping(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetSharedNodesScoping(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_shared_elements_scoping(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetSharedElementsScoping(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_shared_faces_scoping(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetSharedFacesScoping(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_unit(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetUnit(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def meshed_region_get_has_solid_region(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetHasSolidRegion(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_has_shell_region(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetHasShellRegion(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_has_skin_region(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetHasSkinRegion(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_has_only_skin_elements(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetHasOnlySkinElements(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_has_point_region(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetHasPointRegion(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_has_beam_region(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetHasBeamRegion(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_has_polygons(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetHasPolygons(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_has_polyhedrons(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetHasPolyhedrons(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_node_id(meshedRegion, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNodeId(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_node_index(meshedRegion, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNodeIndex(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_element_id(meshedRegion, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetElementId(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_element_index(meshedRegion, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetElementIndex(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_num_nodes_of_element(meshedRegion, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNumNodesOfElement(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_num_corner_nodes_of_element(meshedRegion, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNumCornerNodesOfElement(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_adjacent_nodes_of_mid_node_in_element(meshedRegion, eleIndex, indMidodInEle, indCornerNod1InEle, indCornerNod2InEle): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetAdjacentNodesOfMidNodeInElement(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(eleIndex), utils.to_int32(indMidodInEle), ctypes.byref(utils.to_int32(indCornerNod1InEle)), ctypes.byref(utils.to_int32(indCornerNod2InEle)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_node_id_of_element(meshedRegion, eidx, nidx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNodeIdOfElement(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(eidx), utils.to_int32(nidx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_node_coord(meshedRegion, index, coordinate): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNodeCoord(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(index), utils.to_int32(coordinate), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_element_type(meshedRegion, id, type, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetElementType(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(type)), ctypes.byref(utils.to_int32(index)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_element_shape(meshedRegion, id, shape, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetElementShape(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(shape)), ctypes.byref(utils.to_int32(index)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_set_unit(meshedRegion, unit): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_SetUnit(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_char_ptr(unit), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_num_available_named_selection(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNumAvailableNamedSelection(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_named_selection_name(meshedRegion, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNamedSelectionName(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def meshed_region_get_named_selection_scoping(meshedRegion, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNamedSelectionScoping(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_add_node(meshedRegion, xyz, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_AddNode(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_double_ptr(xyz), utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_add_element(meshedRegion, id, size, conn, type): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_AddElement(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(id), utils.to_int32(size), utils.to_int32_ptr(conn), utils.to_int32(type), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_add_element_by_shape(meshedRegion, id, size, conn, shape): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_AddElementByShape(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(id), utils.to_int32(size), utils.to_int32_ptr(conn), utils.to_int32(shape), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_property_field(meshedRegion, property_type): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetPropertyField(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_char_ptr(property_type), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_has_property_field(meshedRegion, property_type): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_HasPropertyField(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_char_ptr(property_type), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_num_available_property_field(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetNumAvailablePropertyField(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_property_field_name(meshedRegion, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetPropertyFieldName(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def meshed_region_get_coordinates_field(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_GetCoordinatesField(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_fill_name(field, name, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_FillName(field._internal_obj if field is not None else None, utils.to_char_ptr(name), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_set_name(field, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_SetName(field._internal_obj if field is not None else None, utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_set_property_field(meshedRegion, name, prop_field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_SetPropertyField(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_char_ptr(name), prop_field._internal_obj if prop_field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_set_coordinates_field(meshedRegion, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_SetCoordinatesField(meshedRegion._internal_obj if meshedRegion is not None else None, field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_set_named_selection_scoping(meshedRegion, name, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_SetNamedSelectionScoping(meshedRegion._internal_obj if meshedRegion is not None else None, utils.to_char_ptr(name), scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_cursor(f, index, data, id, el_type, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_cursor(f._internal_obj if f is not None else None, utils.to_int32(index), utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(id), utils.to_int32_ptr(el_type), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_fast_access_ptr(meshedRegion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_fast_access_ptr(meshedRegion._internal_obj if meshedRegion is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_fast_add_node(meshedRegion, xyz, id): + res = capi.dll.MeshedRegion_fast_add_node(meshedRegion, utils.to_double_ptr(xyz), utils.to_int32(id)) + return res + + @staticmethod + def meshed_region_fast_add_element(meshedRegion, id, size, conn, type): + res = capi.dll.MeshedRegion_fast_add_element(meshedRegion, utils.to_int32(id), utils.to_int32(size), utils.to_int32_ptr(conn), utils.to_int32(type)) + return res + + @staticmethod + def meshed_region_fast_reserve(meshedRegion, n_nodes, n_elements): + res = capi.dll.MeshedRegion_fast_reserve(meshedRegion, utils.to_int32(n_nodes), utils.to_int32(n_elements)) + return res + + @staticmethod + def meshed_region_fast_cursor(f, index, data, id, el_type, size): + res = capi.dll.MeshedRegion_fast_cursor(f, utils.to_int32(index), utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(id), utils.to_int32_ptr(el_type), utils.to_int32_ptr(size)) + return res + + @staticmethod + def meshed_region_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_New_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def meshed_region_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.MeshedRegion_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/operator_abstract_api.py b/src/ansys/dpf/gate/generated/operator_abstract_api.py new file mode 100644 index 0000000000..6fc1449b40 --- /dev/null +++ b/src/ansys/dpf/gate/generated/operator_abstract_api.py @@ -0,0 +1,345 @@ +#------------------------------------------------------------------------------- +# Operator +#------------------------------------------------------------------------------- + +class OperatorAbstractAPI: + @staticmethod + def init_operator_environment(object): + pass + + @staticmethod + def finish_operator_environment(object): + pass + + @staticmethod + def operator_new(operatorName): + raise NotImplementedError + + @staticmethod + def operator_get_specification_if_any(operatorName): + raise NotImplementedError + + @staticmethod + def operator_delete(op): + raise NotImplementedError + + @staticmethod + def operator_record_instance(op, transfer_ownership): + raise NotImplementedError + + @staticmethod + def operator_record_with_new_name(existing_identifier, new_identifier, core): + raise NotImplementedError + + @staticmethod + def operator_set_config(op, config): + raise NotImplementedError + + @staticmethod + def operator_get_config(op): + raise NotImplementedError + + @staticmethod + def operator_by_id(id): + raise NotImplementedError + + @staticmethod + def get_operator_id(op): + raise NotImplementedError + + @staticmethod + def dpf_operator_by_name(operatorName): + raise NotImplementedError + + @staticmethod + def dpf_operator_delete(op): + raise NotImplementedError + + @staticmethod + def operator_connect_int(op, iPin, value): + raise NotImplementedError + + @staticmethod + def operator_connect_bool(op, iPin, value): + raise NotImplementedError + + @staticmethod + def operator_connect_double(op, iPin, value): + raise NotImplementedError + + @staticmethod + def operator_connect_string(op, iPin, value): + raise NotImplementedError + + @staticmethod + def operator_connect_scoping(op, iPin, scoping): + raise NotImplementedError + + @staticmethod + def operator_connect_data_sources(op, iPin, dataSources): + raise NotImplementedError + + @staticmethod + def operator_connect_field(op, iPin, value): + raise NotImplementedError + + @staticmethod + def operator_connect_collection(op, iPin, value): + raise NotImplementedError + + @staticmethod + def operator_connect_meshed_region(op, iPin, dataSources): + raise NotImplementedError + + @staticmethod + def operator_connect_vector_int(op, iPin, ptrValue, size): + raise NotImplementedError + + @staticmethod + def operator_connect_vector_double(op, iPin, ptrValue, size): + raise NotImplementedError + + @staticmethod + def operator_connect_collection_as_vector(op, iPin, collection): + raise NotImplementedError + + @staticmethod + def operator_connect_operator_output(op, iPin, value, outputIndex): + raise NotImplementedError + + @staticmethod + def operator_connect_streams(op, iPin, streams): + raise NotImplementedError + + @staticmethod + def operator_connect_property_field(op, iPin, streams): + raise NotImplementedError + + @staticmethod + def operator_connect_string_field(op, iPin, value): + raise NotImplementedError + + @staticmethod + def operator_connect_custom_type_field(op, iPin, value): + raise NotImplementedError + + @staticmethod + def operator_connect_support(op, iPin, support): + raise NotImplementedError + + @staticmethod + def operator_connect_time_freq_support(op, iPin, support): + raise NotImplementedError + + @staticmethod + def operator_connect_workflow(op, iPin, wf): + raise NotImplementedError + + @staticmethod + def operator_connect_cyclic_support(op, iPin, sup): + raise NotImplementedError + + @staticmethod + def operator_connect_ians_dispatch(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_connect_data_tree(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_connect_external_data(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_connect_remote_workflow(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_connect_operator_as_input(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_connect_any(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_connect_label_space(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_connect_generic_data_container(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_connect_result_info(op, iPin, ptr): + raise NotImplementedError + + @staticmethod + def operator_disconnect(op, iPin): + raise NotImplementedError + + @staticmethod + def operator_getoutput_fields_container(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_scopings_container(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_field(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_scoping(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_data_sources(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_field_mapping(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_meshes_container(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_custom_type_fields_container(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_cyclic_support(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_workflow(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_string_field(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_custom_type_field(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_generic_data_container(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_string(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_bytearray(op, iOutput, size): + raise NotImplementedError + + @staticmethod + def operator_getoutput_int(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_double(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_bool(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_time_freq_support(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_meshed_region(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_result_info(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_materials_container(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_streams(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_property_field(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_any_support(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_data_tree(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_operator(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_external_data(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_int_collection(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_double_collection(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_getoutput_as_any(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_has_output_when_evaluated(op, iOutput): + raise NotImplementedError + + @staticmethod + def operator_status(op): + raise NotImplementedError + + @staticmethod + def operator_run(op): + raise NotImplementedError + + @staticmethod + def operator_invalidate(op): + raise NotImplementedError + + @staticmethod + def operator_derivate(op): + raise NotImplementedError + + @staticmethod + def operator_name(op): + raise NotImplementedError + + @staticmethod + def operator_get_status(op): + raise NotImplementedError + + @staticmethod + def operator_new_on_client(operatorName, client): + raise NotImplementedError + + @staticmethod + def operator_get_copy(id, client): + raise NotImplementedError + + @staticmethod + def operator_get_id_for_client(wf): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/operator_capi.py b/src/ansys/dpf/gate/generated/operator_capi.py new file mode 100644 index 0000000000..033cd6ac50 --- /dev/null +++ b/src/ansys/dpf/gate/generated/operator_capi.py @@ -0,0 +1,772 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import operator_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Operator +#------------------------------------------------------------------------------- + +class OperatorCAPI(operator_abstract_api.OperatorAbstractAPI): + + @staticmethod + def init_operator_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def operator_new(operatorName): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_new(utils.to_char_ptr(operatorName), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_get_specification_if_any(operatorName): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getSpecificationIfAny(utils.to_char_ptr(operatorName), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_delete(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_delete(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_record_instance(op, transfer_ownership): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_record_instance(op._internal_obj if op is not None else None, transfer_ownership, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_record_with_new_name(existing_identifier, new_identifier, core): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_record_with_new_name(utils.to_char_ptr(existing_identifier), utils.to_char_ptr(new_identifier), core, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_set_config(op, config): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_set_config(op._internal_obj if op is not None else None, config._internal_obj if config is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_get_config(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_get_config(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_by_id(id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_ById(utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def get_operator_id(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Get_Operator_Id(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_operator_by_name(operatorName): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.dpf_operator_ByName(utils.to_char_ptr(operatorName), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def dpf_operator_delete(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.dpf_Operator_delete(op, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_int(op, iPin, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_int(op._internal_obj if op is not None else None, utils.to_int32(iPin), utils.to_int32(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_bool(op, iPin, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_bool(op._internal_obj if op is not None else None, utils.to_int32(iPin), value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_double(op, iPin, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_double(op._internal_obj if op is not None else None, utils.to_int32(iPin), ctypes.c_double(value) if isinstance(value, float) else value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_string(op, iPin, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_string(op._internal_obj if op is not None else None, utils.to_int32(iPin), utils.to_char_ptr(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_scoping(op, iPin, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Scoping(op._internal_obj if op is not None else None, utils.to_int32(iPin), scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_data_sources(op, iPin, dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_DataSources(op._internal_obj if op is not None else None, utils.to_int32(iPin), dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_field(op, iPin, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Field(op._internal_obj if op is not None else None, utils.to_int32(iPin), value._internal_obj if value is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_collection(op, iPin, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Collection(op._internal_obj if op is not None else None, utils.to_int32(iPin), value._internal_obj if value is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_meshed_region(op, iPin, dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_MeshedRegion(op._internal_obj if op is not None else None, utils.to_int32(iPin), dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_vector_int(op, iPin, ptrValue, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_vector_int(op._internal_obj if op is not None else None, utils.to_int32(iPin), utils.to_int32_ptr(ptrValue), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_vector_double(op, iPin, ptrValue, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_vector_double(op._internal_obj if op is not None else None, utils.to_int32(iPin), utils.to_double_ptr(ptrValue), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_collection_as_vector(op, iPin, collection): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Collection_as_vector(op._internal_obj if op is not None else None, utils.to_int32(iPin), collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_operator_output(op, iPin, value, outputIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_operator_output(op._internal_obj if op is not None else None, utils.to_int32(iPin), value._internal_obj if value is not None else None, utils.to_int32(outputIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_streams(op, iPin, streams): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Streams(op._internal_obj if op is not None else None, utils.to_int32(iPin), streams._internal_obj if streams is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_property_field(op, iPin, streams): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_PropertyField(op._internal_obj if op is not None else None, utils.to_int32(iPin), streams._internal_obj if streams is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_string_field(op, iPin, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_StringField(op._internal_obj if op is not None else None, utils.to_int32(iPin), value._internal_obj if value is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_custom_type_field(op, iPin, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_CustomTypeField(op._internal_obj if op is not None else None, utils.to_int32(iPin), value._internal_obj if value is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_support(op, iPin, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Support(op._internal_obj if op is not None else None, utils.to_int32(iPin), support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_time_freq_support(op, iPin, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_TimeFreqSupport(op._internal_obj if op is not None else None, utils.to_int32(iPin), support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_workflow(op, iPin, wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Workflow(op._internal_obj if op is not None else None, utils.to_int32(iPin), wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_cyclic_support(op, iPin, sup): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_CyclicSupport(op._internal_obj if op is not None else None, utils.to_int32(iPin), sup._internal_obj if sup is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_ians_dispatch(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_IAnsDispatch(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_data_tree(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_DataTree(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr._internal_obj if ptr is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_external_data(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_ExternalData(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr._internal_obj if ptr is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_remote_workflow(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_RemoteWorkflow(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr._internal_obj if ptr is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_operator_as_input(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Operator_as_input(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr._internal_obj if ptr is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_any(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_Any(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr._internal_obj if ptr is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_label_space(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_LabelSpace(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr._internal_obj if ptr is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_generic_data_container(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_GenericDataContainer(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr._internal_obj if ptr is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_connect_result_info(op, iPin, ptr): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_connect_ResultInfo(op._internal_obj if op is not None else None, utils.to_int32(iPin), ptr._internal_obj if ptr is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_disconnect(op, iPin): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_disconnect(op._internal_obj if op is not None else None, utils.to_int32(iPin), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_fields_container(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_FieldsContainer(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_scopings_container(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_ScopingsContainer(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_field(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_Field(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_scoping(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_Scoping(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_data_sources(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_DataSources(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_field_mapping(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_FieldMapping(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_meshes_container(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_MeshesContainer(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_custom_type_fields_container(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_CustomTypeFieldsContainer(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_cyclic_support(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_CyclicSupport(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_workflow(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_Workflow(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_string_field(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_StringField(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_custom_type_field(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_CustomTypeField(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_generic_data_container(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_GenericDataContainer(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_string(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_string(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_getoutput_bytearray(op, iOutput, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_bytearray(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_getoutput_int(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_int(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_double(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_double(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_bool(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_bool(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_time_freq_support(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_timeFreqSupport(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_meshed_region(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_meshedRegion(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_result_info(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_resultInfo(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_materials_container(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_MaterialsContainer(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_streams(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_streams(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_property_field(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_propertyField(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_any_support(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_anySupport(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_data_tree(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_DataTree(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_operator(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_Operator(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_external_data(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_ExternalData(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_int_collection(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_IntCollection(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_double_collection(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_DoubleCollection(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_getoutput_as_any(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getoutput_AsAny(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_has_output_when_evaluated(op, iOutput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_has_output_when_evaluated(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_status(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_status(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_run(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_run(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_invalidate(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_invalidate(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_derivate(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_derivate(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_name(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_name(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_get_status(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_get_status(op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_new_on_client(operatorName, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_new_on_client(utils.to_char_ptr(operatorName), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_get_id_for_client(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_get_id_for_client(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/operator_config_abstract_api.py b/src/ansys/dpf/gate/generated/operator_config_abstract_api.py new file mode 100644 index 0000000000..1ae33f69df --- /dev/null +++ b/src/ansys/dpf/gate/generated/operator_config_abstract_api.py @@ -0,0 +1,69 @@ +#------------------------------------------------------------------------------- +# OperatorConfig +#------------------------------------------------------------------------------- + +class OperatorConfigAbstractAPI: + @staticmethod + def init_operator_config_environment(object): + pass + + @staticmethod + def finish_operator_config_environment(object): + pass + + @staticmethod + def operator_config_default_new(op): + raise NotImplementedError + + @staticmethod + def operator_config_empty_new(): + raise NotImplementedError + + @staticmethod + def operator_config_get_int(config, option): + raise NotImplementedError + + @staticmethod + def operator_config_get_double(config, option): + raise NotImplementedError + + @staticmethod + def operator_config_get_bool(config, option): + raise NotImplementedError + + @staticmethod + def operator_config_set_int(config, option, value): + raise NotImplementedError + + @staticmethod + def operator_config_set_double(config, option, value): + raise NotImplementedError + + @staticmethod + def operator_config_set_bool(config, option, value): + raise NotImplementedError + + @staticmethod + def operator_config_get_num_config(config): + raise NotImplementedError + + @staticmethod + def operator_config_get_config_option_name(config, index): + raise NotImplementedError + + @staticmethod + def operator_config_get_config_option_printable_value(config, index): + raise NotImplementedError + + @staticmethod + def operator_config_has_option(config, option): + raise NotImplementedError + + @staticmethod + def operator_config_default_new_on_client(client, op): + raise NotImplementedError + + @staticmethod + def operator_config_empty_new_on_client(client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/operator_config_capi.py b/src/ansys/dpf/gate/generated/operator_config_capi.py new file mode 100644 index 0000000000..62300e48b4 --- /dev/null +++ b/src/ansys/dpf/gate/generated/operator_config_capi.py @@ -0,0 +1,149 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import operator_config_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# OperatorConfig +#------------------------------------------------------------------------------- + +class OperatorConfigCAPI(operator_config_abstract_api.OperatorConfigAbstractAPI): + + @staticmethod + def init_operator_config_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def operator_config_default_new(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_default_new(utils.to_char_ptr(op), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_empty_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_empty_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_get_int(config, option): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_get_int(config._internal_obj if config is not None else None, utils.to_char_ptr(option), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_get_double(config, option): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_get_double(config._internal_obj if config is not None else None, utils.to_char_ptr(option), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_get_bool(config, option): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_get_bool(config._internal_obj if config is not None else None, utils.to_char_ptr(option), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_set_int(config, option, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_set_int(config._internal_obj if config is not None else None, utils.to_char_ptr(option), utils.to_int32(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_set_double(config, option, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_set_double(config._internal_obj if config is not None else None, utils.to_char_ptr(option), ctypes.c_double(value) if isinstance(value, float) else value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_set_bool(config, option, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_set_bool(config._internal_obj if config is not None else None, utils.to_char_ptr(option), value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_get_num_config(config): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_get_num_config(config._internal_obj if config is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_get_config_option_name(config, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_get_config_option_name(config._internal_obj if config is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_config_get_config_option_printable_value(config, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_get_config_option_printable_value(config._internal_obj if config is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_config_has_option(config, option): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_has_option(config._internal_obj if config is not None else None, utils.to_char_ptr(option), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_default_new_on_client(client, op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_default_new_on_client(client._internal_obj if client is not None else None, utils.to_char_ptr(op), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_config_empty_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.OperatorConfig_empty_new_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/operator_specification_abstract_api.py b/src/ansys/dpf/gate/generated/operator_specification_abstract_api.py new file mode 100644 index 0000000000..76d325445b --- /dev/null +++ b/src/ansys/dpf/gate/generated/operator_specification_abstract_api.py @@ -0,0 +1,133 @@ +#------------------------------------------------------------------------------- +# OperatorSpecification +#------------------------------------------------------------------------------- + +class OperatorSpecificationAbstractAPI: + @staticmethod + def init_operator_specification_environment(object): + pass + + @staticmethod + def finish_operator_specification_environment(object): + pass + + @staticmethod + def operator_specification_new(op): + raise NotImplementedError + + @staticmethod + def operator_empty_specification_new(): + raise NotImplementedError + + @staticmethod + def operator_specification_delete(var1): + raise NotImplementedError + + @staticmethod + def operator_specification_get_description(specification): + raise NotImplementedError + + @staticmethod + def operator_specification_set_description(specification, text): + raise NotImplementedError + + @staticmethod + def operator_specification_set_property(specification, key, value): + raise NotImplementedError + + @staticmethod + def operator_specification_get_num_pins(specification, binput): + raise NotImplementedError + + @staticmethod + def operator_specification_get_pin_name(specification, binput, numPin): + raise NotImplementedError + + @staticmethod + def operator_specification_get_pin_num_type_names(specification, binput, numPin): + raise NotImplementedError + + @staticmethod + def operator_specification_fill_pin_numbers(specification, binput, pins): + raise NotImplementedError + + @staticmethod + def operator_specification_get_pin_type_name(specification, binput, numPin, numType): + raise NotImplementedError + + @staticmethod + def operator_specification_is_pin_optional(specification, binput, numPin): + raise NotImplementedError + + @staticmethod + def operator_specification_get_pin_document(specification, binput, numPin): + raise NotImplementedError + + @staticmethod + def operator_specification_is_pin_ellipsis(specification, binput, numPin): + raise NotImplementedError + + @staticmethod + def operator_specification_get_properties(specification, prop): + raise NotImplementedError + + @staticmethod + def operator_specification_get_num_properties(specification): + raise NotImplementedError + + @staticmethod + def operator_specification_get_property_key(specification, index): + raise NotImplementedError + + @staticmethod + def operator_specification_set_pin(specification, var1, position, name, description, n_types, types, is_optional, is_ellipsis): + raise NotImplementedError + + @staticmethod + def operator_specification_set_pin_derived_class(specification, var1, position, name, description, n_types, types, is_optional, is_ellipsis, derived_type_name): + raise NotImplementedError + + @staticmethod + def operator_specification_add_bool_config_option(specification, option_name, default_value, description): + raise NotImplementedError + + @staticmethod + def operator_specification_add_int_config_option(specification, option_name, default_value, description): + raise NotImplementedError + + @staticmethod + def operator_specification_add_double_config_option(specification, option_name, default_value, description): + raise NotImplementedError + + @staticmethod + def operator_specification_get_num_config_options(specification): + raise NotImplementedError + + @staticmethod + def operator_specification_get_config_name(specification, numOption): + raise NotImplementedError + + @staticmethod + def operator_specification_get_config_num_type_names(specification, numOption): + raise NotImplementedError + + @staticmethod + def operator_specification_get_config_type_name(specification, numOption, numType): + raise NotImplementedError + + @staticmethod + def operator_specification_get_config_printable_default_value(specification, numOption): + raise NotImplementedError + + @staticmethod + def operator_specification_get_config_description(specification, numOption): + raise NotImplementedError + + @staticmethod + def operator_specification_get_pin_derived_class_type_name(specification, binput, numPin): + raise NotImplementedError + + @staticmethod + def operator_specification_new_on_client(client, op): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/operator_specification_capi.py b/src/ansys/dpf/gate/generated/operator_specification_capi.py new file mode 100644 index 0000000000..b98f890d6c --- /dev/null +++ b/src/ansys/dpf/gate/generated/operator_specification_capi.py @@ -0,0 +1,303 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import operator_specification_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# OperatorSpecification +#------------------------------------------------------------------------------- + +class OperatorSpecificationCAPI(operator_specification_abstract_api.OperatorSpecificationAbstractAPI): + + @staticmethod + def init_operator_specification_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def operator_specification_new(op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_new(utils.to_char_ptr(op), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_empty_specification_new(): + res = capi.dll.Operator_empty_specification_new() + return res + + @staticmethod + def operator_specification_delete(var1): + res = capi.dll.Operator_specification_delete(var1._internal_obj if var1 is not None else None) + return res + + @staticmethod + def operator_specification_get_description(specification): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetDescription(specification._internal_obj if specification is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_set_description(specification, text): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_SetDescription(specification._internal_obj if specification is not None else None, utils.to_char_ptr(text), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_set_property(specification, key, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_SetProperty(specification._internal_obj if specification is not None else None, utils.to_char_ptr(key), utils.to_char_ptr(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_num_pins(specification, binput): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetNumPins(specification._internal_obj if specification is not None else None, binput, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_pin_name(specification, binput, numPin): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetPinName(specification._internal_obj if specification is not None else None, binput, utils.to_int32(numPin), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_get_pin_num_type_names(specification, binput, numPin): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetPinNumTypeNames(specification._internal_obj if specification is not None else None, binput, utils.to_int32(numPin), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_fill_pin_numbers(specification, binput, pins): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_FillPinNumbers(specification._internal_obj if specification is not None else None, binput, utils.to_int32_ptr(pins), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_pin_type_name(specification, binput, numPin, numType): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetPinTypeName(specification._internal_obj if specification is not None else None, binput, utils.to_int32(numPin), utils.to_int32(numType), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_is_pin_optional(specification, binput, numPin): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_IsPinOptional(specification._internal_obj if specification is not None else None, binput, utils.to_int32(numPin), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_pin_document(specification, binput, numPin): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetPinDocument(specification._internal_obj if specification is not None else None, binput, utils.to_int32(numPin), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_is_pin_ellipsis(specification, binput, numPin): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_IsPinEllipsis(specification._internal_obj if specification is not None else None, binput, utils.to_int32(numPin), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_properties(specification, prop): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetProperties(specification._internal_obj if specification is not None else None, utils.to_char_ptr(prop), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_get_num_properties(specification): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetNumProperties(specification._internal_obj if specification is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_property_key(specification, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetPropertyKey(specification._internal_obj if specification is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_set_pin(specification, var1, position, name, description, n_types, types, is_optional, is_ellipsis): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_SetPin(specification._internal_obj if specification is not None else None, var1, utils.to_int32(position), utils.to_char_ptr(name), utils.to_char_ptr(description), utils.to_int32(n_types), utils.to_char_ptr_ptr(types), is_optional, is_ellipsis, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_set_pin_derived_class(specification, var1, position, name, description, n_types, types, is_optional, is_ellipsis, derived_type_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_SetPinDerivedClass(specification._internal_obj if specification is not None else None, var1, utils.to_int32(position), utils.to_char_ptr(name), utils.to_char_ptr(description), utils.to_int32(n_types), utils.to_char_ptr_ptr(types), is_optional, is_ellipsis, utils.to_char_ptr(derived_type_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_add_bool_config_option(specification, option_name, default_value, description): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_AddBoolConfigOption(specification._internal_obj if specification is not None else None, utils.to_char_ptr(option_name), default_value, utils.to_char_ptr(description), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_add_int_config_option(specification, option_name, default_value, description): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_AddIntConfigOption(specification._internal_obj if specification is not None else None, utils.to_char_ptr(option_name), utils.to_int32(default_value), utils.to_char_ptr(description), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_add_double_config_option(specification, option_name, default_value, description): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_AddDoubleConfigOption(specification._internal_obj if specification is not None else None, utils.to_char_ptr(option_name), ctypes.c_double(default_value) if isinstance(default_value, float) else default_value, utils.to_char_ptr(description), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_num_config_options(specification): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetNumConfigOptions(specification._internal_obj if specification is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_config_name(specification, numOption): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetConfigName(specification._internal_obj if specification is not None else None, utils.to_int32(numOption), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_get_config_num_type_names(specification, numOption): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetConfigNumTypeNames(specification._internal_obj if specification is not None else None, utils.to_int32(numOption), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def operator_specification_get_config_type_name(specification, numOption, numType): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetConfigTypeName(specification._internal_obj if specification is not None else None, utils.to_int32(numOption), utils.to_int32(numType), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_get_config_printable_default_value(specification, numOption): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetConfigPrintableDefaultValue(specification._internal_obj if specification is not None else None, utils.to_int32(numOption), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_get_config_description(specification, numOption): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetConfigDescription(specification._internal_obj if specification is not None else None, utils.to_int32(numOption), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_get_pin_derived_class_type_name(specification, binput, numPin): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_GetPinDerivedClassTypeName(specification._internal_obj if specification is not None else None, binput, utils.to_int32(numPin), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def operator_specification_new_on_client(client, op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Operator_specification_new_on_client(client._internal_obj if client is not None else None, utils.to_char_ptr(op), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/property_field_abstract_api.py b/src/ansys/dpf/gate/generated/property_field_abstract_api.py new file mode 100644 index 0000000000..20874ee4eb --- /dev/null +++ b/src/ansys/dpf/gate/generated/property_field_abstract_api.py @@ -0,0 +1,165 @@ +#------------------------------------------------------------------------------- +# PropertyField +#------------------------------------------------------------------------------- + +class PropertyFieldAbstractAPI: + @staticmethod + def init_property_field_environment(object): + pass + + @staticmethod + def finish_property_field_environment(object): + pass + + @staticmethod + def property_field_delete(field): + raise NotImplementedError + + @staticmethod + def property_field_get_data(field, size): + raise NotImplementedError + + @staticmethod + def property_field_get_data_pointer(field, size): + raise NotImplementedError + + @staticmethod + def property_field_get_scoping(field, size): + raise NotImplementedError + + @staticmethod + def property_field_get_entity_data(field, EntityIndex, size): + raise NotImplementedError + + @staticmethod + def property_field_get_entity_data_by_id(field, EntityId, size): + raise NotImplementedError + + @staticmethod + def property_field_get_location(field): + raise NotImplementedError + + @staticmethod + def csproperty_field_new(numEntities, data_size): + raise NotImplementedError + + @staticmethod + def csproperty_field_new_with_transformation(numEntities, data_size, wf, input_name, output_name): + raise NotImplementedError + + @staticmethod + def csproperty_field_delete(field): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_data(field, size): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_data_for_dpf_vector(field, out, data, size): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_data_pointer(field, size): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_data_pointer_for_dpf_vector(field, out, data, size): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_cscoping(field): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_entity_data(field, EntityIndex, size): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_entity_data_by_id(field, EntityId, size): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_number_elementary_data(field): + raise NotImplementedError + + @staticmethod + def csproperty_field_elementary_data_size(field): + raise NotImplementedError + + @staticmethod + def csproperty_field_push_back(field, EntityId, size, data): + raise NotImplementedError + + @staticmethod + def csproperty_field_set_data(field, size, data): + raise NotImplementedError + + @staticmethod + def csproperty_field_set_data_pointer(field, size, data): + raise NotImplementedError + + @staticmethod + def csproperty_field_set_scoping(field, size, data): + raise NotImplementedError + + @staticmethod + def csproperty_field_set_cscoping(field, scoping): + raise NotImplementedError + + @staticmethod + def csproperty_field_set_entity_data(field, index, id, size, data): + raise NotImplementedError + + @staticmethod + def csproperty_field_resize(field, dataSize, scopingSize): + raise NotImplementedError + + @staticmethod + def csproperty_field_reserve(field, dataSize, scopingSize): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_entity_data_for_dpf_vector(dpf_object, out, data, size, EntityIndex): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_entity_data_by_id_for_dpf_vector(dpf_object, vec, data, size, EntityId): + raise NotImplementedError + + @staticmethod + def csproperty_get_data_fast(f, index, data, id, size, n_comp): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_location(dpf_object): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_data_size(field): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_entity_id(field, index): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_entity_index(field, id): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_fast_access_ptr(field): + raise NotImplementedError + + @staticmethod + def property_get_data_fast(f, index, data, id, size, n_comp): + raise NotImplementedError + + @staticmethod + def csproperty_field_new_on_client(client, numEntities, data_size): + raise NotImplementedError + + @staticmethod + def csproperty_field_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/property_field_capi.py b/src/ansys/dpf/gate/generated/property_field_capi.py new file mode 100644 index 0000000000..9b6a8e3a33 --- /dev/null +++ b/src/ansys/dpf/gate/generated/property_field_capi.py @@ -0,0 +1,361 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import property_field_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# PropertyField +#------------------------------------------------------------------------------- + +class PropertyFieldCAPI(property_field_abstract_api.PropertyFieldAbstractAPI): + + @staticmethod + def init_property_field_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def property_field_delete(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.PropertyField_Delete(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def property_field_get_data(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.PropertyField_GetData(field, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def property_field_get_data_pointer(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.PropertyField_GetDataPointer(field, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def property_field_get_scoping(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.PropertyField_GetScoping(field, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def property_field_get_entity_data(field, EntityIndex, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.PropertyField_GetEntityData(field, utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def property_field_get_entity_data_by_id(field, EntityId, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.PropertyField_GetEntityDataById(field, utils.to_int32(EntityId), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def property_field_get_location(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.PropertyField_GetLocation(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csproperty_field_new(numEntities, data_size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_new(utils.to_int32(numEntities), utils.to_int32(data_size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_new_with_transformation(numEntities, data_size, wf, input_name, output_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_newWithTransformation(utils.to_int32(numEntities), utils.to_int32(data_size), wf._internal_obj if wf is not None else None, utils.to_char_ptr(input_name), utils.to_char_ptr(output_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_delete(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_Delete(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_data(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetData(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_data_for_dpf_vector(field, out, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetData_For_DpfVector(field._internal_obj if field is not None else None, out._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_data_pointer(field, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetDataPointer(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_data_pointer_for_dpf_vector(field, out, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetDataPointer_For_DpfVector(field._internal_obj if field is not None else None, out._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_cscoping(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetCScoping(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_entity_data(field, EntityIndex, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetEntityData(field._internal_obj if field is not None else None, utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_entity_data_by_id(field, EntityId, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetEntityDataById(field._internal_obj if field is not None else None, utils.to_int32(EntityId), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_number_elementary_data(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetNumberElementaryData(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_elementary_data_size(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_ElementaryDataSize(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_push_back(field, EntityId, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_PushBack(field._internal_obj if field is not None else None, utils.to_int32(EntityId), utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_set_data(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_SetData(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_set_data_pointer(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_SetDataPointer(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_set_scoping(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_SetScoping(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_set_cscoping(field, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_SetCScoping(field._internal_obj if field is not None else None, scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_set_entity_data(field, index, id, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_SetEntityData(field._internal_obj if field is not None else None, utils.to_int32(index), utils.to_int32(id), utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_resize(field, dataSize, scopingSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_Resize(field._internal_obj if field is not None else None, utils.to_int32(dataSize), utils.to_int32(scopingSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_reserve(field, dataSize, scopingSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_Reserve(field._internal_obj if field is not None else None, utils.to_int32(dataSize), utils.to_int32(scopingSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_entity_data_for_dpf_vector(dpf_object, out, data, size, EntityIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetEntityData_For_DpfVector(dpf_object._internal_obj if dpf_object is not None else None, out._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_entity_data_by_id_for_dpf_vector(dpf_object, vec, data, size, EntityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetEntityDataById_For_DpfVector(dpf_object._internal_obj if dpf_object is not None else None, vec._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), utils.to_int32(EntityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_get_data_fast(f, index, data, id, size, n_comp): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSProperty_GetDataFast(f._internal_obj if f is not None else None, utils.to_int32(index), utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(id), utils.to_int32_ptr(size), utils.to_int32_ptr(n_comp), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_location(dpf_object): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetLocation(dpf_object._internal_obj if dpf_object is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def csproperty_field_get_data_size(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetDataSize(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_entity_id(field, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetEntityId(field._internal_obj if field is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_entity_index(field, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetEntityIndex(field._internal_obj if field is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_fast_access_ptr(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_GetFastAccessPtr(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def property_get_data_fast(f, index, data, id, size, n_comp): + res = capi.dll.Property_GetDataFast(f, utils.to_int32(index), utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(id), utils.to_int32_ptr(size), utils.to_int32_ptr(n_comp)) + return res + + @staticmethod + def csproperty_field_new_on_client(client, numEntities, data_size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_new_on_client(client._internal_obj if client is not None else None, utils.to_int32(numEntities), utils.to_int32(data_size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/remote_operator_abstract_api.py b/src/ansys/dpf/gate/generated/remote_operator_abstract_api.py new file mode 100644 index 0000000000..6b2c1a04e5 --- /dev/null +++ b/src/ansys/dpf/gate/generated/remote_operator_abstract_api.py @@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------- +# RemoteOperator +#------------------------------------------------------------------------------- + +class RemoteOperatorAbstractAPI: + @staticmethod + def init_remote_operator_environment(object): + pass + + @staticmethod + def finish_remote_operator_environment(object): + pass + + @staticmethod + def remote_operator_new(streams, remoteId): + raise NotImplementedError + + @staticmethod + def remote_operator_get_streams(remote_wf): + raise NotImplementedError + + @staticmethod + def remote_operator_get_operator_id(remote_wf): + raise NotImplementedError + + @staticmethod + def remote_operator_hold_streams(wf, streams): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/remote_operator_capi.py b/src/ansys/dpf/gate/generated/remote_operator_capi.py new file mode 100644 index 0000000000..87da886f3c --- /dev/null +++ b/src/ansys/dpf/gate/generated/remote_operator_capi.py @@ -0,0 +1,55 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import remote_operator_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# RemoteOperator +#------------------------------------------------------------------------------- + +class RemoteOperatorCAPI(remote_operator_abstract_api.RemoteOperatorAbstractAPI): + + @staticmethod + def init_remote_operator_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def remote_operator_new(streams, remoteId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.RemoteOperator_new(streams._internal_obj if streams is not None else None, utils.to_int32(remoteId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def remote_operator_get_streams(remote_wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.RemoteOperator_get_streams(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def remote_operator_get_operator_id(remote_wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.RemoteOperator_get_operator_id(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def remote_operator_hold_streams(wf, streams): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.RemoteOperator_hold_streams(wf._internal_obj if wf is not None else None, utils.to_int32(streams), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/remote_workflow_abstract_api.py b/src/ansys/dpf/gate/generated/remote_workflow_abstract_api.py new file mode 100644 index 0000000000..e54a382948 --- /dev/null +++ b/src/ansys/dpf/gate/generated/remote_workflow_abstract_api.py @@ -0,0 +1,29 @@ +#------------------------------------------------------------------------------- +# RemoteWorkflow +#------------------------------------------------------------------------------- + +class RemoteWorkflowAbstractAPI: + @staticmethod + def init_remote_workflow_environment(object): + pass + + @staticmethod + def finish_remote_workflow_environment(object): + pass + + @staticmethod + def remote_workflow_new(streams, remoteId): + raise NotImplementedError + + @staticmethod + def remote_workflow_get_workflow_id(remote_wf): + raise NotImplementedError + + @staticmethod + def remote_workflow_get_streams(remote_wf): + raise NotImplementedError + + @staticmethod + def remote_work_flow_delete(remote_wf): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/remote_workflow_capi.py b/src/ansys/dpf/gate/generated/remote_workflow_capi.py new file mode 100644 index 0000000000..e5799aa607 --- /dev/null +++ b/src/ansys/dpf/gate/generated/remote_workflow_capi.py @@ -0,0 +1,55 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import remote_workflow_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# RemoteWorkflow +#------------------------------------------------------------------------------- + +class RemoteWorkflowCAPI(remote_workflow_abstract_api.RemoteWorkflowAbstractAPI): + + @staticmethod + def init_remote_workflow_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def remote_workflow_new(streams, remoteId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.RemoteWorkflow_new(streams._internal_obj if streams is not None else None, utils.to_int32(remoteId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def remote_workflow_get_workflow_id(remote_wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.RemoteWorkflow_get_workflow_id(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def remote_workflow_get_streams(remote_wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.RemoteWorkflow_get_streams(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def remote_work_flow_delete(remote_wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.RemoteWorkFlow_delete(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/result_definition_abstract_api.py b/src/ansys/dpf/gate/generated/result_definition_abstract_api.py new file mode 100644 index 0000000000..e29f99eb65 --- /dev/null +++ b/src/ansys/dpf/gate/generated/result_definition_abstract_api.py @@ -0,0 +1,113 @@ +#------------------------------------------------------------------------------- +# ResultDefinition +#------------------------------------------------------------------------------- + +class ResultDefinitionAbstractAPI: + @staticmethod + def init_result_definition_environment(object): + pass + + @staticmethod + def finish_result_definition_environment(object): + pass + + @staticmethod + def result_definition_new(): + raise NotImplementedError + + @staticmethod + def result_definition_delete(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_criteria(resDef, criteria): + raise NotImplementedError + + @staticmethod + def result_definition_get_criteria(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_sub_criteria(resDef, subCriteria): + raise NotImplementedError + + @staticmethod + def result_definition_get_sub_criteria(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_location(resDef, location): + raise NotImplementedError + + @staticmethod + def result_definition_get_location(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_field_cslocation(resDef, CSlocation): + raise NotImplementedError + + @staticmethod + def result_definition_get_field_cslocation(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_user_cs(resDef, userCS): + raise NotImplementedError + + @staticmethod + def result_definition_get_user_cs(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_mesh_scoping(resDef, scoping): + raise NotImplementedError + + @staticmethod + def result_definition_get_mesh_scoping(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_cyclic_sectors_scoping(resDef, scoping, stageNum): + raise NotImplementedError + + @staticmethod + def result_definition_get_cyclic_sectors_scoping(resDef, stageNum): + raise NotImplementedError + + @staticmethod + def result_definition_set_scoping_by_ids(resDef, location, ids, size): + raise NotImplementedError + + @staticmethod + def result_definition_set_unit(resDef, unit): + raise NotImplementedError + + @staticmethod + def result_definition_get_unit(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_result_file_path(resDef, name): + raise NotImplementedError + + @staticmethod + def result_definition_get_result_file_path(resDef): + raise NotImplementedError + + @staticmethod + def result_definition_set_index_param(resDef, sKeyParam, iParameter): + raise NotImplementedError + + @staticmethod + def result_definition_get_index_param(resDef, sKeyParam, iParameter): + raise NotImplementedError + + @staticmethod + def result_definition_set_coef_param(resDef, sKeyParam, dParameter): + raise NotImplementedError + + @staticmethod + def result_definition_get_coef_param(resDef, sKeyParam, dParameter): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/result_definition_capi.py b/src/ansys/dpf/gate/generated/result_definition_capi.py new file mode 100644 index 0000000000..4e69dc8b37 --- /dev/null +++ b/src/ansys/dpf/gate/generated/result_definition_capi.py @@ -0,0 +1,254 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import result_definition_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# ResultDefinition +#------------------------------------------------------------------------------- + +class ResultDefinitionCAPI(result_definition_abstract_api.ResultDefinitionAbstractAPI): + + @staticmethod + def init_result_definition_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def result_definition_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_delete(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_delete(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_set_criteria(resDef, criteria): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetCriteria(resDef, utils.to_char_ptr(criteria), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_criteria(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetCriteria(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_definition_set_sub_criteria(resDef, subCriteria): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetSubCriteria(resDef, utils.to_char_ptr(subCriteria), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_sub_criteria(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetSubCriteria(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_definition_set_location(resDef, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetLocation(resDef, utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_location(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetLocation(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_definition_set_field_cslocation(resDef, CSlocation): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetFieldCSLocation(resDef, utils.to_char_ptr(CSlocation), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_field_cslocation(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetFieldCSLocation(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_definition_set_user_cs(resDef, userCS): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetUserCS(resDef, utils.to_double_ptr(userCS), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_user_cs(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetUserCS(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_set_mesh_scoping(resDef, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetMeshScoping(resDef, scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_mesh_scoping(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetMeshScoping(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_set_cyclic_sectors_scoping(resDef, scoping, stageNum): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetCyclicSectorsScoping(resDef, scoping._internal_obj if scoping is not None else None, utils.to_int32(stageNum), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_cyclic_sectors_scoping(resDef, stageNum): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetCyclicSectorsScoping(resDef, utils.to_int32(stageNum), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_set_scoping_by_ids(resDef, location, ids, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetScopingByIds(resDef, utils.to_char_ptr(location), utils.to_int32_ptr(ids), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_set_unit(resDef, unit): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetUnit(resDef, utils.to_char_ptr(unit), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_unit(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetUnit(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_definition_set_result_file_path(resDef, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetResultFilePath(resDef, name, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_result_file_path(resDef): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetResultFilePath(resDef, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_set_index_param(resDef, sKeyParam, iParameter): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetIndexParam(resDef, utils.to_char_ptr(sKeyParam), utils.to_int32(iParameter), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_index_param(resDef, sKeyParam, iParameter): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetIndexParam(resDef, utils.to_char_ptr(sKeyParam), ctypes.byref(utils.to_int32(iParameter)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_set_coef_param(resDef, sKeyParam, dParameter): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_SetCoefParam(resDef, utils.to_char_ptr(sKeyParam), ctypes.c_double(dParameter) if isinstance(dParameter, float) else dParameter, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_definition_get_coef_param(resDef, sKeyParam, dParameter): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultDefinition_GetCoefParam(resDef, utils.to_char_ptr(sKeyParam), ctypes.byref(ctypes.c_double(dParameter) if isinstance(dParameter, float) else dParameter), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/result_info_abstract_api.py b/src/ansys/dpf/gate/generated/result_info_abstract_api.py new file mode 100644 index 0000000000..06d284cae9 --- /dev/null +++ b/src/ansys/dpf/gate/generated/result_info_abstract_api.py @@ -0,0 +1,201 @@ +#------------------------------------------------------------------------------- +# ResultInfo +#------------------------------------------------------------------------------- + +class ResultInfoAbstractAPI: + @staticmethod + def init_result_info_environment(object): + pass + + @staticmethod + def finish_result_info_environment(object): + pass + + @staticmethod + def result_info_new(analysis_type, physics_type): + raise NotImplementedError + + @staticmethod + def result_info_delete(res): + raise NotImplementedError + + @staticmethod + def result_info_get_analysis_type(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_physics_type(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_analysis_type_name(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_physics_type_name(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_ansys_unit_system_enum(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_custom_unit_system_strings(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_unit_system_name(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_number_of_results(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_result_number_of_components(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_result_dimensionality_nature(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_result_homogeneity(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_result_homogeneity_name(resultInfo, idx, name): + raise NotImplementedError + + @staticmethod + def result_info_get_result_location(resultInfo, idx, name): + raise NotImplementedError + + @staticmethod + def result_info_get_result_description(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_result_name(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_result_physics_name(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_result_scripting_name(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_result_unit_symbol(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_number_of_sub_results(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_sub_result_name(resultInfo, idx, idx_sub): + raise NotImplementedError + + @staticmethod + def result_info_get_sub_result_operator_name(resultInfo, idx, idx_sub, nqme): + raise NotImplementedError + + @staticmethod + def result_info_get_sub_result_description(resultInfo, idx, idx_sub): + raise NotImplementedError + + @staticmethod + def result_info_get_cyclic_support(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_cyclic_symmetry_type(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_has_cyclic_symmetry(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_fill_result_dimensionality(resultInfo, idx, dim, nature, size_vsize): + raise NotImplementedError + + @staticmethod + def result_info_get_solver_version(resultInfo, majorVersion, minorVersion): + raise NotImplementedError + + @staticmethod + def result_info_get_solve_date_and_time(resultInfo, date, time): + raise NotImplementedError + + @staticmethod + def result_info_get_user_name(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_job_name(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_product_name(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_get_main_title(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_set_unit_system(resultInfo, unit_system): + raise NotImplementedError + + @staticmethod + def result_info_set_custom_unit_system(resultInfo, unit_strings): + raise NotImplementedError + + @staticmethod + def result_info_add_result(resultInfo, operator_name, scripting_name, dim, size_dim, dimnature, location, homogeneity, description): + raise NotImplementedError + + @staticmethod + def result_info_add_qualifiers_for_result(resultInfo, operator_name, qualifiers): + raise NotImplementedError + + @staticmethod + def result_info_add_qualifiers_for_all_results(resultInfo, qualifiers): + raise NotImplementedError + + @staticmethod + def result_info_add_qualifiers_support(resultInfo, qualifier_name, support): + raise NotImplementedError + + @staticmethod + def result_info_get_qualifiers_for_result(resultInfo, idx): + raise NotImplementedError + + @staticmethod + def result_info_get_qualifier_label_support(resultInfo, qualifier): + raise NotImplementedError + + @staticmethod + def result_info_get_available_qualifier_labels_as_string_coll(resultInfo): + raise NotImplementedError + + @staticmethod + def result_info_add_string_property(resultInfo, property_name, property_value): + raise NotImplementedError + + @staticmethod + def result_info_add_int_property(resultInfo, property_name, property_value): + raise NotImplementedError + + @staticmethod + def result_info_get_string_property(resultInfo, property_name): + raise NotImplementedError + + @staticmethod + def result_info_get_int_property(resultInfo, property_name): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/result_info_capi.py b/src/ansys/dpf/gate/generated/result_info_capi.py new file mode 100644 index 0000000000..9de2275c6a --- /dev/null +++ b/src/ansys/dpf/gate/generated/result_info_capi.py @@ -0,0 +1,476 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import result_info_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# ResultInfo +#------------------------------------------------------------------------------- + +class ResultInfoCAPI(result_info_abstract_api.ResultInfoAbstractAPI): + + @staticmethod + def init_result_info_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def result_info_new(analysis_type, physics_type): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_new(utils.to_int32(analysis_type), utils.to_int32(physics_type), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_delete(res): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_delete(res._internal_obj if res is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_analysis_type(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetAnalysisType(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_physics_type(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetPhysicsType(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_analysis_type_name(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetAnalysisTypeName(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_physics_type_name(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetPhysicsTypeName(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_ansys_unit_system_enum(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetAnsysUnitSystemEnum(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_custom_unit_system_strings(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetCustomUnitSystemStrings(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_unit_system_name(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetUnitSystemName(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_number_of_results(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetNumberOfResults(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_result_number_of_components(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultNumberOfComponents(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_result_dimensionality_nature(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultDimensionalityNature(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_result_homogeneity(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultHomogeneity(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_result_homogeneity_name(resultInfo, idx, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultHomogeneityName(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_result_location(resultInfo, idx, name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultLocation(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), utils.to_char_ptr(name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_result_description(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultDescription(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_result_name(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultName(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_result_physics_name(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultPhysicsName(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_result_scripting_name(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultScriptingName(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_result_unit_symbol(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetResultUnitSymbol(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_number_of_sub_results(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetNumberOfSubResults(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_sub_result_name(resultInfo, idx, idx_sub): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetSubResultName(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), utils.to_int32(idx_sub), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_sub_result_operator_name(resultInfo, idx, idx_sub, nqme): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetSubResultOperatorName(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), utils.to_int32(idx_sub), utils.to_char_ptr(nqme), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_sub_result_description(resultInfo, idx, idx_sub): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetSubResultDescription(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), utils.to_int32(idx_sub), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_cyclic_support(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetCyclicSupport(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_cyclic_symmetry_type(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetCyclicSymmetryType(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_has_cyclic_symmetry(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_HasCyclicSymmetry(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_fill_result_dimensionality(resultInfo, idx, dim, nature, size_vsize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_FillResultDimensionality(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), utils.to_int32_ptr(dim), utils.to_int32_ptr(nature), utils.to_int32_ptr(size_vsize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_solver_version(resultInfo, majorVersion, minorVersion): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetSolverVersion(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32_ptr(majorVersion), utils.to_int32_ptr(minorVersion), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_solve_date_and_time(resultInfo, date, time): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetSolveDateAndTime(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32_ptr(date), utils.to_int32_ptr(time), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_user_name(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetUserName(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_job_name(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetJobName(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_product_name(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetProductName(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_main_title(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetMainTitle(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_set_unit_system(resultInfo, unit_system): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_SetUnitSystem(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(unit_system), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_set_custom_unit_system(resultInfo, unit_strings): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_SetCustomUnitSystem(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(unit_strings), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_add_result(resultInfo, operator_name, scripting_name, dim, size_dim, dimnature, location, homogeneity, description): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_AddResult(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(operator_name), utils.to_char_ptr(scripting_name), utils.to_int32_ptr(dim), utils.to_int32(size_dim), utils.to_int32(dimnature), utils.to_char_ptr(location), utils.to_char_ptr(homogeneity), utils.to_char_ptr(description), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_add_qualifiers_for_result(resultInfo, operator_name, qualifiers): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_AddQualifiersForResult(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(operator_name), qualifiers._internal_obj if qualifiers is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_add_qualifiers_for_all_results(resultInfo, qualifiers): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_AddQualifiersForAllResults(resultInfo._internal_obj if resultInfo is not None else None, qualifiers._internal_obj if qualifiers is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_add_qualifiers_support(resultInfo, qualifier_name, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_AddQualifiersSupport(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(qualifier_name), support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_qualifiers_for_result(resultInfo, idx): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetQualifiersForResult(resultInfo._internal_obj if resultInfo is not None else None, utils.to_int32(idx), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_qualifier_label_support(resultInfo, qualifier): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetQualifierLabelSupport(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(qualifier), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_available_qualifier_labels_as_string_coll(resultInfo): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetAvailableQualifierLabelsAsStringColl(resultInfo._internal_obj if resultInfo is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_add_string_property(resultInfo, property_name, property_value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_AddStringProperty(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(property_name), utils.to_char_ptr(property_value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_add_int_property(resultInfo, property_name, property_value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_AddIntProperty(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(property_name), utils.to_int32(property_value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def result_info_get_string_property(resultInfo, property_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetStringProperty(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(property_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def result_info_get_int_property(resultInfo, property_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.ResultInfo_GetIntProperty(resultInfo._internal_obj if resultInfo is not None else None, utils.to_char_ptr(property_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/scoping_abstract_api.py b/src/ansys/dpf/gate/generated/scoping_abstract_api.py new file mode 100644 index 0000000000..a10b1d3569 --- /dev/null +++ b/src/ansys/dpf/gate/generated/scoping_abstract_api.py @@ -0,0 +1,113 @@ +#------------------------------------------------------------------------------- +# Scoping +#------------------------------------------------------------------------------- + +class ScopingAbstractAPI: + @staticmethod + def init_scoping_environment(object): + pass + + @staticmethod + def finish_scoping_environment(object): + pass + + @staticmethod + def scoping_new(): + raise NotImplementedError + + @staticmethod + def scoping_new_with_data(location, ids, size): + raise NotImplementedError + + @staticmethod + def scoping_delete(scoping): + raise NotImplementedError + + @staticmethod + def scoping_set_data(scoping, location, ids, size): + raise NotImplementedError + + @staticmethod + def scoping_get_data(scoping, location, size): + raise NotImplementedError + + @staticmethod + def scoping_set_ids(scoping, ids, size): + raise NotImplementedError + + @staticmethod + def scoping_get_ids(scoping, size): + raise NotImplementedError + + @staticmethod + def scoping_get_ids_for_dpf_vector(scoping, out, data, size): + raise NotImplementedError + + @staticmethod + def scoping_get_size(scoping): + raise NotImplementedError + + @staticmethod + def scoping_set_location(scoping, location): + raise NotImplementedError + + @staticmethod + def scoping_get_location(scoping): + raise NotImplementedError + + @staticmethod + def scoping_set_entity(scoping, id, index): + raise NotImplementedError + + @staticmethod + def scoping_id_by_index(scoping, index): + raise NotImplementedError + + @staticmethod + def scoping_index_by_id(scoping, id): + raise NotImplementedError + + @staticmethod + def scoping_resize(scoping, size): + raise NotImplementedError + + @staticmethod + def scoping_reserve(scoping, size): + raise NotImplementedError + + @staticmethod + def scoping_get_ids_hash(scoping, hash): + raise NotImplementedError + + @staticmethod + def scoping_fast_access_ptr(scoping): + raise NotImplementedError + + @staticmethod + def scoping_fast_get_ids(scoping, size): + raise NotImplementedError + + @staticmethod + def scoping_fast_set_entity(scoping, id, index): + raise NotImplementedError + + @staticmethod + def scoping_fast_id_by_index(scoping, index): + raise NotImplementedError + + @staticmethod + def scoping_fast_index_by_id(scoping, id): + raise NotImplementedError + + @staticmethod + def scoping_fast_get_size(scoping): + raise NotImplementedError + + @staticmethod + def scoping_new_on_client(client): + raise NotImplementedError + + @staticmethod + def scoping_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/scoping_capi.py b/src/ansys/dpf/gate/generated/scoping_capi.py new file mode 100644 index 0000000000..e77679b45c --- /dev/null +++ b/src/ansys/dpf/gate/generated/scoping_capi.py @@ -0,0 +1,226 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import scoping_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Scoping +#------------------------------------------------------------------------------- + +class ScopingCAPI(scoping_abstract_api.ScopingAbstractAPI): + + @staticmethod + def init_scoping_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def scoping_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_new_with_data(location, ids, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_new_WithData(utils.to_char_ptr(location), utils.to_int32_ptr(ids), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_delete(scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_delete(scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_set_data(scoping, location, ids, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_SetData(scoping._internal_obj if scoping is not None else None, utils.to_char_ptr(location), utils.to_int32_ptr(ids), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_get_data(scoping, location, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_GetData(scoping._internal_obj if scoping is not None else None, utils.to_char_ptr_ptr(location), ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_set_ids(scoping, ids, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_SetIds(scoping._internal_obj if scoping is not None else None, utils.to_int32_ptr(ids), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_get_ids(scoping, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_GetIds(scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_get_ids_for_dpf_vector(scoping, out, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_GetIds_For_DpfVector(scoping._internal_obj if scoping is not None else None, out._internal_obj, utils.to_int32_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_get_size(scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_GetSize(scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_set_location(scoping, location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_SetLocation(scoping._internal_obj if scoping is not None else None, utils.to_char_ptr(location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_get_location(scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_GetLocation(scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def scoping_set_entity(scoping, id, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_SetEntity(scoping._internal_obj if scoping is not None else None, utils.to_int32(id), utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_id_by_index(scoping, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_IdByIndex(scoping._internal_obj if scoping is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_index_by_id(scoping, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_IndexById(scoping._internal_obj if scoping is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_resize(scoping, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_Resize(scoping._internal_obj if scoping is not None else None, utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_reserve(scoping, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_Reserve(scoping._internal_obj if scoping is not None else None, utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_get_ids_hash(scoping, hash): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_GetIdsHash(scoping._internal_obj if scoping is not None else None, utils.to_char_ptr(hash), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_fast_access_ptr(scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_fast_access_ptr(scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_fast_get_ids(scoping, size): + res = capi.dll.Scoping_fast_get_ids(scoping, ctypes.byref(utils.to_int32(size))) + return res + + @staticmethod + def scoping_fast_set_entity(scoping, id, index): + res = capi.dll.Scoping_fast_set_entity(scoping, utils.to_int32(id), utils.to_int32(index)) + return res + + @staticmethod + def scoping_fast_id_by_index(scoping, index): + res = capi.dll.Scoping_fast_id_by_index(scoping, utils.to_int32(index)) + return res + + @staticmethod + def scoping_fast_index_by_id(scoping, id): + res = capi.dll.Scoping_fast_index_by_id(scoping, utils.to_int32(id)) + return res + + @staticmethod + def scoping_fast_get_size(scoping): + res = capi.dll.Scoping_fast_get_size(scoping) + return res + + @staticmethod + def scoping_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_new_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def scoping_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/serialization_stream_abstract_api.py b/src/ansys/dpf/gate/generated/serialization_stream_abstract_api.py new file mode 100644 index 0000000000..87b628bc7c --- /dev/null +++ b/src/ansys/dpf/gate/generated/serialization_stream_abstract_api.py @@ -0,0 +1,17 @@ +#------------------------------------------------------------------------------- +# SerializationStream +#------------------------------------------------------------------------------- + +class SerializationStreamAbstractAPI: + @staticmethod + def init_serialization_stream_environment(object): + pass + + @staticmethod + def finish_serialization_stream_environment(object): + pass + + @staticmethod + def serialization_stream_get_output_string(stream, dataSize): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/serialization_stream_capi.py b/src/ansys/dpf/gate/generated/serialization_stream_capi.py new file mode 100644 index 0000000000..a7cc926670 --- /dev/null +++ b/src/ansys/dpf/gate/generated/serialization_stream_capi.py @@ -0,0 +1,30 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import serialization_stream_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# SerializationStream +#------------------------------------------------------------------------------- + +class SerializationStreamCAPI(serialization_stream_abstract_api.SerializationStreamAbstractAPI): + + @staticmethod + def init_serialization_stream_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def serialization_stream_get_output_string(stream, dataSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SerializationStream_getOutputString(stream._internal_obj if stream is not None else None, dataSize, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + diff --git a/src/ansys/dpf/gate/generated/session_abstract_api.py b/src/ansys/dpf/gate/generated/session_abstract_api.py new file mode 100644 index 0000000000..13aa220e70 --- /dev/null +++ b/src/ansys/dpf/gate/generated/session_abstract_api.py @@ -0,0 +1,101 @@ +#------------------------------------------------------------------------------- +# Session +#------------------------------------------------------------------------------- + +class SessionAbstractAPI: + @staticmethod + def init_session_environment(object): + pass + + @staticmethod + def finish_session_environment(object): + pass + + @staticmethod + def session_new(): + raise NotImplementedError + + @staticmethod + def delete_session(session): + raise NotImplementedError + + @staticmethod + def get_session_id(session): + raise NotImplementedError + + @staticmethod + def add_workflow(session, workflow_identifier, workflow): + raise NotImplementedError + + @staticmethod + def get_workflow(session, workflow_identifier): + raise NotImplementedError + + @staticmethod + def get_workflow_by_index(session, index): + raise NotImplementedError + + @staticmethod + def flush_workflows(session): + raise NotImplementedError + + @staticmethod + def get_num_workflow(session): + raise NotImplementedError + + @staticmethod + def set_logger(session, callback): + raise NotImplementedError + + @staticmethod + def set_event_system(session, progress_callback, op_state_callback): + raise NotImplementedError + + @staticmethod + def add_breakpoint(session, workflow, operator_ptr, isAfterExe): + raise NotImplementedError + + @staticmethod + def remove_breakpoint(session, workflow, id): + raise NotImplementedError + + @staticmethod + def resume(session): + raise NotImplementedError + + @staticmethod + def add_event_handler(session, event_handler): + raise NotImplementedError + + @staticmethod + def create_signal_emitter_in_session(session, identifier): + raise NotImplementedError + + @staticmethod + def add_external_event_handler(session, event_handler, cb): + raise NotImplementedError + + @staticmethod + def notify_external_event_handler_destruction(event_handler): + raise NotImplementedError + + @staticmethod + def add_workflow_without_identifier(session, workflow): + raise NotImplementedError + + @staticmethod + def emit_signal(eventEmitter, type, message): + raise NotImplementedError + + @staticmethod + def add_event_handler_type(session, type, datatree): + raise NotImplementedError + + @staticmethod + def add_signal_emitter_type(session, type, identifier, datatree): + raise NotImplementedError + + @staticmethod + def session_new_on_client(client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/session_capi.py b/src/ansys/dpf/gate/generated/session_capi.py new file mode 100644 index 0000000000..7ea2e3d70f --- /dev/null +++ b/src/ansys/dpf/gate/generated/session_capi.py @@ -0,0 +1,221 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import session_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Session +#------------------------------------------------------------------------------- + +class SessionCAPI(session_abstract_api.SessionAbstractAPI): + + @staticmethod + def init_session_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def session_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.sessionNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def delete_session(session): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.deleteSession(session._internal_obj if session is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def get_session_id(session): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.getSessionId(session._internal_obj if session is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def add_workflow(session, workflow_identifier, workflow): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.addWorkflow(session._internal_obj if session is not None else None, utils.to_char_ptr(workflow_identifier), workflow._internal_obj if workflow is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def get_workflow(session, workflow_identifier): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.getWorkflow(session._internal_obj if session is not None else None, utils.to_char_ptr(workflow_identifier), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def get_workflow_by_index(session, index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.getWorkflowByIndex(session._internal_obj if session is not None else None, utils.to_int32(index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def flush_workflows(session): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.flushWorkflows(session._internal_obj if session is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def get_num_workflow(session): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.getNumWorkflow(session._internal_obj if session is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def set_logger(session, callback): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.setLogger(session._internal_obj if session is not None else None, callback, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def set_event_system(session, progress_callback, op_state_callback): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.setEventSystem(session._internal_obj if session is not None else None, progress_callback, op_state_callback, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def add_breakpoint(session, workflow, operator_ptr, isAfterExe): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.addBreakpoint(session._internal_obj if session is not None else None, workflow._internal_obj if workflow is not None else None, operator_ptr._internal_obj if operator_ptr is not None else None, isAfterExe, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def remove_breakpoint(session, workflow, id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.removeBreakpoint(session._internal_obj if session is not None else None, workflow._internal_obj if workflow is not None else None, utils.to_int32(id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def resume(session): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.resume(session._internal_obj if session is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def add_event_handler(session, event_handler): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.addEventHandler(session._internal_obj if session is not None else None, event_handler._internal_obj if event_handler is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def create_signal_emitter_in_session(session, identifier): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.createSignalEmitterInSession(session._internal_obj if session is not None else None, utils.to_char_ptr(identifier), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def add_external_event_handler(session, event_handler, cb): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.addExternalEventHandler(session._internal_obj if session is not None else None, utils.to_void_ptr(event_handler), cb, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def notify_external_event_handler_destruction(event_handler): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.NotifyExternalEventHandlerDestruction(utils.to_void_ptr(event_handler), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def add_workflow_without_identifier(session, workflow): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.addWorkflowWithoutIdentifier(session._internal_obj if session is not None else None, workflow._internal_obj if workflow is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def emit_signal(eventEmitter, type, message): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.emitSignal(eventEmitter._internal_obj if eventEmitter is not None else None, utils.to_int32(type), utils.to_char_ptr(message), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def add_event_handler_type(session, type, datatree): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.addEventHandlerType(session._internal_obj if session is not None else None, utils.to_char_ptr(type), datatree._internal_obj if datatree is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def add_signal_emitter_type(session, type, identifier, datatree): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.addSignalEmitterType(session._internal_obj if session is not None else None, utils.to_char_ptr(type), utils.to_char_ptr(identifier), datatree._internal_obj if datatree is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def session_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.sessionNew_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/specification_externalization_abstract_api.py b/src/ansys/dpf/gate/generated/specification_externalization_abstract_api.py new file mode 100644 index 0000000000..d5e939cc09 --- /dev/null +++ b/src/ansys/dpf/gate/generated/specification_externalization_abstract_api.py @@ -0,0 +1,25 @@ +#------------------------------------------------------------------------------- +# SpecificationExternalization +#------------------------------------------------------------------------------- + +class SpecificationExternalizationAbstractAPI: + @staticmethod + def init_specification_externalization_environment(object): + pass + + @staticmethod + def finish_specification_externalization_environment(object): + pass + + @staticmethod + def specification_xml_export(filepath): + raise NotImplementedError + + @staticmethod + def specification_xml_import(filepath): + raise NotImplementedError + + @staticmethod + def set_specification_in_core(registry): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/specification_externalization_capi.py b/src/ansys/dpf/gate/generated/specification_externalization_capi.py new file mode 100644 index 0000000000..6d47004d79 --- /dev/null +++ b/src/ansys/dpf/gate/generated/specification_externalization_capi.py @@ -0,0 +1,46 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import specification_externalization_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# SpecificationExternalization +#------------------------------------------------------------------------------- + +class SpecificationExternalizationCAPI(specification_externalization_abstract_api.SpecificationExternalizationAbstractAPI): + + @staticmethod + def init_specification_externalization_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def specification_xml_export(filepath): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Specification_xml_export(utils.to_char_ptr(filepath), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def specification_xml_import(filepath): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Specification_xml_import(utils.to_char_ptr(filepath), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def set_specification_in_core(registry): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.setSpecificationInCore(registry, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/streams_abstract_api.py b/src/ansys/dpf/gate/generated/streams_abstract_api.py new file mode 100644 index 0000000000..43a8afd281 --- /dev/null +++ b/src/ansys/dpf/gate/generated/streams_abstract_api.py @@ -0,0 +1,49 @@ +#------------------------------------------------------------------------------- +# Streams +#------------------------------------------------------------------------------- + +class StreamsAbstractAPI: + @staticmethod + def init_streams_environment(object): + pass + + @staticmethod + def finish_streams_environment(object): + pass + + @staticmethod + def streams_delete(streams): + raise NotImplementedError + + @staticmethod + def streams_release_handles(streams): + raise NotImplementedError + + @staticmethod + def streams_new(dataSources): + raise NotImplementedError + + @staticmethod + def streams_add_external_stream(streams, streamTypeName, filePath, releaseFileFunc, deleteFunc, var1): + raise NotImplementedError + + @staticmethod + def streams_get_external_stream(streams, key): + raise NotImplementedError + + @staticmethod + def streams_add_external_stream_with_label_space(streams, streamTypeName, filePath, releaseFileFunc, deleteFunc, var1, labelspace): + raise NotImplementedError + + @staticmethod + def streams_get_external_stream_with_label_space(streams, labelspace): + raise NotImplementedError + + @staticmethod + def streams_get_data_sources(streams): + raise NotImplementedError + + @staticmethod + def streams_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/streams_capi.py b/src/ansys/dpf/gate/generated/streams_capi.py new file mode 100644 index 0000000000..7849a2a814 --- /dev/null +++ b/src/ansys/dpf/gate/generated/streams_capi.py @@ -0,0 +1,100 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import streams_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Streams +#------------------------------------------------------------------------------- + +class StreamsCAPI(streams_abstract_api.StreamsAbstractAPI): + + @staticmethod + def init_streams_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def streams_delete(streams): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_delete(streams._internal_obj if streams is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def streams_release_handles(streams): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_ReleaseHandles(streams._internal_obj if streams is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def streams_new(dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_new(dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def streams_add_external_stream(streams, streamTypeName, filePath, releaseFileFunc, deleteFunc, var1): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_addExternalStream(streams._internal_obj if streams is not None else None, utils.to_char_ptr(streamTypeName), utils.to_char_ptr(filePath), releaseFileFunc, deleteFunc, utils.to_void_ptr(var1), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def streams_get_external_stream(streams, key): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_getExternalStream(streams._internal_obj if streams is not None else None, utils.to_char_ptr(key), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def streams_add_external_stream_with_label_space(streams, streamTypeName, filePath, releaseFileFunc, deleteFunc, var1, labelspace): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_addExternalStreamWithLabelSpace(streams._internal_obj if streams is not None else None, utils.to_char_ptr(streamTypeName), utils.to_char_ptr(filePath), releaseFileFunc, deleteFunc, utils.to_void_ptr(var1), labelspace._internal_obj if labelspace is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def streams_get_external_stream_with_label_space(streams, labelspace): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_getExternalStreamWithLabelSpace(streams._internal_obj if streams is not None else None, labelspace._internal_obj if labelspace is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def streams_get_data_sources(streams): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_getDataSources(streams._internal_obj if streams is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def streams_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Streams_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/string_field_abstract_api.py b/src/ansys/dpf/gate/generated/string_field_abstract_api.py new file mode 100644 index 0000000000..0f46732b5a --- /dev/null +++ b/src/ansys/dpf/gate/generated/string_field_abstract_api.py @@ -0,0 +1,77 @@ +#------------------------------------------------------------------------------- +# StringField +#------------------------------------------------------------------------------- + +class StringFieldAbstractAPI: + @staticmethod + def init_string_field_environment(object): + pass + + @staticmethod + def finish_string_field_environment(object): + pass + + @staticmethod + def string_field_delete(field): + raise NotImplementedError + + @staticmethod + def string_field_get_entity_data(field, EntityIndex): + raise NotImplementedError + + @staticmethod + def string_field_get_number_entities(field): + raise NotImplementedError + + @staticmethod + def csstring_field_new(numEntities, data_size): + raise NotImplementedError + + @staticmethod + def csstring_field_get_data_for_dpf_vector(field, out, data, size): + raise NotImplementedError + + @staticmethod + def csstring_field_get_entity_data_for_dpf_vector(dpf_object, out, data, size, EntityIndex): + raise NotImplementedError + + @staticmethod + def csstring_field_get_entity_data_by_id_for_dpf_vector(dpf_object, vec, data, size, EntityId): + raise NotImplementedError + + @staticmethod + def csstring_field_get_cscoping(field): + raise NotImplementedError + + @staticmethod + def csstring_field_get_data_size(field): + raise NotImplementedError + + @staticmethod + def csstring_field_set_data(field, size, data): + raise NotImplementedError + + @staticmethod + def csstring_field_set_cscoping(field, scoping): + raise NotImplementedError + + @staticmethod + def csstring_field_push_back(field, EntityId, size, data): + raise NotImplementedError + + @staticmethod + def csstring_field_resize(field, dataSize, scopingSize): + raise NotImplementedError + + @staticmethod + def csstring_field_reserve(field, dataSize, scopingSize): + raise NotImplementedError + + @staticmethod + def csstring_field_new_on_client(client, numEntities, data_size): + raise NotImplementedError + + @staticmethod + def csstring_field_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/string_field_capi.py b/src/ansys/dpf/gate/generated/string_field_capi.py new file mode 100644 index 0000000000..bf3373c558 --- /dev/null +++ b/src/ansys/dpf/gate/generated/string_field_capi.py @@ -0,0 +1,165 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import string_field_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# StringField +#------------------------------------------------------------------------------- + +class StringFieldCAPI(string_field_abstract_api.StringFieldAbstractAPI): + + @staticmethod + def init_string_field_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def string_field_delete(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.StringField_Delete(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def string_field_get_entity_data(field, EntityIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.StringField_GetEntityData(field, utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def string_field_get_number_entities(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.StringField_GetNumberEntities(field, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_new(numEntities, data_size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_new(utils.to_int32(numEntities), utils.to_int32(data_size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_get_data_for_dpf_vector(field, out, data, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_GetData_For_DpfVector(field._internal_obj if field is not None else None, out._internal_obj, utils.to_char_ptr_ptr_ptr(data), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_get_entity_data_for_dpf_vector(dpf_object, out, data, size, EntityIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_GetEntityData_For_DpfVector(dpf_object._internal_obj if dpf_object is not None else None, out._internal_obj, utils.to_char_ptr_ptr_ptr(data), utils.to_int32_ptr(size), utils.to_int32(EntityIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_get_entity_data_by_id_for_dpf_vector(dpf_object, vec, data, size, EntityId): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_GetEntityDataById_For_DpfVector(dpf_object._internal_obj if dpf_object is not None else None, vec._internal_obj, utils.to_char_ptr_ptr_ptr(data), utils.to_int32_ptr(size), utils.to_int32(EntityId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_get_cscoping(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_GetCScoping(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_get_data_size(field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_GetDataSize(field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_set_data(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_SetData(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_char_ptr_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_set_cscoping(field, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_SetCScoping(field._internal_obj if field is not None else None, scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_push_back(field, EntityId, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_PushBack(field._internal_obj if field is not None else None, utils.to_int32(EntityId), utils.to_int32(size), utils.to_char_ptr_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_resize(field, dataSize, scopingSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_Resize(field._internal_obj if field is not None else None, utils.to_int32(dataSize), utils.to_int32(scopingSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_reserve(field, dataSize, scopingSize): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_Reserve(field._internal_obj if field is not None else None, utils.to_int32(dataSize), utils.to_int32(scopingSize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_new_on_client(client, numEntities, data_size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_new_on_client(client._internal_obj if client is not None else None, utils.to_int32(numEntities), utils.to_int32(data_size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csstring_field_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/support_abstract_api.py b/src/ansys/dpf/gate/generated/support_abstract_api.py new file mode 100644 index 0000000000..6914fa69fb --- /dev/null +++ b/src/ansys/dpf/gate/generated/support_abstract_api.py @@ -0,0 +1,61 @@ +#------------------------------------------------------------------------------- +# Support +#------------------------------------------------------------------------------- + +class SupportAbstractAPI: + @staticmethod + def init_support_environment(object): + pass + + @staticmethod + def finish_support_environment(object): + pass + + @staticmethod + def support_delete(support): + raise NotImplementedError + + @staticmethod + def support_is_domain_mesh_support(support): + raise NotImplementedError + + @staticmethod + def support_set_as_domain_mesh_support(support, meshed_region): + raise NotImplementedError + + @staticmethod + def support_get_as_meshed_support(support): + raise NotImplementedError + + @staticmethod + def support_get_as_cyclic_support(support): + raise NotImplementedError + + @staticmethod + def support_get_as_time_freq_support(support): + raise NotImplementedError + + @staticmethod + def support_get_field_support_by_property(support, prop_name): + raise NotImplementedError + + @staticmethod + def support_get_property_field_support_by_property(support, prop_name): + raise NotImplementedError + + @staticmethod + def support_get_string_field_support_by_property(support, prop_name): + raise NotImplementedError + + @staticmethod + def support_get_property_names_as_string_coll_for_fields(support): + raise NotImplementedError + + @staticmethod + def support_get_property_names_as_string_coll_for_property_fields(support): + raise NotImplementedError + + @staticmethod + def support_get_property_names_as_string_coll_for_string_fields(support): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/support_capi.py b/src/ansys/dpf/gate/generated/support_capi.py new file mode 100644 index 0000000000..2f38121342 --- /dev/null +++ b/src/ansys/dpf/gate/generated/support_capi.py @@ -0,0 +1,127 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import support_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Support +#------------------------------------------------------------------------------- + +class SupportCAPI(support_abstract_api.SupportAbstractAPI): + + @staticmethod + def init_support_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def support_delete(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_delete(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_is_domain_mesh_support(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_isDomainMeshSupport(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_set_as_domain_mesh_support(support, meshed_region): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_setAsDomainMeshSupport(support._internal_obj if support is not None else None, meshed_region._internal_obj if meshed_region is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_as_meshed_support(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getAsMeshedSupport(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_as_cyclic_support(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getAsCyclicSupport(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_as_time_freq_support(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getAsTimeFreqSupport(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_field_support_by_property(support, prop_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getFieldSupportByProperty(support._internal_obj if support is not None else None, utils.to_char_ptr(prop_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_property_field_support_by_property(support, prop_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getPropertyFieldSupportByProperty(support._internal_obj if support is not None else None, utils.to_char_ptr(prop_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_string_field_support_by_property(support, prop_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getStringFieldSupportByProperty(support._internal_obj if support is not None else None, utils.to_char_ptr(prop_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_property_names_as_string_coll_for_fields(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getPropertyNamesAsStringCollForFields(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_property_names_as_string_coll_for_property_fields(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getPropertyNamesAsStringCollForPropertyFields(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_get_property_names_as_string_coll_for_string_fields(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Support_getPropertyNamesAsStringCollForStringFields(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/support_query_abstract_api.py b/src/ansys/dpf/gate/generated/support_query_abstract_api.py new file mode 100644 index 0000000000..6725b36fb9 --- /dev/null +++ b/src/ansys/dpf/gate/generated/support_query_abstract_api.py @@ -0,0 +1,45 @@ +#------------------------------------------------------------------------------- +# SupportQuery +#------------------------------------------------------------------------------- + +class SupportQueryAbstractAPI: + @staticmethod + def init_support_query_environment(object): + pass + + @staticmethod + def finish_support_query_environment(object): + pass + + @staticmethod + def support_query_all_entities(supportQuery, requested_location): + raise NotImplementedError + + @staticmethod + def support_query_scoping_by_property(supportQuery, requested_location, prop_name, prop_number): + raise NotImplementedError + + @staticmethod + def support_query_rescoping_by_property(supportQuery, scoping, prop_name, prop_number): + raise NotImplementedError + + @staticmethod + def support_query_scoping_by_named_selection(supportQuery, requested_location, namedSelection): + raise NotImplementedError + + @staticmethod + def support_query_transpose_scoping(supportQuery, scoping, bInclusive): + raise NotImplementedError + + @staticmethod + def support_query_topology_by_scoping(supportQuery, scoping, topologyRequest): + raise NotImplementedError + + @staticmethod + def support_query_data_by_scoping(supportQuery, scoping, domainsDataRequest): + raise NotImplementedError + + @staticmethod + def support_query_string_field(supportQuery, strRequest): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/support_query_capi.py b/src/ansys/dpf/gate/generated/support_query_capi.py new file mode 100644 index 0000000000..90de69b175 --- /dev/null +++ b/src/ansys/dpf/gate/generated/support_query_capi.py @@ -0,0 +1,91 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import support_query_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# SupportQuery +#------------------------------------------------------------------------------- + +class SupportQueryCAPI(support_query_abstract_api.SupportQueryAbstractAPI): + + @staticmethod + def init_support_query_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def support_query_all_entities(supportQuery, requested_location): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SupportQuery_AllEntities(supportQuery, utils.to_char_ptr(requested_location), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_query_scoping_by_property(supportQuery, requested_location, prop_name, prop_number): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SupportQuery_ScopingByProperty(supportQuery, utils.to_char_ptr(requested_location), utils.to_char_ptr(prop_name), utils.to_int32(prop_number), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_query_rescoping_by_property(supportQuery, scoping, prop_name, prop_number): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SupportQuery_RescopingByProperty(supportQuery, scoping._internal_obj if scoping is not None else None, utils.to_char_ptr(prop_name), utils.to_int32(prop_number), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_query_scoping_by_named_selection(supportQuery, requested_location, namedSelection): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SupportQuery_ScopingByNamedSelection(supportQuery, utils.to_char_ptr(requested_location), namedSelection, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_query_transpose_scoping(supportQuery, scoping, bInclusive): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SupportQuery_TransposeScoping(supportQuery, scoping._internal_obj if scoping is not None else None, bInclusive, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_query_topology_by_scoping(supportQuery, scoping, topologyRequest): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SupportQuery_TopologyByScoping(supportQuery, scoping._internal_obj if scoping is not None else None, utils.to_char_ptr(topologyRequest), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_query_data_by_scoping(supportQuery, scoping, domainsDataRequest): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SupportQuery_DataByScoping(supportQuery, scoping._internal_obj if scoping is not None else None, utils.to_char_ptr(domainsDataRequest), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def support_query_string_field(supportQuery, strRequest): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.SupportQuery_StringField(supportQuery, utils.to_char_ptr(strRequest), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/time_freq_support_abstract_api.py b/src/ansys/dpf/gate/generated/time_freq_support_abstract_api.py new file mode 100644 index 0000000000..8a16d65880 --- /dev/null +++ b/src/ansys/dpf/gate/generated/time_freq_support_abstract_api.py @@ -0,0 +1,113 @@ +#------------------------------------------------------------------------------- +# TimeFreqSupport +#------------------------------------------------------------------------------- + +class TimeFreqSupportAbstractAPI: + @staticmethod + def init_time_freq_support_environment(object): + pass + + @staticmethod + def finish_time_freq_support_environment(object): + pass + + @staticmethod + def time_freq_support_new(): + raise NotImplementedError + + @staticmethod + def time_freq_support_delete(support): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_number_sets(timeFreq): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_number_singular_sets(timeFreq): + raise NotImplementedError + + @staticmethod + def time_freq_support_set_shared_time_freqs(timeFreq, field): + raise NotImplementedError + + @staticmethod + def time_freq_support_set_shared_imaginary_freqs(timeFreq, field): + raise NotImplementedError + + @staticmethod + def time_freq_support_set_shared_rpms(timeFreq, field): + raise NotImplementedError + + @staticmethod + def time_freq_support_set_harmonic_indices(timeFreq, field, stageNum): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_shared_time_freqs(timeFreq): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_shared_imaginary_freqs(timeFreq): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_shared_rpms(timeFreq): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_shared_harmonic_indices(timeFreq, stage): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_shared_harmonic_indices_scoping(timeFreq): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_value(timeFreq, dVal, i1, i2): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_value_and_load_step(timeFreq, dVal, loadStep, i1, i2): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_step(timeFreq, step, subStep): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_imaginary_freqs_cummulative_index(timeFreq, dVal, i1, i2): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_time_freq_by_step(timeFreq, stepIndex, subStepIndex): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_imaginary_freq_by_step(timeFreq, stepIndex, subStepIndex): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_time_freq_by_cumul_index(timeFreq, iCumulativeIndex): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_imaginary_freq_by_cumul_index(timeFreq, iCumulativeIndex): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_cyclic_harmonic_index(timeFreq, iCumulativeIndex): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_step_and_sub_step(timeFreq, iCumulativeIndex, step, substep): + raise NotImplementedError + + @staticmethod + def time_freq_support_new_on_client(client): + raise NotImplementedError + + @staticmethod + def time_freq_support_get_copy(id, client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/time_freq_support_capi.py b/src/ansys/dpf/gate/generated/time_freq_support_capi.py new file mode 100644 index 0000000000..1a2e22a9f9 --- /dev/null +++ b/src/ansys/dpf/gate/generated/time_freq_support_capi.py @@ -0,0 +1,244 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import time_freq_support_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# TimeFreqSupport +#------------------------------------------------------------------------------- + +class TimeFreqSupportCAPI(time_freq_support_abstract_api.TimeFreqSupportAbstractAPI): + + @staticmethod + def init_time_freq_support_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def time_freq_support_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_delete(support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_delete(support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_number_sets(timeFreq): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetNumberSets(timeFreq._internal_obj if timeFreq is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_number_singular_sets(timeFreq): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetNumberSingularSets(timeFreq._internal_obj if timeFreq is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_set_shared_time_freqs(timeFreq, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_SetSharedTimeFreqs(timeFreq._internal_obj if timeFreq is not None else None, field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_set_shared_imaginary_freqs(timeFreq, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_SetSharedImaginaryFreqs(timeFreq._internal_obj if timeFreq is not None else None, field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_set_shared_rpms(timeFreq, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_SetSharedRpms(timeFreq._internal_obj if timeFreq is not None else None, field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_set_harmonic_indices(timeFreq, field, stageNum): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_SetHarmonicIndices(timeFreq._internal_obj if timeFreq is not None else None, field._internal_obj if field is not None else None, utils.to_int32(stageNum), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_shared_time_freqs(timeFreq): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetSharedTimeFreqs(timeFreq._internal_obj if timeFreq is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_shared_imaginary_freqs(timeFreq): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetSharedImaginaryFreqs(timeFreq._internal_obj if timeFreq is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_shared_rpms(timeFreq): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetSharedRpms(timeFreq._internal_obj if timeFreq is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_shared_harmonic_indices(timeFreq, stage): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetSharedHarmonicIndices(timeFreq._internal_obj if timeFreq is not None else None, utils.to_int32(stage), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_shared_harmonic_indices_scoping(timeFreq): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetSharedHarmonicIndicesScoping(timeFreq._internal_obj if timeFreq is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_value(timeFreq, dVal, i1, i2): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByValue(timeFreq._internal_obj if timeFreq is not None else None, ctypes.c_double(dVal) if isinstance(dVal, float) else dVal, ctypes.byref(utils.to_int32(i1)), ctypes.byref(utils.to_int32(i2)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_value_and_load_step(timeFreq, dVal, loadStep, i1, i2): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByValueAndLoadStep(timeFreq._internal_obj if timeFreq is not None else None, ctypes.c_double(dVal) if isinstance(dVal, float) else dVal, utils.to_int32(loadStep), ctypes.byref(utils.to_int32(i1)), ctypes.byref(utils.to_int32(i2)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_step(timeFreq, step, subStep): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetTimeFreqCummulativeIndexByStep(timeFreq._internal_obj if timeFreq is not None else None, utils.to_int32(step), utils.to_int32(subStep), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_imaginary_freqs_cummulative_index(timeFreq, dVal, i1, i2): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetImaginaryFreqsCummulativeIndex(timeFreq._internal_obj if timeFreq is not None else None, ctypes.c_double(dVal) if isinstance(dVal, float) else dVal, ctypes.byref(utils.to_int32(i1)), ctypes.byref(utils.to_int32(i2)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_time_freq_by_step(timeFreq, stepIndex, subStepIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetTimeFreqByStep(timeFreq._internal_obj if timeFreq is not None else None, utils.to_int32(stepIndex), utils.to_int32(subStepIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_imaginary_freq_by_step(timeFreq, stepIndex, subStepIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetImaginaryFreqByStep(timeFreq._internal_obj if timeFreq is not None else None, utils.to_int32(stepIndex), utils.to_int32(subStepIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_time_freq_by_cumul_index(timeFreq, iCumulativeIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetTimeFreqByCumulIndex(timeFreq._internal_obj if timeFreq is not None else None, utils.to_int32(iCumulativeIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_imaginary_freq_by_cumul_index(timeFreq, iCumulativeIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetImaginaryFreqByCumulIndex(timeFreq._internal_obj if timeFreq is not None else None, utils.to_int32(iCumulativeIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_cyclic_harmonic_index(timeFreq, iCumulativeIndex): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetCyclicHarmonicIndex(timeFreq._internal_obj if timeFreq is not None else None, utils.to_int32(iCumulativeIndex), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_step_and_sub_step(timeFreq, iCumulativeIndex, step, substep): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_GetStepAndSubStep(timeFreq._internal_obj if timeFreq is not None else None, utils.to_int32(iCumulativeIndex), ctypes.byref(utils.to_int32(step)), ctypes.byref(utils.to_int32(substep)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_new_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def time_freq_support_get_copy(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TimeFreqSupport_getCopy(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/tmp_dir_abstract_api.py b/src/ansys/dpf/gate/generated/tmp_dir_abstract_api.py new file mode 100644 index 0000000000..dc00512f5b --- /dev/null +++ b/src/ansys/dpf/gate/generated/tmp_dir_abstract_api.py @@ -0,0 +1,25 @@ +#------------------------------------------------------------------------------- +# TmpDir +#------------------------------------------------------------------------------- + +class TmpDirAbstractAPI: + @staticmethod + def init_tmp_dir_environment(object): + pass + + @staticmethod + def finish_tmp_dir_environment(object): + pass + + @staticmethod + def tmp_dir_get_dir(): + raise NotImplementedError + + @staticmethod + def tmp_dir_erase(): + raise NotImplementedError + + @staticmethod + def tmp_dir_get_dir_on_client(client): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/tmp_dir_capi.py b/src/ansys/dpf/gate/generated/tmp_dir_capi.py new file mode 100644 index 0000000000..d5de0abb3d --- /dev/null +++ b/src/ansys/dpf/gate/generated/tmp_dir_capi.py @@ -0,0 +1,50 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import tmp_dir_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# TmpDir +#------------------------------------------------------------------------------- + +class TmpDirCAPI(tmp_dir_abstract_api.TmpDirAbstractAPI): + + @staticmethod + def init_tmp_dir_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def tmp_dir_get_dir(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TmpDir_getDir(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def tmp_dir_erase(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TmpDir_erase(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def tmp_dir_get_dir_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.TmpDir_getDir_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + diff --git a/src/ansys/dpf/gate/generated/unit_abstract_api.py b/src/ansys/dpf/gate/generated/unit_abstract_api.py new file mode 100644 index 0000000000..c0eabdadfb --- /dev/null +++ b/src/ansys/dpf/gate/generated/unit_abstract_api.py @@ -0,0 +1,53 @@ +#------------------------------------------------------------------------------- +# Unit +#------------------------------------------------------------------------------- + +class UnitAbstractAPI: + @staticmethod + def init_unit_environment(object): + pass + + @staticmethod + def finish_unit_environment(object): + pass + + @staticmethod + def unit_get_homogeneity(pre_allocated_char_64, symbol): + raise NotImplementedError + + @staticmethod + def unit_get_conversion_factor(from_, to): + raise NotImplementedError + + @staticmethod + def unit_get_conversion_shift(from_, to): + raise NotImplementedError + + @staticmethod + def unit_are_homogeneous(from_, to): + raise NotImplementedError + + @staticmethod + def unit_get_symbol(pre_allocated_char_64, homogeneity, unit_system_id): + raise NotImplementedError + + @staticmethod + def unit_get_homogeneity_for_object(api_to_use, pre_allocated_char_64, symbol): + raise NotImplementedError + + @staticmethod + def unit_get_conversion_factor_for_object(api_to_use, from_, to): + raise NotImplementedError + + @staticmethod + def unit_get_conversion_shift_for_object(api_to_use, from_, to): + raise NotImplementedError + + @staticmethod + def unit_are_homogeneous_for_object(api_to_use, from_, to): + raise NotImplementedError + + @staticmethod + def unit_get_symbol_for_object(api_to_use, pre_allocated_char_64, homogeneity, unit_system_id): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/unit_capi.py b/src/ansys/dpf/gate/generated/unit_capi.py new file mode 100644 index 0000000000..4c3f79ba07 --- /dev/null +++ b/src/ansys/dpf/gate/generated/unit_capi.py @@ -0,0 +1,109 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import unit_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Unit +#------------------------------------------------------------------------------- + +class UnitCAPI(unit_abstract_api.UnitAbstractAPI): + + @staticmethod + def init_unit_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def unit_get_homogeneity(pre_allocated_char_64, symbol): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_GetHomogeneity(utils.to_char_ptr(pre_allocated_char_64), utils.to_char_ptr(symbol), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_get_conversion_factor(from_, to): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_GetConversionFactor(utils.to_char_ptr(from_), utils.to_char_ptr(to), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_get_conversion_shift(from_, to): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_GetConversionShift(utils.to_char_ptr(from_), utils.to_char_ptr(to), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_are_homogeneous(from_, to): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_AreHomogeneous(utils.to_char_ptr(from_), utils.to_char_ptr(to), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_get_symbol(pre_allocated_char_64, homogeneity, unit_system_id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_getSymbol(utils.to_char_ptr(pre_allocated_char_64), utils.to_char_ptr(homogeneity), utils.to_int32(unit_system_id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_get_homogeneity_for_object(api_to_use, pre_allocated_char_64, symbol): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_GetHomogeneity_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_char_ptr(pre_allocated_char_64), utils.to_char_ptr(symbol), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_get_conversion_factor_for_object(api_to_use, from_, to): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_GetConversionFactor_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_char_ptr(from_), utils.to_char_ptr(to), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_get_conversion_shift_for_object(api_to_use, from_, to): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_GetConversionShift_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_char_ptr(from_), utils.to_char_ptr(to), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_are_homogeneous_for_object(api_to_use, from_, to): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_AreHomogeneous_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_char_ptr(from_), utils.to_char_ptr(to), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def unit_get_symbol_for_object(api_to_use, pre_allocated_char_64, homogeneity, unit_system_id): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Unit_getSymbol_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_char_ptr(pre_allocated_char_64), utils.to_char_ptr(homogeneity), utils.to_int32(unit_system_id), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/workflow_abstract_api.py b/src/ansys/dpf/gate/generated/workflow_abstract_api.py new file mode 100644 index 0000000000..7cd220ada2 --- /dev/null +++ b/src/ansys/dpf/gate/generated/workflow_abstract_api.py @@ -0,0 +1,473 @@ +#------------------------------------------------------------------------------- +# Workflow +#------------------------------------------------------------------------------- + +class WorkflowAbstractAPI: + @staticmethod + def init_workflow_environment(object): + pass + + @staticmethod + def finish_workflow_environment(object): + pass + + @staticmethod + def work_flow_new(): + raise NotImplementedError + + @staticmethod + def work_flow_get_copy(wf): + raise NotImplementedError + + @staticmethod + def work_flow_create_from_text(text): + raise NotImplementedError + + @staticmethod + def work_flow_get_copy_on_other_client(wf, client, protocol): + raise NotImplementedError + + @staticmethod + def work_flow_delete(wf): + raise NotImplementedError + + @staticmethod + def work_flow_record_instance(wf, user_name, transfer_ownership): + raise NotImplementedError + + @staticmethod + def work_flow_replace_instance_at_id(wf, id, user_name, transfer_ownership): + raise NotImplementedError + + @staticmethod + def work_flow_erase_instance(wf): + raise NotImplementedError + + @staticmethod + def work_flow_get_record_id(wf): + raise NotImplementedError + + @staticmethod + def work_flow_get_by_identifier(identifier): + raise NotImplementedError + + @staticmethod + def work_flow_get_first_op(wf): + raise NotImplementedError + + @staticmethod + def work_flow_get_last_op(wf): + raise NotImplementedError + + @staticmethod + def work_flow_discover_operators(wf): + raise NotImplementedError + + @staticmethod + def work_flow_chain_with(wf, wf2): + raise NotImplementedError + + @staticmethod + def work_flow_chain_with_specified_names(wf, wf2, input_name, output_name): + raise NotImplementedError + + @staticmethod + def workflow_create_connection_map(): + raise NotImplementedError + + @staticmethod + def workflow_add_entry_connection_map(map, out, in_): + raise NotImplementedError + + @staticmethod + def work_flow_connect_with(wf_right, wf2_left): + raise NotImplementedError + + @staticmethod + def work_flow_connect_with_specified_names(wf_right, wf2_left, map): + raise NotImplementedError + + @staticmethod + def work_flow_add_operator(wf, op): + raise NotImplementedError + + @staticmethod + def work_flow_number_of_operators(wf): + raise NotImplementedError + + @staticmethod + def work_flow_operator_name_by_index(wf, op_index): + raise NotImplementedError + + @staticmethod + def work_flow_set_name_input_pin(wf, op, pin, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_set_name_output_pin(wf, op, pin, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_rename_input_pin(wf, pin_name, new_pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_rename_output_pin(wf, pin_name, new_pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_erase_input_pin(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_erase_output_pin(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_has_input_pin(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_has_output_pin(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_number_of_input(wf): + raise NotImplementedError + + @staticmethod + def work_flow_number_of_output(wf): + raise NotImplementedError + + @staticmethod + def work_flow_input_by_index(wf, pin_index): + raise NotImplementedError + + @staticmethod + def work_flow_output_by_index(wf, pin_index): + raise NotImplementedError + + @staticmethod + def work_flow_number_of_symbol(wf): + raise NotImplementedError + + @staticmethod + def work_flow_symbol_by_index(wf, symbol_index): + raise NotImplementedError + + @staticmethod + def work_flow_generate_all_derivatives_for(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_generate_derivatives_for(wf, pin_name, variable_name): + raise NotImplementedError + + @staticmethod + def work_flow_write_swf(wf, file_name): + raise NotImplementedError + + @staticmethod + def work_flow_load_swf(wf, file_name): + raise NotImplementedError + + @staticmethod + def work_flow_write_swf_utf8(wf, file_name): + raise NotImplementedError + + @staticmethod + def work_flow_load_swf_utf8(wf, file_name): + raise NotImplementedError + + @staticmethod + def work_flow_write_to_text(wf): + raise NotImplementedError + + @staticmethod + def work_flow_connect_int(wf, pin_name, value): + raise NotImplementedError + + @staticmethod + def work_flow_connect_bool(wf, pin_name, value): + raise NotImplementedError + + @staticmethod + def work_flow_connect_double(wf, pin_name, value): + raise NotImplementedError + + @staticmethod + def work_flow_connect_string(wf, pin_name, value): + raise NotImplementedError + + @staticmethod + def work_flow_connect_scoping(wf, pin_name, scoping): + raise NotImplementedError + + @staticmethod + def work_flow_connect_data_sources(wf, pin_name, dataSources): + raise NotImplementedError + + @staticmethod + def work_flow_connect_streams(wf, pin_name, dataSources): + raise NotImplementedError + + @staticmethod + def work_flow_connect_field(wf, pin_name, value): + raise NotImplementedError + + @staticmethod + def work_flow_connect_collection(wf, pin_name, value): + raise NotImplementedError + + @staticmethod + def work_flow_connect_collection_as_vector(wf, pin_name, value): + raise NotImplementedError + + @staticmethod + def work_flow_connect_meshed_region(wf, pin_name, mesh): + raise NotImplementedError + + @staticmethod + def work_flow_connect_property_field(wf, pin_name, field): + raise NotImplementedError + + @staticmethod + def work_flow_connect_string_field(wf, pin_name, field): + raise NotImplementedError + + @staticmethod + def work_flow_connect_custom_type_field(wf, pin_name, field): + raise NotImplementedError + + @staticmethod + def work_flow_connect_support(wf, pin_name, support): + raise NotImplementedError + + @staticmethod + def work_flow_connect_cyclic_support(wf, pin_name, support): + raise NotImplementedError + + @staticmethod + def work_flow_connect_time_freq_support(wf, pin_name, support): + raise NotImplementedError + + @staticmethod + def work_flow_connect_workflow(wf, pin_name, otherwf): + raise NotImplementedError + + @staticmethod + def work_flow_connect_remote_workflow(wf, pin_name, otherwf): + raise NotImplementedError + + @staticmethod + def work_flow_connect_vector_int(wf, pin_name, ptrValue, size): + raise NotImplementedError + + @staticmethod + def work_flow_connect_vector_double(wf, pin_name, ptrValue, size): + raise NotImplementedError + + @staticmethod + def work_flow_connect_operator_output(wf, pin_name, value, output_pin): + raise NotImplementedError + + @staticmethod + def work_flow_connect_external_data(wf, pin_name, dataSources): + raise NotImplementedError + + @staticmethod + def work_flow_connect_data_tree(wf, pin_name, dataTree): + raise NotImplementedError + + @staticmethod + def work_flow_connect_any(wf, pin_name, any): + raise NotImplementedError + + @staticmethod + def work_flow_connect_label_space(wf, pin_name, labelspace): + raise NotImplementedError + + @staticmethod + def work_flow_connect_generic_data_container(wf, pin_name, labelspace): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_fields_container(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_scopings_container(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_field(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_scoping(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_time_freq_support(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_meshes_container(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_meshed_region(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_result_info(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_property_field(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_any_support(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_cyclic_support(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_data_sources(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_streams(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_workflow(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_external_data(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_as_any(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_int_collection(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_double_collection(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_operator(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_string_field(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_custom_type_field(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_custom_type_fields_container(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_data_tree(op, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_generic_data_container(op, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_unit(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_string(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_int(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_double(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_getoutput_bool(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_has_output_when_evaluated(wf, pin_name): + raise NotImplementedError + + @staticmethod + def work_flow_add_tag(wf, tag_name): + raise NotImplementedError + + @staticmethod + def work_flow_has_tag(wf, tag_name): + raise NotImplementedError + + @staticmethod + def work_flow_export_graphviz(wf, utf8_filename): + raise NotImplementedError + + @staticmethod + def work_flow_export_json(wf, text, size): + raise NotImplementedError + + @staticmethod + def work_flow_import_json(wf, text, size): + raise NotImplementedError + + @staticmethod + def work_flow_make_from_template(template_name): + raise NotImplementedError + + @staticmethod + def work_flow_template_exists(template_name): + raise NotImplementedError + + @staticmethod + def workflow_get_operators_collection_for_input(wf, input_name, pin_indexes, size): + raise NotImplementedError + + @staticmethod + def workflow_get_operator_for_output(wf, output_name, pin_index): + raise NotImplementedError + + @staticmethod + def workflow_get_client_id(wf): + raise NotImplementedError + + @staticmethod + def work_flow_new_on_client(client): + raise NotImplementedError + + @staticmethod + def work_flow_create_from_text_on_client(text, client): + raise NotImplementedError + + @staticmethod + def work_flow_get_copy_on_client(id, client): + raise NotImplementedError + + @staticmethod + def work_flow_get_by_identifier_on_client(identifier, client): + raise NotImplementedError + + @staticmethod + def workflow_create_connection_map_for_object(api_to_use): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/workflow_capi.py b/src/ansys/dpf/gate/generated/workflow_capi.py new file mode 100644 index 0000000000..26ecb99f1a --- /dev/null +++ b/src/ansys/dpf/gate/generated/workflow_capi.py @@ -0,0 +1,1068 @@ +import ctypes +from ansys.dpf.gate import utils +from ansys.dpf.gate import errors +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate.generated import workflow_abstract_api +from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI + +#------------------------------------------------------------------------------- +# Workflow +#------------------------------------------------------------------------------- + +class WorkflowCAPI(workflow_abstract_api.WorkflowAbstractAPI): + + @staticmethod + def init_workflow_environment(object): + # get core api + DataProcessingCAPI.init_data_processing_environment(object) + object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj) + + @staticmethod + def work_flow_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_new(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_get_copy(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getCopy(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_create_from_text(text): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_create_from_text(utils.to_char_ptr(text), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_get_copy_on_other_client(wf, client, protocol): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getCopy_on_other_client(wf._internal_obj if wf is not None else None, utils.to_char_ptr(client), utils.to_char_ptr(protocol), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_delete(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_delete(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_record_instance(wf, user_name, transfer_ownership): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_record_instance(wf._internal_obj if wf is not None else None, utils.to_char_ptr(user_name), transfer_ownership, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_replace_instance_at_id(wf, id, user_name, transfer_ownership): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_replace_instance_at_id(wf._internal_obj if wf is not None else None, utils.to_int32(id), utils.to_char_ptr(user_name), transfer_ownership, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_erase_instance(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_erase_instance(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_get_record_id(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_get_record_id(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_get_by_identifier(identifier): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_get_by_identifier(utils.to_int32(identifier), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_get_first_op(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_get_first_op(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_get_last_op(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_get_last_op(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_discover_operators(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_discover_operators(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_chain_with(wf, wf2): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_chain_with(wf._internal_obj if wf is not None else None, wf2._internal_obj if wf2 is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_chain_with_specified_names(wf, wf2, input_name, output_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_chain_with_specified_names(wf._internal_obj if wf is not None else None, wf2._internal_obj if wf2 is not None else None, utils.to_char_ptr(input_name), utils.to_char_ptr(output_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def workflow_create_connection_map(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Workflow_create_connection_map(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def workflow_add_entry_connection_map(map, out, in_): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Workflow_add_entry_connection_map(map._internal_obj if map is not None else None, utils.to_char_ptr(out), utils.to_char_ptr(in_), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_with(wf_right, wf2_left): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_with(wf_right._internal_obj if wf_right is not None else None, wf2_left._internal_obj if wf2_left is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_with_specified_names(wf_right, wf2_left, map): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_with_specified_names(wf_right._internal_obj if wf_right is not None else None, wf2_left._internal_obj if wf2_left is not None else None, map._internal_obj if map is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_add_operator(wf, op): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_add_operator(wf._internal_obj if wf is not None else None, op._internal_obj if op is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_number_of_operators(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_number_of_operators(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_operator_name_by_index(wf, op_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_operator_name_by_index(wf._internal_obj if wf is not None else None, utils.to_int32(op_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def work_flow_set_name_input_pin(wf, op, pin, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_set_name_input_pin(wf._internal_obj if wf is not None else None, op._internal_obj if op is not None else None, utils.to_int32(pin), utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_set_name_output_pin(wf, op, pin, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_set_name_output_pin(wf._internal_obj if wf is not None else None, op._internal_obj if op is not None else None, utils.to_int32(pin), utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_rename_input_pin(wf, pin_name, new_pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_rename_input_pin(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), utils.to_char_ptr(new_pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_rename_output_pin(wf, pin_name, new_pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_rename_output_pin(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), utils.to_char_ptr(new_pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_erase_input_pin(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_erase_input_pin(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_erase_output_pin(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_erase_output_pin(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_has_input_pin(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_has_input_pin(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_has_output_pin(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_has_output_pin(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_number_of_input(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_number_of_input(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_number_of_output(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_number_of_output(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_input_by_index(wf, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_input_by_index(wf._internal_obj if wf is not None else None, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def work_flow_output_by_index(wf, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_output_by_index(wf._internal_obj if wf is not None else None, utils.to_int32(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def work_flow_number_of_symbol(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_number_of_symbol(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_symbol_by_index(wf, symbol_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_symbol_by_index(wf._internal_obj if wf is not None else None, utils.to_int32(symbol_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def work_flow_generate_all_derivatives_for(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_generate_all_derivatives_for(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_generate_derivatives_for(wf, pin_name, variable_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_generate_derivatives_for(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), utils.to_char_ptr(variable_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_write_swf(wf, file_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_write_swf(wf._internal_obj if wf is not None else None, file_name, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_load_swf(wf, file_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_load_swf(wf._internal_obj if wf is not None else None, file_name, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_write_swf_utf8(wf, file_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_write_swf_utf8(wf._internal_obj if wf is not None else None, utils.to_char_ptr(file_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_load_swf_utf8(wf, file_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_load_swf_utf8(wf._internal_obj if wf is not None else None, utils.to_char_ptr(file_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_write_to_text(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_write_to_text(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def work_flow_connect_int(wf, pin_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_int(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), utils.to_int32(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_bool(wf, pin_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_bool(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_double(wf, pin_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_double(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.c_double(value) if isinstance(value, float) else value, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_string(wf, pin_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_string(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), utils.to_char_ptr(value), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_scoping(wf, pin_name, scoping): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_Scoping(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), scoping._internal_obj if scoping is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_data_sources(wf, pin_name, dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_DataSources(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_streams(wf, pin_name, dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_Streams(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_field(wf, pin_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_Field(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), value._internal_obj if value is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_collection(wf, pin_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_Collection(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), value._internal_obj if value is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_collection_as_vector(wf, pin_name, value): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_Collection_as_vector(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), value._internal_obj if value is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_meshed_region(wf, pin_name, mesh): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_MeshedRegion(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), mesh._internal_obj if mesh is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_property_field(wf, pin_name, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_PropertyField(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_string_field(wf, pin_name, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_StringField(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_custom_type_field(wf, pin_name, field): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_CustomTypeField(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), field._internal_obj if field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_support(wf, pin_name, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_Support(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_cyclic_support(wf, pin_name, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_CyclicSupport(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_time_freq_support(wf, pin_name, support): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_TimeFreqSupport(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), support._internal_obj if support is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_workflow(wf, pin_name, otherwf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_Workflow(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), otherwf._internal_obj if otherwf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_remote_workflow(wf, pin_name, otherwf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_RemoteWorkflow(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), otherwf._internal_obj if otherwf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_vector_int(wf, pin_name, ptrValue, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_vector_int(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), utils.to_int32_ptr(ptrValue), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_vector_double(wf, pin_name, ptrValue, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_vector_double(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), utils.to_double_ptr(ptrValue), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_operator_output(wf, pin_name, value, output_pin): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_operator_output(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), value._internal_obj if value is not None else None, utils.to_int32(output_pin), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_external_data(wf, pin_name, dataSources): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_ExternalData(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), dataSources._internal_obj if dataSources is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_data_tree(wf, pin_name, dataTree): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_DataTree(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), dataTree._internal_obj if dataTree is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_any(wf, pin_name, any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_Any(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_label_space(wf, pin_name, labelspace): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_LabelSpace(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), labelspace._internal_obj if labelspace is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_connect_generic_data_container(wf, pin_name, labelspace): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_connect_GenericDataContainer(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), labelspace._internal_obj if labelspace is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_fields_container(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_FieldsContainer(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_scopings_container(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_ScopingsContainer(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_field(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_Field(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_scoping(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_Scoping(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_time_freq_support(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_timeFreqSupport(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_meshes_container(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_meshesContainer(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_meshed_region(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_meshedRegion(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_result_info(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_resultInfo(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_property_field(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_propertyField(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_any_support(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_anySupport(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_cyclic_support(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_CyclicSupport(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_data_sources(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_DataSources(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_streams(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_Streams(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_workflow(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_Workflow(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_external_data(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_ExternalData(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_as_any(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_as_any(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_int_collection(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_IntCollection(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_double_collection(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_DoubleCollection(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_operator(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_Operator(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_string_field(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_StringField(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_custom_type_field(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_CustomTypeField(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_custom_type_fields_container(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_CustomTypeFieldsContainer(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_data_tree(op, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_DataTree(op._internal_obj if op is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_generic_data_container(op, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_GenericDataContainer(op._internal_obj if op is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_unit(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_Unit(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def work_flow_getoutput_string(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_string(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + + @staticmethod + def work_flow_getoutput_int(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_int(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_double(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_double(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_getoutput_bool(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getoutput_bool(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_has_output_when_evaluated(wf, pin_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_has_output_when_evaluated(wf._internal_obj if wf is not None else None, utils.to_char_ptr(pin_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_add_tag(wf, tag_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_add_tag(wf._internal_obj if wf is not None else None, utils.to_char_ptr(tag_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_has_tag(wf, tag_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_has_tag(wf._internal_obj if wf is not None else None, utils.to_char_ptr(tag_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_export_graphviz(wf, utf8_filename): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_export_graphviz(wf._internal_obj if wf is not None else None, utils.to_char_ptr(utf8_filename), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_export_json(wf, text, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_export_json(wf._internal_obj if wf is not None else None, utils.to_char_ptr_ptr(text), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_import_json(wf, text, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_import_json(wf._internal_obj if wf is not None else None, utils.to_char_ptr(text), utils.to_int32(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_make_from_template(template_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_make_from_template(utils.to_char_ptr(template_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_template_exists(template_name): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_template_exists(utils.to_char_ptr(template_name), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def workflow_get_operators_collection_for_input(wf, input_name, pin_indexes, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Workflow_get_operators_collection_for_input(wf._internal_obj if wf is not None else None, utils.to_char_ptr(input_name), utils.to_int32_ptr_ptr(pin_indexes), utils.to_int32_ptr(size), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def workflow_get_operator_for_output(wf, output_name, pin_index): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Workflow_get_operator_for_output(wf._internal_obj if wf is not None else None, utils.to_char_ptr(output_name), utils.to_int32_ptr(pin_index), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def workflow_get_client_id(wf): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Workflow_get_client_id(wf._internal_obj if wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_new_on_client(client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_new_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_create_from_text_on_client(text, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_create_from_text_on_client(utils.to_char_ptr(text), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_get_copy_on_client(id, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_getCopy_on_client(utils.to_int32(id), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def work_flow_get_by_identifier_on_client(identifier, client): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.WorkFlow_get_by_identifier_on_client(utils.to_int32(identifier), client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def workflow_create_connection_map_for_object(api_to_use): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Workflow_create_connection_map_for_object(api_to_use._internal_obj if api_to_use is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generic_data_container_grpcapi.py b/src/ansys/dpf/gate/generic_data_container_grpcapi.py new file mode 100644 index 0000000000..ae7bdd0491 --- /dev/null +++ b/src/ansys/dpf/gate/generic_data_container_grpcapi.py @@ -0,0 +1,64 @@ +from ansys.dpf.gate import errors, data_processing_grpcapi, utils +from ansys.dpf.gate.generated import generic_data_container_abstract_api, \ + generic_data_container_abstract_api + + +# ------------------------------------------------------------------------------- +# GenericDataContainer +# ------------------------------------------------------------------------------ + +def _get_stub(server): + return server.get_stub(GenericDataContainerGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class GenericDataContainerGRPCAPI(generic_data_container_abstract_api.GenericDataContainerAbstractAPI): + STUBNAME = "generic_data_container_stub" + + @staticmethod + def init_generic_data_container_environment(object): + from ansys.grpc.dpf import generic_data_container_pb2_grpc + object._server.create_stub_if_necessary(GenericDataContainerGRPCAPI.STUBNAME, + generic_data_container_pb2_grpc.GenericDataContainerServiceStub) + data_processing_grpcapi.DataProcessingGRPCAPI.init_data_processing_environment(object) + object._deleter_func = (data_processing_grpcapi._get_stub(object._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def generic_data_container_get_property_any(container, name): + from ansys.grpc.dpf import generic_data_container_pb2 + request = generic_data_container_pb2.GetPropertyRequest() + request.gdc.CopyFrom(container._internal_obj) + request.property_name.extend([name]) + s = dir(_get_stub(container._server).GetProperty(request).any) + return _get_stub(container._server).GetProperty(request).any[0] + + @staticmethod + def generic_data_container_set_property_any(container, name, any): + from ansys.grpc.dpf import generic_data_container_pb2 + request = generic_data_container_pb2.SetPropertyRequest() + request.gdc.CopyFrom(container._internal_obj) + request.property_name.extend([name]) + request.any.add().CopyFrom(any._internal_obj) + return _get_stub(container._server).SetProperty(request) + + @staticmethod + def generic_data_container_new_on_client(client): + from ansys.grpc.dpf import generic_data_container_pb2, base_pb2 + return _get_stub(client).Create(base_pb2.Empty()) + + @staticmethod + def generic_data_container_get_property_names(client): + from ansys.grpc.dpf import generic_data_container_pb2, base_pb2 + request = generic_data_container_pb2.GetPropertyNamesRequest() + request.gdc.CopyFrom(client._internal_obj) + response = _get_stub(client._server).GetPropertyNames(request).property_names + string = dir(response) + return utils.to_array(response) + + @staticmethod + def generic_data_container_get_property_types(client): + from ansys.grpc.dpf import generic_data_container_pb2, base_pb2 + request = generic_data_container_pb2.GetPropertyTypesRequest() + request.gdc.CopyFrom(client._internal_obj) + response = _get_stub(client._server).GetPropertyTypes(request).property_types + return utils.to_array(response) diff --git a/src/ansys/dpf/gate/generic_support_grpcapi.py b/src/ansys/dpf/gate/generic_support_grpcapi.py new file mode 100644 index 0000000000..f7a6cd2b4b --- /dev/null +++ b/src/ansys/dpf/gate/generic_support_grpcapi.py @@ -0,0 +1,55 @@ +from ansys.dpf.gate import errors, data_processing_grpcapi +from ansys.dpf.gate.generated import generic_support_abstract_api + +# ------------------------------------------------------------------------------- +# GenericSupport +# ------------------------------------------------------------------------------ + +def _get_stub(server): + return server.get_stub(GenericSupportGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class GenericSupportGRPCAPI(generic_support_abstract_api.GenericSupportAbstractAPI): + STUBNAME = "generic_support_stub" + + @staticmethod + def init_generic_support_environment(object): + from ansys.grpc.dpf import generic_support_pb2_grpc + object._server.create_stub_if_necessary(GenericSupportGRPCAPI.STUBNAME, + generic_support_pb2_grpc.GenericSupportServiceStub) + data_processing_grpcapi.DataProcessingGRPCAPI.init_data_processing_environment(object) + object._deleter_func = (data_processing_grpcapi._get_stub(object._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def _generic_support_set_field_support_of_property(support, name, field): + from ansys.grpc.dpf import generic_support_pb2 + request = generic_support_pb2.UpdateRequest() + request.support.CopyFrom(support._internal_obj) + request.field_supports.get_or_create(name).CopyFrom(field._internal_obj) + return _get_stub(support._server).Update(request) + + @staticmethod + def generic_support_set_field_support_of_property(support, name, field): + return GenericSupportGRPCAPI._generic_support_set_field_support_of_property( + support, name, field + ) + + @staticmethod + def generic_support_set_property_field_support_of_property(support, name, field): + return GenericSupportGRPCAPI._generic_support_set_field_support_of_property( + support, name, field + ) + + @staticmethod + def generic_support_set_string_field_support_of_property(support, name, field): + return GenericSupportGRPCAPI._generic_support_set_field_support_of_property( + support, name, field + ) + + @staticmethod + def generic_support_new_on_client(client, name): + from ansys.grpc.dpf import generic_support_pb2 + request = generic_support_pb2.CreateRequest() + request.location = name + return _get_stub(client).Create(request) \ No newline at end of file diff --git a/src/ansys/dpf/gate/grpc_stream_helpers.py b/src/ansys/dpf/gate/grpc_stream_helpers.py new file mode 100644 index 0000000000..8a2701754a --- /dev/null +++ b/src/ansys/dpf/gate/grpc_stream_helpers.py @@ -0,0 +1,129 @@ +import sys +import array +import numpy as np + + +def _data_chunk_yielder(request, data, chunk_size=None): + from ansys.dpf.gate import misc + if not chunk_size: + chunk_size = misc.client_config()["streaming_buffer_size"] + + length = data.size + need_progress_bar = length > 1e6 and misc.COMMON_PROGRESS_BAR + if need_progress_bar: + bar = misc.COMMON_PROGRESS_BAR( + "Sending data...", unit=data.dtype.name, tot_size=length + ) + bar.start() + sent_length = 0 + if length == 0: + yield request + return + unitary_size = int(chunk_size // sys.getsizeof(data[0])) + if length - sent_length < unitary_size: + unitary_size = length - sent_length + while sent_length < length: + currentcopy = data[sent_length: sent_length + unitary_size] + request.array = currentcopy.tobytes() + sent_length = sent_length + unitary_size + if length - sent_length < unitary_size: + unitary_size = length - sent_length + yield request + try: + if need_progress_bar: + bar.update(sent_length) + except: + pass + try: + if need_progress_bar: + bar.finish() + except: + pass + +def _data_get_chunk_(dtype, service, np_array=True): + from ansys.dpf.gate import misc + tupleMetaData = service.initial_metadata() + + need_progress_bar = False + size = 0 + for iMeta in range(len(tupleMetaData)): + if tupleMetaData[iMeta].key == "size_tot": + size = int(tupleMetaData[iMeta].value) + + itemsize = np.dtype(dtype).itemsize + need_progress_bar = size // itemsize > 1e6 and misc.COMMON_PROGRESS_BAR + if need_progress_bar: + bar = misc.COMMON_PROGRESS_BAR( + "Receiving data...", unit=np.dtype(dtype).name + "s", tot_size=size // itemsize + ) + bar.start() + + if np_array: + arr = np.empty(size // itemsize, dtype) + i = 0 + for chunk in service: + curr_size = len(chunk.array) // itemsize + arr[i : i + curr_size] = np.frombuffer(chunk.array, dtype) + i += curr_size + try: + if need_progress_bar: + bar.update(i) + except: + pass + + else: + arr = [] + if dtype == np.float64: + dtype = "d" + else: + dtype = "i" + for chunk in service: + arr.extend(array.array(dtype, chunk.array)) + try: + if need_progress_bar: + bar.update(len(arr)) + except: + pass + try: + if need_progress_bar: + bar.finish() + except: + pass + return arr + + +def _string_data_chunk_yielder(request, data, chunk_size=None): + from ansys.dpf.gate import misc + + if not chunk_size: + chunk_size = misc.client_config()["streaming_buffer_size"] + + length = len(data) + sent_length = 0 + separator = b'\0' + while sent_length < length: + num_bytes = 0 + currentcopy = bytearray() + while num_bytes<= chunk_size and sent_length < length: + currentcopy.extend(data[sent_length]) + currentcopy.extend(separator) + sent_length += 1 + num_bytes = len(currentcopy) + + request.array = bytes(currentcopy) + yield request + if length==0: + yield request + + +def _string_data_get_chunk_(service): + from ansys.dpf.gate import misc + tupleMetaData = service.initial_metadata() + size = 0 + for iMeta in range(len(tupleMetaData)): + if tupleMetaData[iMeta].key == "size_tot": + size = int(tupleMetaData[iMeta].value) + arr = [] + for chunk in service: + arr.extend(chunk.array.decode("utf8").rstrip(u'\x00').split(u'\x00')) + return arr diff --git a/src/ansys/dpf/gate/integral_types.py b/src/ansys/dpf/gate/integral_types.py new file mode 100644 index 0000000000..f59eb8c682 --- /dev/null +++ b/src/ansys/dpf/gate/integral_types.py @@ -0,0 +1,190 @@ +import ctypes +import numpy as np + +class MutableInt32: + def __init__(self, val=0): + self.set(val) + + def ctypes_pointer(self): + return ctypes.pointer(self.val) + + def set(self, val): + self.val = ctypes.c_int32(val) + + def __int__(self): + return self.val.value + + +class MutableListInt32: + def __init__(self, size=0): + self.val = ctypes.pointer(ctypes.c_int32(0)) + self._size = MutableInt32(size) + if size != 0: + tmp = list(range(size)) + self.val = (ctypes.c_int32 * len(tmp))(*tmp) + + def ctypes_pointer(self): + return ctypes.pointer(self.val) + + @property + def pointer(self): + return self.val + + @property + def np_type(self): + return np.dtype(self.pointer._type_) + + @property + def internal_size(self): + return self._size + + def tolist(self): + if isinstance(self.val, list): + return self.val + return [int(self.val[i]) for i in range(0, int(self._size))] + + def set(self, val: list): + self.val = val + self._size = len(val) + + +class MutableDouble: + def __init__(self, val=0.): + self.set(val) + + def ctypes_pointer(self): + return ctypes.pointer(self.val) + + def set(self, val): + self.val = ctypes.c_double(val) + + def __float__(self): + return self.val.value + + +class MutableListDouble: + def __init__(self): + self.val = ctypes.pointer(ctypes.c_double(0)) + self._size = MutableInt32(0) + + def ctypes_pointer(self): + return ctypes.pointer(self.val) + + @property + def pointer(self): + return self.val + + @property + def np_type(self): + return np.dtype(self.pointer._type_) + + @property + def internal_size(self): + return self._size + + def tolist(self): + if isinstance(self.val, list): + return self.val + return [float(self.val[i]) for i in range(0, int(self._size))] + + def set(self, val: list): + self.val = val + self._size = len(val) + + +class MutableListChar: + def __init__(self): + self.val = ctypes.pointer(ctypes.c_char(0)) + self._size = MutableInt32(0) + + def ctypes_pointer(self): + return ctypes.pointer(self.val) + + @property + def pointer(self): + return self.val + + @property + def np_type(self): + return np.dtype(self.pointer._type_) + + @property + def internal_size(self): + return self._size + + +class MutableString: + def __init__(self, size): + self.val = ctypes.create_string_buffer(size) + + def set_str(self, value_str): + self.val = value_str + + def set(self, value_str): + self.val = value_str + + def cchar_p_p(self): + self.val = ctypes.c_char_p() + self.val_p = ctypes.byref(self.val) + return ctypes.cast(self.val_p, ctypes.POINTER(ctypes.POINTER(ctypes.c_char))) + + def __str__(self): + if hasattr(self.val, "value"): + return self.val.value.decode("utf8") + return str(self.val) + + +class MutableListString: + def __init__(self, list=None): + if list is not None: + if hasattr(list, "__iter__"): + self.val = (ctypes.c_char_p * len(list))() + self.val[:] = [bytes(s, "utf8") for s in list] + self._size = MutableInt32(len(list)) + else: + self.val = (ctypes.c_char_p * list)() + self._size = MutableInt32(list) + else: + self.val = ctypes.POINTER(ctypes.c_char_p)() + self.val_p = ctypes.byref(self.val) + self._size = MutableInt32(0) + + def tolist(self): + if isinstance(self.val, list): + return self.val + return [val.decode("utf8") for val in self.val] + + def __iter__(self): + self.n = 0 + return self + + def __next__(self): + if self.n < len(self): + self.n += 1 + return self.__getitem__(self.n-1) + else: + raise StopIteration + + def __getitem__(self, i): + return self.val[i] + + def __len__(self): + return int(self.internal_size.val.value) + + @property + def np_type(self): + return None + + @property + def pointer(self): + return self.cchar_p_p + + def cchar_p_p_p(self): + return ctypes.cast(ctypes.byref(self.val), ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(ctypes.c_char)))) + + def cchar_p_p(self): + return ctypes.cast(self.val, ctypes.POINTER(ctypes.POINTER(ctypes.c_char))) + + @property + def internal_size(self): + return self._size \ No newline at end of file diff --git a/src/ansys/dpf/gate/label_space_grpcapi.py b/src/ansys/dpf/gate/label_space_grpcapi.py new file mode 100644 index 0000000000..45d922cdab --- /dev/null +++ b/src/ansys/dpf/gate/label_space_grpcapi.py @@ -0,0 +1,47 @@ +from ansys.dpf.gate.generated import label_space_abstract_api + +#------------------------------------------------------------------------------- +# LabelSpace +#------------------------------------------------------------------------------- + +class LabelSpaceGRPCAPI(label_space_abstract_api.LabelSpaceAbstractAPI): + + @staticmethod + def init_label_space_environment(object): + object._deleter_func = (lambda obj:None, lambda obj: obj._internal_obj) + + @staticmethod + def label_space_new_for_object(object): + from ansys.grpc.dpf import collection_pb2 + if hasattr(collection_pb2, "LabelSpace"): + return collection_pb2.LabelSpace() + from ansys.grpc.dpf import label_space_pb2 + return label_space_pb2.LabelSpace() + + @staticmethod + def label_space_add_data(space, label, id): + space._internal_obj.label_space[label] = id + + @staticmethod + def label_space_get_size(space): + return len(space._internal_obj.label_space) + + @staticmethod + def label_space_get_labels_name(space, index): + for i, tuple in enumerate(space._internal_obj.label_space): + if i == index: + return tuple + + @staticmethod + def label_space_get_labels_value(space, index): + for i, tuple in enumerate(space._internal_obj.label_space.items()): + if i == index: + return tuple[1] + + @staticmethod + def list_label_spaces_size(list): + return len(list._internal_obj) + + @staticmethod + def list_label_spaces_at(list, index): + return list._internal_obj[index] diff --git a/src/ansys/dpf/gate/load_api.py b/src/ansys/dpf/gate/load_api.py new file mode 100644 index 0000000000..36785face8 --- /dev/null +++ b/src/ansys/dpf/gate/load_api.py @@ -0,0 +1,227 @@ +import os +import packaging.version +import pkg_resources +import importlib +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate import utils, errors +from ansys.dpf.gate._version import __ansys_version__ + + +def _find_outdated_ansys_version(arg: str): + arg_to_compute = str(arg) + ver_check = 221 # 221 or lower versions are not supported + c = "v" + char_pos = [pos for pos, char in enumerate(arg_to_compute) if char == c] + # check if len after char is > 3 + for pos in char_pos: + is_digit_after = False + i = pos + 1 + n = i + 3 + if n < len(arg_to_compute): + str_after = arg_to_compute[n] + if str_after.isdigit(): + is_digit_after = True + str_test = arg_to_compute[i:n] + # check if 3 characters after char is int + if len(str_test) >= 3: + if str_test.isdigit(): + check = int(str_test) + if check > int(__ansys_version__): + continue + if check <= ver_check: + if not is_digit_after: + # ensure digit chain has size 3 + return True + return False + + +def _get_path_in_install(is_posix: bool = None, internal_folder="dll"): + if not is_posix: + is_posix = os.name == "posix" + if not is_posix: + path_in_install = os.path.join("aisol", "bin", "winx64") + else: + path_in_install = os.path.join("aisol", internal_folder, "linx64") + return path_in_install + + +def _pythonize_awp_version(version): + if len(version) != 3: + return version + return "20" + version[0:2] + "." + version[2] + + +def _find_latest_ansys_versions(): + awp_versions = [key[-3:] for key in os.environ.keys() if "AWP_ROOT" in key] + installed_packages_list = {} + + for awp_version in awp_versions: + if not awp_version.isnumeric(): + continue + ansys_path = os.environ.get("AWP_ROOT" + awp_version) + if ansys_path: + installed_packages_list[ + packaging.version.parse(_pythonize_awp_version(awp_version)) + ] = ansys_path + + installed_packages = pkg_resources.working_set + for i in installed_packages: + if "ansys-dpf-server" in i.key: + file_name = pkg_resources.to_filename(i.project_name.replace("ansys-dpf-", "")) + try: + module = importlib.import_module("ansys.dpf." + file_name) + installed_packages_list[ + packaging.version.parse(module.__version__) + ] = module.__path__[0] + except ModuleNotFoundError: + pass + except AttributeError: + pass + if len(installed_packages_list) > 0: + return installed_packages_list[sorted(installed_packages_list)[-1]] + + +def _unified_installer_path_if_exists(): + return _find_latest_ansys_versions() + + +def _get_api_path_from_installer_or_package(ansys_path: str, is_posix: bool): + is_ansys_version_old = _find_outdated_ansys_version(ansys_path) + gatebin_found = _try_use_gatebin() + dpf_client_found = False + if gatebin_found and not is_ansys_version_old: + # should work from the gatebin package + from ansys.dpf import gatebin + + path = os.path.abspath(gatebin.__path__._path[0]) + dpf_client_found = True + else: + if ansys_path is not None: + dpf_inner_path = _get_path_in_install(is_posix) + path_gathered = path = os.path.join(ansys_path, dpf_inner_path) + if os.path.isdir(path_gathered): + path = path_gathered # should work from the installer + else: + path = ansys_path + if os.path.isdir(path): + dpf_client_found = True + if not dpf_client_found and not is_ansys_version_old: + raise ModuleNotFoundError( + "To use ansys-dpf-gate as a client API " + "install ansys-dpf-gatebin " + "with :\n pip install ansys-dpf-gatebin." + ) + return path + + +def _try_use_gatebin(): + import shutil + try: + from ansys.dpf import gatebin + if isinstance(gatebin.__path__, str): + gatebin_path = gatebin.__path__ + elif gatebin.__path__ is None: + return False + else: + gatebin_path = gatebin.__path__[0] + for archive_format in shutil.get_unpack_formats(): + extensions = archive_format[1] + if any([x in gatebin_path for x in extensions]): + return False + gatebin.__doc__ + return True + except ModuleNotFoundError: + return False + except ImportError: + return False + except Exception as e: + raise e + return False + + +def _try_load_api(path, name): + api_path = os.path.join(path, name) + try: + capi.load_api(api_path) + return api_path + except Exception as e: + b_outdated_ansys_version_found = False + b_module_not_found = False + for arg in e.args: + if hasattr(e, "winerror"): + # if on Windows, we can check the error code + # cases where the OSError is just saying "module not found" + # without specifying the path + if e.winerror == 126 and _find_outdated_ansys_version(path): + b_module_not_found = True + break + if isinstance(arg, str): + if ( + len(arg) > 3 + ): # at least 4 characters to have v*** defined, e.g. v221 + if _find_outdated_ansys_version(arg): + b_outdated_ansys_version_found = True + if b_outdated_ansys_version_found or b_module_not_found: + raise errors.DpfVersionNotSupported("4.0") + else: + if not os.path.isdir(path): + raise NotADirectoryError( + f'Unable to locate the directory containing DPF at ' + f'"{path}"' + ) + elif not os.path.isfile(api_path): + raise FileNotFoundError( + f'DPF file not found at "{api_path}". ' + f'Unable to locate the following file: "{name}"' + ) + else: + raise e + + +def load_client_api(ansys_path=None): + ISPOSIX = os.name == "posix" + name = "DPFClientAPI.dll" + if ISPOSIX: + name = "libDPFClientAPI.so" + + ANSYS_PATH = ansys_path + if ANSYS_PATH is None: + ANSYS_PATH = _unified_installer_path_if_exists() + path = _get_api_path_from_installer_or_package(ANSYS_PATH, ISPOSIX) + + return _try_load_api(path=path, name=name) + + +def load_grpc_client(ansys_path=None): + path = "" + ISPOSIX = os.name == "posix" + name = "Ans.Dpf.GrpcClient" + if ISPOSIX: + name = "libAns.Dpf.GrpcClient" + + ANSYS_PATH = ansys_path + if ANSYS_PATH is None: + ANSYS_PATH = _unified_installer_path_if_exists() + path = _get_api_path_from_installer_or_package(ANSYS_PATH, ISPOSIX) + + # PATH should be set only on Windows and only if working + # from the installer because of runtime dependencies + # on libcrypto and libssl + previous_path = "" + if not ISPOSIX and ANSYS_PATH is not None: + previous_path = os.getenv("PATH", "") + os.environ["PATH"] = path + ";" + previous_path + + grpc_client_api_path = os.path.join(path, name) + try: + utils.data_processing_core_load_api(grpc_client_api_path, "remote") + except Exception as e: + if not ISPOSIX: + os.environ["PATH"] = previous_path + raise e + + # reset of PATH + if not ISPOSIX and ANSYS_PATH is not None: + os.environ["PATH"] = previous_path + + return grpc_client_api_path diff --git a/src/ansys/dpf/gate/meshed_region_grpcapi.py b/src/ansys/dpf/gate/meshed_region_grpcapi.py new file mode 100644 index 0000000000..68c3669ab0 --- /dev/null +++ b/src/ansys/dpf/gate/meshed_region_grpcapi.py @@ -0,0 +1,316 @@ +from ansys.dpf.gate.generated import meshed_region_abstract_api +from ansys.dpf.gate import errors +# ------------------------------------------------------------------------------- +# MeshedRegion +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(MeshedRegionGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class MeshedRegionGRPCAPI(meshed_region_abstract_api.MeshedRegionAbstractAPI): + STUBNAME = "meshed_region_stub" + + @staticmethod + def init_meshed_region_environment(obj): + from ansys.grpc.dpf import meshed_region_pb2_grpc + obj._server.create_stub_if_necessary(MeshedRegionGRPCAPI.STUBNAME, + meshed_region_pb2_grpc.MeshedRegionServiceStub) + obj._deleter_func = (_get_stub(obj._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def meshed_region_new_on_client(client): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.CreateRequest() + return _get_stub(client).Create(request) + + @staticmethod + def meshed_region_reserve(meshedRegion, numNodes, numElements): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.CreateRequest() + if numNodes: + request.num_nodes_reserved = numNodes + if numElements: + request.num_elements_reserved = numElements + return _get_stub(meshedRegion._server).Create(request) + + @staticmethod + def meshed_region_get_num_nodes(meshedRegion): + return MeshedRegionGRPCAPI.list(meshedRegion).num_nodes + + @staticmethod + def meshed_region_get_num_elements(meshedRegion): + return MeshedRegionGRPCAPI.list(meshedRegion).num_element + + @staticmethod + def meshed_region_get_num_faces(meshedRegion): + return MeshedRegionGRPCAPI.list(meshedRegion).num_faces + + @staticmethod + def meshed_region_get_shared_nodes_scoping(meshedRegion): + from ansys.grpc.dpf import meshed_region_pb2 + from ansys.dpf.gate.common import locations + request = meshed_region_pb2.GetScopingRequest(mesh=meshedRegion._internal_obj) + request.loc.location = locations.nodal + return _get_stub(meshedRegion._server).GetScoping(request) + + @staticmethod + def meshed_region_get_shared_elements_scoping(meshedRegion): + from ansys.grpc.dpf import meshed_region_pb2 + from ansys.dpf.gate.common import locations + request = meshed_region_pb2.GetScopingRequest(mesh=meshedRegion._internal_obj) + request.loc.location = locations.elemental + return _get_stub(meshedRegion._server).GetScoping(request) + + @staticmethod + def meshed_region_get_shared_faces_scoping(meshedRegion): + from ansys.grpc.dpf import meshed_region_pb2 + from ansys.dpf.gate.common import locations + request = meshed_region_pb2.GetScopingRequest(mesh=meshedRegion._internal_obj) + request.loc.location = locations.elemental_nodal + return _get_stub(meshedRegion._server).GetScoping(request) + + @staticmethod + def list(meshedRegion): + return _get_stub(meshedRegion._server).List(meshedRegion._internal_obj) + + @staticmethod + def meshed_region_get_unit(meshedRegion): + return MeshedRegionGRPCAPI.list(meshedRegion).unit + + @staticmethod + def meshed_region_get_has_solid_region(meshedRegion): + return MeshedRegionGRPCAPI.list( + meshedRegion).element_shape_info.has_solid_elements + + @staticmethod + def meshed_region_get_has_shell_region(meshedRegion): + return MeshedRegionGRPCAPI.list( + meshedRegion).element_shape_info.has_shell_elements + + @staticmethod + def meshed_region_get_has_point_region(meshedRegion): + return MeshedRegionGRPCAPI.list( + meshedRegion).element_shape_info.has_point_elements + + @staticmethod + def meshed_region_get_has_beam_region(meshedRegion): + return MeshedRegionGRPCAPI.list( + meshedRegion).element_shape_info.has_beam_elements + + @staticmethod + def meshed_region_get_node_id(meshedRegion, index): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.GetRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.index = index + return _get_stub(meshedRegion._server).GetNode(request).id + + @staticmethod + def meshed_region_get_node_index(meshedRegion, id): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.GetRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.id = id + return _get_stub(meshedRegion._server).GetNode(request).index + + @staticmethod + def meshed_region_get_element_id(meshedRegion, index): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.GetRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.index = index + return _get_stub(meshedRegion._server).GetElement(request).id + + @staticmethod + def meshed_region_get_element_index(meshedRegion, id): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.GetRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.id = id + return _get_stub(meshedRegion._server).GetElement(request).index + + @staticmethod + def meshed_region_get_num_nodes_of_element(meshedRegion, index): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.GetRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.index = index + element = _get_stub(meshedRegion._server).GetElement(request) + return len(element.nodes) + + @staticmethod + def meshed_region_get_node_id_of_element(meshedRegion, eidx, nidx): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.GetRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.index = eidx + element = _get_stub(meshedRegion._server).GetElement(request) + return element.nodes[nidx].id + + @staticmethod + def meshed_region_get_node_coord(meshedRegion, index, coordinate): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.GetRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.index = index + node = _get_stub(meshedRegion._server).GetNode(request) + return node.coordinates[coordinate] + + @staticmethod + def meshed_region_get_element_type(meshedRegion, id, type, index): + from ansys.grpc.dpf import meshed_region_pb2 + from ansys.dpf.gate.common import elemental_property_type_dict + request = meshed_region_pb2.ElementalPropertyRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.index = index + request.id = id + if hasattr(request, "property_name"): + request.property_name.property_name = "eltype" + else: + if "eltype" in elemental_property_type_dict: + request.property = meshed_region_pb2.ElementalPropertyType.Value( + elemental_property_type_dict["eltype"] + ) + else: + raise ValueError(type + " property is not supported") + prop = _get_stub(meshedRegion._server).GetElementalProperty(request).prop + type.set(prop) + + @staticmethod + def meshed_region_get_element_shape(meshedRegion, id, shape, index): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.ElementalPropertyRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.index = index + if hasattr(request, "property_name"): + request.property_name.property_name = "elshape" + else: + from ansys.dpf.gate.common import elemental_property_type_dict + if "elshape" in elemental_property_type_dict: + request.property = meshed_region_pb2.ElementalPropertyType.Value( + elemental_property_type_dict["elshape"] + ) + else: + raise ValueError(type + " property is not supported") + prop = _get_stub(meshedRegion._server).GetElementalProperty(request).prop + shape.set(prop) + + @staticmethod + def update(meshedRegion, request): + return _get_stub(meshedRegion._server).UpdateRequest(request) + + @staticmethod + def meshed_region_set_unit(meshedRegion, unit): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.UpdateMeshedRegionRequest() + request.meshed_region.CopyFrom(meshedRegion._internal_obj) + request.unit = unit + return MeshedRegionGRPCAPI.update(meshedRegion, request) + + @staticmethod + def get_named_selections(meshedRegion): + from ansys.grpc.dpf import meshed_region_pb2 + if hasattr(_get_stub(meshedRegion._server), "ListNamedSelections"): + request = meshed_region_pb2.ListNamedSelectionsRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + res = _get_stub(meshedRegion._server).ListNamedSelections(request).named_selections + else: + res = MeshedRegionGRPCAPI.list(meshedRegion).named_selections + return res + + @staticmethod + def meshed_region_get_num_available_named_selection(meshedRegion): + return len(MeshedRegionGRPCAPI.get_named_selections(meshedRegion)) + + @staticmethod + def meshed_region_get_named_selection_name(meshedRegion, index): + return MeshedRegionGRPCAPI.get_named_selections(meshedRegion)[index] + + @staticmethod + def meshed_region_get_named_selection_scoping(meshedRegion, name): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.GetScopingRequest(mesh=meshedRegion._internal_obj) + request.named_selection = name + return _get_stub(meshedRegion._server).GetScoping(request) + + @staticmethod + def meshed_region_set_named_selection_scoping(meshedRegion, name, scoping): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.SetNamedSelectionRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.named_selection = name + request.scoping.CopyFrom(scoping._internal_obj) + return _get_stub(meshedRegion._server).SetNamedSelection(request) + + @staticmethod + def meshed_region_add_node(meshedRegion, xyz, id): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.AddRequest(mesh=meshedRegion._internal_obj) + node_request = meshed_region_pb2.NodeRequest(id=id) + node_request.coordinates.extend(xyz) + request.nodes.append(node_request) + _get_stub(meshedRegion._server).Add(request) + + @staticmethod + def meshed_region_add_element_by_shape(meshedRegion, id, size, conn, shape): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.AddRequest(mesh=meshedRegion._internal_obj) + element_request = meshed_region_pb2.ElementRequest(id=id) + element_request.connectivity.extend(conn) + element_request.shape = shape + request.elements.extend([element_request]) + _get_stub(meshedRegion._server).Add(request) + + @staticmethod + def meshed_region_get_property_field(meshedRegion, property_type): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.ListPropertyRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + if hasattr(request, "property_type"): + request.property_type.property_name.property_name = property_type + else: + from ansys.dpf.gate.common import nodal_property_type_dict, elemental_property_type_dict + if property_type in nodal_property_type_dict: + request.nodal_property = meshed_region_pb2.NodalPropertyType.Value( + nodal_property_type_dict[property_type]) + elif property_type in elemental_property_type_dict: + request.elemental_property = meshed_region_pb2.ElementalPropertyType.Value( + elemental_property_type_dict[property_type]) + else: + raise ValueError(property_type + " property is not supported") + return _get_stub(meshedRegion._server).ListProperty(request) + + @staticmethod + def meshed_region_has_property_field(meshedRegion, property_type): + return property_type in MeshedRegionGRPCAPI.list(meshedRegion).available_prop + + @staticmethod + def meshed_region_get_num_available_property_field(meshedRegion): + return len(MeshedRegionGRPCAPI.list(meshedRegion).available_prop) + + @staticmethod + def meshed_region_get_property_field_name(meshedRegion, index): + property_type = MeshedRegionGRPCAPI.list(meshedRegion).available_prop[index] + return property_type + + @staticmethod + def meshed_region_set_property_field(meshedRegion, name, prop_field): + from ansys.grpc.dpf import meshed_region_pb2 + request = meshed_region_pb2.SetFieldRequest() + request.mesh.CopyFrom(meshedRegion._internal_obj) + request.property_type.property_name.property_name = name + request.field.CopyFrom(prop_field._internal_obj) + return _get_stub(meshedRegion._server).SetField(request) + + @staticmethod + def meshed_region_get_coordinates_field(meshedRegion): + return MeshedRegionGRPCAPI.meshed_region_get_property_field(meshedRegion, + "coordinates") + + @staticmethod + def meshed_region_set_coordinates_field(meshedRegion, field): + return MeshedRegionGRPCAPI.meshed_region_set_property_field(meshedRegion, "coordinates", + field) diff --git a/src/ansys/dpf/gate/misc.py b/src/ansys/dpf/gate/misc.py new file mode 100644 index 0000000000..c0dbc5a868 --- /dev/null +++ b/src/ansys/dpf/gate/misc.py @@ -0,0 +1,11 @@ +DEFAULT_FILE_CHUNK_SIZE = None +COMMON_PROGRESS_BAR = None +_CLIENT_CONFIG = {} + + +def client_config(): + if len(_CLIENT_CONFIG) == 0: + _CLIENT_CONFIG["use_cache"] = False + _CLIENT_CONFIG["streaming_buffer_size"] = DEFAULT_FILE_CHUNK_SIZE + _CLIENT_CONFIG["stream_floats"] = False + return _CLIENT_CONFIG diff --git a/src/ansys/dpf/gate/object_handler.py b/src/ansys/dpf/gate/object_handler.py new file mode 100644 index 0000000000..c55c46bcc4 --- /dev/null +++ b/src/ansys/dpf/gate/object_handler.py @@ -0,0 +1,24 @@ + +class ObjHandler: + def __init__(self, data_processing_api, internal_obj=None, server=None): + self._internal_obj = internal_obj + self.data_processing_api = data_processing_api + self._server = server + self.owned = False + + def get_ownership(self): + self.owned = True + if hasattr(self._internal_obj, "id"): + if isinstance(self._internal_obj.id, int) and self._internal_obj.id!=0: + return self._internal_obj + elif hasattr(self._internal_obj.id, "id") and self._internal_obj.id.id!=0: + return self._internal_obj + + def __del__(self): + try: + if hasattr(self, "_internal_obj") and not self.owned: + self.data_processing_api.data_processing_delete_shared_object(self) + except Exception as e: + pass + # print("Deletion failed:", e) + diff --git a/src/ansys/dpf/gate/operator_config_grpcapi.py b/src/ansys/dpf/gate/operator_config_grpcapi.py new file mode 100644 index 0000000000..51453e51d3 --- /dev/null +++ b/src/ansys/dpf/gate/operator_config_grpcapi.py @@ -0,0 +1,105 @@ +from ansys.dpf.gate.generated import operator_config_abstract_api +from ansys.dpf.gate import errors +# ------------------------------------------------------------------------------- +# OperatorConfig +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(OperatorConfigGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class OperatorConfigGRPCAPI(operator_config_abstract_api.OperatorConfigAbstractAPI): + STUBNAME = "operator_config_stub" + + @staticmethod + def init_operator_config_environment(obj): + from ansys.grpc.dpf import operator_config_pb2_grpc + obj._server.create_stub_if_necessary(OperatorConfigGRPCAPI.STUBNAME, + operator_config_pb2_grpc.OperatorConfigServiceStub) + obj._deleter_func = (_get_stub(obj._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def operator_config_default_new_on_client(client, operator_name): + from ansys.grpc.dpf import operator_config_pb2 + request = operator_config_pb2.CreateRequest() + request.operator_name.operator_name = operator_name + return _get_stub(client).Create(request) + + @staticmethod + def operator_config_empty_new_on_client(client): + from ansys.grpc.dpf import operator_config_pb2 + request = operator_config_pb2.CreateRequest() + return _get_stub(client).Create(request) + + @staticmethod + def operator_config_get_int(config, option): + tmp = OperatorConfigGRPCAPI.get_list(config) + return int(tmp.options[option].value_str) + + @staticmethod + def operator_config_get_double(config, option): + tmp = OperatorConfigGRPCAPI.get_list(config) + return float(tmp.options[option].value_str) + + @staticmethod + def operator_config_get_bool(config, option): + tmp = OperatorConfigGRPCAPI.get_list(config) + return bool(tmp.options[option].value_str) + + @staticmethod + def update_init(config, option_name): + from ansys.grpc.dpf import operator_config_pb2 + request = operator_config_pb2.UpdateRequest() + request.config.CopyFrom(config._internal_obj) + option_request = operator_config_pb2.ConfigOption() + option_request.option_name = option_name + return request, option_request + + @staticmethod + def update(config, request, option_request): + request.options.extend([option_request]) + _get_stub(config._server).Update(request) + + @staticmethod + def operator_config_set_int(config, option_name, value): + request, option_request = OperatorConfigGRPCAPI.update_init(config, option_name) + option_request.int = value + OperatorConfigGRPCAPI.update(config, request, option_request) + + @staticmethod + def operator_config_set_double(config, option_name, value): + request, option_request = OperatorConfigGRPCAPI.update_init(config, option_name) + option_request.double = value + OperatorConfigGRPCAPI.update(config, request, option_request) + + @staticmethod + def operator_config_set_bool(config, option_name, value): + request, option_request = OperatorConfigGRPCAPI.update_init(config, option_name) + option_request.bool = value + OperatorConfigGRPCAPI.update(config, request, option_request) + + @staticmethod + def get_list(config): + return _get_stub(config._server).List(config._internal_obj) + + @staticmethod + def operator_config_get_num_config(config): + tmp = OperatorConfigGRPCAPI.get_list(config) + return len(tmp.options) + + @staticmethod + def operator_config_get_config_option_name(config, index): + tmp = OperatorConfigGRPCAPI.get_list(config) + return tmp.options[index].option_name + + @staticmethod + def operator_config_get_config_option_printable_value(config, index): + tmp = OperatorConfigGRPCAPI.get_list(config) + return tmp.options[index].value_str + + @staticmethod + def operator_config_has_option(config, option): + tmp = OperatorConfigGRPCAPI.get_list(config) + return option in tmp.options diff --git a/src/ansys/dpf/gate/operator_grpcapi.py b/src/ansys/dpf/gate/operator_grpcapi.py new file mode 100644 index 0000000000..bc1eae67da --- /dev/null +++ b/src/ansys/dpf/gate/operator_grpcapi.py @@ -0,0 +1,434 @@ +from ansys.dpf.gate.generated import operator_abstract_api +from ansys.dpf.gate import errors +# ------------------------------------------------------------------------------- +# Operator +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + from ansys.grpc.dpf import operator_pb2_grpc + server.create_stub_if_necessary(OperatorGRPCAPI.STUBNAME, + operator_pb2_grpc.OperatorServiceStub) + return server.get_stub(OperatorGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class OperatorGRPCAPI(operator_abstract_api.OperatorAbstractAPI): + STUBNAME = "operator_stub" + + @staticmethod + def init_operator_environment(obj): + from ansys.grpc.dpf import operator_pb2_grpc + obj._server.create_stub_if_necessary(OperatorGRPCAPI.STUBNAME, + operator_pb2_grpc.OperatorServiceStub) + obj._deleter_func = (_get_stub(obj._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def operator_new_on_client(operatorName, client): + from ansys.grpc.dpf import operator_pb2 + request = operator_pb2.CreateOperatorRequest() + request.name = operatorName + return _get_stub(client).Create(request) + + @staticmethod + def operator_set_config(op, config): + from ansys.grpc.dpf import operator_pb2 + request = operator_pb2.UpdateConfigRequest() + request.op.CopyFrom(op._internal_obj) + request.config.CopyFrom(config._internal_obj) + _get_stub(op._server).UpdateConfig(request) + + @staticmethod + def get_list(op): + return _get_stub(op._server).List(op._internal_obj) + + @staticmethod + def operator_get_config(op): + return OperatorGRPCAPI.get_list(op).config + + @staticmethod + def update_init(op, pin): + from ansys.grpc.dpf import operator_pb2 + request = operator_pb2.UpdateRequest() + request.op.CopyFrom(op._internal_obj) + request.pin = pin + return request + + @staticmethod + def update(op, request): + _get_stub(op._server).Update(request) + + @staticmethod + def operator_connect_int(op, pin, value): + request = OperatorGRPCAPI.update_init(op, pin) + request.int = value + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_bool(op, pin, value): + request = OperatorGRPCAPI.update_init(op, pin) + request.bool = value + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_double(op, pin, value): + request = OperatorGRPCAPI.update_init(op, pin) + request.double = value + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_string(op, pin, value): + request = OperatorGRPCAPI.update_init(op, pin) + request.str = value + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_scoping(op, pin, scoping): + request = OperatorGRPCAPI.update_init(op, pin) + request.scoping.CopyFrom(scoping._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_data_sources(op, pin, dataSources): + request = OperatorGRPCAPI.update_init(op, pin) + request.data_sources.CopyFrom(dataSources._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_field(op, pin, value): + request = OperatorGRPCAPI.update_init(op, pin) + request.field.CopyFrom(value._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_collection(op, pin, value): + request = OperatorGRPCAPI.update_init(op, pin) + request.collection.CopyFrom(value._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_meshed_region(op, pin, mesh): + request = OperatorGRPCAPI.update_init(op, pin) + request.mesh.CopyFrom(mesh._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_vector_int(op, pin, ptrValue, size): + request = OperatorGRPCAPI.update_init(op, pin) + request.vint.rep_int.extend(ptrValue) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_vector_double(op, pin, ptrValue, size): + request = OperatorGRPCAPI.update_init(op, pin) + request.vdouble.rep_double.extend(ptrValue) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_collection_as_vector(op, pin, collection): + request = OperatorGRPCAPI.update_init(op, pin) + request.collection.CopyFrom(collection._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_operator_output(op, pin, value, outputIndex): + request = OperatorGRPCAPI.update_init(op, pin) + request.inputop.inputop.CopyFrom(value._internal_obj) + request.inputop.pinOut = outputIndex + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_property_field(op, pin, streams): + return OperatorGRPCAPI.operator_connect_field(op, pin, streams) + + @staticmethod + def operator_connect_string_field(op, pin, value): + return OperatorGRPCAPI.operator_connect_field(op, pin, value) + + @staticmethod + def operator_connect_custom_type_field(op, pin, value): + return OperatorGRPCAPI.operator_connect_field(op, pin, value) + + @staticmethod + def operator_connect_time_freq_support(op, pin, support): + if not op._server.meet_version("3.0"): + raise errors.DpfVersionNotSupported("3.0") + request = OperatorGRPCAPI.update_init(op, pin) + request.time_freq_support.CopyFrom(support._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_workflow(op, pin, wf): + request = OperatorGRPCAPI.update_init(op, pin) + request.workflow.CopyFrom(wf._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_cyclic_support(op, pin, sup): + request = OperatorGRPCAPI.update_init(op, pin) + request.cyc_support.CopyFrom(sup._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_data_tree(op, pin, ptr): + request = OperatorGRPCAPI.update_init(op, pin) + request.data_tree.CopyFrom(ptr._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_label_space(op, pin, ptr): + request = OperatorGRPCAPI.update_init(op, pin) + request.label_space.CopyFrom(ptr._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_generic_data_container(op, pin, ptr): + request = OperatorGRPCAPI.update_init(op, pin) + request.generic_data_container.CopyFrom(ptr._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def operator_connect_operator_as_input(op, pin, ptr): + request = OperatorGRPCAPI.update_init(op, pin) + request.operator_as_input.CopyFrom(ptr._internal_obj) + OperatorGRPCAPI.update(op, request) + + @staticmethod + def get_output_init(op, iOutput): + from ansys.grpc.dpf import operator_pb2 + request = operator_pb2.OperatorEvaluationRequest() + request.op.CopyFrom(op._internal_obj) + request.pin = iOutput + return request + + @staticmethod + def get_output_finish(op, request, stype, subtype): + from ansys.grpc.dpf import base_pb2 + request.type = base_pb2.Type.Value(stype.upper()) + if subtype != "": + request.subtype = base_pb2.Type.Value(subtype.upper()) + if hasattr(op, "_progress_thread") and op._progress_thread: + out = _get_stub(op._server).Get.future(request) + op._progress_thread.start() + out = out.result() + else: + out = _get_stub(op._server).Get(request) + return OperatorGRPCAPI._take_out_of_get_response(out) + + @staticmethod + def _take_out_of_get_response(response): + if response.HasField("str"): + return response.str + elif response.HasField("int"): + return response.int + elif response.HasField("double"): + return response.double + elif response.HasField("bool"): + return response.bool + elif response.HasField("field"): + return response.field + elif response.HasField("collection"): + return response.collection + elif response.HasField("scoping"): + return response.scoping + elif response.HasField("mesh"): + return response.mesh + elif response.HasField("result_info"): + return response.result_info + elif response.HasField("time_freq_support"): + return response.time_freq_support + elif response.HasField("data_sources"): + return response.data_sources + elif response.HasField("cyc_support"): + return response.cyc_support + elif hasattr(response,"workflow") and response.HasField("workflow"): + return response.workflow + elif hasattr(response,"data_tree") and response.HasField("data_tree"): + return response.data_tree + + @staticmethod + def operator_getoutput_fields_container(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "collection" + subtype = "field" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_scopings_container(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "collection" + subtype = "scoping" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_field(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "field" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_scoping(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "scoping" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_data_sources(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "data_sources" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_meshes_container(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "collection" + subtype = "meshed_region" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_cyclic_support(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "cyclic_support" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_workflow(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "workflow" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_string(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "string" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_int(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "int" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_double(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "double" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_bool(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "bool" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_time_freq_support(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "time_freq_support" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_meshed_region(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "meshed_region" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_result_info(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "result_info" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_streams(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "streams" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_property_field(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "property_field" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_string_field(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "string_field" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_custom_type_field(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "custom_type_field" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_data_tree(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "data_tree" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_operator(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "operator" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_external_data(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "model" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_int_collection(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "collection" + subtype = "int" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_double_collection(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "collection" + subtype = "double" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_getoutput_generic_data_container(op, iOutput): + request = OperatorGRPCAPI.get_output_init(op, iOutput) + stype = "generic_data_container" + subtype = "" + return OperatorGRPCAPI.get_output_finish(op, request, stype, subtype) + + @staticmethod + def operator_run(op): + from ansys.grpc.dpf import base_pb2 + request = OperatorGRPCAPI.get_output_init(op, 0) + request.type = base_pb2.Type.Value("RUN") + if hasattr(op, "_progress_thread") and op._progress_thread: + out = _get_stub(op._server).Get.future(request) + op._progress_thread.start() + out = out.result() + else: + out = _get_stub(op._server).Get(request) diff --git a/src/ansys/dpf/gate/operator_specification_grpcapi.py b/src/ansys/dpf/gate/operator_specification_grpcapi.py new file mode 100644 index 0000000000..ebcaf5e1e0 --- /dev/null +++ b/src/ansys/dpf/gate/operator_specification_grpcapi.py @@ -0,0 +1,155 @@ +from ansys.dpf.gate.generated import operator_specification_abstract_api +from ansys.dpf.gate import errors +# ------------------------------------------------------------------------------- +# OperatorSpecification +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(OperatorSpecificationGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class OperatorSpecificationGRPCAPI( + operator_specification_abstract_api.OperatorSpecificationAbstractAPI): + STUBNAME = "operator_specification_stub" + + @staticmethod + def init_operator_specification_environment(obj): + from ansys.grpc.dpf import base_pb2_grpc + obj._server.create_stub_if_necessary(OperatorSpecificationGRPCAPI.STUBNAME, + base_pb2_grpc.BaseServiceStub) + + @staticmethod + def operator_specification_new_on_client(client, op_name): + from ansys.dpf.gate.operator_grpcapi import _get_stub as _get_operator_stub + from ansys.grpc.dpf import operator_pb2 + request = operator_pb2.Operator() + if hasattr(op_name, "_internal_obj"): + return op_name._internal_obj.spec + elif client.meet_version("3.0"): + request.name = op_name + stub = _get_operator_stub(client) + list = stub.List(request) + return list.spec + else: + from ansys.dpf.gate import operator_grpcapi, object_handler, data_processing_grpcapi + return object_handler.ObjHandler( + data_processing_grpcapi.DataProcessingGRPCAPI, + operator_grpcapi.OperatorGRPCAPI.operator_new_on_client(op_name, client) + )._internal_obj.spec + + @staticmethod + def operator_specification_get_description(specification): + return specification._internal_obj.description + + @staticmethod + def operator_specification_set_description(specification, text): + specification._internal_obj.description = text + + @staticmethod + def operator_specification_get_num_pins(specification, binput): + if binput: + return len(specification._internal_obj.map_input_pin_spec) + else: + return len(specification._internal_obj.map_output_pin_spec) + + @staticmethod + def operator_specification_get_pin_name(specification, binput, numPin): + if binput: + return specification._internal_obj.map_input_pin_spec[numPin].name + else: + return specification._internal_obj.map_output_pin_spec[numPin].name + + @staticmethod + def operator_specification_get_pin_num_type_names(specification, binput, numPin): + if binput: + return len(specification._internal_obj.map_input_pin_spec[numPin].type_names) + else: + return len(specification._internal_obj.map_output_pin_spec[numPin].type_names) + + @staticmethod + def operator_specification_fill_pin_numbers(specification, binput, pins): + if binput: + return pins.set([key for key in specification._internal_obj.map_input_pin_spec]) + else: + return pins.set([key for key in specification._internal_obj.map_output_pin_spec]) + + @staticmethod + def operator_specification_get_pin_type_name(specification, binput, numPin, numType): + if binput: + return specification._internal_obj.map_input_pin_spec[numPin].type_names[numType] + else: + return specification._internal_obj.map_output_pin_spec[numPin].type_names[numType] + + @staticmethod + def operator_specification_get_pin_derived_class_type_name(specification, binput, numPin): + if binput: + return specification._internal_obj.map_input_pin_spec[numPin].name_derived_class + else: + return specification._internal_obj.map_output_pin_spec[numPin].name_derived_class + + @staticmethod + def operator_specification_is_pin_optional(specification, binput, numPin): + if binput: + return specification._internal_obj.map_input_pin_spec[numPin].optional + else: + return specification._internal_obj.map_output_pin_spec[numPin].optional + + @staticmethod + def operator_specification_get_pin_document(specification, binput, numPin): + if binput: + return specification._internal_obj.map_input_pin_spec[numPin].document + else: + return specification._internal_obj.map_output_pin_spec[numPin].document + + @staticmethod + def operator_specification_is_pin_ellipsis(specification, binput, numPin): + if binput: + return specification._internal_obj.map_input_pin_spec[numPin].ellipsis + else: + return specification._internal_obj.map_output_pin_spec[numPin].ellipsis + + @staticmethod + def operator_specification_get_properties(specification, prop): + return specification._internal_obj.properties[prop] + + @staticmethod + def operator_specification_get_num_properties(specification): + if hasattr(specification._internal_obj, "properties"): + return len(specification._internal_obj.properties) + else: + return 0 + + @staticmethod + def operator_specification_get_property_key(specification, index): + return list(specification._internal_obj.properties.keys())[index] + + @staticmethod + def operator_specification_get_num_config_options(specification): + return len(specification._internal_obj.config_spec.config_options_spec) + + @staticmethod + def operator_specification_get_config_name(specification, numOption): + option = specification._internal_obj.config_spec.config_options_spec[numOption] + return option.name + + @staticmethod + def operator_specification_get_config_num_type_names(specification, numOption): + option = specification._internal_obj.config_spec.config_options_spec[numOption] + return len(option.type_names) + + @staticmethod + def operator_specification_get_config_type_name(specification, numOption, numType): + option = specification._internal_obj.config_spec.config_options_spec[numOption] + return option.type_names[numType] + + @staticmethod + def operator_specification_get_config_printable_default_value(specification, numOption): + option = specification._internal_obj.config_spec.config_options_spec[numOption] + return option.default_value_str + + @staticmethod + def operator_specification_get_config_description(specification, numOption): + option = specification._internal_obj.config_spec.config_options_spec[numOption] + return option.document diff --git a/src/ansys/dpf/gate/property_field_grpcapi.py b/src/ansys/dpf/gate/property_field_grpcapi.py new file mode 100644 index 0000000000..025fd9220f --- /dev/null +++ b/src/ansys/dpf/gate/property_field_grpcapi.py @@ -0,0 +1,77 @@ +import sys +import numpy as np +from ansys.dpf.gate.generated import property_field_abstract_api +from ansys.dpf.gate import errors, field_grpcapi + +api_to_call = field_grpcapi.FieldGRPCAPI + +# ------------------------------------------------------------------------------- +# PropertyField +# ------------------------------------------------------------------------------- + +@errors.protect_grpc_class +class PropertyFieldGRPCAPI(property_field_abstract_api.PropertyFieldAbstractAPI): + @staticmethod + def init_property_field_environment(object): + api_to_call.init_field_environment(object) + + @staticmethod + def csproperty_field_new_on_client(client, numEntities, data_size): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.FieldRequest() + request.size.scoping_size = numEntities + request.size.data_size = data_size + request.datatype = "int" + return field_grpcapi._get_stub(client).Create(request) + + @staticmethod + def csproperty_field_get_number_elementary_data(field): + return api_to_call.csfield_get_number_elementary_data(field) + + @staticmethod + def csproperty_field_get_number_of_components(field): + return api_to_call.csfield_get_number_of_components(field) + + @staticmethod + def csproperty_field_get_data_size(field): + return api_to_call.csfield_get_data_size(field) + + @staticmethod + def csproperty_field_set_cscoping(field, scoping): + return api_to_call.csfield_set_cscoping(field, scoping) + + @staticmethod + def csproperty_field_get_cscoping(field): + return api_to_call.csfield_get_cscoping(field) + + @staticmethod + def csproperty_field_get_entity_data(field, EntityIndex): + return api_to_call.csfield_get_entity_data(field, EntityIndex) + + @staticmethod + def csproperty_field_push_back(field, EntityId, size, data): + return api_to_call.csfield_push_back(field, EntityId, size, data) + + @staticmethod + def csproperty_field_get_data_pointer(field, np_array): + return api_to_call.csfield_get_data_pointer(field, np_array) + + @staticmethod + def csproperty_field_set_data_pointer(field, size, data): + return api_to_call.csfield_set_data_pointer(field, size, data) + + @staticmethod + def csproperty_field_get_data(field, np_array): + return api_to_call.csfield_get_data(field, np_array) + + @staticmethod + def csproperty_field_set_data(field, size, data): + if not isinstance(data[0], (int, np.int32)): + raise TypeError("data", "list of int") + data = np.array(data, dtype=np.int32) + metadata = [("size_int", f"{size}")] + return api_to_call.csfield_raw_set_data(field, data, metadata) + + @staticmethod + def csproperty_field_elementary_data_size(field): + return api_to_call.csfield_get_number_of_components(field) diff --git a/src/ansys/dpf/gate/result_info_grpcapi.py b/src/ansys/dpf/gate/result_info_grpcapi.py new file mode 100644 index 0000000000..ea6b574ac3 --- /dev/null +++ b/src/ansys/dpf/gate/result_info_grpcapi.py @@ -0,0 +1,267 @@ +from ansys.dpf.gate.generated import result_info_abstract_api +from ansys.dpf.gate.data_processing_grpcapi import DataProcessingGRPCAPI +from ansys.dpf.gate.object_handler import ObjHandler +from ansys.dpf.gate import errors + +# ------------------------------------------------------------------------------- +# ResultInfo +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(ResultInfoGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class ResultInfoGRPCAPI(result_info_abstract_api.ResultInfoAbstractAPI): + STUBNAME = "result_info_stub" + + @staticmethod + def init_result_info_environment(result_info): + from ansys.grpc.dpf import result_info_pb2_grpc + result_info._server.create_stub_if_necessary(ResultInfoGRPCAPI.STUBNAME, + result_info_pb2_grpc.ResultInfoServiceStub) + result_info._deleter_func = (_get_stub(result_info._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def list(result_info): + from types import SimpleNamespace + server = result_info._server + api = DataProcessingGRPCAPI + + # Get the ListResponse from the server + list_response = _get_stub(server).List(result_info._internal_obj) + # Wrap the ListResponse in a flat response with ObjHandlers to prevent memory leaks + response = SimpleNamespace() + # add attributes to response + setattr(response, "analysis_type", list_response.analysis_type) + setattr(response, "physics_type", list_response.physics_type) + setattr(response, "unit_system", list_response.unit_system) + setattr(response, "nresult", list_response.nresult) + setattr(response, "unit_system_name", list_response.unit_system_name) + setattr(response, "solver_major_version", list_response.solver_major_version) + setattr(response, "solver_minor_version", list_response.solver_minor_version) + setattr(response, "solver_date", list_response.solver_date) + setattr(response, "solver_time", list_response.solver_time) + setattr(response, "user_name", list_response.user_name) + setattr(response, "job_name", list_response.job_name) + setattr(response, "product_name", list_response.product_name) + setattr(response, "main_title", list_response.main_title) + setattr(response, "cyc_support", + ObjHandler(api, list_response.cyc_info.cyc_support, server)) + setattr(response, "cyclic_type", list_response.cyc_info.cyclic_type) + setattr(response, "has_cyclic", list_response.cyc_info.has_cyclic) + + return response + + @staticmethod + def list_result(result_info, idx): + from ansys.grpc.dpf import result_info_pb2 + request = result_info_pb2.AvailableResultRequest() + request.result_info.CopyFrom(result_info._internal_obj) + request.numres = idx + return _get_stub(result_info._server).ListResult(request) + + @staticmethod + def result_info_get_analysis_type(result_info): + return ResultInfoGRPCAPI.list(result_info).analysis_type + + @staticmethod + def result_info_get_physics_type(result_info): + return ResultInfoGRPCAPI.list(result_info).physics_type + + @staticmethod + def result_info_get_analysis_type_name(result_info): + from ansys.grpc.dpf import result_info_pb2 + if result_info._server.meet_version("3.0"): + return ResultInfoGRPCAPI.result_info_get_string_property(result_info, "analysis_type") + analysis_type = ResultInfoGRPCAPI.result_info_get_analysis_type(result_info) + return result_info_pb2.AnalysisType.Name(analysis_type).lower() + + @staticmethod + def result_info_get_physics_type_name(result_info): + from ansys.grpc.dpf import result_info_pb2 + if result_info._server.meet_version("3.0"): + return ResultInfoGRPCAPI.result_info_get_string_property(result_info, "physics_type") + physics_type = ResultInfoGRPCAPI.result_info_get_physics_type(result_info) + return result_info_pb2.PhysicsType.Name(physics_type).lower() + + @staticmethod + def result_info_get_ansys_unit_system_enum(result_info): + return ResultInfoGRPCAPI.list(result_info).unit_system + + @staticmethod + def result_info_get_unit_system_name(result_info): + if result_info._server.meet_version("3.0"): + return ResultInfoGRPCAPI.result_info_get_string_property(result_info, "unit_system_name") + return ResultInfoGRPCAPI.list(result_info).unit_system_name + + @staticmethod + def result_info_get_number_of_results(result_info): + if result_info._server.meet_version("3.0"): + return ResultInfoGRPCAPI.result_info_get_int_property(result_info, "results_count") + return ResultInfoGRPCAPI.list(result_info).nresult + + @staticmethod + def result_info_get_result_number_of_components(result_info, idx): + return ResultInfoGRPCAPI.list_result(result_info, idx).ncomp + + @staticmethod + def result_info_get_result_dimensionality_nature(result_info, idx): + return ResultInfoGRPCAPI.list_result(result_info, idx).dimensionality + + @staticmethod + def result_info_get_result_homogeneity(result_info, idx): + return ResultInfoGRPCAPI.list_result(result_info, idx).homogeneity + + @staticmethod + def result_info_get_result_location(result_info, idx, location): + res = ResultInfoGRPCAPI.list_result(result_info, idx) + location.set_str(res.properties["location"]) + return res + + @staticmethod + def result_info_get_result_name(result_info, idx): + return ResultInfoGRPCAPI.list_result(result_info, idx).name + + @staticmethod + def result_info_get_result_physics_name(result_info, idx): + return ResultInfoGRPCAPI.list_result(result_info, idx).physicsname + + @staticmethod + def result_info_get_result_scripting_name(result_info, idx): + return ResultInfoGRPCAPI.list_result(result_info, idx).properties["scripting_name"] + + @staticmethod + def result_info_get_result_unit_symbol(result_info, idx): + return ResultInfoGRPCAPI.list_result(result_info, idx).unit + + @staticmethod + def result_info_get_qualifiers_for_result(result_info, idx): + out = ResultInfoGRPCAPI.list_result(result_info, idx) + if hasattr(out, "qualifiers"): + return out.qualifiers + return [] + + @staticmethod + def result_info_get_number_of_sub_results(result_info, idx): + return len(ResultInfoGRPCAPI.list_result(result_info, idx).sub_res) + + @staticmethod + def result_info_get_sub_result_name(result_info, idx, idx_sub): + return ResultInfoGRPCAPI.list_result(result_info, idx).sub_res[idx_sub].name + + @staticmethod + def result_info_get_sub_result_operator_name(result_info, idx, idx_sub, name): + res = ResultInfoGRPCAPI.list_result(result_info, idx) + name.set_str(res.sub_res[idx_sub].op_name) + return res + + @staticmethod + def result_info_get_sub_result_description(result_info, idx, idx_sub): + return ResultInfoGRPCAPI.list_result(result_info, idx).sub_res[idx_sub].description + + @staticmethod + def result_info_get_cyclic_support(result_info): + return ResultInfoGRPCAPI.list(result_info).cyc_support.get_ownership() + + @staticmethod + def result_info_get_cyclic_symmetry_type(result_info): + return ResultInfoGRPCAPI.list(result_info).cyclic_type + + @staticmethod + def result_info_has_cyclic_symmetry(result_info): + return ResultInfoGRPCAPI.list(result_info).has_cyclic + + @staticmethod + def result_info_get_solver_version(result_info, major, minor): + if result_info._server.meet_version("3.0"): + res = ResultInfoGRPCAPI.result_info_get_string_property(result_info, "solver_version") + major.set(int(res.split(".")[0])) + minor.set(int(res.split(".")[1])) + listed = ResultInfoGRPCAPI.list(result_info) + major.set(listed.solver_major_version) + minor.set(listed.solver_minor_version) + + @staticmethod + def result_info_get_solve_date_and_time(result_info, date, time): + if result_info._server.meet_version("3.0"): + res = ResultInfoGRPCAPI.result_info_get_int_property(result_info, "solver_date") + res2 = ResultInfoGRPCAPI.result_info_get_int_property(result_info, "solver_time") + date.set(int(res)) + time.set(int(res2)) + listed = ResultInfoGRPCAPI.list(result_info) + date.set(listed.solver_date) + time.set(listed.solver_time) + + @staticmethod + def result_info_get_user_name(result_info): + if result_info._server.meet_version("3.0"): + return ResultInfoGRPCAPI.result_info_get_string_property(result_info, "user_name") + return ResultInfoGRPCAPI.list(result_info).user_name + + @staticmethod + def result_info_get_job_name(result_info): + if result_info._server.meet_version("3.0"): + return ResultInfoGRPCAPI.result_info_get_string_property(result_info, "job_name") + return ResultInfoGRPCAPI.list(result_info).job_name + + @staticmethod + def result_info_get_product_name(result_info): + if result_info._server.meet_version("3.0"): + return ResultInfoGRPCAPI.result_info_get_string_property(result_info, "product_name") + return ResultInfoGRPCAPI.list(result_info).product_name + + @staticmethod + def result_info_get_main_title(result_info): + if result_info._server.meet_version("3.0"): + return ResultInfoGRPCAPI.result_info_get_string_property(result_info, "main_title") + return ResultInfoGRPCAPI.list(result_info).main_title + + @staticmethod + def result_info_get_string_property(result_info, property_name): + from ansys.grpc.dpf import result_info_pb2 + request = result_info_pb2.GetStringPropertiesRequest() + request.result_info.CopyFrom(result_info._internal_obj) + request.property_names.extend([property_name]) + return _get_stub(result_info._server).GetStringProperties(request).properties[property_name] + + @staticmethod + def result_info_get_int_property(result_info, property_name): + from ansys.grpc.dpf import result_info_pb2 + request = result_info_pb2.GetStringPropertiesRequest() + request.result_info.CopyFrom(result_info._internal_obj) + request.property_names.extend([property_name]) + stub = _get_stub(result_info._server) + return int(stub.GetStringProperties(request).properties[property_name]) + + @staticmethod + def result_info_get_qualifier_label_support(result_info, qualifier): + from ansys.grpc.dpf import result_info_pb2 + request = result_info_pb2.ListQualifiersLabelsRequest() + request.result_info.CopyFrom(result_info._internal_obj) + stub = _get_stub(result_info._server) + out = None + supports = stub.ListQualifiersLabels(request).qualifier_labels + api = DataProcessingGRPCAPI + for key, entry in supports.items(): + if key == qualifier: + out = entry + else: + ObjHandler(api, entry, result_info._server) + return out + + @staticmethod + def result_info_get_available_qualifier_labels_as_string_coll(result_info): + from ansys.grpc.dpf import result_info_pb2 + request = result_info_pb2.ListQualifiersLabelsRequest() + request.result_info.CopyFrom(result_info._internal_obj) + stub = _get_stub(result_info._server) + labels = [] + supports = stub.ListQualifiersLabels(request).qualifier_labels + api = DataProcessingGRPCAPI + for key, entry in supports.items(): + ObjHandler(api, entry, result_info._server) + labels.append(key) + return labels + diff --git a/src/ansys/dpf/gate/scoping_grpcapi.py b/src/ansys/dpf/gate/scoping_grpcapi.py new file mode 100644 index 0000000000..44787ce381 --- /dev/null +++ b/src/ansys/dpf/gate/scoping_grpcapi.py @@ -0,0 +1,112 @@ +import numpy as np +from ansys.dpf.gate.generated import scoping_abstract_api +from ansys.dpf.gate import grpc_stream_helpers, errors + +# ------------------------------------------------------------------------------- +# Scoping +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(ScopingGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class ScopingGRPCAPI(scoping_abstract_api.ScopingAbstractAPI): + STUBNAME = "scoping_stub" + + @staticmethod + def init_scoping_environment(object): + from ansys.grpc.dpf import scoping_pb2_grpc + object._server.create_stub_if_necessary(ScopingGRPCAPI.STUBNAME, + scoping_pb2_grpc.ScopingServiceStub) + object._deleter_func = (_get_stub(object._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def scoping_new_on_client(server): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.Empty() + return _get_stub(server).Create(request) + + @staticmethod + def scoping_set_ids(scoping, ids, size): + from ansys.grpc.dpf import scoping_pb2 + # must convert to a list for gRPC + if isinstance(ids, range): + ids = np.array(list(ids), dtype=np.int32) + elif not isinstance(ids, (np.ndarray, np.generic)): + ids = np.array(ids, dtype=np.int32) + else: + ids = np.array(list(ids), dtype=np.int32) + metadata = [("size_int", f"{len(ids)}")] + request = scoping_pb2.UpdateIdsRequest() + request.scoping.CopyFrom(scoping._internal_obj) + if scoping._server.meet_version("2.1"): + _get_stub(scoping._server).UpdateIds(grpc_stream_helpers._data_chunk_yielder(request, ids), metadata=metadata) + else: + _get_stub(scoping._server).UpdateIds( + grpc_stream_helpers._data_chunk_yielder(request, ids, 8.0e6), metadata=metadata + ) + + @staticmethod + def scoping_get_ids(scoping, np_array): + #TO DO: make it more generic + if scoping._server.meet_version("2.1"): + service = _get_stub(scoping._server).List(scoping._internal_obj) + dtype = np.int32 + return grpc_stream_helpers._data_get_chunk_(dtype, service, np_array) + else: + out = [] + + service = _get_stub(scoping._server).List(scoping._internal_obj) + for chunk in service: + out.extend(chunk.ids.rep_int) + if np_array: + return np.array(out, dtype=np.int32) + else: + return out + + @staticmethod + def scoping_get_size(scoping): + from ansys.grpc.dpf import scoping_pb2, base_pb2 + request = scoping_pb2.CountRequest() + request.entity = base_pb2.NUM_ELEMENTARY_DATA + request.scoping.CopyFrom(scoping._internal_obj) + return _get_stub(scoping._server).Count(request).count + + @staticmethod + def scoping_get_location(scoping): + return _get_stub(scoping._server).GetLocation(scoping._internal_obj).loc.location + + @staticmethod + def scoping_set_location(scoping, location): + from ansys.grpc.dpf import scoping_pb2 + request = scoping_pb2.UpdateRequest() + request.location.location = location + request.scoping.CopyFrom(scoping._internal_obj) + _get_stub(scoping._server).Update(request) + + @staticmethod + def scoping_set_entity(scoping, id, index): + from ansys.grpc.dpf import scoping_pb2 + request = scoping_pb2.UpdateRequest() + request.index_id.id = id + request.index_id.index = index + request.scoping.CopyFrom(scoping._internal_obj) + _get_stub(scoping._server).Update(request) + + @staticmethod + def scoping_id_by_index(scoping, index): + from ansys.grpc.dpf import scoping_pb2 + request = scoping_pb2.GetRequest() + request.index = index + request.scoping.CopyFrom(scoping._internal_obj) + return _get_stub(scoping._server).Get(request).id + + @staticmethod + def scoping_index_by_id(scoping, id): + from ansys.grpc.dpf import scoping_pb2 + request = scoping_pb2.GetRequest() + request.id = id + request.scoping.CopyFrom(scoping._internal_obj) + return _get_stub(scoping._server).Get(request).index diff --git a/src/ansys/dpf/gate/session_grpcapi.py b/src/ansys/dpf/gate/session_grpcapi.py new file mode 100644 index 0000000000..f4b92f94b5 --- /dev/null +++ b/src/ansys/dpf/gate/session_grpcapi.py @@ -0,0 +1,93 @@ +from ansys.dpf.gate.generated import session_abstract_api +from ansys.dpf.gate import grpc_stream_helpers, errors + +# ------------------------------------------------------------------------------- +# Session +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(SessionGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class SessionGRPCAPI(session_abstract_api.SessionAbstractAPI): + STUBNAME = "session_stub" + + @staticmethod + def init_session_environment(object): + from ansys.grpc.dpf import session_pb2_grpc + object._server.create_stub_if_necessary(SessionGRPCAPI.STUBNAME, + session_pb2_grpc.SessionServiceStub) + object._deleter_func = (_get_stub(object._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def session_new_on_client(client): + from ansys.grpc.dpf import session_pb2 + request = session_pb2.CreateSessionRequest() + return _get_stub(client).Create(request) + + @staticmethod + def add_external_event_handler(session, event_handler, cb): + _get_stub(session._server).AddProgressEventSystem(session._internal_obj) + + @staticmethod + def add_workflow(session, workflow_identifier, workflow): + from ansys.grpc.dpf import session_pb2 + request = session_pb2.AddRequest() + request.session.CopyFrom(session._internal_obj) + request.wf.CopyFrom(workflow._internal_obj) + request.identifier = workflow_identifier + _get_stub(session._server).Add(request) + + @staticmethod + def add_operator(session, identifier, operator, pin): + from ansys.grpc.dpf import session_pb2 + request = session_pb2.AddRequest() + request.session.CopyFrom(session._internal_obj) + request.op_output.op.CopyFrom(operator._internal_obj) + request.op_output.pin = pin + request.identifier = identifier + _get_stub(session._server).Add(request) + + @staticmethod + def start_listening(session, bar, LOG): + service = _get_stub(session._server).ListenToProgress(session._internal_obj) + service.initial_metadata() + bar.start() + for chunk in service: + try: + bar.update(chunk.progress.progress_percentage) + if len(chunk.state.state): + LOG.warning(chunk.state.state) + except Exception as e: + pass + try: + bar.finish() + except: + pass + + @staticmethod + def flush_workflows(session): + _get_stub(session._server).FlushWorkflows(session._internal_obj) + + @staticmethod + def add_event_handler_type(session, type, datatree): + from ansys.grpc.dpf import session_pb2 + request = session_pb2.AddRequest() + request.session.CopyFrom(session._internal_obj) + request.event_handler_type = type + if datatree: + request.properties.CopyFrom(datatree._internal_obj) + _get_stub(session._server).Add(request) + + @staticmethod + def add_signal_emitter_type(session, type, identifier, datatree): + from ansys.grpc.dpf import session_pb2 + request = session_pb2.AddRequest() + request.session.CopyFrom(session._internal_obj) + request.signal_emitter_type = type + if datatree: + request.properties.CopyFrom(datatree._internal_obj) + request.identifier = identifier + _get_stub(session._server).Add(request) diff --git a/src/ansys/dpf/gate/settings.py b/src/ansys/dpf/gate/settings.py new file mode 100644 index 0000000000..ffa4e3ebfb --- /dev/null +++ b/src/ansys/dpf/gate/settings.py @@ -0,0 +1,5 @@ + +def forward_settings(default_file_chunk_size, common_progress_bar): + from ansys.dpf.gate import misc + misc.DEFAULT_FILE_CHUNK_SIZE = default_file_chunk_size + misc.COMMON_PROGRESS_BAR = common_progress_bar \ No newline at end of file diff --git a/src/ansys/dpf/gate/string_field_grpcapi.py b/src/ansys/dpf/gate/string_field_grpcapi.py new file mode 100644 index 0000000000..f39a493f4f --- /dev/null +++ b/src/ansys/dpf/gate/string_field_grpcapi.py @@ -0,0 +1,69 @@ +from ansys.dpf.gate.generated import string_field_abstract_api +from ansys.dpf.gate import errors, field_grpcapi, grpc_stream_helpers + +api_to_call = field_grpcapi.FieldGRPCAPI + +# ------------------------------------------------------------------------------- +# StringField +# ------------------------------------------------------------------------------- + +@errors.protect_grpc_class +class StringFieldGRPCAPI(string_field_abstract_api.StringFieldAbstractAPI): + @staticmethod + def init_string_field_environment(object): + api_to_call.init_field_environment(object) + + @staticmethod + def csstring_field_get_cscoping(field): + return api_to_call.csfield_get_cscoping(field) + + @staticmethod + def csstring_field_get_data_size(field): + return api_to_call.csfield_get_data_size(field) + + @staticmethod + def csstring_field_set_data(field, size, data): + return api_to_call.csfield_set_data(field, size, data) + + @staticmethod + def csstring_field_set_cscoping(field, scoping): + return api_to_call.csfield_set_cscoping(field, scoping) + + @staticmethod + def csstring_field_push_back(field, EntityId, size, data): + return api_to_call.csfield_push_back(field, EntityId, size, data) + + @staticmethod + def csstring_field_resize(field, dataSize, scopingSize): + raise api_to_call.csfield_resize(field, dataSize, scopingSize) + + @staticmethod + def csstring_field_new_on_client(client, numEntities, data_size): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.FieldRequest() + request.size.scoping_size = numEntities + request.size.data_size = data_size + request.datatype = "string" + return field_grpcapi._get_stub(client).Create(request) + + @staticmethod + def csstring_field_get_entity_data(field, EntityIndex): + return api_to_call.csfield_get_entity_data(field, EntityIndex).tolist() + + @staticmethod + def csstring_field_get_data(field, np_array): + from ansys.grpc.dpf import field_pb2 + request = field_pb2.ListRequest() + request.field.CopyFrom(field._internal_obj) + service = field_grpcapi._get_stub(field._server).List(request) + return grpc_stream_helpers._string_data_get_chunk_(service) + + @staticmethod + def csstring_field_set_data(field, size, data): + from ansys.grpc.dpf import field_pb2 + metadata = [("size_tot", f"{size}")] + request = field_pb2.UpdateDataRequest() + request.field.CopyFrom(field._internal_obj) + field_grpcapi._get_stub(field._server).UpdateData( + grpc_stream_helpers._string_data_chunk_yielder(request, data), metadata=metadata + ) diff --git a/src/ansys/dpf/gate/support_grpcapi.py b/src/ansys/dpf/gate/support_grpcapi.py new file mode 100644 index 0000000000..14f2cc24d7 --- /dev/null +++ b/src/ansys/dpf/gate/support_grpcapi.py @@ -0,0 +1,135 @@ +from ansys.dpf.gate import errors, object_handler, data_processing_grpcapi +from ansys.dpf.gate.generated import support_abstract_api + +# ------------------------------------------------------------------------------- +# Support +# ------------------------------------------------------------------------------- + +def _get_stub(server): + return server.get_stub(SupportGRPCAPI.STUBNAME) + +@errors.protect_grpc_class +class SupportGRPCAPI(support_abstract_api.SupportAbstractAPI): + STUBNAME = "support_stub" + + @staticmethod + def init_support_environment(object): + from ansys.grpc.dpf import support_service_pb2_grpc + object._server.create_stub_if_necessary(SupportGRPCAPI.STUBNAME, + support_service_pb2_grpc.SupportServiceStub) + data_processing_grpcapi.DataProcessingGRPCAPI.init_data_processing_environment(object) + if object._server.meet_version("4.0"): + object._deleter_func = ( + data_processing_grpcapi._get_stub(object._server).Delete, lambda obj: obj._internal_obj) + else: + from ansys.dpf.gate import scoping_grpcapi + scoping_grpcapi.ScopingGRPCAPI.init_scoping_environment(object) + object._deleter_func = ( + scoping_grpcapi._get_stub(object._server).Delete, lambda obj: obj._internal_obj + ) + + + @staticmethod + def support_get_as_time_freq_support(support): + from ansys.grpc.dpf import support_pb2, time_freq_support_pb2 + internal_obj = support.get_ownership() + if isinstance(internal_obj, time_freq_support_pb2.TimeFreqSupport): + message = support + elif isinstance(internal_obj, support_pb2.Support): + message = time_freq_support_pb2.TimeFreqSupport() + if isinstance(message.id, int): + message.id = internal_obj.id + else: + message.id.CopyFrom(internal_obj.id) + else: + raise NotImplementedError(f"Tried to get {support} as TimeFreqSupport.") + return message + + @staticmethod + def support_get_as_meshed_support(support): + from ansys.grpc.dpf import support_pb2, meshed_region_pb2 + internal_obj = support.get_ownership() + if isinstance(internal_obj, meshed_region_pb2.MeshedRegion): + message = support + elif isinstance(internal_obj, support_pb2.Support): + message = meshed_region_pb2.MeshedRegion() + if isinstance(message.id, int): + message.id = internal_obj.id + else: + message.id.CopyFrom(internal_obj.id) + else: + raise NotImplementedError(f"Tried to get {internal_obj} as MeshedRegion.") + return message + + @staticmethod + def support_get_field_support_by_property(support, prop_name): + from ansys.grpc.dpf import support_service_pb2 + request = support_service_pb2.ListRequest() + request.support.id.CopyFrom(support._internal_obj.id) + request.specific_fields.append(prop_name) + response = _get_stub(support._server).List(request).field_supports + if prop_name in response: + return response[prop_name] + + @staticmethod + def support_get_property_field_support_by_property(support, prop_name): + from ansys.grpc.dpf import support_service_pb2 + request = support_service_pb2.ListRequest() + request.support.id.CopyFrom(support._internal_obj.id) + request.specific_prop_fields.append(prop_name) + response = _get_stub(support._server).List(request).field_supports + if prop_name in response: + return response[prop_name] + + + @staticmethod + def support_get_string_field_support_by_property(support, prop_name): + from ansys.grpc.dpf import support_service_pb2 + request = support_service_pb2.ListRequest() + request.support.id.CopyFrom(support._internal_obj.id) + request.specific_string_fields.append(prop_name) + response = _get_stub(support._server).List(request).field_supports + if prop_name in response: + return response[prop_name] + + + @staticmethod + def support_get_property_names_as_string_coll_for_fields(support): + from ansys.grpc.dpf import support_service_pb2 + request = support_service_pb2.ListRequest() + request.support.id.CopyFrom(support._internal_obj.id) + response = _get_stub(support._server).List(request).field_supports + out = [] + for name, field in response.items(): + object_handler.ObjHandler(field) + if field.datatype =="double": + out.append(name) + return out + + + @staticmethod + def support_get_property_names_as_string_coll_for_property_fields(support): + from ansys.grpc.dpf import support_service_pb2 + request = support_service_pb2.ListRequest() + request.support.id.CopyFrom(support._internal_obj.id) + response = _get_stub(support._server).List(request).field_supports + out = [] + for name, field in response.items(): + object_handler.ObjHandler(field) + if field.datatype =="int": + out.append(name) + return out + + @staticmethod + def support_get_property_names_as_string_coll_for_string_fields(support): + from ansys.grpc.dpf import support_service_pb2 + request = support_service_pb2.ListRequest() + request.support.id.CopyFrom(support._internal_obj.id) + response = _get_stub(support._server).List(request).field_supports + out = [] + for name, field in response.items(): + object_handler.ObjHandler(field) + if field.datatype =="string": + out.append(name) + return out + diff --git a/src/ansys/dpf/gate/time_freq_support_grpcapi.py b/src/ansys/dpf/gate/time_freq_support_grpcapi.py new file mode 100644 index 0000000000..0c01d7eac4 --- /dev/null +++ b/src/ansys/dpf/gate/time_freq_support_grpcapi.py @@ -0,0 +1,215 @@ +from ansys.dpf.gate.generated import time_freq_support_abstract_api +from ansys.dpf.gate.data_processing_grpcapi import DataProcessingGRPCAPI +from ansys.dpf.gate.object_handler import ObjHandler +from ansys.dpf.gate import errors +# ------------------------------------------------------------------------------- +# TimeFreqSupport +# ------------------------------------------------------------------------------- + + +def _get_stub(server): + return server.get_stub(TimeFreqSupportGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class TimeFreqSupportGRPCAPI(time_freq_support_abstract_api.TimeFreqSupportAbstractAPI): + STUBNAME = "time_freq_support_stub" + + @staticmethod + def _cumulative_index_request(bIsComplex, timeFreq, freq): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.GetRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.bool_cumulative_index = True + request.complex = bIsComplex + request.frequency = freq + return TimeFreqSupportGRPCAPI.get(timeFreq, request).cumulative_index + + @staticmethod + def _copy_into(request, time_freq_support): + from ansys.grpc.dpf import time_freq_support_pb2, support_pb2 + if isinstance(time_freq_support, time_freq_support_pb2.TimeFreqSupport): + message = time_freq_support + elif isinstance(time_freq_support, support_pb2.Support): + message = time_freq_support_pb2.TimeFreqSupport() + if isinstance(time_freq_support.id, int): + message.id = time_freq_support.id + else: + message.id.CopyFrom(time_freq_support.id) + request.CopyFrom(message) + + @staticmethod + def init_time_freq_support_environment(obj): + from ansys.grpc.dpf import time_freq_support_pb2_grpc + obj._server.create_stub_if_necessary(TimeFreqSupportGRPCAPI.STUBNAME, + time_freq_support_pb2_grpc.TimeFreqSupportServiceStub) + obj._deleter_func = (_get_stub(obj._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def time_freq_support_new_on_client(client): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.Empty() + return _get_stub(client).Create(request) + + @staticmethod + def list(support, stage_num=None): + from types import SimpleNamespace + from ansys.grpc.dpf import time_freq_support_pb2 + server = support._server + api = DataProcessingGRPCAPI + + # Get the ListResponse from the server + request = time_freq_support_pb2.ListRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, support._internal_obj) + if stage_num: + request.cyclic_stage_num = stage_num + list_response = _get_stub(server).List(request) + + # Wrap the ListResponse in a flat response with ObjHandlers to prevent memory leaks + response = SimpleNamespace( + freq_real=ObjHandler(api, list_response.freq_real, server), + freq_complex=ObjHandler(api, list_response.freq_complex, server), + rpm=ObjHandler(api, list_response.rpm, server), + cyc_harmonic_index=ObjHandler(api, list_response.cyc_harmonic_index, server), + cyclic_harmonic_index_scoping=ObjHandler(api, list_response.cyclic_harmonic_index_scoping, server) if hasattr(list_response, "cyclic_harmonic_index_scoping") else None) + return response + + @staticmethod + def get(timeFreq, request): + return _get_stub(timeFreq._server).Get(request) + + @staticmethod + def update(timeFreq, request): + _get_stub(timeFreq._server).Update(request) + + @staticmethod + def time_freq_support_get_number_sets(timeFreq): + from ansys.grpc.dpf import time_freq_support_pb2, base_pb2 + request = time_freq_support_pb2.CountRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.entity = base_pb2.NUM_SETS + return _get_stub(timeFreq._server).Count(request).count + + @staticmethod + def time_freq_support_set_shared_time_freqs(timeFreq, frequencies): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.TimeFreqSupportUpdateRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.freq_real.CopyFrom(frequencies._internal_obj) + TimeFreqSupportGRPCAPI.update(timeFreq, request) + + @staticmethod + def time_freq_support_set_shared_imaginary_freqs(timeFreq, complex_frequencies): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.TimeFreqSupportUpdateRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.freq_complex.CopyFrom(complex_frequencies._internal_obj) + TimeFreqSupportGRPCAPI.update(timeFreq, request) + + @staticmethod + def time_freq_support_set_shared_rpms(timeFreq, rpms): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.TimeFreqSupportUpdateRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.rpm.CopyFrom(rpms._internal_obj) + TimeFreqSupportGRPCAPI.update(timeFreq, request) + + @staticmethod + def time_freq_support_set_harmonic_indices(timeFreq, field, stageNum): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.TimeFreqSupportUpdateRequest() + cyclic_data = time_freq_support_pb2.CyclicHarmonicData() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + cyclic_data.cyc_harmonic_index.CopyFrom(field._internal_obj) + cyclic_data.stage_num = stageNum + request.cyc_harmonic_data.CopyFrom(cyclic_data) + TimeFreqSupportGRPCAPI.update(timeFreq, request) + + @staticmethod + def time_freq_support_get_shared_time_freqs(timeFreq): + return TimeFreqSupportGRPCAPI.list(timeFreq).freq_real.get_ownership() + + @staticmethod + def time_freq_support_get_shared_imaginary_freqs(timeFreq): + return TimeFreqSupportGRPCAPI.list(timeFreq).freq_complex.get_ownership() + + @staticmethod + def time_freq_support_get_shared_rpms(timeFreq): + return TimeFreqSupportGRPCAPI.list(timeFreq).rpm.get_ownership() + + @staticmethod + def time_freq_support_get_shared_harmonic_indices(timeFreq, stage): + return TimeFreqSupportGRPCAPI.list(timeFreq, + stage_num=stage).cyc_harmonic_index.get_ownership() + + @staticmethod + def time_freq_support_get_imaginary_freqs_cummulative_index(timeFreq, dVal, i1, i2): + return TimeFreqSupportGRPCAPI._cumulative_index_request(True, timeFreq, dVal) + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_value(timeFreq, dVal, i1, i2): + return TimeFreqSupportGRPCAPI._cumulative_index_request(False, timeFreq, dVal) + + + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_value_and_load_step(timeFreq, step, + substep, freq, + cplx): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.GetRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.bool_cumulative_index = True + request.complex = cplx + if freq is not None: + request.frequency = freq + else: + request.step_substep.step = step + request.step_substep.substep = substep + return TimeFreqSupportGRPCAPI.get(timeFreq, request).cumulative_index + + @staticmethod + def time_freq_support_get_time_freq_cummulative_index_by_step(timeFreq, step, subStep): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.GetRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.bool_cumulative_index = True + request.step_substep.step = step + request.step_substep.substep = subStep + return TimeFreqSupportGRPCAPI.get(timeFreq, request).cumulative_index + + @staticmethod + def time_freq_support_get_time_freq_by_step(timeFreq, stepIndex, subStepIndex): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.GetRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.complex = False + request.step_substep.step = stepIndex + request.step_substep.substep = subStepIndex + return TimeFreqSupportGRPCAPI.get(timeFreq, request).frequency + + @staticmethod + def time_freq_support_get_imaginary_freq_by_step(timeFreq, stepIndex, subStepIndex): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.GetRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.complex = True + request.step_substep.step = stepIndex + request.step_substep.substep = subStepIndex + return TimeFreqSupportGRPCAPI.get(timeFreq, request).frequency + + @staticmethod + def time_freq_support_get_time_freq_by_cumul_index(timeFreq, iCumulativeIndex): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.GetRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.complex = False + request.cumulative_index = iCumulativeIndex + return TimeFreqSupportGRPCAPI.get(timeFreq, request).frequency + + @staticmethod + def time_freq_support_get_imaginary_freq_by_cumul_index(timeFreq, iCumulativeIndex): + from ansys.grpc.dpf import time_freq_support_pb2 + request = time_freq_support_pb2.GetRequest() + TimeFreqSupportGRPCAPI._copy_into(request.time_freq_support, timeFreq._internal_obj) + request.complex = True + request.cumulative_index = iCumulativeIndex + return TimeFreqSupportGRPCAPI.get(timeFreq, request).frequency diff --git a/src/ansys/dpf/gate/tmp_dir_grpcapi.py b/src/ansys/dpf/gate/tmp_dir_grpcapi.py new file mode 100644 index 0000000000..d7fe57e8a4 --- /dev/null +++ b/src/ansys/dpf/gate/tmp_dir_grpcapi.py @@ -0,0 +1,19 @@ +from ansys.dpf.gate.data_processing_grpcapi import DataProcessingGRPCAPI +from ansys.dpf.gate.generated import tmp_dir_abstract_api +#------------------------------------------------------------------------------- +# TmpDir +#------------------------------------------------------------------------------- + +def _get_stub(server): + from ansys.grpc.dpf import base_pb2_grpc + server.create_stub_if_necessary(DataProcessingGRPCAPI.STUBNAME, base_pb2_grpc.BaseServiceStub) + return server.get_stub(DataProcessingGRPCAPI.STUBNAME) + +class TmpDirGRPCAPI(tmp_dir_abstract_api.TmpDirAbstractAPI): + STUBNAME = "core_stub" + + @staticmethod + def tmp_dir_get_dir_on_client(client): + from ansys.grpc.dpf import base_pb2 + request = base_pb2.Empty() + return _get_stub(client).CreateTmpDir(request).server_file_path \ No newline at end of file diff --git a/src/ansys/dpf/gate/utils.py b/src/ansys/dpf/gate/utils.py new file mode 100644 index 0000000000..ae4134ebc9 --- /dev/null +++ b/src/ansys/dpf/gate/utils.py @@ -0,0 +1,129 @@ +import ctypes +import numpy as np +from ansys.dpf.gate.generated import capi +from ansys.dpf.gate import integral_types + + +def data_processing_core_load_api(path, api_name): + errorSize = ctypes.c_int(0) + errorMsg = ctypes.c_wchar_p() + capi.dll.DataProcessingCore_LoadAPI(str.encode(path), str.encode(api_name), ctypes.byref(errorSize), + ctypes.byref(errorMsg)) + if errorSize.value != 0: + raise Exception(errorMsg.value) + + +def to_int32_ptr(to_replace): + if to_replace is None: + return None + elif isinstance(to_replace, np.ndarray): + return to_replace.ctypes.data_as(ctypes.POINTER(ctypes.c_int32)) + elif isinstance(to_replace, integral_types.MutableInt32): + return to_replace.ctypes_pointer() + elif isinstance(to_replace, integral_types.MutableListInt32): + return to_replace.val + elif isinstance(to_replace, (int, np.int32)): + return ctypes.pointer(ctypes.c_int32(to_replace)) + else: + return (ctypes.c_int32 * len(to_replace))(*to_replace) + + +def to_int32(to_replace): + if isinstance(to_replace, int): + return ctypes.c_int32(to_replace) + elif isinstance(to_replace, integral_types.MutableInt32): + return to_replace.val + else: + return to_replace + + +def to_int32_ptr_ptr(to_replace): + if to_replace is None: + return None + elif isinstance(to_replace, np.ndarray): + return ctypes.pointer(to_replace.ctypes.data_as(ctypes.POINTER(ctypes.c_int32))) + else: + return to_replace.ctypes_pointer() + + +def to_double_ptr(to_replace): + if to_replace is None: + return None + elif isinstance(to_replace, np.ndarray): + return to_replace.ctypes.data_as(ctypes.POINTER(ctypes.c_double)) + elif isinstance(to_replace, integral_types.MutableDouble): + return to_replace.ctypes_pointer() + elif isinstance(to_replace, integral_types.MutableListDouble): + return to_replace.val + elif isinstance(to_replace, (float, np.float64)): + return ctypes.pointer(ctypes.c_double(to_replace)) + else: + return (ctypes.c_double * len(to_replace))(*to_replace) + + +def to_double_ptr_ptr(to_replace): + if to_replace is None: + return None + elif isinstance(to_replace, np.ndarray): + return ctypes.pointer(to_replace.ctypes.data_as(ctypes.POINTER(ctypes.c_double))) + else: + return to_replace.ctypes_pointer() + + +def to_char_ptr(to_replace): + if to_replace is None: + return None + if isinstance(to_replace, integral_types.MutableString): + return to_replace.val + elif isinstance(to_replace, integral_types.MutableListChar): + return to_replace.val + return ctypes.create_string_buffer(to_replace.encode('utf-8')) + + +def to_char_ptr_ptr(to_replace): + if to_replace is None: + return None + if isinstance(to_replace, integral_types.MutableListString): + return ctypes.cast(to_replace.val, ctypes.POINTER(ctypes.POINTER(ctypes.c_char))) + elif isinstance(to_replace, integral_types.MutableString): + return to_replace.cchar_p_p() + elif isinstance(to_replace, integral_types.MutableListChar): + return ctypes.pointer(to_replace.val) + else: + raise NotImplemented + + +def to_char_ptr_ptr_ptr(to_replace): + if to_replace is None: + return None + if isinstance(to_replace, integral_types.MutableListString): + return to_replace.cchar_p_p_p() + else: + raise NotImplemented + + +def to_void_ptr(to_replace): + if to_replace is None: + return None + elif isinstance(to_replace, np.ndarray): + return to_replace.ctypes.data_as(ctypes.c_void_p) + else: + return to_replace + + +def to_void_ptr_ptr(to_replace): + if to_replace is None: + return None + elif isinstance(to_replace, np.ndarray): + return ctypes.pointer(to_replace.ctypes.data_as(ctypes.c_void_p)) + elif isinstance(to_replace, integral_types.MutableListChar): + return ctypes.cast(to_replace.ctypes_pointer(), ctypes.POINTER(ctypes.c_void_p)) + else: + return to_replace + + +def to_array(response): + out = [] + for i in range(len(response)): + out.append(response[i]) + return out \ No newline at end of file diff --git a/src/ansys/dpf/gate/workflow_grpcapi.py b/src/ansys/dpf/gate/workflow_grpcapi.py new file mode 100644 index 0000000000..5c35e3bed3 --- /dev/null +++ b/src/ansys/dpf/gate/workflow_grpcapi.py @@ -0,0 +1,497 @@ +from ansys.dpf.gate.generated import workflow_abstract_api +from ansys.dpf.gate.operator_grpcapi import OperatorGRPCAPI +from ansys.dpf.gate import errors + +#------------------------------------------------------------------------------- +# Workflow +#------------------------------------------------------------------------------- + +def _get_stub(server): + return server.get_stub(WorkflowGRPCAPI.STUBNAME) + + +@errors.protect_grpc_class +class WorkflowGRPCAPI(workflow_abstract_api.WorkflowAbstractAPI): + STUBNAME = "workflow_stub" + + @staticmethod + def init_workflow_environment(object): + from ansys.grpc.dpf import workflow_pb2_grpc + object._server.create_stub_if_necessary(WorkflowGRPCAPI.STUBNAME, + workflow_pb2_grpc.WorkflowServiceStub) + object._deleter_func = (_get_stub(object._server).Delete, lambda obj: obj._internal_obj) + + @staticmethod + def work_flow_new_on_client(client): + from ansys.grpc.dpf import base_pb2, workflow_pb2 + request = base_pb2.Empty() + if hasattr(workflow_pb2, "CreateRequest"): + request = workflow_pb2.CreateRequest(empty=request) + return _get_stub(client).Create(request) + + @staticmethod + #TO DO: add @version_requires("3.0") + def work_flow_get_copy_on_other_client(wf, address, protocol): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.RemoteCopyRequest() + request.wf.CopyFrom(wf._internal_obj) + request.address = address + create_request = workflow_pb2.CreateRequest() + create_request.remote_copy.CopyFrom(request) + return _get_stub(wf._server).Create(create_request) + + @staticmethod + def _connect_init(wf, pin_name): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.UpdateConnectionRequest() + request.wf.CopyFrom(wf._internal_obj) + request.pin_name = pin_name + return request + + @staticmethod + def work_flow_connect_int(wf, pin_name, value): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.int = value + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_bool(wf, pin_name, value): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.bool = value + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_double(wf, pin_name, value): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.double = value + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_string(wf, pin_name, value): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.str = value + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_scoping(wf, pin_name, scoping): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.scoping.CopyFrom(scoping._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_data_sources(wf, pin_name, dataSources): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.data_sources.CopyFrom(dataSources._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_field(wf, pin_name, value): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.field.CopyFrom(value._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_collection(wf, pin_name, value): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.collection.CopyFrom(value._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_collection_as_vector(wf, pin_name, value): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.collection.CopyFrom(value._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_meshed_region(wf, pin_name, mesh): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.mesh.CopyFrom(mesh._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_property_field(wf, pin_name, field): + return WorkflowGRPCAPI.work_flow_connect_field(wf, pin_name, field) + + @staticmethod + def work_flow_connect_string_field(wf, pin_name, field): + return WorkflowGRPCAPI.work_flow_connect_field(wf, pin_name, field) + + @staticmethod + def work_flow_connect_custom_type_field(wf, pin_name, field): + return WorkflowGRPCAPI.work_flow_connect_field(wf, pin_name, field) + + @staticmethod + def work_flow_connect_cyclic_support(wf, pin_name, support): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.cyc_support.CopyFrom(support._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_time_freq_support(wf, pin_name, support): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.time_freq_support.CopyFrom(support._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_workflow(wf, pin_name, otherwf): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.workflow.CopyFrom(otherwf._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_label_space(wf, pin_name, labelspace): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.label_space.CopyFrom(labelspace._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_vector_int(wf, pin_name, ptrValue, size): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.vint.rep_int.extend(ptrValue) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_vector_double(wf, pin_name, ptrValue, size): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.vdouble.rep_double.extend(ptrValue) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_operator_output(wf, pin_name, value, output_pin): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.inputop.inputop.CopyFrom(value._internal_obj) + request.inputop.pinOut = output_pin + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_data_tree(wf, pin_name, dataTree): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.data_tree.CopyFrom(dataTree._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def work_flow_connect_generic_data_container(wf, pin_name, container): + request = WorkflowGRPCAPI._connect_init(wf, pin_name) + request.generic_data_container.CopyFrom(container._internal_obj) + _get_stub(wf._server).UpdateConnection(request) + + @staticmethod + def get_output_init(wf, pin_name): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.WorkflowEvaluationRequest() + request.wf.CopyFrom(wf._internal_obj) + request.pin_name = pin_name + return request + + @staticmethod + def get_output_finish(wf, request, stype, subtype=""): + from ansys.grpc.dpf import base_pb2 + request.type = base_pb2.Type.Value(stype.upper()) + if subtype != "": + request.subtype = base_pb2.Type.Value(subtype.upper()) + if hasattr(wf, "_progress_thread") and wf._progress_thread: + out = _get_stub(wf._server).Get.future(request) + wf._progress_thread.start() + out = out.result() + else: + out = _get_stub(wf._server).Get(request) + return OperatorGRPCAPI._take_out_of_get_response(out) + + @staticmethod + def work_flow_getoutput_fields_container(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "collection" + subtype = "field" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype, subtype) + + @staticmethod + def work_flow_getoutput_scopings_container(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "collection" + subtype = "scoping" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype, subtype) + + @staticmethod + def work_flow_getoutput_meshes_container(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "collection" + subtype = "meshed_region" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype, subtype) + + @staticmethod + def work_flow_getoutput_field(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "field" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_scoping(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "scoping" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_time_freq_support(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "time_freq_support" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_meshed_region(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "meshed_region" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_result_info(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "result_info" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_property_field(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "property_field" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_string_field(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "string_field" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_custom_type_field(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "custom_type_field" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_cyclic_support(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "cyclic_support" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_data_sources(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "data_sources" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_workflow(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "workflow" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_generic_data_container(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "generic_data_container" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_int_collection(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "collection" + subtype = "int" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype, subtype) + + @staticmethod + def work_flow_getoutput_double_collection(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "collection" + subtype = "double" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype, subtype) + + @staticmethod + def work_flow_getoutput_operator(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "operator" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_data_tree(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "data_tree" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_string(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "string" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_int(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "int" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_double(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "double" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_getoutput_bool(wf, pin_name): + request = WorkflowGRPCAPI.get_output_init(wf, pin_name) + stype = "bool" + return WorkflowGRPCAPI.get_output_finish(wf, request, stype) + + @staticmethod + def work_flow_set_name_input_pin(wf, op, pin, pin_name): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.UpdatePinNamesRequest() + request.wf.CopyFrom(wf._internal_obj) + input_request = workflow_pb2.OperatorNaming() + input_request.name = pin_name + input_request.pin = pin + input_request.operator.CopyFrom(op._internal_obj) + request.inputs_naming.extend([input_request]) + _get_stub(wf._server).UpdatePinNames(request) + + @staticmethod + def work_flow_set_name_output_pin(wf, op, pin, pin_name): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.UpdatePinNamesRequest() + request.wf.CopyFrom(wf._internal_obj) + output_request = workflow_pb2.OperatorNaming() + output_request.name = pin_name + output_request.pin = pin + output_request.operator.CopyFrom(op._internal_obj) + request.outputs_naming.extend([output_request]) + _get_stub(wf._server).UpdatePinNames(request) + + @staticmethod + def work_flow_add_operator(wf, op): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.AddOperatorsRequest() + request.wf.CopyFrom(wf._internal_obj) + request.operators.extend([op._internal_obj]) + _get_stub(wf._server).AddOperators(request) + + @staticmethod + def work_flow_record_instance(wf, user_name, transfer_ownership): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.RecordInInternalRegistryRequest() + request.wf.CopyFrom(wf._internal_obj) + if user_name: + request.identifier = user_name + request.transferOwnership = transfer_ownership + return _get_stub(wf._server).RecordInInternalRegistry(request).id + + @staticmethod + def work_flow_get_by_identifier_on_client(identifier, client): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.WorkflowFromInternalRegistryRequest() + request.registry_id = identifier + return _get_stub(client).GetFromInternalRegistry(request) + + @staticmethod + def _info(wf): + """Dictionary with the operator names and the exposed input and output names. + + Returns + ---------- + info : dictionarry str->list str + Dictionary with ``"operator_names"``, ``"input_names"``, and ``"output_names"`` key. + """ + tmp = _get_stub(wf._server).List(wf._internal_obj) + out = {"operator_names": [], "input_names": [], "output_names": []} + for name in tmp.operator_names: + out["operator_names"].append(name) + for name in tmp.input_pin_names.pin_names: + out["input_names"].append(name) + for name in tmp.output_pin_names.pin_names: + out["output_names"].append(name) + return out + + @staticmethod + def work_flow_number_of_operators(wf): + return len(WorkflowGRPCAPI._info(wf)["operator_names"]) + + @staticmethod + def work_flow_operator_name_by_index(wf, op_index): + return WorkflowGRPCAPI._info(wf)["operator_names"][op_index] + + @staticmethod + def work_flow_number_of_input(wf): + return len(WorkflowGRPCAPI._info(wf)["input_names"]) + + @staticmethod + def work_flow_number_of_output(wf): + return len(WorkflowGRPCAPI._info(wf)["output_names"]) + + @staticmethod + def work_flow_input_by_index(wf, pin_index): + return WorkflowGRPCAPI._info(wf)["input_names"][pin_index] + + @staticmethod + def work_flow_output_by_index(wf, pin_index): + return WorkflowGRPCAPI._info(wf)["output_names"][pin_index] + + @staticmethod + def work_flow_connect_with(wf_right, wf2_left): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.ConnectRequest() + request.right_wf.CopyFrom(wf_right._internal_obj) + request.left_wf.CopyFrom(wf2_left._internal_obj) + return _get_stub(wf_right._server).Connect(request) + + @staticmethod + def work_flow_connect_with_specified_names(wf_right, wf2_left, map): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.ConnectRequest() + request.right_wf.CopyFrom(wf_right._internal_obj) + request.left_wf.CopyFrom(wf2_left._internal_obj) + request.input_to_output.extend(map._internal_obj) + return _get_stub(wf_right._server).Connect(request) + + @staticmethod + def workflow_create_connection_map_for_object(obj): + return [] + + @staticmethod + def workflow_add_entry_connection_map(map, out, in_): + from ansys.grpc.dpf import workflow_pb2 + map._internal_obj.append(workflow_pb2.InputToOutputChainRequest( + output_name=out, + input_name=in_) + ) + + @staticmethod + def work_flow_create_from_text_on_client(text, client): + from ansys.grpc.dpf import workflow_pb2 + if isinstance(text, str): + save_text = text + text = workflow_pb2.TextStream() + text.stream = save_text + return _get_stub(client).LoadFromStream(text) + + @staticmethod + def work_flow_write_to_text(wf): + return _get_stub(wf._server).WriteToStream(wf._internal_obj) + + @staticmethod + def work_flow_rename_input_pin(wf, pin_name, new_pin_name): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.UpdatePinNamesRequest() + request.wf.CopyFrom(wf._internal_obj) + output_request = workflow_pb2.OperatorNaming() + output_request.name = new_pin_name + output_request.old_name = pin_name + request.inputs_naming.extend([output_request]) + _get_stub(wf._server).UpdatePinNames(request) + + @staticmethod + def work_flow_rename_output_pin(wf, pin_name, new_pin_name): + from ansys.grpc.dpf import workflow_pb2 + request = workflow_pb2.UpdatePinNamesRequest() + request.wf.CopyFrom(wf._internal_obj) + output_request = workflow_pb2.OperatorNaming() + output_request.name = new_pin_name + output_request.old_name = pin_name + request.outputs_naming.extend([output_request]) + _get_stub(wf._server).UpdatePinNames(request) diff --git a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll new file mode 100644 index 0000000000..7261ceac99 Binary files /dev/null and b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll differ diff --git a/src/ansys/dpf/gatebin/DPFClientAPI.dll b/src/ansys/dpf/gatebin/DPFClientAPI.dll new file mode 100644 index 0000000000..961e0d95de Binary files /dev/null and b/src/ansys/dpf/gatebin/DPFClientAPI.dll differ diff --git a/src/ansys/dpf/gatebin/_version.py b/src/ansys/dpf/gatebin/_version.py new file mode 100644 index 0000000000..5716a08eb5 --- /dev/null +++ b/src/ansys/dpf/gatebin/_version.py @@ -0,0 +1,6 @@ +"""Version for ansys-dpf-gatebin""" +# major, minor, patch +version_info = 0, 4, "2.dev0" + +# Nice string for the version +__version__ = ".".join(map(str, version_info)) \ No newline at end of file diff --git a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so new file mode 100644 index 0000000000..07a5aa86a6 Binary files /dev/null and b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so differ diff --git a/src/ansys/dpf/gatebin/libDPFClientAPI.so b/src/ansys/dpf/gatebin/libDPFClientAPI.so new file mode 100644 index 0000000000..57799a17bc Binary files /dev/null and b/src/ansys/dpf/gatebin/libDPFClientAPI.so differ diff --git a/src/ansys/grpc/dpf/__init__.py b/src/ansys/grpc/dpf/__init__.py new file mode 100644 index 0000000000..792881caa1 --- /dev/null +++ b/src/ansys/grpc/dpf/__init__.py @@ -0,0 +1 @@ +from ansys.grpc.dpf._version import __version__ \ No newline at end of file diff --git a/src/ansys/grpc/dpf/_version.py b/src/ansys/grpc/dpf/_version.py new file mode 100644 index 0000000000..dcd30a579e --- /dev/null +++ b/src/ansys/grpc/dpf/_version.py @@ -0,0 +1,2 @@ +"""ansys-grpc-dpf python protocol version""" +__version__ = '0.8.2dev0' # major.minor.patch diff --git a/src/ansys/grpc/dpf/available_result_pb2.py b/src/ansys/grpc/dpf/available_result_pb2.py new file mode 100644 index 0000000000..c2165aa37c --- /dev/null +++ b/src/ansys/grpc/dpf/available_result_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: available_result.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.label_space_pb2 as label__space__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x61vailable_result.proto\x12!ansys.api.dpf.available_result.v0\x1a\nbase.proto\x1a\x11label_space.proto\"?\n\tSubResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07op_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\xe5\x03\n\x17\x41vailableResultResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0bphysicsname\x18\x02 \x01(\t\x12\r\n\x05ncomp\x18\x03 \x01(\x05\x12\x35\n\x0e\x64imensionality\x18\x04 \x01(\x0e\x32\x1d.ansys.api.dpf.base.v0.Nature\x12\x43\n\x0bhomogeneity\x18\x05 \x01(\x0e\x32..ansys.api.dpf.available_result.v0.Homogeneity\x12\x0c\n\x04unit\x18\x06 \x01(\t\x12=\n\x07sub_res\x18\x07 \x03(\x0b\x32,.ansys.api.dpf.available_result.v0.SubResult\x12^\n\nproperties\x18\x08 \x03(\x0b\x32J.ansys.api.dpf.available_result.v0.AvailableResultResponse.PropertiesEntry\x12<\n\nqualifiers\x18\t \x03(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpace\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*\xb7\x08\n\x0bHomogeneity\x12\x10\n\x0c\x41\x43\x43\x45LERATION\x10\x00\x12\t\n\x05\x41NGLE\x10\x01\x12\x14\n\x10\x41NGULAR_VELOCITY\x10\x02\x12\x0b\n\x07SURFACE\x10\x03\x12\x0f\n\x0b\x43\x41PACITANCE\x10\x04\x12\x13\n\x0f\x45LECTRIC_CHARGE\x10\x05\x12\x1b\n\x17\x45LECTRIC_CHARGE_DENSITY\x10\x06\x12\x10\n\x0c\x43ONDUCTIVITY\x10\x07\x12\x0b\n\x07\x43URRENT\x10\t\x12\x0b\n\x07\x44\x45NSITY\x10\n\x12\x10\n\x0c\x44ISPLACEMENT\x10\x0b\x12\x19\n\x15\x45LECTRIC_CONDUCTIVITY\x10\x0c\x12\x12\n\x0e\x45LECTRIC_FIELD\x10\r\x12\x19\n\x15\x45LECTRIC_FLUX_DENSITY\x10\x0e\x12\x18\n\x14\x45LECTRIC_RESISTIVITY\x10\x0f\x12\n\n\x06\x45NERGY\x10\x10\x12\x14\n\x10\x46ILM_COEFFICIENT\x10\x11\x12\t\n\x05\x46ORCE\x10\x12\x12\x13\n\x0f\x46ORCE_INTENSITY\x10\x13\x12\r\n\tFREQUENCY\x10\x14\x12\r\n\tHEAT_FLUX\x10\x15\x12\x13\n\x0fHEAT_GENERATION\x10\x16\x12\r\n\tHEAT_RATE\x10\x17\x12\x0e\n\nINDUCTANCE\x10\x18\x12\x12\n\x0eINVERSE_STRESS\x10\x19\x12\n\n\x06LENGTH\x10\x1a\x12\x1c\n\x18MAGNETIC_FIELD_INTENSITY\x10\x1b\x12\x11\n\rMAGNETIC_FLUX\x10\x1c\x12\x19\n\x15MAGNETIC_FLUX_DENSITY\x10\x1d\x12\x08\n\x04MASS\x10\x1e\x12\n\n\x06MOMENT\x10\x1f\x12\x13\n\x0fMOMENT_INTERTIA\x10 \x12\x10\n\x0cPERMEABILITY\x10!\x12\x10\n\x0cPERMITTIVITY\x10\"\x12\x0b\n\x07POISSON\x10#\x12\t\n\x05POWER\x10$\x12\x0c\n\x08PRESSURE\x10%\x12\x19\n\x15RELATIVE_PERMEABILITY\x10&\x12\x19\n\x15RELATIVE_PERMITTIVITY\x10\'\x12\x13\n\x0fSECTION_MODULUS\x10(\x12\x11\n\rSPECIFIC_HEAT\x10)\x12\x13\n\x0fSPECIFIC_WEIGHT\x10*\x12\x10\n\x0cSHEAR_STRAIN\x10+\x12\r\n\tSTIFFNESS\x10,\x12\n\n\x06STRAIN\x10-\x12\n\n\x06STRESS\x10.\x12\x0c\n\x08STRENGTH\x10/\x12\x15\n\x11THERMAL_EXPANSION\x10\x30\x12\x0f\n\x0bTEMPERATURE\x10\x31\x12\x08\n\x04TIME\x10\x32\x12\x0c\n\x08VELOCITY\x10\x33\x12\x0b\n\x07VOLTAGE\x10\x34\x12\n\n\x06VOLUME\x10\x35\x12\x17\n\x13MOMENT_INERTIA_MASS\x10\x37\x12\x1b\n\x17STRESS_INTENSITY_FACTOR\x10\\\x12\x14\n\x10THERMAL_GRADIENT\x10_\x12\x0f\n\nRESISTANCE\x10\xe8\x07\x12\x0b\n\x07UNKNOWN\x10o\x12\x11\n\rDIMENSIONLESS\x10uB#\xaa\x02 Ansys.Api.Dpf.AvailableResult.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'available_result_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002 Ansys.Api.Dpf.AvailableResult.V0' + _AVAILABLERESULTRESPONSE_PROPERTIESENTRY._options = None + _AVAILABLERESULTRESPONSE_PROPERTIESENTRY._serialized_options = b'8\001' + _globals['_HOMOGENEITY']._serialized_start=646 + _globals['_HOMOGENEITY']._serialized_end=1725 + _globals['_SUBRESULT']._serialized_start=92 + _globals['_SUBRESULT']._serialized_end=155 + _globals['_AVAILABLERESULTRESPONSE']._serialized_start=158 + _globals['_AVAILABLERESULTRESPONSE']._serialized_end=643 + _globals['_AVAILABLERESULTRESPONSE_PROPERTIESENTRY']._serialized_start=594 + _globals['_AVAILABLERESULTRESPONSE_PROPERTIESENTRY']._serialized_end=643 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/available_result_pb2_grpc.py b/src/ansys/grpc/dpf/available_result_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/src/ansys/grpc/dpf/available_result_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/src/ansys/grpc/dpf/base_pb2.py b/src/ansys/grpc/dpf/base_pb2.py new file mode 100644 index 0000000000..031a686b09 --- /dev/null +++ b/src/ansys/grpc/dpf/base_pb2.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: base.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nbase.proto\x12\x15\x61nsys.api.dpf.base.v0\"\x07\n\x05\x45mpty\"6\n\x10\x45ntityIdentifier\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x16\n\x0eserver_address\x18\x02 \x01(\t\"\"\n\x0c\x44oubleVector\x12\x12\n\nrep_double\x18\x01 \x03(\x01\" \n\x0b\x46loatVector\x12\x11\n\trep_float\x18\x01 \x03(\x02\"\x1c\n\tIntVector\x12\x0f\n\x07rep_int\x18\x01 \x03(\x05\"\x1f\n\nByteVector\x12\x11\n\trep_bytes\x18\x01 \x01(\x0c\"\x1a\n\x08PBString\x12\x0e\n\x06string\x18\x01 \x01(\t\"\"\n\x0cStringVector\x12\x12\n\nrep_string\x18\x01 \x03(\t\"4\n\x03Ids\x12-\n\x03ids\x18\x01 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVector\"\x1c\n\x08Location\x12\x10\n\x08location\x18\x01 \x01(\t\"\x1e\n\rCountResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\"\x16\n\x05\x41rray\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"V\n\rPluginRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x64llPath\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x16\n\x0egenerate_files\x18\x04 \x01(\x08\"\x13\n\x11ServerInfoRequest\"\xef\x01\n\x12ServerInfoResponse\x12\x14\n\x0cmajorVersion\x18\x01 \x01(\x05\x12\x14\n\x0cminorVersion\x18\x02 \x01(\x05\x12\x11\n\tprocessId\x18\x03 \x01(\x04\x12\n\n\x02ip\x18\x04 \x01(\t\x12\x0c\n\x04port\x18\x05 \x01(\x05\x12M\n\nproperties\x18\x06 \x03(\x0b\x32\x39.ansys.api.dpf.base.v0.ServerInfoResponse.PropertiesEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"&\n\x0f\x44\x65scribeRequest\x12\x13\n\x0b\x64pf_type_id\x18\x01 \x01(\x05\"M\n\rDeleteRequest\x12<\n\x0b\x64pf_type_id\x18\x01 \x03(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"S\n\x13\x44uplicateRefRequest\x12<\n\x0b\x64pf_type_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\'\n\x10\x44\x65scribeResponse\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\"X\n\x14\x44uplicateRefResponse\x12@\n\x0fnew_dpf_type_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"2\n\x08\x46ileData\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x18\n\x10server_file_path\x18\x02 \x01(\t\"/\n\x13\x44ownloadFileRequest\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\"E\n\x14\x44ownloadFileResponse\x12-\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.FileData\"r\n\x11UploadFileRequest\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\x12\x14\n\x0cuse_temp_dir\x18\x02 \x01(\x08\x12-\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.FileData\".\n\x12UploadFileResponse\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\"G\n\x10SerializeRequest\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\"\n\x11SerializeResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"c\n\x0e\x43onfigResponse\x12Q\n runtime_core_config_data_tree_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\">\n\x05\x45rror\x12\n\n\x02ok\x18\x01 \x01(\x08\x12\x12\n\nerror_code\x18\x02 \x01(\x05\x12\x15\n\rerror_message\x18\x03 \x01(\t\"K\n\x15InitializationRequest\x12\x0f\n\x07\x63ontext\x18\x01 \x01(\x05\x12\x0b\n\x03xml\x18\x02 \x01(\t\x12\x14\n\x0c\x66orce_reinit\x18\x03 \x01(\x08\"E\n\x16InitializationResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Error*U\n\x0b\x43ountEntity\x12\x11\n\rNUM_COMPONENT\x10\x00\x12\x17\n\x13NUM_ELEMENTARY_DATA\x10\x01\x12\x0c\n\x08NUM_SETS\x10\x02\x12\x0c\n\x08NUM_DATA\x10\x03*\"\n\x07\x43omplex\x12\x08\n\x04REAL\x10\x00\x12\r\n\tIMAGINARY\x10\x01*;\n\x06Nature\x12\n\n\x06SCALAR\x10\x00\x12\n\n\x06VECTOR\x10\x01\x12\n\n\x06MATRIX\x10\x02\x12\r\n\tSYMMATRIX\x10\x05*\x8a\x03\n\x04Type\x12\n\n\x06STRING\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\t\n\x05\x46IELD\x10\x04\x12\x0e\n\nCOLLECTION\x10\x05\x12\x0b\n\x07SCOPING\x10\x06\x12\x10\n\x0c\x44\x41TA_SOURCES\x10\x07\x12\x11\n\rMESHED_REGION\x10\x08\x12\x15\n\x11TIME_FREQ_SUPPORT\x10\t\x12\x0f\n\x0bRESULT_INFO\x10\n\x12\x12\n\x0e\x43YCLIC_SUPPORT\x10\x0b\x12\x12\n\x0ePROPERTY_FIELD\x10\x0c\x12\x0c\n\x08WORKFLOW\x10\r\x12\x07\n\x03RUN\x10\x0e\x12\x07\n\x03\x41NY\x10\x0f\x12\x0b\n\x07VEC_INT\x10\x10\x12\x0e\n\nVEC_DOUBLE\x10\x11\x12\x0b\n\x07SUPPORT\x10\x12\x12\x0c\n\x08OPERATOR\x10\x13\x12\r\n\tDATA_TREE\x10\x14\x12\x0e\n\nVEC_STRING\x10\x15\x12\x10\n\x0cSTRING_FIELD\x10\x16\x12\x15\n\x11\x43USTOM_TYPE_FIELD\x10\x17\x12\x1a\n\x16GENERIC_DATA_CONTAINER\x10\x18\x32\xb7\t\n\x0b\x42\x61seService\x12i\n\nInitialize\x12,.ansys.api.dpf.base.v0.InitializationRequest\x1a-.ansys.api.dpf.base.v0.InitializationResponse\x12\x64\n\rGetServerInfo\x12(.ansys.api.dpf.base.v0.ServerInfoRequest\x1a).ansys.api.dpf.base.v0.ServerInfoResponse\x12P\n\tGetConfig\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a%.ansys.api.dpf.base.v0.ConfigResponse\x12J\n\x04Load\x12$.ansys.api.dpf.base.v0.PluginRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12[\n\x08\x44\x65scribe\x12&.ansys.api.dpf.base.v0.DescribeRequest\x1a\'.ansys.api.dpf.base.v0.DescribeResponse\x12L\n\x06\x44\x65lete\x12$.ansys.api.dpf.base.v0.DeleteRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\tSerialize\x12\'.ansys.api.dpf.base.v0.SerializeRequest\x1a(.ansys.api.dpf.base.v0.SerializeResponse0\x01\x12g\n\x0c\x44uplicateRef\x12*.ansys.api.dpf.base.v0.DuplicateRefRequest\x1a+.ansys.api.dpf.base.v0.DuplicateRefResponse\x12W\n\x0c\x43reateTmpDir\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a).ansys.api.dpf.base.v0.UploadFileResponse\x12i\n\x0c\x44ownloadFile\x12*.ansys.api.dpf.base.v0.DownloadFileRequest\x1a+.ansys.api.dpf.base.v0.DownloadFileResponse0\x01\x12\x63\n\nUploadFile\x12(.ansys.api.dpf.base.v0.UploadFileRequest\x1a).ansys.api.dpf.base.v0.UploadFileResponse(\x01\x12M\n\x0fPrepareShutdown\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12K\n\rReleaseServer\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x18\xaa\x02\x15\x41nsys.Api.Dpf.Base.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'base_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\025Ansys.Api.Dpf.Base.V0' + _SERVERINFORESPONSE_PROPERTIESENTRY._options = None + _SERVERINFORESPONSE_PROPERTIESENTRY._serialized_options = b'8\001' + _globals['_COUNTENTITY']._serialized_start=1883 + _globals['_COUNTENTITY']._serialized_end=1968 + _globals['_COMPLEX']._serialized_start=1970 + _globals['_COMPLEX']._serialized_end=2004 + _globals['_NATURE']._serialized_start=2006 + _globals['_NATURE']._serialized_end=2065 + _globals['_TYPE']._serialized_start=2068 + _globals['_TYPE']._serialized_end=2462 + _globals['_EMPTY']._serialized_start=37 + _globals['_EMPTY']._serialized_end=44 + _globals['_ENTITYIDENTIFIER']._serialized_start=46 + _globals['_ENTITYIDENTIFIER']._serialized_end=100 + _globals['_DOUBLEVECTOR']._serialized_start=102 + _globals['_DOUBLEVECTOR']._serialized_end=136 + _globals['_FLOATVECTOR']._serialized_start=138 + _globals['_FLOATVECTOR']._serialized_end=170 + _globals['_INTVECTOR']._serialized_start=172 + _globals['_INTVECTOR']._serialized_end=200 + _globals['_BYTEVECTOR']._serialized_start=202 + _globals['_BYTEVECTOR']._serialized_end=233 + _globals['_PBSTRING']._serialized_start=235 + _globals['_PBSTRING']._serialized_end=261 + _globals['_STRINGVECTOR']._serialized_start=263 + _globals['_STRINGVECTOR']._serialized_end=297 + _globals['_IDS']._serialized_start=299 + _globals['_IDS']._serialized_end=351 + _globals['_LOCATION']._serialized_start=353 + _globals['_LOCATION']._serialized_end=381 + _globals['_COUNTRESPONSE']._serialized_start=383 + _globals['_COUNTRESPONSE']._serialized_end=413 + _globals['_ARRAY']._serialized_start=415 + _globals['_ARRAY']._serialized_end=437 + _globals['_PLUGINREQUEST']._serialized_start=439 + _globals['_PLUGINREQUEST']._serialized_end=525 + _globals['_SERVERINFOREQUEST']._serialized_start=527 + _globals['_SERVERINFOREQUEST']._serialized_end=546 + _globals['_SERVERINFORESPONSE']._serialized_start=549 + _globals['_SERVERINFORESPONSE']._serialized_end=788 + _globals['_SERVERINFORESPONSE_PROPERTIESENTRY']._serialized_start=739 + _globals['_SERVERINFORESPONSE_PROPERTIESENTRY']._serialized_end=788 + _globals['_DESCRIBEREQUEST']._serialized_start=790 + _globals['_DESCRIBEREQUEST']._serialized_end=828 + _globals['_DELETEREQUEST']._serialized_start=830 + _globals['_DELETEREQUEST']._serialized_end=907 + _globals['_DUPLICATEREFREQUEST']._serialized_start=909 + _globals['_DUPLICATEREFREQUEST']._serialized_end=992 + _globals['_DESCRIBERESPONSE']._serialized_start=994 + _globals['_DESCRIBERESPONSE']._serialized_end=1033 + _globals['_DUPLICATEREFRESPONSE']._serialized_start=1035 + _globals['_DUPLICATEREFRESPONSE']._serialized_end=1123 + _globals['_FILEDATA']._serialized_start=1125 + _globals['_FILEDATA']._serialized_end=1175 + _globals['_DOWNLOADFILEREQUEST']._serialized_start=1177 + _globals['_DOWNLOADFILEREQUEST']._serialized_end=1224 + _globals['_DOWNLOADFILERESPONSE']._serialized_start=1226 + _globals['_DOWNLOADFILERESPONSE']._serialized_end=1295 + _globals['_UPLOADFILEREQUEST']._serialized_start=1297 + _globals['_UPLOADFILEREQUEST']._serialized_end=1411 + _globals['_UPLOADFILERESPONSE']._serialized_start=1413 + _globals['_UPLOADFILERESPONSE']._serialized_end=1459 + _globals['_SERIALIZEREQUEST']._serialized_start=1461 + _globals['_SERIALIZEREQUEST']._serialized_end=1532 + _globals['_SERIALIZERESPONSE']._serialized_start=1534 + _globals['_SERIALIZERESPONSE']._serialized_end=1568 + _globals['_CONFIGRESPONSE']._serialized_start=1570 + _globals['_CONFIGRESPONSE']._serialized_end=1669 + _globals['_ERROR']._serialized_start=1671 + _globals['_ERROR']._serialized_end=1733 + _globals['_INITIALIZATIONREQUEST']._serialized_start=1735 + _globals['_INITIALIZATIONREQUEST']._serialized_end=1810 + _globals['_INITIALIZATIONRESPONSE']._serialized_start=1812 + _globals['_INITIALIZATIONRESPONSE']._serialized_end=1881 + _globals['_BASESERVICE']._serialized_start=2465 + _globals['_BASESERVICE']._serialized_end=3672 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/base_pb2_grpc.py b/src/ansys/grpc/dpf/base_pb2_grpc.py new file mode 100644 index 0000000000..f0f411c50b --- /dev/null +++ b/src/ansys/grpc/dpf/base_pb2_grpc.py @@ -0,0 +1,471 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +class BaseServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Initialize = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/Initialize', + request_serializer=base__pb2.InitializationRequest.SerializeToString, + response_deserializer=base__pb2.InitializationResponse.FromString, + ) + self.GetServerInfo = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/GetServerInfo', + request_serializer=base__pb2.ServerInfoRequest.SerializeToString, + response_deserializer=base__pb2.ServerInfoResponse.FromString, + ) + self.GetConfig = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/GetConfig', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=base__pb2.ConfigResponse.FromString, + ) + self.Load = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/Load', + request_serializer=base__pb2.PluginRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.Describe = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/Describe', + request_serializer=base__pb2.DescribeRequest.SerializeToString, + response_deserializer=base__pb2.DescribeResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/Delete', + request_serializer=base__pb2.DeleteRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.Serialize = channel.unary_stream( + '/ansys.api.dpf.base.v0.BaseService/Serialize', + request_serializer=base__pb2.SerializeRequest.SerializeToString, + response_deserializer=base__pb2.SerializeResponse.FromString, + ) + self.DuplicateRef = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/DuplicateRef', + request_serializer=base__pb2.DuplicateRefRequest.SerializeToString, + response_deserializer=base__pb2.DuplicateRefResponse.FromString, + ) + self.CreateTmpDir = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/CreateTmpDir', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=base__pb2.UploadFileResponse.FromString, + ) + self.DownloadFile = channel.unary_stream( + '/ansys.api.dpf.base.v0.BaseService/DownloadFile', + request_serializer=base__pb2.DownloadFileRequest.SerializeToString, + response_deserializer=base__pb2.DownloadFileResponse.FromString, + ) + self.UploadFile = channel.stream_unary( + '/ansys.api.dpf.base.v0.BaseService/UploadFile', + request_serializer=base__pb2.UploadFileRequest.SerializeToString, + response_deserializer=base__pb2.UploadFileResponse.FromString, + ) + self.PrepareShutdown = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/PrepareShutdown', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.ReleaseServer = channel.unary_unary( + '/ansys.api.dpf.base.v0.BaseService/ReleaseServer', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class BaseServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Initialize(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetServerInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Load(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Describe(self, request, context): + """describes any sharedObjectBase + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """deletes any sharedObjectBase + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Serialize(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DuplicateRef(self, request, context): + """describes any sharedOpbjectBase + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateTmpDir(self, request, context): + """creates a temporary dir server side + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DownloadFile(self, request, context): + """file from server to client + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UploadFile(self, request_iterator, context): + """file from client to server + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PrepareShutdown(self, request, context): + """clears temporary folders allocated during the server runtime + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReleaseServer(self, request, context): + """removes the handle on the server + should be used only if the server was started by this client instance + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BaseServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Initialize': grpc.unary_unary_rpc_method_handler( + servicer.Initialize, + request_deserializer=base__pb2.InitializationRequest.FromString, + response_serializer=base__pb2.InitializationResponse.SerializeToString, + ), + 'GetServerInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetServerInfo, + request_deserializer=base__pb2.ServerInfoRequest.FromString, + response_serializer=base__pb2.ServerInfoResponse.SerializeToString, + ), + 'GetConfig': grpc.unary_unary_rpc_method_handler( + servicer.GetConfig, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=base__pb2.ConfigResponse.SerializeToString, + ), + 'Load': grpc.unary_unary_rpc_method_handler( + servicer.Load, + request_deserializer=base__pb2.PluginRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'Describe': grpc.unary_unary_rpc_method_handler( + servicer.Describe, + request_deserializer=base__pb2.DescribeRequest.FromString, + response_serializer=base__pb2.DescribeResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=base__pb2.DeleteRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'Serialize': grpc.unary_stream_rpc_method_handler( + servicer.Serialize, + request_deserializer=base__pb2.SerializeRequest.FromString, + response_serializer=base__pb2.SerializeResponse.SerializeToString, + ), + 'DuplicateRef': grpc.unary_unary_rpc_method_handler( + servicer.DuplicateRef, + request_deserializer=base__pb2.DuplicateRefRequest.FromString, + response_serializer=base__pb2.DuplicateRefResponse.SerializeToString, + ), + 'CreateTmpDir': grpc.unary_unary_rpc_method_handler( + servicer.CreateTmpDir, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=base__pb2.UploadFileResponse.SerializeToString, + ), + 'DownloadFile': grpc.unary_stream_rpc_method_handler( + servicer.DownloadFile, + request_deserializer=base__pb2.DownloadFileRequest.FromString, + response_serializer=base__pb2.DownloadFileResponse.SerializeToString, + ), + 'UploadFile': grpc.stream_unary_rpc_method_handler( + servicer.UploadFile, + request_deserializer=base__pb2.UploadFileRequest.FromString, + response_serializer=base__pb2.UploadFileResponse.SerializeToString, + ), + 'PrepareShutdown': grpc.unary_unary_rpc_method_handler( + servicer.PrepareShutdown, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'ReleaseServer': grpc.unary_unary_rpc_method_handler( + servicer.ReleaseServer, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.base.v0.BaseService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class BaseService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Initialize(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/Initialize', + base__pb2.InitializationRequest.SerializeToString, + base__pb2.InitializationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetServerInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/GetServerInfo', + base__pb2.ServerInfoRequest.SerializeToString, + base__pb2.ServerInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/GetConfig', + base__pb2.Empty.SerializeToString, + base__pb2.ConfigResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Load(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/Load', + base__pb2.PluginRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Describe(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/Describe', + base__pb2.DescribeRequest.SerializeToString, + base__pb2.DescribeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/Delete', + base__pb2.DeleteRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Serialize(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ansys.api.dpf.base.v0.BaseService/Serialize', + base__pb2.SerializeRequest.SerializeToString, + base__pb2.SerializeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DuplicateRef(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/DuplicateRef', + base__pb2.DuplicateRefRequest.SerializeToString, + base__pb2.DuplicateRefResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateTmpDir(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/CreateTmpDir', + base__pb2.Empty.SerializeToString, + base__pb2.UploadFileResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DownloadFile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ansys.api.dpf.base.v0.BaseService/DownloadFile', + base__pb2.DownloadFileRequest.SerializeToString, + base__pb2.DownloadFileResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UploadFile(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/ansys.api.dpf.base.v0.BaseService/UploadFile', + base__pb2.UploadFileRequest.SerializeToString, + base__pb2.UploadFileResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PrepareShutdown(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/PrepareShutdown', + base__pb2.Empty.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReleaseServer(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.base.v0.BaseService/ReleaseServer', + base__pb2.Empty.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/collection_pb2.py b/src/ansys/grpc/dpf/collection_pb2.py new file mode 100644 index 0000000000..f0ad7bd17b --- /dev/null +++ b/src/ansys/grpc/dpf/collection_pb2.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: collection.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.support_pb2 as support__pb2 +import ansys.grpc.dpf.time_freq_support_pb2 as time__freq__support__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 +import ansys.grpc.dpf.label_space_pb2 as label__space__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x63ollection.proto\x12\x1b\x61nsys.api.dpf.collection.v0\x1a\x19google/protobuf/any.proto\x1a\nbase.proto\x1a\rsupport.proto\x1a\x17time_freq_support.proto\x1a\rscoping.proto\x1a\x11label_space.proto\"l\n\nCollection\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\">\n\x11\x43ollectionRequest\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"%\n\x0c\x44\x65\x66\x61ultValue\x12\x15\n\rdefault_value\x18\x01 \x01(\x05\"[\n\x08NewLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12@\n\rdefault_value\x18\x02 \x01(\x0b\x32).ansys.api.dpf.collection.v0.DefaultValue\"\xa2\x01\n\x13UpdateLabelsRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x35\n\x06labels\x18\x02 \x03(\x0b\x32%.ansys.api.dpf.collection.v0.NewLabel\x12\x17\n\x0foverride_others\x18\x03 \x01(\x08\"\xdd\x01\n\rUpdateRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x31\n\x05\x65ntry\x18\x02 \x01(\x0b\x32\".ansys.api.dpf.collection.v0.Entry\x12?\n\x0blabel_space\x18\x03 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x0f\n\x05index\x18\x04 \x01(\x05H\x00\x42\n\n\x08location\"\xa9\x01\n\x0c\x45ntryRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12?\n\x0blabel_space\x18\x03 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x0f\n\x05index\x18\x04 \x01(\x05H\x00\x42\n\n\x08location\"\xbb\x01\n\x05\x45ntry\x12(\n\x08\x64pf_type\x18\x01 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x12\n\x08int_type\x18\x02 \x01(\x05H\x00\x12\x15\n\x0b\x64ouble_type\x18\x03 \x01(\x01H\x00\x12\x15\n\x0bstring_type\x18\x04 \x01(\tH\x00\x12=\n\x0blabel_space\x18\x05 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceB\x07\n\x05\x65ntry\"I\n\x12GetEntriesResponse\x12\x33\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\".ansys.api.dpf.collection.v0.Entry\"\x18\n\x06Labels\x12\x0e\n\x06labels\x18\x01 \x03(\t\"Z\n\x0cListResponse\x12\x33\n\x06labels\x18\x01 \x01(\x0b\x32#.ansys.api.dpf.collection.v0.Labels\x12\x15\n\rcount_entries\x18\x02 \x01(\x05\"a\n\x13LabelScopingRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05label\x18\x02 \x01(\t\"P\n\x14LabelScopingResponse\x12\x38\n\rlabel_scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"\x87\x01\n\x0eSupportRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12\r\n\x05label\x18\x03 \x01(\t\"\xfa\x01\n\x14UpdateSupportRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05label\x18\x02 \x01(\t\x12P\n\x11time_freq_support\x18\x03 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x34\n\x07support\x18\x04 \x01(\x0b\x32!.ansys.api.dpf.support.v0.SupportH\x00\x42\x0e\n\x0csupport_type\"P\n\x11GetAllDataRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\"b\n\x14UpdateAllDataRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\x32\x9d\t\n\x11\x43ollectionService\x12\x61\n\x06\x43reate\x12..ansys.api.dpf.collection.v0.CollectionRequest\x1a\'.ansys.api.dpf.collection.v0.Collection\x12^\n\x0cUpdateLabels\x12\x30.ansys.api.dpf.collection.v0.UpdateLabelsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\x0bUpdateEntry\x12*.ansys.api.dpf.collection.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Z\n\x04List\x12\'.ansys.api.dpf.collection.v0.Collection\x1a).ansys.api.dpf.collection.v0.ListResponse\x12h\n\nGetEntries\x12).ansys.api.dpf.collection.v0.EntryRequest\x1a/.ansys.api.dpf.collection.v0.GetEntriesResponse\x12\\\n\nGetSupport\x12+.ansys.api.dpf.collection.v0.SupportRequest\x1a!.ansys.api.dpf.support.v0.Support\x12v\n\x0fGetLabelScoping\x12\x30.ansys.api.dpf.collection.v0.LabelScopingRequest\x1a\x31.ansys.api.dpf.collection.v0.LabelScopingResponse\x12`\n\rUpdateSupport\x12\x31.ansys.api.dpf.collection.v0.UpdateSupportRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\\\n\nGetAllData\x12..ansys.api.dpf.collection.v0.GetAllDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Array0\x01\x12\x62\n\rUpdateAllData\x12\x31.ansys.api.dpf.collection.v0.UpdateAllDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12[\n\x08\x44\x65scribe\x12&.ansys.api.dpf.base.v0.DescribeRequest\x1a\'.ansys.api.dpf.base.v0.DescribeResponse\x12O\n\x06\x44\x65lete\x12\'.ansys.api.dpf.collection.v0.Collection\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1e\xaa\x02\x1b\x41nsys.Api.Dpf.Collection.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'collection_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\033Ansys.Api.Dpf.Collection.v0' + _globals['_COLLECTION']._serialized_start=162 + _globals['_COLLECTION']._serialized_end=270 + _globals['_COLLECTIONREQUEST']._serialized_start=272 + _globals['_COLLECTIONREQUEST']._serialized_end=334 + _globals['_DEFAULTVALUE']._serialized_start=336 + _globals['_DEFAULTVALUE']._serialized_end=373 + _globals['_NEWLABEL']._serialized_start=375 + _globals['_NEWLABEL']._serialized_end=466 + _globals['_UPDATELABELSREQUEST']._serialized_start=469 + _globals['_UPDATELABELSREQUEST']._serialized_end=631 + _globals['_UPDATEREQUEST']._serialized_start=634 + _globals['_UPDATEREQUEST']._serialized_end=855 + _globals['_ENTRYREQUEST']._serialized_start=858 + _globals['_ENTRYREQUEST']._serialized_end=1027 + _globals['_ENTRY']._serialized_start=1030 + _globals['_ENTRY']._serialized_end=1217 + _globals['_GETENTRIESRESPONSE']._serialized_start=1219 + _globals['_GETENTRIESRESPONSE']._serialized_end=1292 + _globals['_LABELS']._serialized_start=1294 + _globals['_LABELS']._serialized_end=1318 + _globals['_LISTRESPONSE']._serialized_start=1320 + _globals['_LISTRESPONSE']._serialized_end=1410 + _globals['_LABELSCOPINGREQUEST']._serialized_start=1412 + _globals['_LABELSCOPINGREQUEST']._serialized_end=1509 + _globals['_LABELSCOPINGRESPONSE']._serialized_start=1511 + _globals['_LABELSCOPINGRESPONSE']._serialized_end=1591 + _globals['_SUPPORTREQUEST']._serialized_start=1594 + _globals['_SUPPORTREQUEST']._serialized_end=1729 + _globals['_UPDATESUPPORTREQUEST']._serialized_start=1732 + _globals['_UPDATESUPPORTREQUEST']._serialized_end=1982 + _globals['_GETALLDATAREQUEST']._serialized_start=1984 + _globals['_GETALLDATAREQUEST']._serialized_end=2064 + _globals['_UPDATEALLDATAREQUEST']._serialized_start=2066 + _globals['_UPDATEALLDATAREQUEST']._serialized_end=2164 + _globals['_COLLECTIONSERVICE']._serialized_start=2167 + _globals['_COLLECTIONSERVICE']._serialized_end=3348 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/collection_pb2_grpc.py b/src/ansys/grpc/dpf/collection_pb2_grpc.py new file mode 100644 index 0000000000..78377b96b7 --- /dev/null +++ b/src/ansys/grpc/dpf/collection_pb2_grpc.py @@ -0,0 +1,438 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.collection_pb2 as collection__pb2 +import ansys.grpc.dpf.support_pb2 as support__pb2 + + +class CollectionServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/Create', + request_serializer=collection__pb2.CollectionRequest.SerializeToString, + response_deserializer=collection__pb2.Collection.FromString, + ) + self.UpdateLabels = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/UpdateLabels', + request_serializer=collection__pb2.UpdateLabelsRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateEntry = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/UpdateEntry', + request_serializer=collection__pb2.UpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/List', + request_serializer=collection__pb2.Collection.SerializeToString, + response_deserializer=collection__pb2.ListResponse.FromString, + ) + self.GetEntries = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/GetEntries', + request_serializer=collection__pb2.EntryRequest.SerializeToString, + response_deserializer=collection__pb2.GetEntriesResponse.FromString, + ) + self.GetSupport = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/GetSupport', + request_serializer=collection__pb2.SupportRequest.SerializeToString, + response_deserializer=support__pb2.Support.FromString, + ) + self.GetLabelScoping = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/GetLabelScoping', + request_serializer=collection__pb2.LabelScopingRequest.SerializeToString, + response_deserializer=collection__pb2.LabelScopingResponse.FromString, + ) + self.UpdateSupport = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/UpdateSupport', + request_serializer=collection__pb2.UpdateSupportRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.GetAllData = channel.unary_stream( + '/ansys.api.dpf.collection.v0.CollectionService/GetAllData', + request_serializer=collection__pb2.GetAllDataRequest.SerializeToString, + response_deserializer=base__pb2.Array.FromString, + ) + self.UpdateAllData = channel.stream_unary( + '/ansys.api.dpf.collection.v0.CollectionService/UpdateAllData', + request_serializer=collection__pb2.UpdateAllDataRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.Describe = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/Describe', + request_serializer=base__pb2.DescribeRequest.SerializeToString, + response_deserializer=base__pb2.DescribeResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.collection.v0.CollectionService/Delete', + request_serializer=collection__pb2.Collection.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class CollectionServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateLabels(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateEntry(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetEntries(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetSupport(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetLabelScoping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateSupport(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllData(self, request, context): + """for integral type collections + sends streamed data, to choose the size of each chunk set metadata with "num_double", "num_int" or "num_bytes" + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateAllData(self, request_iterator, context): + """for integral type collections + streams bytes from client to server + optional: for efficiency purpose, please give the total array size in the client metadata with "size_bytes", "size_double" or "size_int" + if the total size is specified, the data will be directly copied in the collection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Describe(self, request, context): + """describe any ISharedObjCollection + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CollectionServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=collection__pb2.CollectionRequest.FromString, + response_serializer=collection__pb2.Collection.SerializeToString, + ), + 'UpdateLabels': grpc.unary_unary_rpc_method_handler( + servicer.UpdateLabels, + request_deserializer=collection__pb2.UpdateLabelsRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateEntry': grpc.unary_unary_rpc_method_handler( + servicer.UpdateEntry, + request_deserializer=collection__pb2.UpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=collection__pb2.Collection.FromString, + response_serializer=collection__pb2.ListResponse.SerializeToString, + ), + 'GetEntries': grpc.unary_unary_rpc_method_handler( + servicer.GetEntries, + request_deserializer=collection__pb2.EntryRequest.FromString, + response_serializer=collection__pb2.GetEntriesResponse.SerializeToString, + ), + 'GetSupport': grpc.unary_unary_rpc_method_handler( + servicer.GetSupport, + request_deserializer=collection__pb2.SupportRequest.FromString, + response_serializer=support__pb2.Support.SerializeToString, + ), + 'GetLabelScoping': grpc.unary_unary_rpc_method_handler( + servicer.GetLabelScoping, + request_deserializer=collection__pb2.LabelScopingRequest.FromString, + response_serializer=collection__pb2.LabelScopingResponse.SerializeToString, + ), + 'UpdateSupport': grpc.unary_unary_rpc_method_handler( + servicer.UpdateSupport, + request_deserializer=collection__pb2.UpdateSupportRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'GetAllData': grpc.unary_stream_rpc_method_handler( + servicer.GetAllData, + request_deserializer=collection__pb2.GetAllDataRequest.FromString, + response_serializer=base__pb2.Array.SerializeToString, + ), + 'UpdateAllData': grpc.stream_unary_rpc_method_handler( + servicer.UpdateAllData, + request_deserializer=collection__pb2.UpdateAllDataRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'Describe': grpc.unary_unary_rpc_method_handler( + servicer.Describe, + request_deserializer=base__pb2.DescribeRequest.FromString, + response_serializer=base__pb2.DescribeResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=collection__pb2.Collection.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.collection.v0.CollectionService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CollectionService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/Create', + collection__pb2.CollectionRequest.SerializeToString, + collection__pb2.Collection.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateLabels(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/UpdateLabels', + collection__pb2.UpdateLabelsRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateEntry(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/UpdateEntry', + collection__pb2.UpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/List', + collection__pb2.Collection.SerializeToString, + collection__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetEntries(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/GetEntries', + collection__pb2.EntryRequest.SerializeToString, + collection__pb2.GetEntriesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetSupport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/GetSupport', + collection__pb2.SupportRequest.SerializeToString, + support__pb2.Support.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetLabelScoping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/GetLabelScoping', + collection__pb2.LabelScopingRequest.SerializeToString, + collection__pb2.LabelScopingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateSupport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/UpdateSupport', + collection__pb2.UpdateSupportRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllData(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ansys.api.dpf.collection.v0.CollectionService/GetAllData', + collection__pb2.GetAllDataRequest.SerializeToString, + base__pb2.Array.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateAllData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/ansys.api.dpf.collection.v0.CollectionService/UpdateAllData', + collection__pb2.UpdateAllDataRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Describe(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/Describe', + base__pb2.DescribeRequest.SerializeToString, + base__pb2.DescribeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/Delete', + collection__pb2.Collection.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/cyclic_support_pb2.py b/src/ansys/grpc/dpf/cyclic_support_pb2.py new file mode 100644 index 0000000000..a9c470ab1a --- /dev/null +++ b/src/ansys/grpc/dpf/cyclic_support_pb2.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: cyclic_support.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x63yclic_support.proto\x12\x1f\x61nsys.api.dpf.cyclic_support.v0\x1a\nbase.proto\x1a\rscoping.proto\x1a\x0b\x66ield.proto\"D\n\rCyclicSupport\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\xdc\x01\n\x15GetExpandedIdsRequest\x12?\n\x07support\x18\x01 \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupport\x12\x11\n\x07node_id\x18\x02 \x01(\x05H\x00\x12\x14\n\nelement_id\x18\x03 \x01(\x05H\x00\x12<\n\x11sectors_to_expand\x18\x04 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x11\n\tstage_num\x18\x05 \x01(\x05\x42\x08\n\x06\x65ntity\"Q\n\x16GetExpandedIdsResponse\x12\x37\n\x0c\x65xpanded_ids\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"O\n\x0cGetCSRequest\x12?\n\x07support\x18\x01 \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupport\":\n\rGetCSResponse\x12)\n\x02\x63s\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\"c\n\x0cListResponse\x12\x12\n\nnum_stages\x18\x01 \x01(\x05\x12?\n\x0bstage_infos\x18\x02 \x03(\x0b\x32*.ansys.api.dpf.cyclic_support.v0.StageList\"\xcd\x02\n\tStageList\x12\x13\n\x0bnum_sectors\x18\x01 \x01(\x05\x12@\n\x15\x62\x61se_elements_scoping\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12=\n\x12\x62\x61se_nodes_scoping\x18\x03 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12@\n\x15sectors_for_expansion\x18\x04 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x33\n\x0chigh_low_map\x18\x05 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x33\n\x0clow_high_map\x18\x06 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field2\xc1\x03\n\x14\x43yclicSupportService\x12\x65\n\x04List\x12..ansys.api.dpf.cyclic_support.v0.CyclicSupport\x1a-.ansys.api.dpf.cyclic_support.v0.ListResponse\x12\x81\x01\n\x0eGetExpandedIds\x12\x36.ansys.api.dpf.cyclic_support.v0.GetExpandedIdsRequest\x1a\x37.ansys.api.dpf.cyclic_support.v0.GetExpandedIdsResponse\x12\x66\n\x05GetCS\x12-.ansys.api.dpf.cyclic_support.v0.GetCSRequest\x1a..ansys.api.dpf.cyclic_support.v0.GetCSResponse\x12V\n\x06\x44\x65lete\x12..ansys.api.dpf.cyclic_support.v0.CyclicSupport\x1a\x1c.ansys.api.dpf.base.v0.EmptyB!\xaa\x02\x1e\x41nsys.Api.Dpf.CyclicSupport.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cyclic_support_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\036Ansys.Api.Dpf.CyclicSupport.V0' + _globals['_CYCLICSUPPORT']._serialized_start=97 + _globals['_CYCLICSUPPORT']._serialized_end=165 + _globals['_GETEXPANDEDIDSREQUEST']._serialized_start=168 + _globals['_GETEXPANDEDIDSREQUEST']._serialized_end=388 + _globals['_GETEXPANDEDIDSRESPONSE']._serialized_start=390 + _globals['_GETEXPANDEDIDSRESPONSE']._serialized_end=471 + _globals['_GETCSREQUEST']._serialized_start=473 + _globals['_GETCSREQUEST']._serialized_end=552 + _globals['_GETCSRESPONSE']._serialized_start=554 + _globals['_GETCSRESPONSE']._serialized_end=612 + _globals['_LISTRESPONSE']._serialized_start=614 + _globals['_LISTRESPONSE']._serialized_end=713 + _globals['_STAGELIST']._serialized_start=716 + _globals['_STAGELIST']._serialized_end=1049 + _globals['_CYCLICSUPPORTSERVICE']._serialized_start=1052 + _globals['_CYCLICSUPPORTSERVICE']._serialized_end=1501 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/cyclic_support_pb2_grpc.py b/src/ansys/grpc/dpf/cyclic_support_pb2_grpc.py new file mode 100644 index 0000000000..f820df4312 --- /dev/null +++ b/src/ansys/grpc/dpf/cyclic_support_pb2_grpc.py @@ -0,0 +1,166 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.cyclic_support_pb2 as cyclic__support__pb2 + + +class CyclicSupportServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.List = channel.unary_unary( + '/ansys.api.dpf.cyclic_support.v0.CyclicSupportService/List', + request_serializer=cyclic__support__pb2.CyclicSupport.SerializeToString, + response_deserializer=cyclic__support__pb2.ListResponse.FromString, + ) + self.GetExpandedIds = channel.unary_unary( + '/ansys.api.dpf.cyclic_support.v0.CyclicSupportService/GetExpandedIds', + request_serializer=cyclic__support__pb2.GetExpandedIdsRequest.SerializeToString, + response_deserializer=cyclic__support__pb2.GetExpandedIdsResponse.FromString, + ) + self.GetCS = channel.unary_unary( + '/ansys.api.dpf.cyclic_support.v0.CyclicSupportService/GetCS', + request_serializer=cyclic__support__pb2.GetCSRequest.SerializeToString, + response_deserializer=cyclic__support__pb2.GetCSResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.cyclic_support.v0.CyclicSupportService/Delete', + request_serializer=cyclic__support__pb2.CyclicSupport.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class CyclicSupportServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetExpandedIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetCS(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CyclicSupportServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=cyclic__support__pb2.CyclicSupport.FromString, + response_serializer=cyclic__support__pb2.ListResponse.SerializeToString, + ), + 'GetExpandedIds': grpc.unary_unary_rpc_method_handler( + servicer.GetExpandedIds, + request_deserializer=cyclic__support__pb2.GetExpandedIdsRequest.FromString, + response_serializer=cyclic__support__pb2.GetExpandedIdsResponse.SerializeToString, + ), + 'GetCS': grpc.unary_unary_rpc_method_handler( + servicer.GetCS, + request_deserializer=cyclic__support__pb2.GetCSRequest.FromString, + response_serializer=cyclic__support__pb2.GetCSResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=cyclic__support__pb2.CyclicSupport.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.cyclic_support.v0.CyclicSupportService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CyclicSupportService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.cyclic_support.v0.CyclicSupportService/List', + cyclic__support__pb2.CyclicSupport.SerializeToString, + cyclic__support__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetExpandedIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.cyclic_support.v0.CyclicSupportService/GetExpandedIds', + cyclic__support__pb2.GetExpandedIdsRequest.SerializeToString, + cyclic__support__pb2.GetExpandedIdsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetCS(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.cyclic_support.v0.CyclicSupportService/GetCS', + cyclic__support__pb2.GetCSRequest.SerializeToString, + cyclic__support__pb2.GetCSResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.cyclic_support.v0.CyclicSupportService/Delete', + cyclic__support__pb2.CyclicSupport.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/data_sources_pb2.py b/src/ansys/grpc/dpf/data_sources_pb2.py new file mode 100644 index 0000000000..9f4009a95b --- /dev/null +++ b/src/ansys/grpc/dpf/data_sources_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: data_sources.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x64\x61ta_sources.proto\x12\x1d\x61nsys.api.dpf.data_sources.v0\x1a\nbase.proto\"B\n\x0b\x44\x61taSources\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\xcc\x01\n\rUpdateRequest\x12@\n\x0c\x64\x61ta_sources\x18\x01 \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSources\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0b\n\x03key\x18\x03 \x01(\t\x12\x13\n\x0bresult_path\x18\x04 \x01(\x08\x12\x35\n\x06\x64omain\x18\x05 \x01(\x0b\x32%.ansys.api.dpf.data_sources.v0.Domain\x12\x12\n\nresult_key\x18\x06 \x01(\t\"z\n\x16UpdateNamespaceRequest\x12@\n\x0c\x64\x61ta_sources\x18\x01 \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSources\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\x11\n\tnamespace\x18\x03 \x01(\t\"0\n\x06\x44omain\x12\x13\n\x0b\x64omain_path\x18\x01 \x01(\x08\x12\x11\n\tdomain_id\x18\x02 \x01(\x05\"\xef\x01\n\x15UpdateUpstreamRequest\x12@\n\x0c\x64\x61ta_sources\x18\x01 \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSources\x12I\n\x15upstream_data_sources\x18\x02 \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSources\x12\x12\n\nresult_key\x18\x03 \x01(\t\x12\x35\n\x06\x64omain\x18\x04 \x01(\x0b\x32%.ansys.api.dpf.data_sources.v0.Domain\"\xd0\x01\n\x0cListResponse\x12\x12\n\nresult_key\x18\x01 \x01(\t\x12\x45\n\x05paths\x18\x02 \x03(\x0b\x32\x36.ansys.api.dpf.data_sources.v0.ListResponse.PathsEntry\x12\x0c\n\x04keys\x18\x03 \x03(\t\x1aW\n\nPathsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).ansys.api.dpf.data_sources.v0.PathPerKey:\x02\x38\x01\"\x1b\n\nPathPerKey\x12\r\n\x05paths\x18\x01 \x03(\t2\xc1\x04\n\x12\x44\x61taSourcesService\x12R\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a*.ansys.api.dpf.data_sources.v0.DataSources\x12T\n\x06Update\x12,.ansys.api.dpf.data_sources.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x66\n\x0fUpdateNamespace\x12\x35.ansys.api.dpf.data_sources.v0.UpdateNamespaceRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x64\n\x0eUpdateUpstream\x12\x34.ansys.api.dpf.data_sources.v0.UpdateUpstreamRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12_\n\x04List\x12*.ansys.api.dpf.data_sources.v0.DataSources\x1a+.ansys.api.dpf.data_sources.v0.ListResponse\x12R\n\x06\x44\x65lete\x12*.ansys.api.dpf.data_sources.v0.DataSources\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1f\xaa\x02\x1c\x41nsys.Api.Dpf.DataSources.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'data_sources_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\034Ansys.Api.Dpf.DataSources.v0' + _LISTRESPONSE_PATHSENTRY._options = None + _LISTRESPONSE_PATHSENTRY._serialized_options = b'8\001' + _globals['_DATASOURCES']._serialized_start=65 + _globals['_DATASOURCES']._serialized_end=131 + _globals['_UPDATEREQUEST']._serialized_start=134 + _globals['_UPDATEREQUEST']._serialized_end=338 + _globals['_UPDATENAMESPACEREQUEST']._serialized_start=340 + _globals['_UPDATENAMESPACEREQUEST']._serialized_end=462 + _globals['_DOMAIN']._serialized_start=464 + _globals['_DOMAIN']._serialized_end=512 + _globals['_UPDATEUPSTREAMREQUEST']._serialized_start=515 + _globals['_UPDATEUPSTREAMREQUEST']._serialized_end=754 + _globals['_LISTRESPONSE']._serialized_start=757 + _globals['_LISTRESPONSE']._serialized_end=965 + _globals['_LISTRESPONSE_PATHSENTRY']._serialized_start=878 + _globals['_LISTRESPONSE_PATHSENTRY']._serialized_end=965 + _globals['_PATHPERKEY']._serialized_start=967 + _globals['_PATHPERKEY']._serialized_end=994 + _globals['_DATASOURCESSERVICE']._serialized_start=997 + _globals['_DATASOURCESSERVICE']._serialized_end=1574 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/data_sources_pb2_grpc.py b/src/ansys/grpc/dpf/data_sources_pb2_grpc.py new file mode 100644 index 0000000000..5755cbebd5 --- /dev/null +++ b/src/ansys/grpc/dpf/data_sources_pb2_grpc.py @@ -0,0 +1,232 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.data_sources_pb2 as data__sources__pb2 + + +class DataSourcesServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.data_sources.v0.DataSourcesService/Create', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=data__sources__pb2.DataSources.FromString, + ) + self.Update = channel.unary_unary( + '/ansys.api.dpf.data_sources.v0.DataSourcesService/Update', + request_serializer=data__sources__pb2.UpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateNamespace = channel.unary_unary( + '/ansys.api.dpf.data_sources.v0.DataSourcesService/UpdateNamespace', + request_serializer=data__sources__pb2.UpdateNamespaceRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateUpstream = channel.unary_unary( + '/ansys.api.dpf.data_sources.v0.DataSourcesService/UpdateUpstream', + request_serializer=data__sources__pb2.UpdateUpstreamRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.data_sources.v0.DataSourcesService/List', + request_serializer=data__sources__pb2.DataSources.SerializeToString, + response_deserializer=data__sources__pb2.ListResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.data_sources.v0.DataSourcesService/Delete', + request_serializer=data__sources__pb2.DataSources.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class DataSourcesServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateNamespace(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateUpstream(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DataSourcesServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=data__sources__pb2.DataSources.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=data__sources__pb2.UpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateNamespace': grpc.unary_unary_rpc_method_handler( + servicer.UpdateNamespace, + request_deserializer=data__sources__pb2.UpdateNamespaceRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateUpstream': grpc.unary_unary_rpc_method_handler( + servicer.UpdateUpstream, + request_deserializer=data__sources__pb2.UpdateUpstreamRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=data__sources__pb2.DataSources.FromString, + response_serializer=data__sources__pb2.ListResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=data__sources__pb2.DataSources.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.data_sources.v0.DataSourcesService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DataSourcesService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_sources.v0.DataSourcesService/Create', + base__pb2.Empty.SerializeToString, + data__sources__pb2.DataSources.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_sources.v0.DataSourcesService/Update', + data__sources__pb2.UpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateNamespace(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_sources.v0.DataSourcesService/UpdateNamespace', + data__sources__pb2.UpdateNamespaceRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateUpstream(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_sources.v0.DataSourcesService/UpdateUpstream', + data__sources__pb2.UpdateUpstreamRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_sources.v0.DataSourcesService/List', + data__sources__pb2.DataSources.SerializeToString, + data__sources__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_sources.v0.DataSourcesService/Delete', + data__sources__pb2.DataSources.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/data_tree_pb2.py b/src/ansys/grpc/dpf/data_tree_pb2.py new file mode 100644 index 0000000000..fad606eaf1 --- /dev/null +++ b/src/ansys/grpc/dpf/data_tree_pb2.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: data_tree.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x64\x61ta_tree.proto\x12\x1a\x61nsys.api.dpf.data_tree.v0\x1a\nbase.proto\"?\n\x08\x44\x61taTree\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"x\n\rUpdateRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12.\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32 .ansys.api.dpf.data_tree.v0.Data\"\x82\x01\n\nGetRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12;\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32-.ansys.api.dpf.data_tree.v0.SingleDataRequest\"=\n\x0bGetResponse\x12.\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32 .ansys.api.dpf.data_tree.v0.Data\"T\n\nHasRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12\r\n\x05names\x18\x02 \x03(\t\"\x92\x01\n\x0bHasResponse\x12O\n\rhas_each_name\x18\x01 \x03(\x0b\x32\x38.ansys.api.dpf.data_tree.v0.HasResponse.HasEachNameEntry\x1a\x32\n\x10HasEachNameEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"\xba\x02\n\x04\x44\x61ta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x03int\x18\x02 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x03 \x01(\x01H\x00\x12\x10\n\x06string\x18\x04 \x01(\tH\x00\x12\x33\n\x07vec_int\x18\x05 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x39\n\nvec_double\x18\x06 \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x39\n\nvec_string\x18\x07 \x01(\x0b\x32#.ansys.api.dpf.base.v0.StringVectorH\x00\x12\x39\n\tdata_tree\x18\x08 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x42\x0b\n\tdata_type\"L\n\x11SingleDataRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"F\n\x0bListRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\"?\n\x0cListResponse\x12\x17\n\x0f\x61ttribute_names\x18\x01 \x03(\t\x12\x16\n\x0esub_tree_names\x18\x02 \x03(\t2\x8b\x04\n\x0f\x44\x61taTreeService\x12L\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a$.ansys.api.dpf.data_tree.v0.DataTree\x12Q\n\x06Update\x12).ansys.api.dpf.data_tree.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Y\n\x04List\x12\'.ansys.api.dpf.data_tree.v0.ListRequest\x1a(.ansys.api.dpf.data_tree.v0.ListResponse\x12V\n\x03Get\x12&.ansys.api.dpf.data_tree.v0.GetRequest\x1a\'.ansys.api.dpf.data_tree.v0.GetResponse\x12V\n\x03Has\x12&.ansys.api.dpf.data_tree.v0.HasRequest\x1a\'.ansys.api.dpf.data_tree.v0.HasResponse\x12L\n\x06\x44\x65lete\x12$.ansys.api.dpf.data_tree.v0.DataTree\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1c\xaa\x02\x19\x41nsys.Api.Dpf.DataTree.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'data_tree_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\031Ansys.Api.Dpf.DataTree.V0' + _HASRESPONSE_HASEACHNAMEENTRY._options = None + _HASRESPONSE_HASEACHNAMEENTRY._serialized_options = b'8\001' + _globals['_DATATREE']._serialized_start=59 + _globals['_DATATREE']._serialized_end=122 + _globals['_UPDATEREQUEST']._serialized_start=124 + _globals['_UPDATEREQUEST']._serialized_end=244 + _globals['_GETREQUEST']._serialized_start=247 + _globals['_GETREQUEST']._serialized_end=377 + _globals['_GETRESPONSE']._serialized_start=379 + _globals['_GETRESPONSE']._serialized_end=440 + _globals['_HASREQUEST']._serialized_start=442 + _globals['_HASREQUEST']._serialized_end=526 + _globals['_HASRESPONSE']._serialized_start=529 + _globals['_HASRESPONSE']._serialized_end=675 + _globals['_HASRESPONSE_HASEACHNAMEENTRY']._serialized_start=625 + _globals['_HASRESPONSE_HASEACHNAMEENTRY']._serialized_end=675 + _globals['_DATA']._serialized_start=678 + _globals['_DATA']._serialized_end=992 + _globals['_SINGLEDATAREQUEST']._serialized_start=994 + _globals['_SINGLEDATAREQUEST']._serialized_end=1070 + _globals['_LISTREQUEST']._serialized_start=1072 + _globals['_LISTREQUEST']._serialized_end=1142 + _globals['_LISTRESPONSE']._serialized_start=1144 + _globals['_LISTRESPONSE']._serialized_end=1207 + _globals['_DATATREESERVICE']._serialized_start=1210 + _globals['_DATATREESERVICE']._serialized_end=1733 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/data_tree_pb2_grpc.py b/src/ansys/grpc/dpf/data_tree_pb2_grpc.py new file mode 100644 index 0000000000..21fd175283 --- /dev/null +++ b/src/ansys/grpc/dpf/data_tree_pb2_grpc.py @@ -0,0 +1,232 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.data_tree_pb2 as data__tree__pb2 + + +class DataTreeServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.data_tree.v0.DataTreeService/Create', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=data__tree__pb2.DataTree.FromString, + ) + self.Update = channel.unary_unary( + '/ansys.api.dpf.data_tree.v0.DataTreeService/Update', + request_serializer=data__tree__pb2.UpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.data_tree.v0.DataTreeService/List', + request_serializer=data__tree__pb2.ListRequest.SerializeToString, + response_deserializer=data__tree__pb2.ListResponse.FromString, + ) + self.Get = channel.unary_unary( + '/ansys.api.dpf.data_tree.v0.DataTreeService/Get', + request_serializer=data__tree__pb2.GetRequest.SerializeToString, + response_deserializer=data__tree__pb2.GetResponse.FromString, + ) + self.Has = channel.unary_unary( + '/ansys.api.dpf.data_tree.v0.DataTreeService/Has', + request_serializer=data__tree__pb2.HasRequest.SerializeToString, + response_deserializer=data__tree__pb2.HasResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.data_tree.v0.DataTreeService/Delete', + request_serializer=data__tree__pb2.DataTree.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class DataTreeServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Has(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DataTreeServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=data__tree__pb2.DataTree.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=data__tree__pb2.UpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=data__tree__pb2.ListRequest.FromString, + response_serializer=data__tree__pb2.ListResponse.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=data__tree__pb2.GetRequest.FromString, + response_serializer=data__tree__pb2.GetResponse.SerializeToString, + ), + 'Has': grpc.unary_unary_rpc_method_handler( + servicer.Has, + request_deserializer=data__tree__pb2.HasRequest.FromString, + response_serializer=data__tree__pb2.HasResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=data__tree__pb2.DataTree.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.data_tree.v0.DataTreeService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DataTreeService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_tree.v0.DataTreeService/Create', + base__pb2.Empty.SerializeToString, + data__tree__pb2.DataTree.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_tree.v0.DataTreeService/Update', + data__tree__pb2.UpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_tree.v0.DataTreeService/List', + data__tree__pb2.ListRequest.SerializeToString, + data__tree__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_tree.v0.DataTreeService/Get', + data__tree__pb2.GetRequest.SerializeToString, + data__tree__pb2.GetResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Has(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_tree.v0.DataTreeService/Has', + data__tree__pb2.HasRequest.SerializeToString, + data__tree__pb2.HasResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.data_tree.v0.DataTreeService/Delete', + data__tree__pb2.DataTree.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/dpf_any_message_pb2.py b/src/ansys/grpc/dpf/dpf_any_message_pb2.py new file mode 100644 index 0000000000..f045dfdc25 --- /dev/null +++ b/src/ansys/grpc/dpf/dpf_any_message_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: dpf_any_message.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x64pf_any_message.proto\x12 ansys.api.dpf.dpf_any_message.v0\x1a\nbase.proto\"=\n\x06\x44pfAny\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifierB!\xaa\x02\x1e\x41nsys.Api.Dpf.DpfAnyMessage.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dpf_any_message_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\036Ansys.Api.Dpf.DpfAnyMessage.V0' + _globals['_DPFANY']._serialized_start=71 + _globals['_DPFANY']._serialized_end=132 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/dpf_any_message_pb2_grpc.py b/src/ansys/grpc/dpf/dpf_any_message_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/src/ansys/grpc/dpf/dpf_any_message_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/src/ansys/grpc/dpf/dpf_any_pb2.py b/src/ansys/grpc/dpf/dpf_any_pb2.py new file mode 100644 index 0000000000..115e057654 --- /dev/null +++ b/src/ansys/grpc/dpf/dpf_any_pb2.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: dpf_any.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.dpf_any_message_pb2 as dpf__any__message__pb2 +import ansys.grpc.dpf.collection_pb2 as collection__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 +import ansys.grpc.dpf.data_sources_pb2 as data__sources__pb2 +import ansys.grpc.dpf.meshed_region_pb2 as meshed__region__pb2 +import ansys.grpc.dpf.time_freq_support_pb2 as time__freq__support__pb2 +import ansys.grpc.dpf.cyclic_support_pb2 as cyclic__support__pb2 +import ansys.grpc.dpf.workflow_message_pb2 as workflow__message__pb2 +import ansys.grpc.dpf.result_info_pb2 as result__info__pb2 +import ansys.grpc.dpf.operator_pb2 as operator__pb2 +import ansys.grpc.dpf.generic_data_container_pb2 as generic__data__container__pb2 +import ansys.grpc.dpf.data_tree_pb2 as data__tree__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rdpf_any.proto\x12\x18\x61nsys.api.dpf.dpf_any.v0\x1a\nbase.proto\x1a\x15\x64pf_any_message.proto\x1a\x10\x63ollection.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x11result_info.proto\x1a\x0eoperator.proto\x1a\x1cgeneric_data_container.proto\x1a\x0f\x64\x61ta_tree.proto\"$\n\x0cListResponse\x12\x14\n\x0cwrapped_type\x18\x01 \x01(\t\"\\\n\x0bTypeRequest\x12\x35\n\x03\x61ny\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12\x16\n\x0erequested_type\x18\x02 \x01(\t\"\"\n\x0cTypeResponse\x12\x12\n\nis_type_of\x18\x01 \x01(\x08\"\x9e\x01\n\x0cGetAsRequest\x12\x35\n\x03\x61ny\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\xf1\x06\n\rGetAsResponse\x12.\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x02 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\x03 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\x04 \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x05 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x45\n\x0b\x63yc_support\x18\x06 \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x07 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x08 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12;\n\x08operator\x18\t \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12?\n\x0bresult_info\x18\n \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12_\n\x16generic_data_container\x18\x0b \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12\x39\n\tdata_tree\x18\x0f \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12\x11\n\x07int_val\x18\x0c \x01(\x05H\x00\x12\x14\n\nstring_val\x18\r \x01(\tH\x00\x12\x14\n\ndouble_val\x18\x0e \x01(\x01H\x00\x42\x06\n\x04\x64\x61ta\"\xb8\x01\n\rCreateRequest\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifierH\x00\x12\x11\n\x07int_val\x18\x03 \x01(\x05H\x00\x12\x14\n\nstring_val\x18\x04 \x01(\tH\x00\x12\x14\n\ndouble_val\x18\x05 \x01(\x01H\x00\x42\x06\n\x04\x64\x61ta2\xf9\x02\n\rDpfAnyService\x12[\n\x06\x43reate\x12\'.ansys.api.dpf.dpf_any.v0.CreateRequest\x1a(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12X\n\x04List\x12(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x1a&.ansys.api.dpf.dpf_any.v0.ListResponse\x12W\n\x06IsType\x12%.ansys.api.dpf.dpf_any.v0.TypeRequest\x1a&.ansys.api.dpf.dpf_any.v0.TypeResponse\x12X\n\x05GetAs\x12&.ansys.api.dpf.dpf_any.v0.GetAsRequest\x1a\'.ansys.api.dpf.dpf_any.v0.GetAsResponseB\x1a\xaa\x02\x17\x41nsys.Api.Dpf.DpfAny.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dpf_any_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\027Ansys.Api.Dpf.DpfAny.V0' + _globals['_LISTRESPONSE']._serialized_start=318 + _globals['_LISTRESPONSE']._serialized_end=354 + _globals['_TYPEREQUEST']._serialized_start=356 + _globals['_TYPEREQUEST']._serialized_end=448 + _globals['_TYPERESPONSE']._serialized_start=450 + _globals['_TYPERESPONSE']._serialized_end=484 + _globals['_GETASREQUEST']._serialized_start=487 + _globals['_GETASREQUEST']._serialized_end=645 + _globals['_GETASRESPONSE']._serialized_start=648 + _globals['_GETASRESPONSE']._serialized_end=1529 + _globals['_CREATEREQUEST']._serialized_start=1532 + _globals['_CREATEREQUEST']._serialized_end=1716 + _globals['_DPFANYSERVICE']._serialized_start=1719 + _globals['_DPFANYSERVICE']._serialized_end=2096 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/dpf_any_pb2_grpc.py b/src/ansys/grpc/dpf/dpf_any_pb2_grpc.py new file mode 100644 index 0000000000..a049503ab4 --- /dev/null +++ b/src/ansys/grpc/dpf/dpf_any_pb2_grpc.py @@ -0,0 +1,166 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.dpf_any_message_pb2 as dpf__any__message__pb2 +import ansys.grpc.dpf.dpf_any_pb2 as dpf__any__pb2 + + +class DpfAnyServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.dpf_any.v0.DpfAnyService/Create', + request_serializer=dpf__any__pb2.CreateRequest.SerializeToString, + response_deserializer=dpf__any__message__pb2.DpfAny.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.dpf_any.v0.DpfAnyService/List', + request_serializer=dpf__any__message__pb2.DpfAny.SerializeToString, + response_deserializer=dpf__any__pb2.ListResponse.FromString, + ) + self.IsType = channel.unary_unary( + '/ansys.api.dpf.dpf_any.v0.DpfAnyService/IsType', + request_serializer=dpf__any__pb2.TypeRequest.SerializeToString, + response_deserializer=dpf__any__pb2.TypeResponse.FromString, + ) + self.GetAs = channel.unary_unary( + '/ansys.api.dpf.dpf_any.v0.DpfAnyService/GetAs', + request_serializer=dpf__any__pb2.GetAsRequest.SerializeToString, + response_deserializer=dpf__any__pb2.GetAsResponse.FromString, + ) + + +class DpfAnyServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def IsType(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAs(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DpfAnyServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=dpf__any__pb2.CreateRequest.FromString, + response_serializer=dpf__any__message__pb2.DpfAny.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=dpf__any__message__pb2.DpfAny.FromString, + response_serializer=dpf__any__pb2.ListResponse.SerializeToString, + ), + 'IsType': grpc.unary_unary_rpc_method_handler( + servicer.IsType, + request_deserializer=dpf__any__pb2.TypeRequest.FromString, + response_serializer=dpf__any__pb2.TypeResponse.SerializeToString, + ), + 'GetAs': grpc.unary_unary_rpc_method_handler( + servicer.GetAs, + request_deserializer=dpf__any__pb2.GetAsRequest.FromString, + response_serializer=dpf__any__pb2.GetAsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.dpf_any.v0.DpfAnyService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DpfAnyService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_any.v0.DpfAnyService/Create', + dpf__any__pb2.CreateRequest.SerializeToString, + dpf__any__message__pb2.DpfAny.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_any.v0.DpfAnyService/List', + dpf__any__message__pb2.DpfAny.SerializeToString, + dpf__any__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def IsType(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_any.v0.DpfAnyService/IsType', + dpf__any__pb2.TypeRequest.SerializeToString, + dpf__any__pb2.TypeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAs(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_any.v0.DpfAnyService/GetAs', + dpf__any__pb2.GetAsRequest.SerializeToString, + dpf__any__pb2.GetAsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/field_definition_pb2.py b/src/ansys/grpc/dpf/field_definition_pb2.py new file mode 100644 index 0000000000..a67ba5e57e --- /dev/null +++ b/src/ansys/grpc/dpf/field_definition_pb2.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: field_definition.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.available_result_pb2 as available__result__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66ield_definition.proto\x12!ansys.api.dpf.field_definition.v0\x1a\nbase.proto\x1a\x16\x61vailable_result.proto\"F\n\x0f\x46ieldDefinition\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\xb9\x01\n\tDimension\x12\x0c\n\x04mass\x18\x01 \x01(\x01\x12\x0e\n\x06length\x18\x02 \x01(\x01\x12\x0c\n\x04time\x18\x03 \x01(\x01\x12\x17\n\x0f\x65lectric_charge\x18\x04 \x01(\x01\x12\x13\n\x0btemperature\x18\x05 \x01(\x01\x12\r\n\x05\x61ngle\x18\x06 \x01(\x01\x12\x43\n\x0bhomogeneity\x18\x07 \x01(\x0e\x32..ansys.api.dpf.available_result.v0.Homogeneity\"M\n\x0e\x44imensionality\x12-\n\x06nature\x18\x01 \x01(\x0e\x32\x1d.ansys.api.dpf.base.v0.Nature\x12\x0c\n\x04size\x18\x02 \x03(\x05\"#\n\x11UnitParseBySymbol\x12\x0e\n\x06symbol\x18\x01 \x01(\t\"p\n\x04Unit\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x39\n\x03\x64im\x18\x02 \x01(\x0b\x32,.ansys.api.dpf.field_definition.v0.Dimension\x12\x0e\n\x06\x66\x61\x63tor\x18\x03 \x01(\x01\x12\r\n\x05shift\x18\x04 \x01(\x01\"+\n\x11ListQuantityTypes\x12\x16\n\x0equantity_types\x18\x01 \x03(\t\"\x8e\x03\n\x13\x46ieldDefinitionData\x12\x35\n\x04unit\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.field_definition.v0.Unit\x12\x31\n\x08location\x18\x02 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\x12J\n\x0f\x64imensionnality\x18\x03 \x01(\x0b\x32\x31.ansys.api.dpf.field_definition.v0.Dimensionality\x12\x44\n\x0cshell_layers\x18\x05 \x01(\x0e\x32..ansys.api.dpf.field_definition.v0.ShellLayers\x12L\n\x0equantity_types\x18\x06 \x01(\x0b\x32\x34.ansys.api.dpf.field_definition.v0.ListQuantityTypes\x12-\n\x04name\x18\x07 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.PBString\"\xcc\x04\n\x1c\x46ieldDefinitionUpdateRequest\x12L\n\x10\x66ield_definition\x18\x01 \x01(\x0b\x32\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\x12\x37\n\x04unit\x18\x02 \x01(\x0b\x32\'.ansys.api.dpf.field_definition.v0.UnitH\x00\x12K\n\x0bunit_symbol\x18\x03 \x01(\x0b\x32\x34.ansys.api.dpf.field_definition.v0.UnitParseBySymbolH\x00\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\x12J\n\x0f\x64imensionnality\x18\x05 \x01(\x0b\x32\x31.ansys.api.dpf.field_definition.v0.Dimensionality\x12\x44\n\x0cshell_layers\x18\x06 \x01(\x0e\x32..ansys.api.dpf.field_definition.v0.ShellLayers\x12L\n\x0equantity_types\x18\x07 \x01(\x0b\x32\x34.ansys.api.dpf.field_definition.v0.ListQuantityTypes\x12-\n\x04name\x18\x08 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.PBStringB\x16\n\x14unit_definition_type*}\n\x0bShellLayers\x12\n\n\x06NOTSET\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\n\n\x06\x42OTTOM\x10\x02\x12\r\n\tTOPBOTTOM\x10\x03\x12\x07\n\x03MID\x10\x04\x12\x10\n\x0cTOPBOTTOMMID\x10\x05\x12\r\n\tNONELAYER\x10\x06\x12\x14\n\x10LAYERINDEPENDENT\x10\x07\x32\xad\x03\n\x16\x46ieldDefinitionService\x12Z\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\x12g\n\x06Update\x12?.ansys.api.dpf.field_definition.v0.FieldDefinitionUpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12r\n\x04List\x12\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\x1a\x36.ansys.api.dpf.field_definition.v0.FieldDefinitionData\x12Z\n\x06\x44\x65lete\x12\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\x1a\x1c.ansys.api.dpf.base.v0.EmptyB#\xaa\x02 Ansys.Api.Dpf.FieldDefinition.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'field_definition_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002 Ansys.Api.Dpf.FieldDefinition.V0' + _globals['_SHELLLAYERS']._serialized_start=1624 + _globals['_SHELLLAYERS']._serialized_end=1749 + _globals['_FIELDDEFINITION']._serialized_start=97 + _globals['_FIELDDEFINITION']._serialized_end=167 + _globals['_DIMENSION']._serialized_start=170 + _globals['_DIMENSION']._serialized_end=355 + _globals['_DIMENSIONALITY']._serialized_start=357 + _globals['_DIMENSIONALITY']._serialized_end=434 + _globals['_UNITPARSEBYSYMBOL']._serialized_start=436 + _globals['_UNITPARSEBYSYMBOL']._serialized_end=471 + _globals['_UNIT']._serialized_start=473 + _globals['_UNIT']._serialized_end=585 + _globals['_LISTQUANTITYTYPES']._serialized_start=587 + _globals['_LISTQUANTITYTYPES']._serialized_end=630 + _globals['_FIELDDEFINITIONDATA']._serialized_start=633 + _globals['_FIELDDEFINITIONDATA']._serialized_end=1031 + _globals['_FIELDDEFINITIONUPDATEREQUEST']._serialized_start=1034 + _globals['_FIELDDEFINITIONUPDATEREQUEST']._serialized_end=1622 + _globals['_FIELDDEFINITIONSERVICE']._serialized_start=1752 + _globals['_FIELDDEFINITIONSERVICE']._serialized_end=2181 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/field_definition_pb2_grpc.py b/src/ansys/grpc/dpf/field_definition_pb2_grpc.py new file mode 100644 index 0000000000..08bab813c6 --- /dev/null +++ b/src/ansys/grpc/dpf/field_definition_pb2_grpc.py @@ -0,0 +1,166 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.field_definition_pb2 as field__definition__pb2 + + +class FieldDefinitionServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.field_definition.v0.FieldDefinitionService/Create', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=field__definition__pb2.FieldDefinition.FromString, + ) + self.Update = channel.unary_unary( + '/ansys.api.dpf.field_definition.v0.FieldDefinitionService/Update', + request_serializer=field__definition__pb2.FieldDefinitionUpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.field_definition.v0.FieldDefinitionService/List', + request_serializer=field__definition__pb2.FieldDefinition.SerializeToString, + response_deserializer=field__definition__pb2.FieldDefinitionData.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.field_definition.v0.FieldDefinitionService/Delete', + request_serializer=field__definition__pb2.FieldDefinition.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class FieldDefinitionServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FieldDefinitionServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=field__definition__pb2.FieldDefinition.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=field__definition__pb2.FieldDefinitionUpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=field__definition__pb2.FieldDefinition.FromString, + response_serializer=field__definition__pb2.FieldDefinitionData.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=field__definition__pb2.FieldDefinition.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.field_definition.v0.FieldDefinitionService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class FieldDefinitionService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field_definition.v0.FieldDefinitionService/Create', + base__pb2.Empty.SerializeToString, + field__definition__pb2.FieldDefinition.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field_definition.v0.FieldDefinitionService/Update', + field__definition__pb2.FieldDefinitionUpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field_definition.v0.FieldDefinitionService/List', + field__definition__pb2.FieldDefinition.SerializeToString, + field__definition__pb2.FieldDefinitionData.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field_definition.v0.FieldDefinitionService/Delete', + field__definition__pb2.FieldDefinition.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/field_pb2.py b/src/ansys/grpc/dpf/field_pb2.py new file mode 100644 index 0000000000..0d03e86fe7 --- /dev/null +++ b/src/ansys/grpc/dpf/field_pb2.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: field.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 +import ansys.grpc.dpf.field_definition_pb2 as field__definition__pb2 +import ansys.grpc.dpf.support_pb2 as support__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x66ield.proto\x12\x16\x61nsys.api.dpf.field.v0\x1a\nbase.proto\x1a\rscoping.proto\x1a\x16\x66ield_definition.proto\x1a\rsupport.proto\"P\n\x14\x43ustomTypeDefinition\x12\x18\n\x10unitary_datatype\x18\x01 \x01(\t\x12\x1e\n\x16num_bytes_unitary_data\x18\x02 \x01(\x05\"\x95\x01\n\x05\x46ield\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12\x10\n\x08\x64\x61tatype\x18\x02 \x01(\t\x12\x45\n\x0f\x63ustom_type_def\x18\x03 \x01(\x0b\x32,.ansys.api.dpf.field.v0.CustomTypeDefinition\"\xc5\x02\n\x0c\x46ieldRequest\x12-\n\x06nature\x18\x01 \x01(\x0e\x32\x1d.ansys.api.dpf.base.v0.Nature\x12\x31\n\x08location\x18\x02 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\x12/\n\x04size\x18\x03 \x01(\x0b\x32!.ansys.api.dpf.field.v0.FieldSize\x12\x10\n\x08\x64\x61tatype\x18\x04 \x01(\t\x12I\n\x0e\x64imensionality\x18\x05 \x01(\x0b\x32\x31.ansys.api.dpf.field_definition.v0.Dimensionality\x12\x45\n\x0f\x63ustom_type_def\x18\x06 \x01(\x0b\x32,.ansys.api.dpf.field.v0.CustomTypeDefinition\"\x8d\x01\n\x0e\x41\x64\x64\x44\x61taRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12M\n\x13\x65lemdata_containers\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"x\n\x14UpdateScopingRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x07scoping\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"\x93\x01\n\x1cUpdateFieldDefinitionRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x45\n\tfield_def\x18\x02 \x01(\x0b\x32\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\"\x9a\x01\n\x1bUpdateElementaryDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12M\n\x13\x65lemdata_containers\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"r\n\x11UpdateSizeRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12/\n\x04size\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.field.v0.FieldSize\"4\n\tFieldSize\x12\x14\n\x0cscoping_size\x18\x01 \x01(\x05\x12\x11\n\tdata_size\x18\x02 \x01(\x05\"\xae\x02\n\x04\x44\x61ta\x12\x39\n\ndatadouble\x18\x02 \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x33\n\x07\x64\x61taint\x18\x03 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x37\n\tdatafloat\x18\x04 \x01(\x0b\x32\".ansys.api.dpf.base.v0.FloatVectorH\x00\x12\x39\n\ndatastring\x18\x01 \x01(\x0b\x32#.ansys.api.dpf.base.v0.StringVectorH\x00\x12\x35\n\x08\x64\x61tabyte\x18\x05 \x01(\x0b\x32!.ansys.api.dpf.base.v0.ByteVectorH\x00\x42\x0b\n\tdatatypes\"q\n\x18\x45lementaryDataContainers\x12\x12\n\nscoping_id\x18\x01 \x01(\x05\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.ansys.api.dpf.field.v0.Data\x12\x15\n\rscoping_index\x18\x03 \x01(\x05\";\n\x0bListRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\":\n\nGetRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\"s\n\x18GetElementaryDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x0f\n\x05index\x18\x02 \x01(\x05H\x00\x12\x0c\n\x02id\x18\x03 \x01(\x05H\x00\x42\n\n\x08index_id\"\x1d\n\x0cListResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"j\n\x19GetElementaryDataResponse\x12M\n\x13\x65lemdata_containers\x18\x01 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"H\n\x12GetScopingResponse\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"x\n\x1aGetFieldDefinitionResponse\x12L\n\x10\x66ield_definition\x18\x01 \x01(\x0b\x32\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\x12\x0c\n\x04name\x18\x02 \x01(\t\"p\n\x0c\x43ountRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x06\x65ntity\x18\x02 \x01(\x0e\x32\".ansys.api.dpf.base.v0.CountEntity\"i\n\x0eSupportRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"u\n\x11SetSupportRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x07support\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.support.v0.Support\"P\n\x11UpdateDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\x32\xba\x0c\n\x0c\x46ieldService\x12M\n\x06\x43reate\x12$.ansys.api.dpf.field.v0.FieldRequest\x1a\x1d.ansys.api.dpf.field.v0.Field\x12O\n\x07\x41\x64\x64\x44\x61ta\x12&.ansys.api.dpf.field.v0.AddDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\nUpdateData\x12).ansys.api.dpf.field.v0.UpdateDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12^\n\x11UpdateDataPointer\x12).ansys.api.dpf.field.v0.UpdateDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12[\n\rUpdateScoping\x12,.ansys.api.dpf.field.v0.UpdateScopingRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12U\n\nUpdateSize\x12).ansys.api.dpf.field.v0.UpdateSizeRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12k\n\x15UpdateFieldDefinition\x12\x34.ansys.api.dpf.field.v0.UpdateFieldDefinitionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12i\n\x14UpdateElementaryData\x12\x33.ansys.api.dpf.field.v0.UpdateElementaryDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12S\n\x04List\x12#.ansys.api.dpf.field.v0.ListRequest\x1a$.ansys.api.dpf.field.v0.ListResponse0\x01\x12^\n\x0fListDataPointer\x12#.ansys.api.dpf.field.v0.ListRequest\x1a$.ansys.api.dpf.field.v0.ListResponse0\x01\x12\\\n\nGetScoping\x12\".ansys.api.dpf.field.v0.GetRequest\x1a*.ansys.api.dpf.field.v0.GetScopingResponse\x12W\n\nGetSupport\x12&.ansys.api.dpf.field.v0.SupportRequest\x1a!.ansys.api.dpf.support.v0.Support\x12U\n\nSetSupport\x12).ansys.api.dpf.field.v0.SetSupportRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12l\n\x12GetFieldDefinition\x12\".ansys.api.dpf.field.v0.GetRequest\x1a\x32.ansys.api.dpf.field.v0.GetFieldDefinitionResponse\x12x\n\x11GetElementaryData\x12\x30.ansys.api.dpf.field.v0.GetElementaryDataRequest\x1a\x31.ansys.api.dpf.field.v0.GetElementaryDataResponse\x12S\n\x05\x43ount\x12$.ansys.api.dpf.field.v0.CountRequest\x1a$.ansys.api.dpf.base.v0.CountResponse\x12\x45\n\x06\x44\x65lete\x12\x1d.ansys.api.dpf.field.v0.Field\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x19\xaa\x02\x16\x41nsys.Api.Dpf.Field.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'field_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\026Ansys.Api.Dpf.Field.V0' + _globals['_CUSTOMTYPEDEFINITION']._serialized_start=105 + _globals['_CUSTOMTYPEDEFINITION']._serialized_end=185 + _globals['_FIELD']._serialized_start=188 + _globals['_FIELD']._serialized_end=337 + _globals['_FIELDREQUEST']._serialized_start=340 + _globals['_FIELDREQUEST']._serialized_end=665 + _globals['_ADDDATAREQUEST']._serialized_start=668 + _globals['_ADDDATAREQUEST']._serialized_end=809 + _globals['_UPDATESCOPINGREQUEST']._serialized_start=811 + _globals['_UPDATESCOPINGREQUEST']._serialized_end=931 + _globals['_UPDATEFIELDDEFINITIONREQUEST']._serialized_start=934 + _globals['_UPDATEFIELDDEFINITIONREQUEST']._serialized_end=1081 + _globals['_UPDATEELEMENTARYDATAREQUEST']._serialized_start=1084 + _globals['_UPDATEELEMENTARYDATAREQUEST']._serialized_end=1238 + _globals['_UPDATESIZEREQUEST']._serialized_start=1240 + _globals['_UPDATESIZEREQUEST']._serialized_end=1354 + _globals['_FIELDSIZE']._serialized_start=1356 + _globals['_FIELDSIZE']._serialized_end=1408 + _globals['_DATA']._serialized_start=1411 + _globals['_DATA']._serialized_end=1713 + _globals['_ELEMENTARYDATACONTAINERS']._serialized_start=1715 + _globals['_ELEMENTARYDATACONTAINERS']._serialized_end=1828 + _globals['_LISTREQUEST']._serialized_start=1830 + _globals['_LISTREQUEST']._serialized_end=1889 + _globals['_GETREQUEST']._serialized_start=1891 + _globals['_GETREQUEST']._serialized_end=1949 + _globals['_GETELEMENTARYDATAREQUEST']._serialized_start=1951 + _globals['_GETELEMENTARYDATAREQUEST']._serialized_end=2066 + _globals['_LISTRESPONSE']._serialized_start=2068 + _globals['_LISTRESPONSE']._serialized_end=2097 + _globals['_GETELEMENTARYDATARESPONSE']._serialized_start=2099 + _globals['_GETELEMENTARYDATARESPONSE']._serialized_end=2205 + _globals['_GETSCOPINGRESPONSE']._serialized_start=2207 + _globals['_GETSCOPINGRESPONSE']._serialized_end=2279 + _globals['_GETFIELDDEFINITIONRESPONSE']._serialized_start=2281 + _globals['_GETFIELDDEFINITIONRESPONSE']._serialized_end=2401 + _globals['_COUNTREQUEST']._serialized_start=2403 + _globals['_COUNTREQUEST']._serialized_end=2515 + _globals['_SUPPORTREQUEST']._serialized_start=2517 + _globals['_SUPPORTREQUEST']._serialized_end=2622 + _globals['_SETSUPPORTREQUEST']._serialized_start=2624 + _globals['_SETSUPPORTREQUEST']._serialized_end=2741 + _globals['_UPDATEDATAREQUEST']._serialized_start=2743 + _globals['_UPDATEDATAREQUEST']._serialized_end=2823 + _globals['_FIELDSERVICE']._serialized_start=2826 + _globals['_FIELDSERVICE']._serialized_end=4420 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/field_pb2_grpc.py b/src/ansys/grpc/dpf/field_pb2_grpc.py new file mode 100644 index 0000000000..252928a41c --- /dev/null +++ b/src/ansys/grpc/dpf/field_pb2_grpc.py @@ -0,0 +1,604 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 +import ansys.grpc.dpf.support_pb2 as support__pb2 + + +class FieldServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/Create', + request_serializer=field__pb2.FieldRequest.SerializeToString, + response_deserializer=field__pb2.Field.FromString, + ) + self.AddData = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/AddData', + request_serializer=field__pb2.AddDataRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateData = channel.stream_unary( + '/ansys.api.dpf.field.v0.FieldService/UpdateData', + request_serializer=field__pb2.UpdateDataRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateDataPointer = channel.stream_unary( + '/ansys.api.dpf.field.v0.FieldService/UpdateDataPointer', + request_serializer=field__pb2.UpdateDataRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateScoping = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/UpdateScoping', + request_serializer=field__pb2.UpdateScopingRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateSize = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/UpdateSize', + request_serializer=field__pb2.UpdateSizeRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateFieldDefinition = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/UpdateFieldDefinition', + request_serializer=field__pb2.UpdateFieldDefinitionRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateElementaryData = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/UpdateElementaryData', + request_serializer=field__pb2.UpdateElementaryDataRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.List = channel.unary_stream( + '/ansys.api.dpf.field.v0.FieldService/List', + request_serializer=field__pb2.ListRequest.SerializeToString, + response_deserializer=field__pb2.ListResponse.FromString, + ) + self.ListDataPointer = channel.unary_stream( + '/ansys.api.dpf.field.v0.FieldService/ListDataPointer', + request_serializer=field__pb2.ListRequest.SerializeToString, + response_deserializer=field__pb2.ListResponse.FromString, + ) + self.GetScoping = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/GetScoping', + request_serializer=field__pb2.GetRequest.SerializeToString, + response_deserializer=field__pb2.GetScopingResponse.FromString, + ) + self.GetSupport = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/GetSupport', + request_serializer=field__pb2.SupportRequest.SerializeToString, + response_deserializer=support__pb2.Support.FromString, + ) + self.SetSupport = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/SetSupport', + request_serializer=field__pb2.SetSupportRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.GetFieldDefinition = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/GetFieldDefinition', + request_serializer=field__pb2.GetRequest.SerializeToString, + response_deserializer=field__pb2.GetFieldDefinitionResponse.FromString, + ) + self.GetElementaryData = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/GetElementaryData', + request_serializer=field__pb2.GetElementaryDataRequest.SerializeToString, + response_deserializer=field__pb2.GetElementaryDataResponse.FromString, + ) + self.Count = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/Count', + request_serializer=field__pb2.CountRequest.SerializeToString, + response_deserializer=base__pb2.CountResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/Delete', + request_serializer=field__pb2.Field.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class FieldServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddData(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateData(self, request_iterator, context): + """streams bytes from client to server + to choose to stream double values as doubles or floats add metadata with {"float_or_double":"float"} or {"float_or_double":"double"} + optional: for efficiency purpose, please give the total array size in the client metadata with "size_bytes", "size_double", "size_float" or "size_int" + if the total size is specified, the data will be directly copied in the field + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateDataPointer(self, request_iterator, context): + """streams ints as bytes from client to server + optional: for efficiency purpose, please give the total array size in the client metadata with "size_bytes" or "size_int" + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateScoping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateSize(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateFieldDefinition(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateElementaryData(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """sends streamed data, to choose the size of each chunk set metadata with "num_float", "num_double", "num_int" or "num_bytes" + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListDataPointer(self, request, context): + """sends streamed data, to choose the size of each chunk set metadata with "num_double", "num_int" or "num_bytes" + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetScoping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetSupport(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetSupport(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetFieldDefinition(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetElementaryData(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Count(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FieldServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=field__pb2.FieldRequest.FromString, + response_serializer=field__pb2.Field.SerializeToString, + ), + 'AddData': grpc.unary_unary_rpc_method_handler( + servicer.AddData, + request_deserializer=field__pb2.AddDataRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateData': grpc.stream_unary_rpc_method_handler( + servicer.UpdateData, + request_deserializer=field__pb2.UpdateDataRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateDataPointer': grpc.stream_unary_rpc_method_handler( + servicer.UpdateDataPointer, + request_deserializer=field__pb2.UpdateDataRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateScoping': grpc.unary_unary_rpc_method_handler( + servicer.UpdateScoping, + request_deserializer=field__pb2.UpdateScopingRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateSize': grpc.unary_unary_rpc_method_handler( + servicer.UpdateSize, + request_deserializer=field__pb2.UpdateSizeRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateFieldDefinition': grpc.unary_unary_rpc_method_handler( + servicer.UpdateFieldDefinition, + request_deserializer=field__pb2.UpdateFieldDefinitionRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateElementaryData': grpc.unary_unary_rpc_method_handler( + servicer.UpdateElementaryData, + request_deserializer=field__pb2.UpdateElementaryDataRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'List': grpc.unary_stream_rpc_method_handler( + servicer.List, + request_deserializer=field__pb2.ListRequest.FromString, + response_serializer=field__pb2.ListResponse.SerializeToString, + ), + 'ListDataPointer': grpc.unary_stream_rpc_method_handler( + servicer.ListDataPointer, + request_deserializer=field__pb2.ListRequest.FromString, + response_serializer=field__pb2.ListResponse.SerializeToString, + ), + 'GetScoping': grpc.unary_unary_rpc_method_handler( + servicer.GetScoping, + request_deserializer=field__pb2.GetRequest.FromString, + response_serializer=field__pb2.GetScopingResponse.SerializeToString, + ), + 'GetSupport': grpc.unary_unary_rpc_method_handler( + servicer.GetSupport, + request_deserializer=field__pb2.SupportRequest.FromString, + response_serializer=support__pb2.Support.SerializeToString, + ), + 'SetSupport': grpc.unary_unary_rpc_method_handler( + servicer.SetSupport, + request_deserializer=field__pb2.SetSupportRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'GetFieldDefinition': grpc.unary_unary_rpc_method_handler( + servicer.GetFieldDefinition, + request_deserializer=field__pb2.GetRequest.FromString, + response_serializer=field__pb2.GetFieldDefinitionResponse.SerializeToString, + ), + 'GetElementaryData': grpc.unary_unary_rpc_method_handler( + servicer.GetElementaryData, + request_deserializer=field__pb2.GetElementaryDataRequest.FromString, + response_serializer=field__pb2.GetElementaryDataResponse.SerializeToString, + ), + 'Count': grpc.unary_unary_rpc_method_handler( + servicer.Count, + request_deserializer=field__pb2.CountRequest.FromString, + response_serializer=base__pb2.CountResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=field__pb2.Field.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.field.v0.FieldService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class FieldService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/Create', + field__pb2.FieldRequest.SerializeToString, + field__pb2.Field.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddData(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/AddData', + field__pb2.AddDataRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/ansys.api.dpf.field.v0.FieldService/UpdateData', + field__pb2.UpdateDataRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateDataPointer(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/ansys.api.dpf.field.v0.FieldService/UpdateDataPointer', + field__pb2.UpdateDataRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateScoping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/UpdateScoping', + field__pb2.UpdateScopingRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateSize(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/UpdateSize', + field__pb2.UpdateSizeRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateFieldDefinition(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/UpdateFieldDefinition', + field__pb2.UpdateFieldDefinitionRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateElementaryData(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/UpdateElementaryData', + field__pb2.UpdateElementaryDataRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ansys.api.dpf.field.v0.FieldService/List', + field__pb2.ListRequest.SerializeToString, + field__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListDataPointer(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ansys.api.dpf.field.v0.FieldService/ListDataPointer', + field__pb2.ListRequest.SerializeToString, + field__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetScoping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/GetScoping', + field__pb2.GetRequest.SerializeToString, + field__pb2.GetScopingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetSupport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/GetSupport', + field__pb2.SupportRequest.SerializeToString, + support__pb2.Support.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetSupport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/SetSupport', + field__pb2.SetSupportRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetFieldDefinition(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/GetFieldDefinition', + field__pb2.GetRequest.SerializeToString, + field__pb2.GetFieldDefinitionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetElementaryData(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/GetElementaryData', + field__pb2.GetElementaryDataRequest.SerializeToString, + field__pb2.GetElementaryDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Count(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/Count', + field__pb2.CountRequest.SerializeToString, + base__pb2.CountResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/Delete', + field__pb2.Field.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/generic_data_container_pb2.py b/src/ansys/grpc/dpf/generic_data_container_pb2.py new file mode 100644 index 0000000000..6d4009747a --- /dev/null +++ b/src/ansys/grpc/dpf/generic_data_container_pb2.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: generic_data_container.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.dpf_any_message_pb2 as dpf__any__message__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cgeneric_data_container.proto\x12\'ansys.api.dpf.generic_data_container.v0\x1a\nbase.proto\x1a\x15\x64pf_any_message.proto\"K\n\x14GenericDataContainer\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\x0f\n\rCreateRequest\"w\n\x12GetPropertyRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x15\n\rproperty_name\x18\x02 \x03(\t\"L\n\x13GetPropertyResponse\x12\x35\n\x03\x61ny\x18\x01 \x03(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\"\xae\x01\n\x12SetPropertyRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x15\n\rproperty_name\x18\x02 \x03(\t\x12\x35\n\x03\x61ny\x18\x03 \x03(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\"\x15\n\x13SetPropertyResponse\"e\n\x17GetPropertyTypesRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\"2\n\x18GetPropertyTypesResponse\x12\x16\n\x0eproperty_types\x18\x01 \x03(\t\"e\n\x17GetPropertyNamesRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\"2\n\x18GetPropertyNamesResponse\x12\x16\n\x0eproperty_names\x18\x01 \x03(\t2\xcf\x06\n\x1bGenericDataContainerService\x12\x7f\n\x06\x43reate\x12\x36.ansys.api.dpf.generic_data_container.v0.CreateRequest\x1a=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x88\x01\n\x0bSetProperty\x12;.ansys.api.dpf.generic_data_container.v0.SetPropertyRequest\x1a<.ansys.api.dpf.generic_data_container.v0.SetPropertyResponse\x12\x88\x01\n\x0bGetProperty\x12;.ansys.api.dpf.generic_data_container.v0.GetPropertyRequest\x1a<.ansys.api.dpf.generic_data_container.v0.GetPropertyResponse\x12\x97\x01\n\x10GetPropertyTypes\x12@.ansys.api.dpf.generic_data_container.v0.GetPropertyTypesRequest\x1a\x41.ansys.api.dpf.generic_data_container.v0.GetPropertyTypesResponse\x12\x97\x01\n\x10GetPropertyNames\x12@.ansys.api.dpf.generic_data_container.v0.GetPropertyNamesRequest\x1a\x41.ansys.api.dpf.generic_data_container.v0.GetPropertyNamesResponse\x12\x65\n\x06\x44\x65lete\x12=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x1a\x1c.ansys.api.dpf.base.v0.EmptyB(\xaa\x02%Ansys.Api.Dpf.GenericDataContainer.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'generic_data_container_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002%Ansys.Api.Dpf.GenericDataContainer.V0' + _globals['_GENERICDATACONTAINER']._serialized_start=108 + _globals['_GENERICDATACONTAINER']._serialized_end=183 + _globals['_CREATEREQUEST']._serialized_start=185 + _globals['_CREATEREQUEST']._serialized_end=200 + _globals['_GETPROPERTYREQUEST']._serialized_start=202 + _globals['_GETPROPERTYREQUEST']._serialized_end=321 + _globals['_GETPROPERTYRESPONSE']._serialized_start=323 + _globals['_GETPROPERTYRESPONSE']._serialized_end=399 + _globals['_SETPROPERTYREQUEST']._serialized_start=402 + _globals['_SETPROPERTYREQUEST']._serialized_end=576 + _globals['_SETPROPERTYRESPONSE']._serialized_start=578 + _globals['_SETPROPERTYRESPONSE']._serialized_end=599 + _globals['_GETPROPERTYTYPESREQUEST']._serialized_start=601 + _globals['_GETPROPERTYTYPESREQUEST']._serialized_end=702 + _globals['_GETPROPERTYTYPESRESPONSE']._serialized_start=704 + _globals['_GETPROPERTYTYPESRESPONSE']._serialized_end=754 + _globals['_GETPROPERTYNAMESREQUEST']._serialized_start=756 + _globals['_GETPROPERTYNAMESREQUEST']._serialized_end=857 + _globals['_GETPROPERTYNAMESRESPONSE']._serialized_start=859 + _globals['_GETPROPERTYNAMESRESPONSE']._serialized_end=909 + _globals['_GENERICDATACONTAINERSERVICE']._serialized_start=912 + _globals['_GENERICDATACONTAINERSERVICE']._serialized_end=1759 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/generic_data_container_pb2_grpc.py b/src/ansys/grpc/dpf/generic_data_container_pb2_grpc.py new file mode 100644 index 0000000000..9bbd812d99 --- /dev/null +++ b/src/ansys/grpc/dpf/generic_data_container_pb2_grpc.py @@ -0,0 +1,232 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.generic_data_container_pb2 as generic__data__container__pb2 + + +class GenericDataContainerServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/Create', + request_serializer=generic__data__container__pb2.CreateRequest.SerializeToString, + response_deserializer=generic__data__container__pb2.GenericDataContainer.FromString, + ) + self.SetProperty = channel.unary_unary( + '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/SetProperty', + request_serializer=generic__data__container__pb2.SetPropertyRequest.SerializeToString, + response_deserializer=generic__data__container__pb2.SetPropertyResponse.FromString, + ) + self.GetProperty = channel.unary_unary( + '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/GetProperty', + request_serializer=generic__data__container__pb2.GetPropertyRequest.SerializeToString, + response_deserializer=generic__data__container__pb2.GetPropertyResponse.FromString, + ) + self.GetPropertyTypes = channel.unary_unary( + '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/GetPropertyTypes', + request_serializer=generic__data__container__pb2.GetPropertyTypesRequest.SerializeToString, + response_deserializer=generic__data__container__pb2.GetPropertyTypesResponse.FromString, + ) + self.GetPropertyNames = channel.unary_unary( + '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/GetPropertyNames', + request_serializer=generic__data__container__pb2.GetPropertyNamesRequest.SerializeToString, + response_deserializer=generic__data__container__pb2.GetPropertyNamesResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/Delete', + request_serializer=generic__data__container__pb2.GenericDataContainer.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class GenericDataContainerServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetProperty(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetProperty(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPropertyTypes(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPropertyNames(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_GenericDataContainerServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=generic__data__container__pb2.CreateRequest.FromString, + response_serializer=generic__data__container__pb2.GenericDataContainer.SerializeToString, + ), + 'SetProperty': grpc.unary_unary_rpc_method_handler( + servicer.SetProperty, + request_deserializer=generic__data__container__pb2.SetPropertyRequest.FromString, + response_serializer=generic__data__container__pb2.SetPropertyResponse.SerializeToString, + ), + 'GetProperty': grpc.unary_unary_rpc_method_handler( + servicer.GetProperty, + request_deserializer=generic__data__container__pb2.GetPropertyRequest.FromString, + response_serializer=generic__data__container__pb2.GetPropertyResponse.SerializeToString, + ), + 'GetPropertyTypes': grpc.unary_unary_rpc_method_handler( + servicer.GetPropertyTypes, + request_deserializer=generic__data__container__pb2.GetPropertyTypesRequest.FromString, + response_serializer=generic__data__container__pb2.GetPropertyTypesResponse.SerializeToString, + ), + 'GetPropertyNames': grpc.unary_unary_rpc_method_handler( + servicer.GetPropertyNames, + request_deserializer=generic__data__container__pb2.GetPropertyNamesRequest.FromString, + response_serializer=generic__data__container__pb2.GetPropertyNamesResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=generic__data__container__pb2.GenericDataContainer.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.generic_data_container.v0.GenericDataContainerService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class GenericDataContainerService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/Create', + generic__data__container__pb2.CreateRequest.SerializeToString, + generic__data__container__pb2.GenericDataContainer.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetProperty(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/SetProperty', + generic__data__container__pb2.SetPropertyRequest.SerializeToString, + generic__data__container__pb2.SetPropertyResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetProperty(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/GetProperty', + generic__data__container__pb2.GetPropertyRequest.SerializeToString, + generic__data__container__pb2.GetPropertyResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPropertyTypes(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/GetPropertyTypes', + generic__data__container__pb2.GetPropertyTypesRequest.SerializeToString, + generic__data__container__pb2.GetPropertyTypesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPropertyNames(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/GetPropertyNames', + generic__data__container__pb2.GetPropertyNamesRequest.SerializeToString, + generic__data__container__pb2.GetPropertyNamesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/Delete', + generic__data__container__pb2.GenericDataContainer.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/generic_support_pb2.py b/src/ansys/grpc/dpf/generic_support_pb2.py new file mode 100644 index 0000000000..226ed85b56 --- /dev/null +++ b/src/ansys/grpc/dpf/generic_support_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: generic_support.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15generic_support.proto\x12 ansys.api.dpf.generic_support.v0\x1a\nbase.proto\x1a\x0b\x66ield.proto\"E\n\x0eGenericSupport\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"!\n\rCreateRequest\x12\x10\n\x08location\x18\x01 \x01(\t\"\x83\x02\n\rUpdateRequest\x12\x41\n\x07support\x18\x01 \x01(\x0b\x32\x30.ansys.api.dpf.generic_support.v0.GenericSupport\x12Z\n\x0e\x66ield_supports\x18\x02 \x03(\x0b\x32\x42.ansys.api.dpf.generic_support.v0.UpdateRequest.FieldSupportsEntry\x1aS\n\x12\x46ieldSupportsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field:\x02\x38\x01\x32\xdd\x01\n\x15GenericSupportService\x12k\n\x06\x43reate\x12/.ansys.api.dpf.generic_support.v0.CreateRequest\x1a\x30.ansys.api.dpf.generic_support.v0.GenericSupport\x12W\n\x06Update\x12/.ansys.api.dpf.generic_support.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\"\xaa\x02\x1f\x41nsys.Api.Dpf.GenericSupport.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'generic_support_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\037Ansys.Api.Dpf.GenericSupport.v0' + _UPDATEREQUEST_FIELDSUPPORTSENTRY._options = None + _UPDATEREQUEST_FIELDSUPPORTSENTRY._serialized_options = b'8\001' + _globals['_GENERICSUPPORT']._serialized_start=84 + _globals['_GENERICSUPPORT']._serialized_end=153 + _globals['_CREATEREQUEST']._serialized_start=155 + _globals['_CREATEREQUEST']._serialized_end=188 + _globals['_UPDATEREQUEST']._serialized_start=191 + _globals['_UPDATEREQUEST']._serialized_end=450 + _globals['_UPDATEREQUEST_FIELDSUPPORTSENTRY']._serialized_start=367 + _globals['_UPDATEREQUEST_FIELDSUPPORTSENTRY']._serialized_end=450 + _globals['_GENERICSUPPORTSERVICE']._serialized_start=453 + _globals['_GENERICSUPPORTSERVICE']._serialized_end=674 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/generic_support_pb2_grpc.py b/src/ansys/grpc/dpf/generic_support_pb2_grpc.py new file mode 100644 index 0000000000..037da86e55 --- /dev/null +++ b/src/ansys/grpc/dpf/generic_support_pb2_grpc.py @@ -0,0 +1,100 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.generic_support_pb2 as generic__support__pb2 + + +class GenericSupportServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.generic_support.v0.GenericSupportService/Create', + request_serializer=generic__support__pb2.CreateRequest.SerializeToString, + response_deserializer=generic__support__pb2.GenericSupport.FromString, + ) + self.Update = channel.unary_unary( + '/ansys.api.dpf.generic_support.v0.GenericSupportService/Update', + request_serializer=generic__support__pb2.UpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class GenericSupportServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_GenericSupportServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=generic__support__pb2.CreateRequest.FromString, + response_serializer=generic__support__pb2.GenericSupport.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=generic__support__pb2.UpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.generic_support.v0.GenericSupportService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class GenericSupportService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.generic_support.v0.GenericSupportService/Create', + generic__support__pb2.CreateRequest.SerializeToString, + generic__support__pb2.GenericSupport.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.generic_support.v0.GenericSupportService/Update', + generic__support__pb2.UpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/label_space_pb2.py b/src/ansys/grpc/dpf/label_space_pb2.py new file mode 100644 index 0000000000..e2461e7da0 --- /dev/null +++ b/src/ansys/grpc/dpf/label_space_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: label_space.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11label_space.proto\x12\x1c\x61nsys.api.dpf.label_space.v0\"\x8e\x01\n\nLabelSpace\x12M\n\x0blabel_space\x18\x01 \x03(\x0b\x32\x38.ansys.api.dpf.label_space.v0.LabelSpace.LabelSpaceEntry\x1a\x31\n\x0fLabelSpaceEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x42\x1e\xaa\x02\x1b\x41nsys.Api.Dpf.LabelSpace.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'label_space_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\033Ansys.Api.Dpf.LabelSpace.v0' + _LABELSPACE_LABELSPACEENTRY._options = None + _LABELSPACE_LABELSPACEENTRY._serialized_options = b'8\001' + _globals['_LABELSPACE']._serialized_start=52 + _globals['_LABELSPACE']._serialized_end=194 + _globals['_LABELSPACE_LABELSPACEENTRY']._serialized_start=145 + _globals['_LABELSPACE_LABELSPACEENTRY']._serialized_end=194 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/label_space_pb2_grpc.py b/src/ansys/grpc/dpf/label_space_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/src/ansys/grpc/dpf/label_space_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/src/ansys/grpc/dpf/meshed_region_pb2.py b/src/ansys/grpc/dpf/meshed_region_pb2.py new file mode 100644 index 0000000000..57ce9ed1c9 --- /dev/null +++ b/src/ansys/grpc/dpf/meshed_region_pb2.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: meshed_region.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13meshed_region.proto\x12\x1e\x61nsys.api.dpf.meshed_region.v0\x1a\nbase.proto\x1a\rscoping.proto\x1a\x0b\x66ield.proto\"J\n\rCreateRequest\x12\x1a\n\x12num_nodes_reserved\x18\x01 \x01(\x05\x12\x1d\n\x15num_elements_reserved\x18\x02 \x01(\x05\"C\n\x0cMeshedRegion\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\xaa\x01\n\x11GetScopingRequest\x12:\n\x04mesh\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12.\n\x03loc\x18\x02 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.LocationH\x00\x12\x19\n\x0fnamed_selection\x18\x03 \x01(\tH\x00\x42\x0e\n\x0cscoping_type\"\xa3\x01\n\x18SetNamedSelectionRequest\x12:\n\x04mesh\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12\x17\n\x0fnamed_selection\x18\x02 \x01(\t\x12\x32\n\x07scoping\x18\x03 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"\xc0\x01\n\x0fSetFieldRequest\x12:\n\x04mesh\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12,\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x43\n\rproperty_type\x18\x03 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.PropertyType\"%\n\x0cPropertyName\x12\x15\n\rproperty_name\x18\x01 \x01(\t\"\xa0\x01\n\x0cPropertyType\x12\x43\n\rproperty_name\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.PropertyName\x12K\n\x11property_location\x18\x02 \x01(\x0e\x32\x30.ansys.api.dpf.meshed_region.v0.PropertyLocation\"\xc6\x01\n\x18\x45lementalPropertyRequest\x12:\n\x04mesh\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12\x43\n\rproperty_name\x18\x02 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.PropertyName\x12\x0f\n\x05index\x18\x03 \x01(\x05H\x00\x12\x0c\n\x02id\x18\x04 \x01(\x05H\x00\x42\n\n\x08index_id\"\x96\x01\n\x13ListPropertyRequest\x12:\n\x04mesh\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12\x43\n\rproperty_type\x18\x02 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.PropertyType\")\n\x19\x45lementalPropertyResponse\x12\x0c\n\x04prop\x18\x01 \x01(\x05\"6\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x05\x12\r\n\x05index\x18\x02 \x01(\x05\x12\x13\n\x0b\x63oordinates\x18\x03 \x03(\x01\"Y\n\x07\x45lement\x12\n\n\x02id\x18\x01 \x01(\x05\x12\r\n\x05index\x18\x02 \x01(\x05\x12\x33\n\x05nodes\x18\x03 \x03(\x0b\x32$.ansys.api.dpf.meshed_region.v0.Node\"s\n\nGetRequest\x12:\n\x04mesh\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12\x0f\n\x05index\x18\x03 \x01(\x05H\x00\x12\x0c\n\x02id\x18\x04 \x01(\x05H\x00\x42\n\n\x08index_id\"\xbd\x01\n\x0cListResponse\x12\x0c\n\x04unit\x18\x02 \x01(\t\x12\x16\n\x0e\x61vailable_prop\x18\x03 \x03(\t\x12\x11\n\tnum_nodes\x18\x04 \x01(\x05\x12\x13\n\x0bnum_element\x18\x05 \x01(\x05\x12L\n\x12\x65lement_shape_info\x18\x06 \x01(\x0b\x32\x30.ansys.api.dpf.meshed_region.v0.ElementShapeInfo\x12\x11\n\tnum_faces\x18\x07 \x01(\x05\"X\n\x1aListNamedSelectionsRequest\x12:\n\x04mesh\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\"7\n\x1bListNamedSelectionsResponse\x12\x18\n\x10named_selections\x18\x01 \x03(\t\"\xcb\x01\n\x10\x45lementShapeInfo\x12\x1a\n\x12has_shell_elements\x18\x01 \x01(\x08\x12\x19\n\x11has_beam_elements\x18\x02 \x01(\x08\x12\x1a\n\x12has_solid_elements\x18\x03 \x01(\x08\x12\x1a\n\x12has_point_elements\x18\x04 \x01(\x08\x12\x19\n\x11has_skin_elements\x18\x05 \x01(\x08\x12\x14\n\x0chas_polygons\x18\x06 \x01(\x08\x12\x17\n\x0fhas_polyhedrons\x18\x07 \x01(\x08\"\xc6\x01\n\nAddRequest\x12:\n\x04mesh\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12:\n\x05nodes\x18\x02 \x03(\x0b\x32+.ansys.api.dpf.meshed_region.v0.NodeRequest\x12@\n\x08\x65lements\x18\x03 \x03(\x0b\x32..ansys.api.dpf.meshed_region.v0.ElementRequest\"o\n\x0e\x45lementRequest\x12\n\n\x02id\x18\x01 \x01(\x05\x12;\n\x05shape\x18\x02 \x01(\x0e\x32,.ansys.api.dpf.meshed_region.v0.ElementShape\x12\x14\n\x0c\x63onnectivity\x18\x03 \x03(\x05\".\n\x0bNodeRequest\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x13\n\x0b\x63oordinates\x18\x04 \x03(\x01\"n\n\x19UpdateMeshedRegionRequest\x12\x43\n\rmeshed_region\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12\x0c\n\x04unit\x18\x02 \x01(\t*,\n\x10PropertyLocation\x12\t\n\x05NODAL\x10\x00\x12\r\n\tELEMENTAL\x10\x01*A\n\x0c\x45lementShape\x12\t\n\x05SHELL\x10\x00\x12\t\n\x05SOLID\x10\x01\x12\x08\n\x04\x42\x45\x41M\x10\x02\x12\x11\n\rUNKNOWN_SHAPE\x10\x03\x32\xe0\n\n\x13MeshedRegionService\x12\x65\n\x06\x43reate\x12-.ansys.api.dpf.meshed_region.v0.CreateRequest\x1a,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x12O\n\x03\x41\x64\x64\x12*.ansys.api.dpf.meshed_region.v0.AddRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x62\n\nGetScoping\x12\x31.ansys.api.dpf.meshed_region.v0.GetScopingRequest\x1a!.ansys.api.dpf.scoping.v0.Scoping\x12k\n\x11SetNamedSelection\x12\x38.ansys.api.dpf.meshed_region.v0.SetNamedSelectionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Y\n\x08SetField\x12/.ansys.api.dpf.meshed_region.v0.SetFieldRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x8b\x01\n\x14GetElementalProperty\x12\x38.ansys.api.dpf.meshed_region.v0.ElementalPropertyRequest\x1a\x39.ansys.api.dpf.meshed_region.v0.ElementalPropertyResponse\x12h\n\rUpdateRequest\x12\x39.ansys.api.dpf.meshed_region.v0.UpdateMeshedRegionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x62\n\x0cListProperty\x12\x33.ansys.api.dpf.meshed_region.v0.ListPropertyRequest\x1a\x1d.ansys.api.dpf.field.v0.Field\x12\x62\n\x04List\x12,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x1a,.ansys.api.dpf.meshed_region.v0.ListResponse\x12\x8e\x01\n\x13ListNamedSelections\x12:.ansys.api.dpf.meshed_region.v0.ListNamedSelectionsRequest\x1a;.ansys.api.dpf.meshed_region.v0.ListNamedSelectionsResponse\x12[\n\x07GetNode\x12*.ansys.api.dpf.meshed_region.v0.GetRequest\x1a$.ansys.api.dpf.meshed_region.v0.Node\x12\x61\n\nGetElement\x12*.ansys.api.dpf.meshed_region.v0.GetRequest\x1a\'.ansys.api.dpf.meshed_region.v0.Element\x12T\n\x06\x44\x65lete\x12,.ansys.api.dpf.meshed_region.v0.MeshedRegion\x1a\x1c.ansys.api.dpf.base.v0.EmptyB \xaa\x02\x1d\x41nsys.Api.Dpf.MeshedRegion.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshed_region_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\035Ansys.Api.Dpf.MeshedRegion.v0' + _globals['_PROPERTYLOCATION']._serialized_start=2656 + _globals['_PROPERTYLOCATION']._serialized_end=2700 + _globals['_ELEMENTSHAPE']._serialized_start=2702 + _globals['_ELEMENTSHAPE']._serialized_end=2767 + _globals['_CREATEREQUEST']._serialized_start=95 + _globals['_CREATEREQUEST']._serialized_end=169 + _globals['_MESHEDREGION']._serialized_start=171 + _globals['_MESHEDREGION']._serialized_end=238 + _globals['_GETSCOPINGREQUEST']._serialized_start=241 + _globals['_GETSCOPINGREQUEST']._serialized_end=411 + _globals['_SETNAMEDSELECTIONREQUEST']._serialized_start=414 + _globals['_SETNAMEDSELECTIONREQUEST']._serialized_end=577 + _globals['_SETFIELDREQUEST']._serialized_start=580 + _globals['_SETFIELDREQUEST']._serialized_end=772 + _globals['_PROPERTYNAME']._serialized_start=774 + _globals['_PROPERTYNAME']._serialized_end=811 + _globals['_PROPERTYTYPE']._serialized_start=814 + _globals['_PROPERTYTYPE']._serialized_end=974 + _globals['_ELEMENTALPROPERTYREQUEST']._serialized_start=977 + _globals['_ELEMENTALPROPERTYREQUEST']._serialized_end=1175 + _globals['_LISTPROPERTYREQUEST']._serialized_start=1178 + _globals['_LISTPROPERTYREQUEST']._serialized_end=1328 + _globals['_ELEMENTALPROPERTYRESPONSE']._serialized_start=1330 + _globals['_ELEMENTALPROPERTYRESPONSE']._serialized_end=1371 + _globals['_NODE']._serialized_start=1373 + _globals['_NODE']._serialized_end=1427 + _globals['_ELEMENT']._serialized_start=1429 + _globals['_ELEMENT']._serialized_end=1518 + _globals['_GETREQUEST']._serialized_start=1520 + _globals['_GETREQUEST']._serialized_end=1635 + _globals['_LISTRESPONSE']._serialized_start=1638 + _globals['_LISTRESPONSE']._serialized_end=1827 + _globals['_LISTNAMEDSELECTIONSREQUEST']._serialized_start=1829 + _globals['_LISTNAMEDSELECTIONSREQUEST']._serialized_end=1917 + _globals['_LISTNAMEDSELECTIONSRESPONSE']._serialized_start=1919 + _globals['_LISTNAMEDSELECTIONSRESPONSE']._serialized_end=1974 + _globals['_ELEMENTSHAPEINFO']._serialized_start=1977 + _globals['_ELEMENTSHAPEINFO']._serialized_end=2180 + _globals['_ADDREQUEST']._serialized_start=2183 + _globals['_ADDREQUEST']._serialized_end=2381 + _globals['_ELEMENTREQUEST']._serialized_start=2383 + _globals['_ELEMENTREQUEST']._serialized_end=2494 + _globals['_NODEREQUEST']._serialized_start=2496 + _globals['_NODEREQUEST']._serialized_end=2542 + _globals['_UPDATEMESHEDREGIONREQUEST']._serialized_start=2544 + _globals['_UPDATEMESHEDREGIONREQUEST']._serialized_end=2654 + _globals['_MESHEDREGIONSERVICE']._serialized_start=2770 + _globals['_MESHEDREGIONSERVICE']._serialized_end=4146 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/meshed_region_pb2_grpc.py b/src/ansys/grpc/dpf/meshed_region_pb2_grpc.py new file mode 100644 index 0000000000..7b1669371d --- /dev/null +++ b/src/ansys/grpc/dpf/meshed_region_pb2_grpc.py @@ -0,0 +1,465 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 +import ansys.grpc.dpf.meshed_region_pb2 as meshed__region__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 + + +class MeshedRegionServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/Create', + request_serializer=meshed__region__pb2.CreateRequest.SerializeToString, + response_deserializer=meshed__region__pb2.MeshedRegion.FromString, + ) + self.Add = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/Add', + request_serializer=meshed__region__pb2.AddRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.GetScoping = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/GetScoping', + request_serializer=meshed__region__pb2.GetScopingRequest.SerializeToString, + response_deserializer=scoping__pb2.Scoping.FromString, + ) + self.SetNamedSelection = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/SetNamedSelection', + request_serializer=meshed__region__pb2.SetNamedSelectionRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.SetField = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/SetField', + request_serializer=meshed__region__pb2.SetFieldRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.GetElementalProperty = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/GetElementalProperty', + request_serializer=meshed__region__pb2.ElementalPropertyRequest.SerializeToString, + response_deserializer=meshed__region__pb2.ElementalPropertyResponse.FromString, + ) + self.UpdateRequest = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/UpdateRequest', + request_serializer=meshed__region__pb2.UpdateMeshedRegionRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.ListProperty = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/ListProperty', + request_serializer=meshed__region__pb2.ListPropertyRequest.SerializeToString, + response_deserializer=field__pb2.Field.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/List', + request_serializer=meshed__region__pb2.MeshedRegion.SerializeToString, + response_deserializer=meshed__region__pb2.ListResponse.FromString, + ) + self.ListNamedSelections = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/ListNamedSelections', + request_serializer=meshed__region__pb2.ListNamedSelectionsRequest.SerializeToString, + response_deserializer=meshed__region__pb2.ListNamedSelectionsResponse.FromString, + ) + self.GetNode = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/GetNode', + request_serializer=meshed__region__pb2.GetRequest.SerializeToString, + response_deserializer=meshed__region__pb2.Node.FromString, + ) + self.GetElement = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/GetElement', + request_serializer=meshed__region__pb2.GetRequest.SerializeToString, + response_deserializer=meshed__region__pb2.Element.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/Delete', + request_serializer=meshed__region__pb2.MeshedRegion.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class MeshedRegionServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Add(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetScoping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetNamedSelection(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetField(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetElementalProperty(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateRequest(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListProperty(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListNamedSelections(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetNode(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetElement(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_MeshedRegionServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=meshed__region__pb2.CreateRequest.FromString, + response_serializer=meshed__region__pb2.MeshedRegion.SerializeToString, + ), + 'Add': grpc.unary_unary_rpc_method_handler( + servicer.Add, + request_deserializer=meshed__region__pb2.AddRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'GetScoping': grpc.unary_unary_rpc_method_handler( + servicer.GetScoping, + request_deserializer=meshed__region__pb2.GetScopingRequest.FromString, + response_serializer=scoping__pb2.Scoping.SerializeToString, + ), + 'SetNamedSelection': grpc.unary_unary_rpc_method_handler( + servicer.SetNamedSelection, + request_deserializer=meshed__region__pb2.SetNamedSelectionRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'SetField': grpc.unary_unary_rpc_method_handler( + servicer.SetField, + request_deserializer=meshed__region__pb2.SetFieldRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'GetElementalProperty': grpc.unary_unary_rpc_method_handler( + servicer.GetElementalProperty, + request_deserializer=meshed__region__pb2.ElementalPropertyRequest.FromString, + response_serializer=meshed__region__pb2.ElementalPropertyResponse.SerializeToString, + ), + 'UpdateRequest': grpc.unary_unary_rpc_method_handler( + servicer.UpdateRequest, + request_deserializer=meshed__region__pb2.UpdateMeshedRegionRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'ListProperty': grpc.unary_unary_rpc_method_handler( + servicer.ListProperty, + request_deserializer=meshed__region__pb2.ListPropertyRequest.FromString, + response_serializer=field__pb2.Field.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=meshed__region__pb2.MeshedRegion.FromString, + response_serializer=meshed__region__pb2.ListResponse.SerializeToString, + ), + 'ListNamedSelections': grpc.unary_unary_rpc_method_handler( + servicer.ListNamedSelections, + request_deserializer=meshed__region__pb2.ListNamedSelectionsRequest.FromString, + response_serializer=meshed__region__pb2.ListNamedSelectionsResponse.SerializeToString, + ), + 'GetNode': grpc.unary_unary_rpc_method_handler( + servicer.GetNode, + request_deserializer=meshed__region__pb2.GetRequest.FromString, + response_serializer=meshed__region__pb2.Node.SerializeToString, + ), + 'GetElement': grpc.unary_unary_rpc_method_handler( + servicer.GetElement, + request_deserializer=meshed__region__pb2.GetRequest.FromString, + response_serializer=meshed__region__pb2.Element.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=meshed__region__pb2.MeshedRegion.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.meshed_region.v0.MeshedRegionService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class MeshedRegionService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/Create', + meshed__region__pb2.CreateRequest.SerializeToString, + meshed__region__pb2.MeshedRegion.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Add(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/Add', + meshed__region__pb2.AddRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetScoping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/GetScoping', + meshed__region__pb2.GetScopingRequest.SerializeToString, + scoping__pb2.Scoping.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetNamedSelection(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/SetNamedSelection', + meshed__region__pb2.SetNamedSelectionRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetField(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/SetField', + meshed__region__pb2.SetFieldRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetElementalProperty(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/GetElementalProperty', + meshed__region__pb2.ElementalPropertyRequest.SerializeToString, + meshed__region__pb2.ElementalPropertyResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateRequest(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/UpdateRequest', + meshed__region__pb2.UpdateMeshedRegionRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListProperty(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/ListProperty', + meshed__region__pb2.ListPropertyRequest.SerializeToString, + field__pb2.Field.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/List', + meshed__region__pb2.MeshedRegion.SerializeToString, + meshed__region__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListNamedSelections(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/ListNamedSelections', + meshed__region__pb2.ListNamedSelectionsRequest.SerializeToString, + meshed__region__pb2.ListNamedSelectionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetNode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/GetNode', + meshed__region__pb2.GetRequest.SerializeToString, + meshed__region__pb2.Node.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetElement(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/GetElement', + meshed__region__pb2.GetRequest.SerializeToString, + meshed__region__pb2.Element.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.meshed_region.v0.MeshedRegionService/Delete', + meshed__region__pb2.MeshedRegion.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/operator_config_pb2.py b/src/ansys/grpc/dpf/operator_config_pb2.py new file mode 100644 index 0000000000..a76ebc8ec5 --- /dev/null +++ b/src/ansys/grpc/dpf/operator_config_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: operator_config.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15operator_config.proto\x12 ansys.api.dpf.operator_config.v0\x1a\nbase.proto\"\x8a\x01\n\x0eOperatorConfig\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12\x43\n\x04spec\x18\x02 \x01(\x0b\x32\x35.ansys.api.dpf.operator_config.v0.ConfigSpecification\"f\n\rCreateRequest\x12U\n\roperator_name\x18\x01 \x01(\x0b\x32>.ansys.api.dpf.operator_config.v0.OperatorNameForDefaultConfig\"5\n\x1cOperatorNameForDefaultConfig\x12\x15\n\roperator_name\x18\x01 \x01(\t\"d\n\x0c\x43onfigOption\x12\x13\n\x0boption_name\x18\x01 \x01(\t\x12\x0e\n\x04\x62ool\x18\x02 \x01(\x08H\x00\x12\r\n\x03int\x18\x03 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x04 \x01(\x01H\x00\x42\x0e\n\x0coption_value\"?\n\x15PrintableConfigOption\x12\x13\n\x0boption_name\x18\x01 \x01(\t\x12\x11\n\tvalue_str\x18\x02 \x01(\t\"o\n\x13\x43onfigSpecification\x12X\n\x13\x63onfig_options_spec\x18\x01 \x03(\x0b\x32;.ansys.api.dpf.operator_config.v0.ConfigOptionSpecification\"j\n\x19\x43onfigOptionSpecification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ntype_names\x18\x02 \x03(\t\x12\x19\n\x11\x64\x65\x66\x61ult_value_str\x18\x03 \x01(\t\x12\x10\n\x08\x64ocument\x18\x04 \x01(\t\"\x92\x01\n\rUpdateRequest\x12@\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\x12?\n\x07options\x18\x02 \x03(\x0b\x32..ansys.api.dpf.operator_config.v0.ConfigOption\"X\n\x0cListResponse\x12H\n\x07options\x18\x01 \x03(\x0b\x32\x37.ansys.api.dpf.operator_config.v0.PrintableConfigOption2\xa1\x03\n\x15OperatorConfigService\x12k\n\x06\x43reate\x12/.ansys.api.dpf.operator_config.v0.CreateRequest\x1a\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\x12W\n\x06Update\x12/.ansys.api.dpf.operator_config.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12h\n\x04List\x12\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\x1a..ansys.api.dpf.operator_config.v0.ListResponse\x12X\n\x06\x44\x65lete\x12\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\"\xaa\x02\x1f\x41nsys.Api.Dpf.OperatorConfig.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'operator_config_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\037Ansys.Api.Dpf.OperatorConfig.v0' + _globals['_OPERATORCONFIG']._serialized_start=72 + _globals['_OPERATORCONFIG']._serialized_end=210 + _globals['_CREATEREQUEST']._serialized_start=212 + _globals['_CREATEREQUEST']._serialized_end=314 + _globals['_OPERATORNAMEFORDEFAULTCONFIG']._serialized_start=316 + _globals['_OPERATORNAMEFORDEFAULTCONFIG']._serialized_end=369 + _globals['_CONFIGOPTION']._serialized_start=371 + _globals['_CONFIGOPTION']._serialized_end=471 + _globals['_PRINTABLECONFIGOPTION']._serialized_start=473 + _globals['_PRINTABLECONFIGOPTION']._serialized_end=536 + _globals['_CONFIGSPECIFICATION']._serialized_start=538 + _globals['_CONFIGSPECIFICATION']._serialized_end=649 + _globals['_CONFIGOPTIONSPECIFICATION']._serialized_start=651 + _globals['_CONFIGOPTIONSPECIFICATION']._serialized_end=757 + _globals['_UPDATEREQUEST']._serialized_start=760 + _globals['_UPDATEREQUEST']._serialized_end=906 + _globals['_LISTRESPONSE']._serialized_start=908 + _globals['_LISTRESPONSE']._serialized_end=996 + _globals['_OPERATORCONFIGSERVICE']._serialized_start=999 + _globals['_OPERATORCONFIGSERVICE']._serialized_end=1416 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/operator_config_pb2_grpc.py b/src/ansys/grpc/dpf/operator_config_pb2_grpc.py new file mode 100644 index 0000000000..e20246ce41 --- /dev/null +++ b/src/ansys/grpc/dpf/operator_config_pb2_grpc.py @@ -0,0 +1,166 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.operator_config_pb2 as operator__config__pb2 + + +class OperatorConfigServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.operator_config.v0.OperatorConfigService/Create', + request_serializer=operator__config__pb2.CreateRequest.SerializeToString, + response_deserializer=operator__config__pb2.OperatorConfig.FromString, + ) + self.Update = channel.unary_unary( + '/ansys.api.dpf.operator_config.v0.OperatorConfigService/Update', + request_serializer=operator__config__pb2.UpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.operator_config.v0.OperatorConfigService/List', + request_serializer=operator__config__pb2.OperatorConfig.SerializeToString, + response_deserializer=operator__config__pb2.ListResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.operator_config.v0.OperatorConfigService/Delete', + request_serializer=operator__config__pb2.OperatorConfig.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class OperatorConfigServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_OperatorConfigServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=operator__config__pb2.CreateRequest.FromString, + response_serializer=operator__config__pb2.OperatorConfig.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=operator__config__pb2.UpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=operator__config__pb2.OperatorConfig.FromString, + response_serializer=operator__config__pb2.ListResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=operator__config__pb2.OperatorConfig.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.operator_config.v0.OperatorConfigService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class OperatorConfigService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.operator_config.v0.OperatorConfigService/Create', + operator__config__pb2.CreateRequest.SerializeToString, + operator__config__pb2.OperatorConfig.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.operator_config.v0.OperatorConfigService/Update', + operator__config__pb2.UpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.operator_config.v0.OperatorConfigService/List', + operator__config__pb2.OperatorConfig.SerializeToString, + operator__config__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.operator_config.v0.OperatorConfigService/Delete', + operator__config__pb2.OperatorConfig.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/operator_pb2.py b/src/ansys/grpc/dpf/operator_pb2.py new file mode 100644 index 0000000000..fbc7e2ed23 --- /dev/null +++ b/src/ansys/grpc/dpf/operator_pb2.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: operator.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.collection_pb2 as collection__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.data_sources_pb2 as data__sources__pb2 +import ansys.grpc.dpf.meshed_region_pb2 as meshed__region__pb2 +import ansys.grpc.dpf.time_freq_support_pb2 as time__freq__support__pb2 +import ansys.grpc.dpf.result_info_pb2 as result__info__pb2 +import ansys.grpc.dpf.operator_config_pb2 as operator__config__pb2 +import ansys.grpc.dpf.cyclic_support_pb2 as cyclic__support__pb2 +import ansys.grpc.dpf.workflow_message_pb2 as workflow__message__pb2 +import ansys.grpc.dpf.dpf_any_message_pb2 as dpf__any__message__pb2 +import ansys.grpc.dpf.data_tree_pb2 as data__tree__pb2 +import ansys.grpc.dpf.label_space_pb2 as label__space__pb2 +import ansys.grpc.dpf.generic_data_container_pb2 as generic__data__container__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eoperator.proto\x12\x1d\x61nsys.api.dpf.dpf_operator.v0\x1a\x10\x63ollection.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\nbase.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x11result_info.proto\x1a\x15operator_config.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x15\x64pf_any_message.proto\x1a\x0f\x64\x61ta_tree.proto\x1a\x11label_space.proto\x1a\x1cgeneric_data_container.proto\"M\n\x08Operator\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x88\x05\n\rSpecification\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12]\n\x12map_input_pin_spec\x18\x02 \x03(\x0b\x32\x41.ansys.api.dpf.dpf_operator.v0.Specification.MapInputPinSpecEntry\x12_\n\x13map_output_pin_spec\x18\x03 \x03(\x0b\x32\x42.ansys.api.dpf.dpf_operator.v0.Specification.MapOutputPinSpecEntry\x12J\n\x0b\x63onfig_spec\x18\x04 \x01(\x0b\x32\x35.ansys.api.dpf.operator_config.v0.ConfigSpecification\x12P\n\nproperties\x18\x05 \x03(\x0b\x32<.ansys.api.dpf.dpf_operator.v0.Specification.PropertiesEntry\x1ag\n\x14MapInputPinSpecEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.ansys.api.dpf.dpf_operator.v0.PinSpecification:\x02\x38\x01\x1ah\n\x15MapOutputPinSpecEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.ansys.api.dpf.dpf_operator.v0.PinSpecification:\x02\x38\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x86\x01\n\x10PinSpecification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ntype_names\x18\x02 \x03(\t\x12\x10\n\x08optional\x18\x03 \x01(\x08\x12\x10\n\x08\x64ocument\x18\x04 \x01(\t\x12\x10\n\x08\x65llipsis\x18\x05 \x01(\x08\x12\x1a\n\x12name_derived_class\x18\x06 \x01(\t\"Y\n\rOperatorInput\x12\x38\n\x07inputop\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0e\n\x06pinOut\x18\x03 \x01(\x05\"\xa5\t\n\rUpdateRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\n \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x0b \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x30\n\x04vint\x18\x0c \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x36\n\x07vdouble\x18\r \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x0f \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x10 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12:\n\x06\x61s_any\x18\x13 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12?\n\x0blabel_space\x18\x14 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x44\n\x11operator_as_input\x18\x15 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12_\n\x16generic_data_container\x18\x16 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12?\n\x07inputop\x18\x11 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.OperatorInputH\x00\x42\x07\n\x05input\"\x8c\x01\n\x13UpdateConfigRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\"\xb6\x01\n\x19OperatorEvaluationRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12)\n\x04type\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"g\n\x15\x43reateOperatorRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\"\xb0\x07\n\x10OperatorResponse\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12<\n\x04mesh\x18\n \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12?\n\x0bresult_info\x18\x0b \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12P\n\x11time_freq_support\x18\x0c \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\r \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12?\n\x08workflow\x18\x0f \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x37\n\x03\x61ny\x18\x10 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12;\n\x08operator\x18\x11 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12_\n\x16generic_data_container\x18\x13 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x42\x08\n\x06output\"\x9d\x01\n\x0cListResponse\x12\x0f\n\x07op_name\x18\x01 \x01(\t\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\x12:\n\x04spec\x18\x03 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.Specification\"G\n\x10GetStatusRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\"#\n\x11GetStatusResponse\x12\x0e\n\x06status\x18\x01 \x01(\x05\"\x19\n\x17ListAllOperatorsRequest\")\n\x18ListAllOperatorsResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\x32\xcb\x06\n\x0fOperatorService\x12g\n\x06\x43reate\x12\x34.ansys.api.dpf.dpf_operator.v0.CreateOperatorRequest\x1a\'.ansys.api.dpf.dpf_operator.v0.Operator\x12T\n\x06Update\x12,.ansys.api.dpf.dpf_operator.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\x0cUpdateConfig\x12\x32.ansys.api.dpf.dpf_operator.v0.UpdateConfigRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12p\n\x03Get\x12\x38.ansys.api.dpf.dpf_operator.v0.OperatorEvaluationRequest\x1a/.ansys.api.dpf.dpf_operator.v0.OperatorResponse\x12\\\n\x04List\x12\'.ansys.api.dpf.dpf_operator.v0.Operator\x1a+.ansys.api.dpf.dpf_operator.v0.ListResponse\x12n\n\tGetStatus\x12/.ansys.api.dpf.dpf_operator.v0.GetStatusRequest\x1a\x30.ansys.api.dpf.dpf_operator.v0.GetStatusResponse\x12O\n\x06\x44\x65lete\x12\'.ansys.api.dpf.dpf_operator.v0.Operator\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x85\x01\n\x10ListAllOperators\x12\x36.ansys.api.dpf.dpf_operator.v0.ListAllOperatorsRequest\x1a\x37.ansys.api.dpf.dpf_operator.v0.ListAllOperatorsResponse0\x01\x42\x1c\xaa\x02\x19\x41nsys.Api.Dpf.Operator.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'operator_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\031Ansys.Api.Dpf.Operator.V0' + _SPECIFICATION_MAPINPUTPINSPECENTRY._options = None + _SPECIFICATION_MAPINPUTPINSPECENTRY._serialized_options = b'8\001' + _SPECIFICATION_MAPOUTPUTPINSPECENTRY._options = None + _SPECIFICATION_MAPOUTPUTPINSPECENTRY._serialized_options = b'8\001' + _SPECIFICATION_PROPERTIESENTRY._options = None + _SPECIFICATION_PROPERTIESENTRY._serialized_options = b'8\001' + _globals['_OPERATOR']._serialized_start=350 + _globals['_OPERATOR']._serialized_end=427 + _globals['_SPECIFICATION']._serialized_start=430 + _globals['_SPECIFICATION']._serialized_end=1078 + _globals['_SPECIFICATION_MAPINPUTPINSPECENTRY']._serialized_start=818 + _globals['_SPECIFICATION_MAPINPUTPINSPECENTRY']._serialized_end=921 + _globals['_SPECIFICATION_MAPOUTPUTPINSPECENTRY']._serialized_start=923 + _globals['_SPECIFICATION_MAPOUTPUTPINSPECENTRY']._serialized_end=1027 + _globals['_SPECIFICATION_PROPERTIESENTRY']._serialized_start=1029 + _globals['_SPECIFICATION_PROPERTIESENTRY']._serialized_end=1078 + _globals['_PINSPECIFICATION']._serialized_start=1081 + _globals['_PINSPECIFICATION']._serialized_end=1215 + _globals['_OPERATORINPUT']._serialized_start=1217 + _globals['_OPERATORINPUT']._serialized_end=1306 + _globals['_UPDATEREQUEST']._serialized_start=1309 + _globals['_UPDATEREQUEST']._serialized_end=2498 + _globals['_UPDATECONFIGREQUEST']._serialized_start=2501 + _globals['_UPDATECONFIGREQUEST']._serialized_end=2641 + _globals['_OPERATOREVALUATIONREQUEST']._serialized_start=2644 + _globals['_OPERATOREVALUATIONREQUEST']._serialized_end=2826 + _globals['_CREATEOPERATORREQUEST']._serialized_start=2828 + _globals['_CREATEOPERATORREQUEST']._serialized_end=2931 + _globals['_OPERATORRESPONSE']._serialized_start=2934 + _globals['_OPERATORRESPONSE']._serialized_end=3878 + _globals['_LISTRESPONSE']._serialized_start=3881 + _globals['_LISTRESPONSE']._serialized_end=4038 + _globals['_GETSTATUSREQUEST']._serialized_start=4040 + _globals['_GETSTATUSREQUEST']._serialized_end=4111 + _globals['_GETSTATUSRESPONSE']._serialized_start=4113 + _globals['_GETSTATUSRESPONSE']._serialized_end=4148 + _globals['_LISTALLOPERATORSREQUEST']._serialized_start=4150 + _globals['_LISTALLOPERATORSREQUEST']._serialized_end=4175 + _globals['_LISTALLOPERATORSRESPONSE']._serialized_start=4177 + _globals['_LISTALLOPERATORSRESPONSE']._serialized_end=4218 + _globals['_OPERATORSERVICE']._serialized_start=4221 + _globals['_OPERATORSERVICE']._serialized_end=5064 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/operator_pb2_grpc.py b/src/ansys/grpc/dpf/operator_pb2_grpc.py new file mode 100644 index 0000000000..9ec0894479 --- /dev/null +++ b/src/ansys/grpc/dpf/operator_pb2_grpc.py @@ -0,0 +1,299 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.operator_pb2 as operator__pb2 + + +class OperatorServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.dpf_operator.v0.OperatorService/Create', + request_serializer=operator__pb2.CreateOperatorRequest.SerializeToString, + response_deserializer=operator__pb2.Operator.FromString, + ) + self.Update = channel.unary_unary( + '/ansys.api.dpf.dpf_operator.v0.OperatorService/Update', + request_serializer=operator__pb2.UpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateConfig = channel.unary_unary( + '/ansys.api.dpf.dpf_operator.v0.OperatorService/UpdateConfig', + request_serializer=operator__pb2.UpdateConfigRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.Get = channel.unary_unary( + '/ansys.api.dpf.dpf_operator.v0.OperatorService/Get', + request_serializer=operator__pb2.OperatorEvaluationRequest.SerializeToString, + response_deserializer=operator__pb2.OperatorResponse.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.dpf_operator.v0.OperatorService/List', + request_serializer=operator__pb2.Operator.SerializeToString, + response_deserializer=operator__pb2.ListResponse.FromString, + ) + self.GetStatus = channel.unary_unary( + '/ansys.api.dpf.dpf_operator.v0.OperatorService/GetStatus', + request_serializer=operator__pb2.GetStatusRequest.SerializeToString, + response_deserializer=operator__pb2.GetStatusResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.dpf_operator.v0.OperatorService/Delete', + request_serializer=operator__pb2.Operator.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.ListAllOperators = channel.unary_stream( + '/ansys.api.dpf.dpf_operator.v0.OperatorService/ListAllOperators', + request_serializer=operator__pb2.ListAllOperatorsRequest.SerializeToString, + response_deserializer=operator__pb2.ListAllOperatorsResponse.FromString, + ) + + +class OperatorServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListAllOperators(self, request, context): + """static services + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_OperatorServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=operator__pb2.CreateOperatorRequest.FromString, + response_serializer=operator__pb2.Operator.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=operator__pb2.UpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateConfig': grpc.unary_unary_rpc_method_handler( + servicer.UpdateConfig, + request_deserializer=operator__pb2.UpdateConfigRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=operator__pb2.OperatorEvaluationRequest.FromString, + response_serializer=operator__pb2.OperatorResponse.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=operator__pb2.Operator.FromString, + response_serializer=operator__pb2.ListResponse.SerializeToString, + ), + 'GetStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetStatus, + request_deserializer=operator__pb2.GetStatusRequest.FromString, + response_serializer=operator__pb2.GetStatusResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=operator__pb2.Operator.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'ListAllOperators': grpc.unary_stream_rpc_method_handler( + servicer.ListAllOperators, + request_deserializer=operator__pb2.ListAllOperatorsRequest.FromString, + response_serializer=operator__pb2.ListAllOperatorsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.dpf_operator.v0.OperatorService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class OperatorService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_operator.v0.OperatorService/Create', + operator__pb2.CreateOperatorRequest.SerializeToString, + operator__pb2.Operator.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_operator.v0.OperatorService/Update', + operator__pb2.UpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_operator.v0.OperatorService/UpdateConfig', + operator__pb2.UpdateConfigRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_operator.v0.OperatorService/Get', + operator__pb2.OperatorEvaluationRequest.SerializeToString, + operator__pb2.OperatorResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_operator.v0.OperatorService/List', + operator__pb2.Operator.SerializeToString, + operator__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_operator.v0.OperatorService/GetStatus', + operator__pb2.GetStatusRequest.SerializeToString, + operator__pb2.GetStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.dpf_operator.v0.OperatorService/Delete', + operator__pb2.Operator.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListAllOperators(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ansys.api.dpf.dpf_operator.v0.OperatorService/ListAllOperators', + operator__pb2.ListAllOperatorsRequest.SerializeToString, + operator__pb2.ListAllOperatorsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/result_info_pb2.py b/src/ansys/grpc/dpf/result_info_pb2.py new file mode 100644 index 0000000000..8a0048e4fb --- /dev/null +++ b/src/ansys/grpc/dpf/result_info_pb2.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: result_info.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.available_result_pb2 as available__result__pb2 +import ansys.grpc.dpf.cyclic_support_pb2 as cyclic__support__pb2 +import ansys.grpc.dpf.support_pb2 as support__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11result_info.proto\x12\x1c\x61nsys.api.dpf.result_info.v0\x1a\nbase.proto\x1a\x16\x61vailable_result.proto\x1a\x14\x63yclic_support.proto\x1a\rsupport.proto\"A\n\nResultInfo\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\xc9\x03\n\x12ResultInfoResponse\x12\x41\n\ranalysis_type\x18\x01 \x01(\x0e\x32*.ansys.api.dpf.result_info.v0.AnalysisType\x12?\n\x0cphysics_type\x18\x02 \x01(\x0e\x32).ansys.api.dpf.result_info.v0.PhysicsType\x12\x13\n\x0bunit_system\x18\x03 \x01(\x05\x12\x0f\n\x07nresult\x18\x04 \x01(\x05\x12\x18\n\x10unit_system_name\x18\x05 \x01(\t\x12\x1c\n\x14solver_major_version\x18\x06 \x01(\x05\x12\x1c\n\x14solver_minor_version\x18\x07 \x01(\x05\x12\x13\n\x0bsolver_date\x18\x08 \x01(\x05\x12\x13\n\x0bsolver_time\x18\t \x01(\x05\x12\x11\n\tuser_name\x18\n \x01(\t\x12\x10\n\x08job_name\x18\x0b \x01(\t\x12\x14\n\x0cproduct_name\x18\x0c \x01(\t\x12\x12\n\nmain_title\x18\r \x01(\t\x12:\n\x08\x63yc_info\x18\x0e \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.CyclicInfo\"g\n\x16\x41vailableResultRequest\x12=\n\x0bresult_info\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfo\x12\x0e\n\x06numres\x18\x02 \x01(\x05\"z\n\nCyclicInfo\x12\x12\n\nhas_cyclic\x18\x01 \x01(\x08\x12\x13\n\x0b\x63yclic_type\x18\x02 \x01(\t\x12\x43\n\x0b\x63yc_support\x18\x03 \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupport\"s\n\x1aGetStringPropertiesRequest\x12=\n\x0bresult_info\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfo\x12\x16\n\x0eproperty_names\x18\x02 \x03(\t\"\xaf\x01\n\x1bGetStringPropertiesResponse\x12]\n\nproperties\x18\x05 \x03(\x0b\x32I.ansys.api.dpf.result_info.v0.GetStringPropertiesResponse.PropertiesEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe4\x01\n\x1cListQualifiersLabelsResponse\x12i\n\x10qualifier_labels\x18\x01 \x03(\x0b\x32O.ansys.api.dpf.result_info.v0.ListQualifiersLabelsResponse.QualifierLabelsEntry\x1aY\n\x14QualifierLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.support.v0.Support:\x02\x38\x01\"\\\n\x1bListQualifiersLabelsRequest\x12=\n\x0bresult_info\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfo*\x96\x01\n\x0c\x41nalysisType\x12\n\n\x06STATIC\x10\x00\x12\x0c\n\x08\x42UCKLING\x10\x01\x12\t\n\x05MODAL\x10\x02\x12\x0c\n\x08HARMONIC\x10\x03\x12\x07\n\x03\x43MS\x10\x04\x12\r\n\tTRANSIENT\x10\x05\x12\x08\n\x04MSUP\x10\x06\x12\r\n\tSUBSTRUCT\x10\x07\x12\x0c\n\x08SPECTRUM\x10\x08\x12\x14\n\x10UNKNOWN_ANALYSIS\x10\t*X\n\x0bPhysicsType\x12\x0b\n\x07MECANIC\x10\x00\x12\x0b\n\x07THERMAL\x10\x01\x12\x0c\n\x08MAGNETIC\x10\x02\x12\x0c\n\x08\x45LECTRIC\x10\x03\x12\x13\n\x0fUNKNOWN_PHYSICS\x10\x04\x32\xe6\x04\n\x11ResultInfoService\x12\x62\n\x04List\x12(.ansys.api.dpf.result_info.v0.ResultInfo\x1a\x30.ansys.api.dpf.result_info.v0.ResultInfoResponse\x12\x8d\x01\n\x14ListQualifiersLabels\x12\x39.ansys.api.dpf.result_info.v0.ListQualifiersLabelsRequest\x1a:.ansys.api.dpf.result_info.v0.ListQualifiersLabelsResponse\x12\x8a\x01\n\x13GetStringProperties\x12\x38.ansys.api.dpf.result_info.v0.GetStringPropertiesRequest\x1a\x39.ansys.api.dpf.result_info.v0.GetStringPropertiesResponse\x12~\n\nListResult\x12\x34.ansys.api.dpf.result_info.v0.AvailableResultRequest\x1a:.ansys.api.dpf.available_result.v0.AvailableResultResponse\x12P\n\x06\x44\x65lete\x12(.ansys.api.dpf.result_info.v0.ResultInfo\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1e\xaa\x02\x1b\x41nsys.Api.Dpf.ResultInfo.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'result_info_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\033Ansys.Api.Dpf.ResultInfo.V0' + _GETSTRINGPROPERTIESRESPONSE_PROPERTIESENTRY._options = None + _GETSTRINGPROPERTIESRESPONSE_PROPERTIESENTRY._serialized_options = b'8\001' + _LISTQUALIFIERSLABELSRESPONSE_QUALIFIERLABELSENTRY._options = None + _LISTQUALIFIERSLABELSRESPONSE_QUALIFIERLABELSENTRY._serialized_options = b'8\001' + _globals['_ANALYSISTYPE']._serialized_start=1501 + _globals['_ANALYSISTYPE']._serialized_end=1651 + _globals['_PHYSICSTYPE']._serialized_start=1653 + _globals['_PHYSICSTYPE']._serialized_end=1741 + _globals['_RESULTINFO']._serialized_start=124 + _globals['_RESULTINFO']._serialized_end=189 + _globals['_RESULTINFORESPONSE']._serialized_start=192 + _globals['_RESULTINFORESPONSE']._serialized_end=649 + _globals['_AVAILABLERESULTREQUEST']._serialized_start=651 + _globals['_AVAILABLERESULTREQUEST']._serialized_end=754 + _globals['_CYCLICINFO']._serialized_start=756 + _globals['_CYCLICINFO']._serialized_end=878 + _globals['_GETSTRINGPROPERTIESREQUEST']._serialized_start=880 + _globals['_GETSTRINGPROPERTIESREQUEST']._serialized_end=995 + _globals['_GETSTRINGPROPERTIESRESPONSE']._serialized_start=998 + _globals['_GETSTRINGPROPERTIESRESPONSE']._serialized_end=1173 + _globals['_GETSTRINGPROPERTIESRESPONSE_PROPERTIESENTRY']._serialized_start=1124 + _globals['_GETSTRINGPROPERTIESRESPONSE_PROPERTIESENTRY']._serialized_end=1173 + _globals['_LISTQUALIFIERSLABELSRESPONSE']._serialized_start=1176 + _globals['_LISTQUALIFIERSLABELSRESPONSE']._serialized_end=1404 + _globals['_LISTQUALIFIERSLABELSRESPONSE_QUALIFIERLABELSENTRY']._serialized_start=1315 + _globals['_LISTQUALIFIERSLABELSRESPONSE_QUALIFIERLABELSENTRY']._serialized_end=1404 + _globals['_LISTQUALIFIERSLABELSREQUEST']._serialized_start=1406 + _globals['_LISTQUALIFIERSLABELSREQUEST']._serialized_end=1498 + _globals['_RESULTINFOSERVICE']._serialized_start=1744 + _globals['_RESULTINFOSERVICE']._serialized_end=2358 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/result_info_pb2_grpc.py b/src/ansys/grpc/dpf/result_info_pb2_grpc.py new file mode 100644 index 0000000000..b3b82367b8 --- /dev/null +++ b/src/ansys/grpc/dpf/result_info_pb2_grpc.py @@ -0,0 +1,200 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.available_result_pb2 as available__result__pb2 +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.result_info_pb2 as result__info__pb2 + + +class ResultInfoServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.List = channel.unary_unary( + '/ansys.api.dpf.result_info.v0.ResultInfoService/List', + request_serializer=result__info__pb2.ResultInfo.SerializeToString, + response_deserializer=result__info__pb2.ResultInfoResponse.FromString, + ) + self.ListQualifiersLabels = channel.unary_unary( + '/ansys.api.dpf.result_info.v0.ResultInfoService/ListQualifiersLabels', + request_serializer=result__info__pb2.ListQualifiersLabelsRequest.SerializeToString, + response_deserializer=result__info__pb2.ListQualifiersLabelsResponse.FromString, + ) + self.GetStringProperties = channel.unary_unary( + '/ansys.api.dpf.result_info.v0.ResultInfoService/GetStringProperties', + request_serializer=result__info__pb2.GetStringPropertiesRequest.SerializeToString, + response_deserializer=result__info__pb2.GetStringPropertiesResponse.FromString, + ) + self.ListResult = channel.unary_unary( + '/ansys.api.dpf.result_info.v0.ResultInfoService/ListResult', + request_serializer=result__info__pb2.AvailableResultRequest.SerializeToString, + response_deserializer=available__result__pb2.AvailableResultResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.result_info.v0.ResultInfoService/Delete', + request_serializer=result__info__pb2.ResultInfo.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class ResultInfoServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListQualifiersLabels(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStringProperties(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListResult(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ResultInfoServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=result__info__pb2.ResultInfo.FromString, + response_serializer=result__info__pb2.ResultInfoResponse.SerializeToString, + ), + 'ListQualifiersLabels': grpc.unary_unary_rpc_method_handler( + servicer.ListQualifiersLabels, + request_deserializer=result__info__pb2.ListQualifiersLabelsRequest.FromString, + response_serializer=result__info__pb2.ListQualifiersLabelsResponse.SerializeToString, + ), + 'GetStringProperties': grpc.unary_unary_rpc_method_handler( + servicer.GetStringProperties, + request_deserializer=result__info__pb2.GetStringPropertiesRequest.FromString, + response_serializer=result__info__pb2.GetStringPropertiesResponse.SerializeToString, + ), + 'ListResult': grpc.unary_unary_rpc_method_handler( + servicer.ListResult, + request_deserializer=result__info__pb2.AvailableResultRequest.FromString, + response_serializer=available__result__pb2.AvailableResultResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=result__info__pb2.ResultInfo.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.result_info.v0.ResultInfoService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ResultInfoService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.result_info.v0.ResultInfoService/List', + result__info__pb2.ResultInfo.SerializeToString, + result__info__pb2.ResultInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListQualifiersLabels(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.result_info.v0.ResultInfoService/ListQualifiersLabels', + result__info__pb2.ListQualifiersLabelsRequest.SerializeToString, + result__info__pb2.ListQualifiersLabelsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetStringProperties(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.result_info.v0.ResultInfoService/GetStringProperties', + result__info__pb2.GetStringPropertiesRequest.SerializeToString, + result__info__pb2.GetStringPropertiesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListResult(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.result_info.v0.ResultInfoService/ListResult', + result__info__pb2.AvailableResultRequest.SerializeToString, + available__result__pb2.AvailableResultResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.result_info.v0.ResultInfoService/Delete', + result__info__pb2.ResultInfo.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/scoping_pb2.py b/src/ansys/grpc/dpf/scoping_pb2.py new file mode 100644 index 0000000000..c1f499a28f --- /dev/null +++ b/src/ansys/grpc/dpf/scoping_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: scoping.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rscoping.proto\x12\x18\x61nsys.api.dpf.scoping.v0\x1a\nbase.proto\">\n\x07Scoping\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\xc1\x01\n\rUpdateRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x33\n\x08location\x18\x03 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.LocationH\x00\x12\x35\n\x08index_id\x18\x04 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.IndexIdH\x00\x42\x10\n\x0eupdate_request\"U\n\x10UpdateIdsRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\"$\n\x07IndexId\x12\n\n\x02id\x18\x01 \x01(\x05\x12\r\n\x05index\x18\x02 \x01(\x05\"v\n\x0c\x43ountRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x32\n\x06\x65ntity\x18\x02 \x01(\x0e\x32\".ansys.api.dpf.base.v0.CountEntity\"C\n\x13GetLocationResponse\x12,\n\x03loc\x18\x01 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\"o\n\nGetRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x0c\n\x02id\x18\x02 \x01(\x05H\x00\x12\x0f\n\x05index\x18\x03 \x01(\x05H\x00\x42\x0e\n\x0ctype_request\"<\n\x0bGetResponse\x12\x0c\n\x02id\x18\x01 \x01(\x05H\x00\x12\x0f\n\x05index\x18\x02 \x01(\x05H\x00\x42\x0e\n\x0ctype_request\"\x1d\n\x0cListResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\x32\xb1\x05\n\x0eScopingService\x12I\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a!.ansys.api.dpf.scoping.v0.Scoping\x12O\n\x06Update\x12\'.ansys.api.dpf.scoping.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\tUpdateIds\x12*.ansys.api.dpf.scoping.v0.UpdateIdsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12S\n\x04List\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a&.ansys.api.dpf.scoping.v0.ListResponse0\x01\x12U\n\x05\x43ount\x12&.ansys.api.dpf.scoping.v0.CountRequest\x1a$.ansys.api.dpf.base.v0.CountResponse\x12_\n\x0bGetLocation\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a-.ansys.api.dpf.scoping.v0.GetLocationResponse\x12R\n\x03Get\x12$.ansys.api.dpf.scoping.v0.GetRequest\x1a%.ansys.api.dpf.scoping.v0.GetResponse\x12I\n\x06\x44\x65lete\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1b\xaa\x02\x18\x41nsys.Api.Dpf.Scoping.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scoping_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\030Ansys.Api.Dpf.Scoping.V0' + _globals['_SCOPING']._serialized_start=55 + _globals['_SCOPING']._serialized_end=117 + _globals['_UPDATEREQUEST']._serialized_start=120 + _globals['_UPDATEREQUEST']._serialized_end=313 + _globals['_UPDATEIDSREQUEST']._serialized_start=315 + _globals['_UPDATEIDSREQUEST']._serialized_end=400 + _globals['_INDEXID']._serialized_start=402 + _globals['_INDEXID']._serialized_end=438 + _globals['_COUNTREQUEST']._serialized_start=440 + _globals['_COUNTREQUEST']._serialized_end=558 + _globals['_GETLOCATIONRESPONSE']._serialized_start=560 + _globals['_GETLOCATIONRESPONSE']._serialized_end=627 + _globals['_GETREQUEST']._serialized_start=629 + _globals['_GETREQUEST']._serialized_end=740 + _globals['_GETRESPONSE']._serialized_start=742 + _globals['_GETRESPONSE']._serialized_end=802 + _globals['_LISTRESPONSE']._serialized_start=804 + _globals['_LISTRESPONSE']._serialized_end=833 + _globals['_SCOPINGSERVICE']._serialized_start=836 + _globals['_SCOPINGSERVICE']._serialized_end=1525 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/scoping_pb2_grpc.py b/src/ansys/grpc/dpf/scoping_pb2_grpc.py new file mode 100644 index 0000000000..99c80746e2 --- /dev/null +++ b/src/ansys/grpc/dpf/scoping_pb2_grpc.py @@ -0,0 +1,302 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 + + +class ScopingServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.scoping.v0.ScopingService/Create', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=scoping__pb2.Scoping.FromString, + ) + self.Update = channel.unary_unary( + '/ansys.api.dpf.scoping.v0.ScopingService/Update', + request_serializer=scoping__pb2.UpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdateIds = channel.stream_unary( + '/ansys.api.dpf.scoping.v0.ScopingService/UpdateIds', + request_serializer=scoping__pb2.UpdateIdsRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.List = channel.unary_stream( + '/ansys.api.dpf.scoping.v0.ScopingService/List', + request_serializer=scoping__pb2.Scoping.SerializeToString, + response_deserializer=scoping__pb2.ListResponse.FromString, + ) + self.Count = channel.unary_unary( + '/ansys.api.dpf.scoping.v0.ScopingService/Count', + request_serializer=scoping__pb2.CountRequest.SerializeToString, + response_deserializer=base__pb2.CountResponse.FromString, + ) + self.GetLocation = channel.unary_unary( + '/ansys.api.dpf.scoping.v0.ScopingService/GetLocation', + request_serializer=scoping__pb2.Scoping.SerializeToString, + response_deserializer=scoping__pb2.GetLocationResponse.FromString, + ) + self.Get = channel.unary_unary( + '/ansys.api.dpf.scoping.v0.ScopingService/Get', + request_serializer=scoping__pb2.GetRequest.SerializeToString, + response_deserializer=scoping__pb2.GetResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.scoping.v0.ScopingService/Delete', + request_serializer=scoping__pb2.Scoping.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class ScopingServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateIds(self, request_iterator, context): + """streams ints as bytes from client to server + optional: for efficiency purpose, please give the total array size in the client metadata with "size_bytes" or "size_int" + if the total size is specified, the data will be directly copied in the scoping + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """sends streamed data, to choose the size of each chunk set metadata with "num_int" or "num_bytes" + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Count(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetLocation(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ScopingServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=scoping__pb2.Scoping.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=scoping__pb2.UpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdateIds': grpc.stream_unary_rpc_method_handler( + servicer.UpdateIds, + request_deserializer=scoping__pb2.UpdateIdsRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'List': grpc.unary_stream_rpc_method_handler( + servicer.List, + request_deserializer=scoping__pb2.Scoping.FromString, + response_serializer=scoping__pb2.ListResponse.SerializeToString, + ), + 'Count': grpc.unary_unary_rpc_method_handler( + servicer.Count, + request_deserializer=scoping__pb2.CountRequest.FromString, + response_serializer=base__pb2.CountResponse.SerializeToString, + ), + 'GetLocation': grpc.unary_unary_rpc_method_handler( + servicer.GetLocation, + request_deserializer=scoping__pb2.Scoping.FromString, + response_serializer=scoping__pb2.GetLocationResponse.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=scoping__pb2.GetRequest.FromString, + response_serializer=scoping__pb2.GetResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=scoping__pb2.Scoping.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.scoping.v0.ScopingService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ScopingService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.scoping.v0.ScopingService/Create', + base__pb2.Empty.SerializeToString, + scoping__pb2.Scoping.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.scoping.v0.ScopingService/Update', + scoping__pb2.UpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateIds(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/ansys.api.dpf.scoping.v0.ScopingService/UpdateIds', + scoping__pb2.UpdateIdsRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ansys.api.dpf.scoping.v0.ScopingService/List', + scoping__pb2.Scoping.SerializeToString, + scoping__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Count(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.scoping.v0.ScopingService/Count', + scoping__pb2.CountRequest.SerializeToString, + base__pb2.CountResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetLocation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.scoping.v0.ScopingService/GetLocation', + scoping__pb2.Scoping.SerializeToString, + scoping__pb2.GetLocationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.scoping.v0.ScopingService/Get', + scoping__pb2.GetRequest.SerializeToString, + scoping__pb2.GetResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.scoping.v0.ScopingService/Delete', + scoping__pb2.Scoping.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/session_pb2.py b/src/ansys/grpc/dpf/session_pb2.py new file mode 100644 index 0000000000..7feb68c72f --- /dev/null +++ b/src/ansys/grpc/dpf/session_pb2.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: session.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.operator_pb2 as operator__pb2 +import ansys.grpc.dpf.workflow_message_pb2 as workflow__message__pb2 +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.data_tree_pb2 as data__tree__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\x18\x61nsys.api.dpf.session.v0\x1a\x0eoperator.proto\x1a\x16workflow_message.proto\x1a\nbase.proto\x1a\x0f\x64\x61ta_tree.proto\">\n\x07Session\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\x16\n\x14\x43reateSessionRequest\"\xcf\x02\n\nAddRequest\x12\x32\n\x07session\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.session.v0.Session\x12\x39\n\x02wf\x18\x02 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12=\n\top_output\x18\x03 \x01(\x0b\x32(.ansys.api.dpf.session.v0.OperatorOutputH\x00\x12\x1c\n\x12\x65vent_handler_type\x18\x05 \x01(\tH\x00\x12\x1d\n\x13signal_emitter_type\x18\x06 \x01(\tH\x00\x12\x12\n\nidentifier\x18\x04 \x01(\t\x12\x38\n\nproperties\x18\x07 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeB\x08\n\x06\x65ntity\"R\n\x0eOperatorOutput\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\"{\n\x13GetProgressResponse\x12.\n\x05state\x18\x01 \x01(\x0b\x32\x1f.ansys.api.dpf.session.v0.State\x12\x34\n\x08progress\x18\x02 \x01(\x0b\x32\".ansys.api.dpf.session.v0.Progress\"\x16\n\x05State\x12\r\n\x05state\x18\x02 \x01(\t\"\'\n\x08Progress\x12\x1b\n\x13progress_percentage\x18\x01 \x01(\x01\x32\x99\x04\n\x0eSessionService\x12[\n\x06\x43reate\x12..ansys.api.dpf.session.v0.CreateSessionRequest\x1a!.ansys.api.dpf.session.v0.Session\x12I\n\x03\x41\x64\x64\x12$.ansys.api.dpf.session.v0.AddRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x66\n\x10ListenToProgress\x12!.ansys.api.dpf.session.v0.Session\x1a-.ansys.api.dpf.session.v0.GetProgressResponse0\x01\x12Y\n\x16\x41\x64\x64ProgressEventSystem\x12!.ansys.api.dpf.session.v0.Session\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Q\n\x0e\x46lushWorkflows\x12!.ansys.api.dpf.session.v0.Session\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12I\n\x06\x44\x65lete\x12!.ansys.api.dpf.session.v0.Session\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1b\xaa\x02\x18\x41nsys.Api.Dpf.Session.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'session_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\030Ansys.Api.Dpf.Session.V0' + _globals['_SESSION']._serialized_start=112 + _globals['_SESSION']._serialized_end=174 + _globals['_CREATESESSIONREQUEST']._serialized_start=176 + _globals['_CREATESESSIONREQUEST']._serialized_end=198 + _globals['_ADDREQUEST']._serialized_start=201 + _globals['_ADDREQUEST']._serialized_end=536 + _globals['_OPERATOROUTPUT']._serialized_start=538 + _globals['_OPERATOROUTPUT']._serialized_end=620 + _globals['_GETPROGRESSRESPONSE']._serialized_start=622 + _globals['_GETPROGRESSRESPONSE']._serialized_end=745 + _globals['_STATE']._serialized_start=747 + _globals['_STATE']._serialized_end=769 + _globals['_PROGRESS']._serialized_start=771 + _globals['_PROGRESS']._serialized_end=810 + _globals['_SESSIONSERVICE']._serialized_start=813 + _globals['_SESSIONSERVICE']._serialized_end=1350 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/session_pb2_grpc.py b/src/ansys/grpc/dpf/session_pb2_grpc.py new file mode 100644 index 0000000000..d9a3d715d8 --- /dev/null +++ b/src/ansys/grpc/dpf/session_pb2_grpc.py @@ -0,0 +1,232 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.session_pb2 as session__pb2 + + +class SessionServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.session.v0.SessionService/Create', + request_serializer=session__pb2.CreateSessionRequest.SerializeToString, + response_deserializer=session__pb2.Session.FromString, + ) + self.Add = channel.unary_unary( + '/ansys.api.dpf.session.v0.SessionService/Add', + request_serializer=session__pb2.AddRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.ListenToProgress = channel.unary_stream( + '/ansys.api.dpf.session.v0.SessionService/ListenToProgress', + request_serializer=session__pb2.Session.SerializeToString, + response_deserializer=session__pb2.GetProgressResponse.FromString, + ) + self.AddProgressEventSystem = channel.unary_unary( + '/ansys.api.dpf.session.v0.SessionService/AddProgressEventSystem', + request_serializer=session__pb2.Session.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.FlushWorkflows = channel.unary_unary( + '/ansys.api.dpf.session.v0.SessionService/FlushWorkflows', + request_serializer=session__pb2.Session.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.session.v0.SessionService/Delete', + request_serializer=session__pb2.Session.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class SessionServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Add(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListenToProgress(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddProgressEventSystem(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FlushWorkflows(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_SessionServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=session__pb2.CreateSessionRequest.FromString, + response_serializer=session__pb2.Session.SerializeToString, + ), + 'Add': grpc.unary_unary_rpc_method_handler( + servicer.Add, + request_deserializer=session__pb2.AddRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'ListenToProgress': grpc.unary_stream_rpc_method_handler( + servicer.ListenToProgress, + request_deserializer=session__pb2.Session.FromString, + response_serializer=session__pb2.GetProgressResponse.SerializeToString, + ), + 'AddProgressEventSystem': grpc.unary_unary_rpc_method_handler( + servicer.AddProgressEventSystem, + request_deserializer=session__pb2.Session.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'FlushWorkflows': grpc.unary_unary_rpc_method_handler( + servicer.FlushWorkflows, + request_deserializer=session__pb2.Session.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=session__pb2.Session.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.session.v0.SessionService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class SessionService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.session.v0.SessionService/Create', + session__pb2.CreateSessionRequest.SerializeToString, + session__pb2.Session.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Add(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.session.v0.SessionService/Add', + session__pb2.AddRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListenToProgress(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/ansys.api.dpf.session.v0.SessionService/ListenToProgress', + session__pb2.Session.SerializeToString, + session__pb2.GetProgressResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddProgressEventSystem(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.session.v0.SessionService/AddProgressEventSystem', + session__pb2.Session.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def FlushWorkflows(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.session.v0.SessionService/FlushWorkflows', + session__pb2.Session.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.session.v0.SessionService/Delete', + session__pb2.Session.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/support_pb2.py b/src/ansys/grpc/dpf/support_pb2.py new file mode 100644 index 0000000000..dc9e884649 --- /dev/null +++ b/src/ansys/grpc/dpf/support_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: support.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsupport.proto\x12\x18\x61nsys.api.dpf.support.v0\x1a\nbase.proto\"i\n\x07Support\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.TypeB\x1b\xaa\x02\x18\x41nsys.Api.Dpf.Support.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'support_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\030Ansys.Api.Dpf.Support.v0' + _globals['_SUPPORT']._serialized_start=55 + _globals['_SUPPORT']._serialized_end=160 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/support_pb2_grpc.py b/src/ansys/grpc/dpf/support_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/src/ansys/grpc/dpf/support_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/src/ansys/grpc/dpf/support_service_pb2.py b/src/ansys/grpc/dpf/support_service_pb2.py new file mode 100644 index 0000000000..59abc85606 --- /dev/null +++ b/src/ansys/grpc/dpf/support_service_pb2.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: support_service.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.support_pb2 as support__pb2 +import ansys.grpc.dpf.time_freq_support_pb2 as time__freq__support__pb2 +import ansys.grpc.dpf.meshed_region_pb2 as meshed__region__pb2 +import ansys.grpc.dpf.cyclic_support_pb2 as cyclic__support__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15support_service.proto\x12 ansys.api.dpf.support_service.v0\x1a\rsupport.proto\x1a\x17time_freq_support.proto\x1a\x13meshed_region.proto\x1a\x14\x63yclic_support.proto\x1a\x0b\x66ield.proto\"\x82\x02\n\x0fSupportResponse\x12P\n\x11time_freq_support\x18\x01 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x43\n\x0b\x64omain_mesh\x18\x02 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12H\n\x0e\x63yclic_support\x18\x03 \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x42\x0e\n\x0csupport_type\"\x98\x01\n\x0bListRequest\x12\x32\n\x07support\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.support.v0.Support\x12\x17\n\x0fspecific_fields\x18\x02 \x03(\t\x12\x1c\n\x14specific_prop_fields\x18\x03 \x03(\t\x12\x1e\n\x16specific_string_fields\x18\x04 \x03(\t\"\xbe\x01\n\x0cListResponse\x12Y\n\x0e\x66ield_supports\x18\x01 \x03(\x0b\x32\x41.ansys.api.dpf.support_service.v0.ListResponse.FieldSupportsEntry\x1aS\n\x12\x46ieldSupportsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field:\x02\x38\x01\x32\xdb\x01\n\x0eSupportService\x12\x62\n\nGetSupport\x12!.ansys.api.dpf.support.v0.Support\x1a\x31.ansys.api.dpf.support_service.v0.SupportResponse\x12\x65\n\x04List\x12-.ansys.api.dpf.support_service.v0.ListRequest\x1a..ansys.api.dpf.support_service.v0.ListResponseB\"\xaa\x02\x1f\x41nsys.Api.Dpf.SupportService.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'support_service_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\037Ansys.Api.Dpf.SupportService.v0' + _LISTRESPONSE_FIELDSUPPORTSENTRY._options = None + _LISTRESPONSE_FIELDSUPPORTSENTRY._serialized_options = b'8\001' + _globals['_SUPPORTRESPONSE']._serialized_start=156 + _globals['_SUPPORTRESPONSE']._serialized_end=414 + _globals['_LISTREQUEST']._serialized_start=417 + _globals['_LISTREQUEST']._serialized_end=569 + _globals['_LISTRESPONSE']._serialized_start=572 + _globals['_LISTRESPONSE']._serialized_end=762 + _globals['_LISTRESPONSE_FIELDSUPPORTSENTRY']._serialized_start=679 + _globals['_LISTRESPONSE_FIELDSUPPORTSENTRY']._serialized_end=762 + _globals['_SUPPORTSERVICE']._serialized_start=765 + _globals['_SUPPORTSERVICE']._serialized_end=984 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/support_service_pb2_grpc.py b/src/ansys/grpc/dpf/support_service_pb2_grpc.py new file mode 100644 index 0000000000..558d1ed4f0 --- /dev/null +++ b/src/ansys/grpc/dpf/support_service_pb2_grpc.py @@ -0,0 +1,100 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.support_pb2 as support__pb2 +import ansys.grpc.dpf.support_service_pb2 as support__service__pb2 + + +class SupportServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetSupport = channel.unary_unary( + '/ansys.api.dpf.support_service.v0.SupportService/GetSupport', + request_serializer=support__pb2.Support.SerializeToString, + response_deserializer=support__service__pb2.SupportResponse.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.support_service.v0.SupportService/List', + request_serializer=support__service__pb2.ListRequest.SerializeToString, + response_deserializer=support__service__pb2.ListResponse.FromString, + ) + + +class SupportServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetSupport(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_SupportServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetSupport': grpc.unary_unary_rpc_method_handler( + servicer.GetSupport, + request_deserializer=support__pb2.Support.FromString, + response_serializer=support__service__pb2.SupportResponse.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=support__service__pb2.ListRequest.FromString, + response_serializer=support__service__pb2.ListResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.support_service.v0.SupportService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class SupportService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetSupport(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.support_service.v0.SupportService/GetSupport', + support__pb2.Support.SerializeToString, + support__service__pb2.SupportResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.support_service.v0.SupportService/List', + support__service__pb2.ListRequest.SerializeToString, + support__service__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/time_freq_support_pb2.py b/src/ansys/grpc/dpf/time_freq_support_pb2.py new file mode 100644 index 0000000000..2e0a1c9a6a --- /dev/null +++ b/src/ansys/grpc/dpf/time_freq_support_pb2.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: time_freq_support.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17time_freq_support.proto\x12\"ansys.api.dpf.time_freq_support.v0\x1a\nbase.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\"F\n\x0fTimeFreqSupport\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\",\n\x0bStepSubStep\x12\x0c\n\x04step\x18\x01 \x01(\x05\x12\x0f\n\x07substep\x18\x02 \x01(\x05\"\xb2\x02\n\nGetRequest\x12N\n\x11time_freq_support\x18\x01 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupport\x12/\n\x07\x63omplex\x18\x02 \x01(\x0e\x32\x1e.ansys.api.dpf.base.v0.Complex\x12\x1d\n\x15\x62ool_cumulative_index\x18\x03 \x01(\x08\x12\x1a\n\x10\x63umulative_index\x18\x04 \x01(\x05H\x00\x12G\n\x0cstep_substep\x18\x05 \x01(\x0b\x32/.ansys.api.dpf.time_freq_support.v0.StepSubStepH\x00\x12\x13\n\tfrequency\x18\x06 \x01(\x01H\x00\x42\n\n\x08\x66reqtype\"w\n\x0bListRequest\x12N\n\x11time_freq_support\x18\x01 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupport\x12\x18\n\x10\x63yclic_stage_num\x18\x02 \x01(\x05\"\xd4\x02\n\x1cTimeFreqSupportUpdateRequest\x12N\n\x11time_freq_support\x18\x01 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupport\x12\x30\n\tfreq_real\x18\x02 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x33\n\x0c\x66req_complex\x18\x03 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12*\n\x03rpm\x18\x04 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12Q\n\x11\x63yc_harmonic_data\x18\x05 \x01(\x0b\x32\x36.ansys.api.dpf.time_freq_support.v0.CyclicHarmonicData\"b\n\x12\x43yclicHarmonicData\x12\x39\n\x12\x63yc_harmonic_index\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x11\n\tstage_num\x18\x02 \x01(\x05\"O\n\x0bGetResponse\x12\x1a\n\x10\x63umulative_index\x18\x01 \x01(\x05H\x00\x12\x13\n\tfrequency\x18\x02 \x01(\x01H\x00\x42\x0f\n\rresponse_type\"\x92\x01\n\x0c\x43ountRequest\x12N\n\x11time_freq_support\x18\x01 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupport\x12\x32\n\x06\x65ntity\x18\x02 \x01(\x0e\x32\".ansys.api.dpf.base.v0.CountEntity\"\xa6\x02\n\x0cListResponse\x12\x30\n\tfreq_real\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x33\n\x0c\x66req_complex\x18\x02 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12*\n\x03rpm\x18\x03 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x39\n\x12\x63yc_harmonic_index\x18\x04 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12H\n\x1d\x63yclic_harmonic_index_scoping\x18\x05 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping2\xf0\x04\n\x16TimeFreqSupportService\x12[\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupport\x12\x66\n\x03Get\x12..ansys.api.dpf.time_freq_support.v0.GetRequest\x1a/.ansys.api.dpf.time_freq_support.v0.GetResponse\x12h\n\x06Update\x12@.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportUpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12i\n\x04List\x12/.ansys.api.dpf.time_freq_support.v0.ListRequest\x1a\x30.ansys.api.dpf.time_freq_support.v0.ListResponse\x12_\n\x05\x43ount\x12\x30.ansys.api.dpf.time_freq_support.v0.CountRequest\x1a$.ansys.api.dpf.base.v0.CountResponse\x12[\n\x06\x44\x65lete\x12\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupport\x1a\x1c.ansys.api.dpf.base.v0.EmptyB#\xaa\x02 Ansys.Api.Dpf.TimeFreqSupport.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'time_freq_support_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002 Ansys.Api.Dpf.TimeFreqSupport.V0' + _globals['_TIMEFREQSUPPORT']._serialized_start=103 + _globals['_TIMEFREQSUPPORT']._serialized_end=173 + _globals['_STEPSUBSTEP']._serialized_start=175 + _globals['_STEPSUBSTEP']._serialized_end=219 + _globals['_GETREQUEST']._serialized_start=222 + _globals['_GETREQUEST']._serialized_end=528 + _globals['_LISTREQUEST']._serialized_start=530 + _globals['_LISTREQUEST']._serialized_end=649 + _globals['_TIMEFREQSUPPORTUPDATEREQUEST']._serialized_start=652 + _globals['_TIMEFREQSUPPORTUPDATEREQUEST']._serialized_end=992 + _globals['_CYCLICHARMONICDATA']._serialized_start=994 + _globals['_CYCLICHARMONICDATA']._serialized_end=1092 + _globals['_GETRESPONSE']._serialized_start=1094 + _globals['_GETRESPONSE']._serialized_end=1173 + _globals['_COUNTREQUEST']._serialized_start=1176 + _globals['_COUNTREQUEST']._serialized_end=1322 + _globals['_LISTRESPONSE']._serialized_start=1325 + _globals['_LISTRESPONSE']._serialized_end=1619 + _globals['_TIMEFREQSUPPORTSERVICE']._serialized_start=1622 + _globals['_TIMEFREQSUPPORTSERVICE']._serialized_end=2246 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/time_freq_support_pb2_grpc.py b/src/ansys/grpc/dpf/time_freq_support_pb2_grpc.py new file mode 100644 index 0000000000..7c56c88198 --- /dev/null +++ b/src/ansys/grpc/dpf/time_freq_support_pb2_grpc.py @@ -0,0 +1,232 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.time_freq_support_pb2 as time__freq__support__pb2 + + +class TimeFreqSupportServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Create', + request_serializer=base__pb2.Empty.SerializeToString, + response_deserializer=time__freq__support__pb2.TimeFreqSupport.FromString, + ) + self.Get = channel.unary_unary( + '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Get', + request_serializer=time__freq__support__pb2.GetRequest.SerializeToString, + response_deserializer=time__freq__support__pb2.GetResponse.FromString, + ) + self.Update = channel.unary_unary( + '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Update', + request_serializer=time__freq__support__pb2.TimeFreqSupportUpdateRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/List', + request_serializer=time__freq__support__pb2.ListRequest.SerializeToString, + response_deserializer=time__freq__support__pb2.ListResponse.FromString, + ) + self.Count = channel.unary_unary( + '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Count', + request_serializer=time__freq__support__pb2.CountRequest.SerializeToString, + response_deserializer=base__pb2.CountResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Delete', + request_serializer=time__freq__support__pb2.TimeFreqSupport.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class TimeFreqSupportServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Count(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TimeFreqSupportServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=base__pb2.Empty.FromString, + response_serializer=time__freq__support__pb2.TimeFreqSupport.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=time__freq__support__pb2.GetRequest.FromString, + response_serializer=time__freq__support__pb2.GetResponse.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=time__freq__support__pb2.TimeFreqSupportUpdateRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=time__freq__support__pb2.ListRequest.FromString, + response_serializer=time__freq__support__pb2.ListResponse.SerializeToString, + ), + 'Count': grpc.unary_unary_rpc_method_handler( + servicer.Count, + request_deserializer=time__freq__support__pb2.CountRequest.FromString, + response_serializer=base__pb2.CountResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=time__freq__support__pb2.TimeFreqSupport.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class TimeFreqSupportService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Create', + base__pb2.Empty.SerializeToString, + time__freq__support__pb2.TimeFreqSupport.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Get', + time__freq__support__pb2.GetRequest.SerializeToString, + time__freq__support__pb2.GetResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Update', + time__freq__support__pb2.TimeFreqSupportUpdateRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/List', + time__freq__support__pb2.ListRequest.SerializeToString, + time__freq__support__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Count(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Count', + time__freq__support__pb2.CountRequest.SerializeToString, + base__pb2.CountResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.time_freq_support.v0.TimeFreqSupportService/Delete', + time__freq__support__pb2.TimeFreqSupport.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/workflow_message_pb2.py b/src/ansys/grpc/dpf/workflow_message_pb2.py new file mode 100644 index 0000000000..51db72e793 --- /dev/null +++ b/src/ansys/grpc/dpf/workflow_message_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: workflow_message.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16workflow_message.proto\x12!ansys.api.dpf.workflow_message.v0\x1a\nbase.proto\"?\n\x08Workflow\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifierB#\xaa\x02 Ansys.Api.Dpf.WorkflowMessage.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow_message_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002 Ansys.Api.Dpf.WorkflowMessage.V0' + _globals['_WORKFLOW']._serialized_start=73 + _globals['_WORKFLOW']._serialized_end=136 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/workflow_message_pb2_grpc.py b/src/ansys/grpc/dpf/workflow_message_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/src/ansys/grpc/dpf/workflow_message_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/src/ansys/grpc/dpf/workflow_pb2.py b/src/ansys/grpc/dpf/workflow_pb2.py new file mode 100644 index 0000000000..bc20be0669 --- /dev/null +++ b/src/ansys/grpc/dpf/workflow_pb2.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: workflow.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.collection_pb2 as collection__pb2 +import ansys.grpc.dpf.field_pb2 as field__pb2 +import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.data_sources_pb2 as data__sources__pb2 +import ansys.grpc.dpf.meshed_region_pb2 as meshed__region__pb2 +import ansys.grpc.dpf.time_freq_support_pb2 as time__freq__support__pb2 +import ansys.grpc.dpf.result_info_pb2 as result__info__pb2 +import ansys.grpc.dpf.operator_pb2 as operator__pb2 +import ansys.grpc.dpf.cyclic_support_pb2 as cyclic__support__pb2 +import ansys.grpc.dpf.workflow_message_pb2 as workflow__message__pb2 +import ansys.grpc.dpf.dpf_any_message_pb2 as dpf__any__message__pb2 +import ansys.grpc.dpf.data_tree_pb2 as data__tree__pb2 +import ansys.grpc.dpf.generic_data_container_pb2 as generic__data__container__pb2 +import ansys.grpc.dpf.label_space_pb2 as label__space__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eworkflow.proto\x12\x19\x61nsys.api.dpf.workflow.v0\x1a\x10\x63ollection.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\nbase.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x11result_info.proto\x1a\x0eoperator.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x15\x64pf_any_message.proto\x1a\x0f\x64\x61ta_tree.proto\x1a\x1cgeneric_data_container.proto\x1a\x11label_space.proto\":\n#WorkflowFromInternalRegistryRequest\x12\x13\n\x0bregistry_id\x18\x01 \x01(\x05\"\xf2\x08\n\x17UpdateConnectionRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x10\n\x08pin_name\x18\x02 \x01(\t\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\n \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x0b \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x30\n\x04vint\x18\x0c \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x36\n\x07vdouble\x18\r \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x0f \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x10 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12?\n\x0blabel_space\x18\x14 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12_\n\x16generic_data_container\x18\x15 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12:\n\x06\x61s_any\x18\x13 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12?\n\x07inputop\x18\x11 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.OperatorInputH\x00\x42\x07\n\x05input\"\x8a\x01\n\x0eOperatorNaming\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x0c\n\x04name\x18\x03 \x01(\t\x12;\n\x08operator\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x12\n\x08old_name\x18\x04 \x01(\tH\x00\x42\x0c\n\nidentifier\"\x88\x02\n\x15UpdatePinNamesRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12@\n\rinputs_naming\x18\x02 \x03(\x0b\x32).ansys.api.dpf.workflow.v0.OperatorNaming\x12\x41\n\x0eoutputs_naming\x18\x03 \x03(\x0b\x32).ansys.api.dpf.workflow.v0.OperatorNaming\x12\x17\n\x0finputs_to_erase\x18\x04 \x03(\t\x12\x18\n\x10outputs_to_erase\x18\x05 \x03(\t\"\xbf\x01\n\x19WorkflowEvaluationRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x10\n\x08pin_name\x18\x02 \x01(\t\x12)\n\x04type\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\xb0\x07\n\x10WorkflowResponse\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12<\n\x04mesh\x18\n \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12?\n\x0bresult_info\x18\x0b \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12P\n\x11time_freq_support\x18\x0c \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\r \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12?\n\x08workflow\x18\x0f \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x37\n\x03\x61ny\x18\x10 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12;\n\x08operator\x18\x11 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12_\n\x16generic_data_container\x18\x13 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x42\x08\n\x06output\"\x8a\x01\n\x13\x41\x64\x64OperatorsRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12:\n\toperators\x18\x02 \x03(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\"\x89\x01\n\x1fRecordInInternalRegistryRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x12\n\nidentifier\x18\x02 \x01(\t\x12\x19\n\x11transferOwnership\x18\x03 \x01(\x08\".\n RecordInInternalRegistryResponse\x12\n\n\x02id\x18\x01 \x01(\x05\"$\n\x0f\x45xposedPinNames\x12\x11\n\tpin_names\x18\x01 \x03(\t\"\xb1\x01\n\x0cListResponse\x12\x16\n\x0eoperator_names\x18\x01 \x03(\t\x12\x43\n\x0finput_pin_names\x18\x02 \x01(\x0b\x32*.ansys.api.dpf.workflow.v0.ExposedPinNames\x12\x44\n\x10output_pin_names\x18\x03 \x01(\x0b\x32*.ansys.api.dpf.workflow.v0.ExposedPinNames\"\xa0\x01\n\x12GetOperatorRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x16\n\x0coperator_num\x18\x02 \x01(\x05H\x00\x12\x14\n\ninput_name\x18\x03 \x01(\tH\x00\x12\x15\n\x0boutput_name\x18\x04 \x01(\tH\x00\x42\x0c\n\nop_request\"^\n\x13GetOperatorResponse\x12\x34\n\x03ops\x18\x01 \x03(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x11\n\tpin_index\x18\x02 \x03(\x05\"D\n\x19InputToOutputChainRequest\x12\x13\n\x0boutput_name\x18\x01 \x01(\t\x12\x12\n\ninput_name\x18\x02 \x01(\t\"\xdc\x01\n\x0e\x43onnectRequest\x12=\n\x08right_wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12<\n\x07left_wf\x18\x02 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12M\n\x0finput_to_output\x18\x03 \x03(\x0b\x32\x34.ansys.api.dpf.workflow.v0.InputToOutputChainRequest\"\x1c\n\nTextStream\x12\x0e\n\x06stream\x18\x01 \x01(\t\"\x8b\x01\n\rCreateRequest\x12-\n\x05\x65mpty\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.EmptyH\x00\x12\x43\n\x0bremote_copy\x18\x02 \x01(\x0b\x32,.ansys.api.dpf.workflow.v0.RemoteCopyRequestH\x00\x42\x06\n\x04type\"]\n\x11RemoteCopyRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t2\xc1\x0b\n\x0fWorkflowService\x12_\n\x06\x43reate\x12(.ansys.api.dpf.workflow.v0.CreateRequest\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x64\n\x0eLoadFromStream\x12%.ansys.api.dpf.workflow.v0.TextStream\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x86\x01\n\x17GetFromInternalRegistry\x12>.ansys.api.dpf.workflow.v0.WorkflowFromInternalRegistryRequest\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x64\n\x10UpdateConnection\x12\x32.ansys.api.dpf.workflow.v0.UpdateConnectionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\x0eUpdatePinNames\x12\x30.ansys.api.dpf.workflow.v0.UpdatePinNamesRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\\\n\x0c\x41\x64\x64Operators\x12..ansys.api.dpf.workflow.v0.AddOperatorsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12h\n\x03Get\x12\x34.ansys.api.dpf.workflow.v0.WorkflowEvaluationRequest\x1a+.ansys.api.dpf.workflow.v0.WorkflowResponse\x12\x93\x01\n\x18RecordInInternalRegistry\x12:.ansys.api.dpf.workflow.v0.RecordInInternalRegistryRequest\x1a;.ansys.api.dpf.workflow.v0.RecordInInternalRegistryResponse\x12\\\n\x04List\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\'.ansys.api.dpf.workflow.v0.ListResponse\x12R\n\x07\x43onnect\x12).ansys.api.dpf.workflow.v0.ConnectRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12^\n\x11\x44iscoverOperators\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x63\n\rWriteToStream\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a%.ansys.api.dpf.workflow.v0.TextStream\x12l\n\x0bGetOperator\x12-.ansys.api.dpf.workflow.v0.GetOperatorRequest\x1a..ansys.api.dpf.workflow.v0.GetOperatorResponse\x12S\n\x06\x44\x65lete\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1c\xaa\x02\x19\x41nsys.Api.Dpf.Workflow.V0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\031Ansys.Api.Dpf.Workflow.V0' + _globals['_WORKFLOWFROMINTERNALREGISTRYREQUEST']._serialized_start=339 + _globals['_WORKFLOWFROMINTERNALREGISTRYREQUEST']._serialized_end=397 + _globals['_UPDATECONNECTIONREQUEST']._serialized_start=400 + _globals['_UPDATECONNECTIONREQUEST']._serialized_end=1538 + _globals['_OPERATORNAMING']._serialized_start=1541 + _globals['_OPERATORNAMING']._serialized_end=1679 + _globals['_UPDATEPINNAMESREQUEST']._serialized_start=1682 + _globals['_UPDATEPINNAMESREQUEST']._serialized_end=1946 + _globals['_WORKFLOWEVALUATIONREQUEST']._serialized_start=1949 + _globals['_WORKFLOWEVALUATIONREQUEST']._serialized_end=2140 + _globals['_WORKFLOWRESPONSE']._serialized_start=2143 + _globals['_WORKFLOWRESPONSE']._serialized_end=3087 + _globals['_ADDOPERATORSREQUEST']._serialized_start=3090 + _globals['_ADDOPERATORSREQUEST']._serialized_end=3228 + _globals['_RECORDININTERNALREGISTRYREQUEST']._serialized_start=3231 + _globals['_RECORDININTERNALREGISTRYREQUEST']._serialized_end=3368 + _globals['_RECORDININTERNALREGISTRYRESPONSE']._serialized_start=3370 + _globals['_RECORDININTERNALREGISTRYRESPONSE']._serialized_end=3416 + _globals['_EXPOSEDPINNAMES']._serialized_start=3418 + _globals['_EXPOSEDPINNAMES']._serialized_end=3454 + _globals['_LISTRESPONSE']._serialized_start=3457 + _globals['_LISTRESPONSE']._serialized_end=3634 + _globals['_GETOPERATORREQUEST']._serialized_start=3637 + _globals['_GETOPERATORREQUEST']._serialized_end=3797 + _globals['_GETOPERATORRESPONSE']._serialized_start=3799 + _globals['_GETOPERATORRESPONSE']._serialized_end=3893 + _globals['_INPUTTOOUTPUTCHAINREQUEST']._serialized_start=3895 + _globals['_INPUTTOOUTPUTCHAINREQUEST']._serialized_end=3963 + _globals['_CONNECTREQUEST']._serialized_start=3966 + _globals['_CONNECTREQUEST']._serialized_end=4186 + _globals['_TEXTSTREAM']._serialized_start=4188 + _globals['_TEXTSTREAM']._serialized_end=4216 + _globals['_CREATEREQUEST']._serialized_start=4219 + _globals['_CREATEREQUEST']._serialized_end=4358 + _globals['_REMOTECOPYREQUEST']._serialized_start=4360 + _globals['_REMOTECOPYREQUEST']._serialized_end=4453 + _globals['_WORKFLOWSERVICE']._serialized_start=4456 + _globals['_WORKFLOWSERVICE']._serialized_end=5929 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/workflow_pb2_grpc.py b/src/ansys/grpc/dpf/workflow_pb2_grpc.py new file mode 100644 index 0000000000..c651cfdae3 --- /dev/null +++ b/src/ansys/grpc/dpf/workflow_pb2_grpc.py @@ -0,0 +1,497 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.workflow_message_pb2 as workflow__message__pb2 +import ansys.grpc.dpf.workflow_pb2 as workflow__pb2 + + +class WorkflowServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Create = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/Create', + request_serializer=workflow__pb2.CreateRequest.SerializeToString, + response_deserializer=workflow__message__pb2.Workflow.FromString, + ) + self.LoadFromStream = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/LoadFromStream', + request_serializer=workflow__pb2.TextStream.SerializeToString, + response_deserializer=workflow__message__pb2.Workflow.FromString, + ) + self.GetFromInternalRegistry = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/GetFromInternalRegistry', + request_serializer=workflow__pb2.WorkflowFromInternalRegistryRequest.SerializeToString, + response_deserializer=workflow__message__pb2.Workflow.FromString, + ) + self.UpdateConnection = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/UpdateConnection', + request_serializer=workflow__pb2.UpdateConnectionRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.UpdatePinNames = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/UpdatePinNames', + request_serializer=workflow__pb2.UpdatePinNamesRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.AddOperators = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/AddOperators', + request_serializer=workflow__pb2.AddOperatorsRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.Get = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/Get', + request_serializer=workflow__pb2.WorkflowEvaluationRequest.SerializeToString, + response_deserializer=workflow__pb2.WorkflowResponse.FromString, + ) + self.RecordInInternalRegistry = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/RecordInInternalRegistry', + request_serializer=workflow__pb2.RecordInInternalRegistryRequest.SerializeToString, + response_deserializer=workflow__pb2.RecordInInternalRegistryResponse.FromString, + ) + self.List = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/List', + request_serializer=workflow__message__pb2.Workflow.SerializeToString, + response_deserializer=workflow__pb2.ListResponse.FromString, + ) + self.Connect = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/Connect', + request_serializer=workflow__pb2.ConnectRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.DiscoverOperators = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/DiscoverOperators', + request_serializer=workflow__message__pb2.Workflow.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + self.WriteToStream = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/WriteToStream', + request_serializer=workflow__message__pb2.Workflow.SerializeToString, + response_deserializer=workflow__pb2.TextStream.FromString, + ) + self.GetOperator = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/GetOperator', + request_serializer=workflow__pb2.GetOperatorRequest.SerializeToString, + response_deserializer=workflow__pb2.GetOperatorResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/ansys.api.dpf.workflow.v0.WorkflowService/Delete', + request_serializer=workflow__message__pb2.Workflow.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) + + +class WorkflowServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Create(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LoadFromStream(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetFromInternalRegistry(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateConnection(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdatePinNames(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddOperators(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordInInternalRegistry(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def List(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Connect(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DiscoverOperators(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def WriteToStream(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetOperator(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_WorkflowServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Create': grpc.unary_unary_rpc_method_handler( + servicer.Create, + request_deserializer=workflow__pb2.CreateRequest.FromString, + response_serializer=workflow__message__pb2.Workflow.SerializeToString, + ), + 'LoadFromStream': grpc.unary_unary_rpc_method_handler( + servicer.LoadFromStream, + request_deserializer=workflow__pb2.TextStream.FromString, + response_serializer=workflow__message__pb2.Workflow.SerializeToString, + ), + 'GetFromInternalRegistry': grpc.unary_unary_rpc_method_handler( + servicer.GetFromInternalRegistry, + request_deserializer=workflow__pb2.WorkflowFromInternalRegistryRequest.FromString, + response_serializer=workflow__message__pb2.Workflow.SerializeToString, + ), + 'UpdateConnection': grpc.unary_unary_rpc_method_handler( + servicer.UpdateConnection, + request_deserializer=workflow__pb2.UpdateConnectionRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'UpdatePinNames': grpc.unary_unary_rpc_method_handler( + servicer.UpdatePinNames, + request_deserializer=workflow__pb2.UpdatePinNamesRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'AddOperators': grpc.unary_unary_rpc_method_handler( + servicer.AddOperators, + request_deserializer=workflow__pb2.AddOperatorsRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=workflow__pb2.WorkflowEvaluationRequest.FromString, + response_serializer=workflow__pb2.WorkflowResponse.SerializeToString, + ), + 'RecordInInternalRegistry': grpc.unary_unary_rpc_method_handler( + servicer.RecordInInternalRegistry, + request_deserializer=workflow__pb2.RecordInInternalRegistryRequest.FromString, + response_serializer=workflow__pb2.RecordInInternalRegistryResponse.SerializeToString, + ), + 'List': grpc.unary_unary_rpc_method_handler( + servicer.List, + request_deserializer=workflow__message__pb2.Workflow.FromString, + response_serializer=workflow__pb2.ListResponse.SerializeToString, + ), + 'Connect': grpc.unary_unary_rpc_method_handler( + servicer.Connect, + request_deserializer=workflow__pb2.ConnectRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'DiscoverOperators': grpc.unary_unary_rpc_method_handler( + servicer.DiscoverOperators, + request_deserializer=workflow__message__pb2.Workflow.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + 'WriteToStream': grpc.unary_unary_rpc_method_handler( + servicer.WriteToStream, + request_deserializer=workflow__message__pb2.Workflow.FromString, + response_serializer=workflow__pb2.TextStream.SerializeToString, + ), + 'GetOperator': grpc.unary_unary_rpc_method_handler( + servicer.GetOperator, + request_deserializer=workflow__pb2.GetOperatorRequest.FromString, + response_serializer=workflow__pb2.GetOperatorResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=workflow__message__pb2.Workflow.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ansys.api.dpf.workflow.v0.WorkflowService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class WorkflowService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Create(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/Create', + workflow__pb2.CreateRequest.SerializeToString, + workflow__message__pb2.Workflow.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def LoadFromStream(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/LoadFromStream', + workflow__pb2.TextStream.SerializeToString, + workflow__message__pb2.Workflow.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetFromInternalRegistry(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/GetFromInternalRegistry', + workflow__pb2.WorkflowFromInternalRegistryRequest.SerializeToString, + workflow__message__pb2.Workflow.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateConnection(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/UpdateConnection', + workflow__pb2.UpdateConnectionRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdatePinNames(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/UpdatePinNames', + workflow__pb2.UpdatePinNamesRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddOperators(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/AddOperators', + workflow__pb2.AddOperatorsRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/Get', + workflow__pb2.WorkflowEvaluationRequest.SerializeToString, + workflow__pb2.WorkflowResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordInInternalRegistry(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/RecordInInternalRegistry', + workflow__pb2.RecordInInternalRegistryRequest.SerializeToString, + workflow__pb2.RecordInInternalRegistryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def List(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/List', + workflow__message__pb2.Workflow.SerializeToString, + workflow__pb2.ListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Connect(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/Connect', + workflow__pb2.ConnectRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DiscoverOperators(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/DiscoverOperators', + workflow__message__pb2.Workflow.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def WriteToStream(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/WriteToStream', + workflow__message__pb2.Workflow.SerializeToString, + workflow__pb2.TextStream.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetOperator(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/GetOperator', + workflow__pb2.GetOperatorRequest.SerializeToString, + workflow__pb2.GetOperatorResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.workflow.v0.WorkflowService/Delete', + workflow__message__pb2.Workflow.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tests/test_data_tree.py b/tests/test_data_tree.py index 8a30a8ab6a..079698430a 100644 --- a/tests/test_data_tree.py +++ b/tests/test_data_tree.py @@ -317,9 +317,9 @@ def test_runtime_core_config(server_type): timeout_init = core_config.license_timeout_in_seconds core_config.license_timeout_in_seconds = 4.0 license_timeout_in_seconds = core_config.license_timeout_in_seconds - assert license_timeout_in_seconds == 4.0 + assert abs(license_timeout_in_seconds - 4.0) < 1.0e-16 core_config.license_timeout_in_seconds = timeout_init - assert core_config.license_timeout_in_seconds == timeout_init + assert abs(core_config.license_timeout_in_seconds - timeout_init) < 1.0e-16 @conftest.raises_for_servers_version_under("4.0") diff --git a/tests/test_service.py b/tests/test_service.py index 26d64b5e5b..d39aac0219 100644 --- a/tests/test_service.py +++ b/tests/test_service.py @@ -285,8 +285,7 @@ def test_load_api_without_awp_root(restore_awp_root): ver_to_check = ver_to_check[2:4] + ver_to_check[5:6] awp_root_name = "AWP_ROOT" + ver_to_check # delete awp_root - if os.environ.get(awp_root_name, None): - del os.environ[awp_root_name] + os.environ.pop(awp_root_name, None) # start CServer conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=False) @@ -363,7 +362,7 @@ def test_load_api_without_awp_root_no_gatebin(restore_awp_root): awp_root_name = "AWP_ROOT" + dpf.core.misc.__ansys_version__ # delete awp_root - del os.environ[awp_root_name] + os.environ.pop(awp_root_name, None) # start CServer conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=False)