datamodel_tui#

Wrappers over TUI-based datamodel gRPC service of Fluent.

Classes:

DatamodelService(channel, metadata, ...)

Pure Python wrapper of DatamodelServiceImpl.

DatamodelServiceImpl(channel, metadata, ...)

Class wrapping the TUI-based datamodel gRPC service of Fluent.

PyMenu(service, version, mode, path)

Pythonic wrapper of TUI-based DatamodelService class.

TUICommand(service, version, mode, path)

Generic command class for when the explicit menu classes aren't available.

TUIMenu(service, version, mode, path)

Base class for the generated menu classes.

TUIMethod(service, version, mode, path)

Base class for the generated menu methods.

Functions:

convert_path_to_grpc_path(path)

Convert a path structure to a string that can be passed to the data model gRPC service.

convert_tui_menu_to_func_name(menu)

Convert a TUI menu string to a Python function name.

class ansys.fluent.core.services.datamodel_tui.DatamodelService(channel, metadata, fluent_error_state, scheme_eval)#

Bases: object

Pure Python wrapper of DatamodelServiceImpl.

Methods:

__init__(channel, metadata, ...)

__init__ method of DatamodelService class.

execute_command(path, *args, **kwargs)

Execute the command.

execute_query(path, *args, **kwargs)

Execute the query.

get_attribute_value(path, attribute, ...)

Get the attribute value.

get_static_info(path)

Get static info.

__init__(channel, metadata, fluent_error_state, scheme_eval)#

__init__ method of DatamodelService class.

execute_command(path, *args, **kwargs)#

Execute the command.

execute_query(path, *args, **kwargs)#

Execute the query.

get_attribute_value(path, attribute, include_unavailable)#

Get the attribute value.

get_static_info(path)#

Get static info.

class ansys.fluent.core.services.datamodel_tui.DatamodelServiceImpl(channel, metadata, fluent_error_state)#

Bases: object

Class wrapping the TUI-based datamodel gRPC service of Fluent.

Methods:

__init__(channel, metadata, fluent_error_state)

__init__ method of DatamodelServiceImpl class.

execute_command(request)

ExecuteCommand RPC of DataModel service.

execute_query(request)

ExecuteQuery RPC of DataModel service.

get_attribute_value(request)

GetAttributeValue RPC of DataModel service.

get_state(request)

GetState RPC of DataModel service.

get_static_info(request)

GetStaticInfo RPC of DataModel service.

set_state(request)

SetState RPC of DataModel service.

__init__(channel, metadata, fluent_error_state)#

__init__ method of DatamodelServiceImpl class.

execute_command(request)#

ExecuteCommand RPC of DataModel service.

execute_query(request)#

ExecuteQuery RPC of DataModel service.

get_attribute_value(request)#

GetAttributeValue RPC of DataModel service.

get_state(request)#

GetState RPC of DataModel service.

get_static_info(request)#

GetStaticInfo RPC of DataModel service.

set_state(request)#

SetState RPC of DataModel service.

class ansys.fluent.core.services.datamodel_tui.PyMenu(service, version, mode, path)#

Bases: object

Pythonic wrapper of TUI-based DatamodelService class. Use this class instead of directly calling the DatamodelService’s method.

Methods

get_child_names(include_unavailable):

Get child menu names.

execute(*args, **kwargs)

Execute a command or query at a menu with positional or keyword arguments.

get_doc_string(include_unavailable)

Get docstring for a menu.

Methods:

__init__(service, version, mode, path)

__init__ method of PyMenu class.

execute(*args, **kwargs)

Execute a command or query at a path with positional or keyword arguments.

get_child_names([include_unavailable])

Get the names of child menus.

get_doc_string([include_unavailable])

Get docstring for a menu.

get_static_info()

Get static info at menu level.

__init__(service, version, mode, path)#

__init__ method of PyMenu class.

execute(*args, **kwargs)#

Execute a command or query at a path with positional or keyword arguments.

Parameters:
*args

Positional arguments of the command or qyery.

**kwargs

Keyword arguments of the command or query.

Returns:
Any

Query result (any Python datatype)

get_child_names(include_unavailable=False)#

Get the names of child menus.

Parameters:
include_unavailablebool, optional

Whether to query over static TUI metadata. The default is False.

Returns:
List[str]

Names of child menus.

get_doc_string(include_unavailable=False)#

Get docstring for a menu.

Parameters:
include_unavailablebool, optional

Whether to query over static TUI metadata. The default is False.

Returns:
str
get_static_info()#

Get static info at menu level.

Returns:
DataModelProtoModule.StaticInfo

static info

class ansys.fluent.core.services.datamodel_tui.TUICommand(service, version, mode, path)#

Bases: TUIMenu

Generic command class for when the explicit menu classes aren’t available.

class ansys.fluent.core.services.datamodel_tui.TUIMenu(service, version, mode, path)#

Bases: object

Base class for the generated menu classes.

Methods:

__init__(service, version, mode, path)

__init__ method of TUIMenu class.

__init__(service, version, mode, path)#

__init__ method of TUIMenu class.

class ansys.fluent.core.services.datamodel_tui.TUIMethod(service, version, mode, path)#

Bases: object

Base class for the generated menu methods.

Methods like ___repr__ are inserted at PyConsole side.

Methods:

__init__(service, version, mode, path)

Initialize TUIMethod.

__init__(service, version, mode, path)#

Initialize TUIMethod.

ansys.fluent.core.services.datamodel_tui.convert_path_to_grpc_path(path)#

Convert a path structure to a string that can be passed to the data model gRPC service.

Parameters:
pathPath

Path structure.

Returns:
str

gRPC path.

ansys.fluent.core.services.datamodel_tui.convert_tui_menu_to_func_name(menu)#

Convert a TUI menu string to a Python function name.

Parameters:
menustr

TUI menu string.

Returns:
str