datamodel_se#
Wrappers over StateEngine based datamodel gRPC service of Fluent.
Classes:
|
Contains the standard names of data model attributes associated with the data model service. |
|
An enumeration over datamodel types. |
|
Pure Python wrapper of DatamodelServiceImpl. |
|
Wraps the StateEngine-based datamodel gRPC service of Fluent. |
|
EventSubscription class for any datamodel event. |
Any object which can be called to get its state. |
|
|
Command class using the StateEngine-based DatamodelService as the backend. |
|
Class representing command arguments in datamodel. |
|
Class representing command argument in datamodel. |
|
Provides interface for dictionaries. |
|
Class representing dictionary-like command argument in datamodel. |
|
Object class using StateEngine based DatamodelService as backend. |
|
Generic PyMenu class for when generated API code is not available. |
|
Container class using the StateEngine-based DatamodelService as the backend. |
|
Generic PyNamedObjectContainer class for when generated API code is not available. |
|
Provides interface for numerical parameters. |
|
Class representing numerical command argument in datamodel. |
|
Object class using StateEngine based DatamodelService as backend. |
|
Class representing generic parameter-like command argument in datamodel. |
|
Query class using the StateEngine-based DatamodelService as the backend. |
|
A simple implementation of PyMenuGeneric applicable only for SINGLETONS. |
|
Class representing singleton-like command argument in datamodel. |
|
Object class using StateEngine based DatamodelService as backend. |
|
Provides interface for textual parameters. |
|
Class representing textual command argument in datamodel. |
Stores subscription objects by tag. |
Exceptions:
|
Is raised when the specified file purpose is not in the allowed values. |
|
Raised when the object is not a named object. |
|
Raised on an attempt to mutate a read-only object. |
|
Raised when server fails to subscribe from event. |
|
Raised when server fails to unsubscribe from event. |
Functions:
|
Convert a path structure to a StateEngine path. |
|
Returns false if 'val' is false or None, else returns true. |
|
Returns true if 'val' is true or None, else returns false. |
- class ansys.fluent.core.services.datamodel_se.Attribute(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
Enum
Contains the standard names of data model attributes associated with the data model service.
Attributes:
- class ansys.fluent.core.services.datamodel_se.DataModelType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
Enum
An enumeration over datamodel types.
Attributes:
Methods:
get_mode
(mode)Returns the datamodel type.
- DICTIONARY = (['Dict'], <class 'ansys.fluent.core.services.datamodel_se.PyDictionaryCommandArgumentsSubItem'>)#
- MODELOBJECT = (['ModelObject'], <class 'ansys.fluent.core.services.datamodel_se.PySingletonCommandArgumentsSubItem'>)#
- NUMBER = (['Real', 'Int', 'ListReal', 'Real List', 'Integer', 'ListInt'], <class 'ansys.fluent.core.services.datamodel_se.PyNumericalCommandArgumentsSubItem'>)#
- PARAMETER = (['Bool', 'Logical', 'Logical List'], <class 'ansys.fluent.core.services.datamodel_se.PyParameterCommandArgumentsSubItem'>)#
- TEXT = (['String', 'ListString', 'String List'], <class 'ansys.fluent.core.services.datamodel_se.PyTextualCommandArgumentsSubItem'>)#
- static get_mode(mode)#
Returns the datamodel type.
- Parameters:
- mode
str
mode
- mode
- Returns:
DataModelType
datamodel type
- Raises:
InvalidArgument
If an unknown mode is passed.
- class ansys.fluent.core.services.datamodel_se.DatamodelService(channel, metadata, version, fluent_error_state, file_transfer_service=None)#
Bases:
StreamingService
Pure Python wrapper of DatamodelServiceImpl.
Methods:
__init__
(channel, metadata, version, ...[, ...])__init__ method of DatamodelService class.
add_on_affected
(rules, path, obj, cb)Add on affected.
add_on_affected_at_type_path
(rules, path, ...)Add on affected at type path.
add_on_attribute_changed
(rules, path, ...)Add on attribute changed.
add_on_changed
(rules, path, obj, cb)Add on changed.
add_on_child_created
(rules, path, ...)Add on child created.
add_on_command_attribute_changed
(rules, ...)Add on command attribute changed.
add_on_command_executed
(rules, path, ...)Add on command executed.
add_on_deleted
(rules, path, obj, cb)Add on deleted.
create_command_arguments
(rules, path, command)Create command arguments.
delete_all_child_objects
(rules, path, obj_type)Delete all child objects.
delete_child_objects
(rules, path, obj_type, ...)Delete child objects.
delete_command_arguments
(rules, path, ...)Delete command arguments.
delete_object
(rules, path)Delete an object.
execute_command
(rules, path, command, args)Execute the command.
execute_query
(rules, path, query, args)Execute the query.
fix_state
(rules, path)Fix state.
get_attribute_value
(rules, path, attribute)Get attribute value.
get_object_names
(rules, path)Get object names.
get_specs
(rules, path)Get specifications.
get_state
(rules, path)Get state.
get_static_info
(rules)Get static info.
rename
(rules, path, new_name)Rename an object.
set_state
(rules, path, state)Set state.
subscribe_events
(request_dict)Subscribe events.
Unsubscribe all subscribed events.
unsubscribe_events
(tags)Unsubscribe events.
update_dict
(rules, path, dict_state[, recursive])Update the dict.
- __init__(channel, metadata, version, fluent_error_state, file_transfer_service=None)#
__init__ method of DatamodelService class.
- add_on_affected(rules, path, obj, cb)#
Add on affected.
- add_on_affected_at_type_path(rules, path, child_type, obj, cb)#
Add on affected at type path.
- add_on_attribute_changed(rules, path, attribute, obj, cb)#
Add on attribute changed.
- add_on_changed(rules, path, obj, cb)#
Add on changed.
- add_on_child_created(rules, path, child_type, obj, cb)#
Add on child created.
- add_on_command_attribute_changed(rules, path, command, attribute, obj, cb)#
Add on command attribute changed.
- add_on_command_executed(rules, path, command, obj, cb)#
Add on command executed.
- add_on_deleted(rules, path, obj, cb)#
Add on deleted.
- create_command_arguments(rules, path, command)#
Create command arguments.
- delete_all_child_objects(rules, path, obj_type)#
Delete all child objects.
- delete_child_objects(rules, path, obj_type, child_names)#
Delete child objects.
- delete_command_arguments(rules, path, command, commandid)#
Delete command arguments.
- delete_object(rules, path)#
Delete an object.
- execute_command(rules, path, command, args)#
Execute the command.
- execute_query(rules, path, query, args)#
Execute the query.
- fix_state(rules, path)#
Fix state.
- get_attribute_value(rules, path, attribute)#
Get attribute value.
- get_object_names(rules, path)#
Get object names.
- get_specs(rules, path)#
Get specifications.
- get_state(rules, path)#
Get state.
- get_static_info(rules)#
Get static info.
- rename(rules, path, new_name)#
Rename an object.
- set_state(rules, path, state)#
Set state.
- subscribe_events(request_dict)#
Subscribe events.
- unsubscribe_all_events()#
Unsubscribe all subscribed events.
- unsubscribe_events(tags)#
Unsubscribe events.
- update_dict(rules, path, dict_state, recursive=False)#
Update the dict.
- class ansys.fluent.core.services.datamodel_se.DatamodelServiceImpl(channel, metadata, fluent_error_state, file_transfer_service=None)#
Bases:
object
Wraps the StateEngine-based datamodel gRPC service of Fluent.
Methods:
__init__
(channel, metadata, fluent_error_state)__init__ method of DatamodelServiceImpl class.
create_command_arguments
(request)RPC createCommandArguments of DataModel service.
delete_child_objects
(request)RPC deleteChildObjects of DataModel service.
delete_command_arguments
(request)RPC deleteCommandArguments of DataModel service.
delete_object
(request)RPC deleteObject of DataModel service.
execute_command
(request)RPC executeCommand of DataModel service.
execute_query
(request)RPC executeQuery of DataModel service.
fix_state
(request)RPC fixState of DataModel service.
get_attribute_value
(request)RPC getAttributeValue of DataModel service.
get_object_names
(request)RPC getObjectNames of DataModel service.
get_specs
(request)RPC getSpecs of DataModel service.
get_state
(request)RPC getState of DataModel service.
get_static_info
(request)RPC getStaticInfo of DataModel service.
initialize_datamodel
(request)RPC initDatamodel of DataModel service.
rename
(request)RPC rename of DataModel service.
set_state
(request)RPC setState of DataModel service.
subscribe_events
(request)RPC subscribeEvents of DataModel service.
unsubscribe_events
(request)RPC unsubscribeEvents of DataModel service.
update_dict
(request)RPC updateDict of DataModel service.
- __init__(channel, metadata, fluent_error_state, file_transfer_service=None)#
__init__ method of DatamodelServiceImpl class.
- create_command_arguments(request)#
RPC createCommandArguments of DataModel service.
- delete_child_objects(request)#
RPC deleteChildObjects of DataModel service.
- delete_command_arguments(request)#
RPC deleteCommandArguments of DataModel service.
- Raises:
RuntimeError
If command instancing is not supported.
- delete_object(request)#
RPC deleteObject of DataModel service.
- execute_command(request)#
RPC executeCommand of DataModel service.
- execute_query(request)#
RPC executeQuery of DataModel service.
- fix_state(request)#
RPC fixState of DataModel service.
- get_attribute_value(request)#
RPC getAttributeValue of DataModel service.
- get_object_names(request)#
RPC getObjectNames of DataModel service.
- get_specs(request)#
RPC getSpecs of DataModel service.
- get_state(request)#
RPC getState of DataModel service.
- get_static_info(request)#
RPC getStaticInfo of DataModel service.
- initialize_datamodel(request)#
RPC initDatamodel of DataModel service.
- rename(request)#
RPC rename of DataModel service.
- set_state(request)#
RPC setState of DataModel service.
- subscribe_events(request)#
RPC subscribeEvents of DataModel service.
- unsubscribe_events(request)#
RPC unsubscribeEvents of DataModel service.
- update_dict(request)#
RPC updateDict of DataModel service.
- exception ansys.fluent.core.services.datamodel_se.DisallowedFilePurpose(context=None, name=None, allowed_values=None)#
Bases:
ValueError
Is raised when the specified file purpose is not in the allowed values.
Methods:
__init__
([context, name, allowed_values])Initialize DisallowedFilePurpose.
- __init__(context=None, name=None, allowed_values=None)#
Initialize DisallowedFilePurpose.
- class ansys.fluent.core.services.datamodel_se.EventSubscription(service, path, request_dict)#
Bases:
object
EventSubscription class for any datamodel event.
Methods:
__init__
(service, path, request_dict)Subscribe to a datamodel event.
Unsubscribe the datamodel event.
- __init__(service, path, request_dict)#
Subscribe to a datamodel event.
- Raises:
SubscribeEventError
If server fails to subscribe from event.
- unsubscribe()#
Unsubscribe the datamodel event.
- Raises:
UnsubscribeEventError
If server fails to unsubscribe from event.
- exception ansys.fluent.core.services.datamodel_se.InvalidNamedObject(class_name)#
Bases:
RuntimeError
Raised when the object is not a named object.
Methods:
__init__
(class_name)Initialize InvalidNamedObject.
- __init__(class_name)#
Initialize InvalidNamedObject.
- class ansys.fluent.core.services.datamodel_se.PyCallableStateObject#
Bases:
object
Any object which can be called to get its state.
Methods
__call__()
Get the state of the current object.
- class ansys.fluent.core.services.datamodel_se.PyCommand(service, rules, command, path=None)#
Bases:
object
Command class using the StateEngine-based DatamodelService as the backend. Use this class instead of directly calling the DatamodelService’s method.
Methods
__call__()
Execute the command.
help()
Print the command help string.
Methods:
__init__
(service, rules, command[, path])__init__ method of PyCommand class.
after_execute
(value)Executes after command execution.
before_execute
(value)Executes before command execution.
Create a command instance.
help
()Prints help string.
- __init__(service, rules, command, path=None)#
__init__ method of PyCommand class.
- after_execute(value)#
Executes after command execution.
- before_execute(value)#
Executes before command execution.
- create_instance()#
Create a command instance.
- help()#
Prints help string.
- class ansys.fluent.core.services.datamodel_se.PyCommandArguments(service, rules, command, path, id, static_info)#
Bases:
PyStateContainer
Class representing command arguments in datamodel.
Methods:
__init__
(service, rules, command, path, id, ...)__init__ method of PyCommandArguments class.
get_attr
(attrib)Get attribute value of the current object.
- __init__(service, rules, command, path, id, static_info)#
__init__ method of PyCommandArguments class.
- class ansys.fluent.core.services.datamodel_se.PyCommandArgumentsSubItem(parent, name, service, rules, path, parent_arg)#
Bases:
PyCallableStateObject
Class representing command argument in datamodel.
Methods:
__init__
(parent, name, service, rules, path, ...)__init__ method of PyCommandArgumentsSubItem class.
getAttribValue
(attrib)Get attribute value of the command argument.
getState
()Get state of the command argument.
get_attr
(attrib)Get attribute value of the command argument.
Get state of the command argument.
help
()Get help.
setState
(state)Set state of the command argument.
set_state
(state)Set state of the command argument.
- __init__(parent, name, service, rules, path, parent_arg)#
__init__ method of PyCommandArgumentsSubItem class.
- getAttribValue(attrib)#
Get attribute value of the command argument.
- Parameters:
- attrib
str
attribute name
- attrib
- Returns:
Any
attribute value
- getState()#
Get state of the command argument.
- get_attr(attrib)#
Get attribute value of the command argument.
- Parameters:
- attrib
str
attribute name
- attrib
- Returns:
Any
attribute value
- get_state()#
Get state of the command argument.
- help()#
Get help.
- setState(state)#
Set state of the command argument.
- set_state(state)#
Set state of the command argument.
- class ansys.fluent.core.services.datamodel_se.PyDictionary(service, rules, path=None)#
Bases:
PyParameter
Provides interface for dictionaries.
Methods
update_dict(dict_state)
Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python). Update is executed according to dict.update semantics
updateDict(dict_state)
Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python). Update is executed according to dict.update semantics (same as update_dict(dict_state))]
Methods:
updateDict
(dict_state[, recursive])Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python).
update_dict
(dict_state[, recursive])Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python).
- updateDict(dict_state, recursive=False)#
Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python). Update is executed according to dict.update semantics.
- Parameters:
- Raises:
ReadOnlyObjectError
If the object is read-only.
- update_dict(dict_state, recursive=False)#
Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python). Update is executed according to dict.update semantics.
- Parameters:
- Raises:
ReadOnlyObjectError
If the object is read-only.
- class ansys.fluent.core.services.datamodel_se.PyDictionaryCommandArgumentsSubItem(parent, attr, service, rules, path, arg)#
Bases:
PyCommandArgumentsSubItem
,PyDictionary
Class representing dictionary-like command argument in datamodel.
Methods:
__init__
(parent, attr, service, rules, path, arg)__init__ method of PyDictionaryCommandArgumentsSubItem class.
- __init__(parent, attr, service, rules, path, arg)#
__init__ method of PyDictionaryCommandArgumentsSubItem class.
- class ansys.fluent.core.services.datamodel_se.PyMenu(service, rules, path=None)#
Bases:
PyStateContainer
Object class using StateEngine based DatamodelService as backend. Use this class instead of directly calling DatamodelService’s method.
Methods
__setattr__(name, value)
Set state of the child object
rename(new_name)
name()
create_command_arguments(command)
Methods:
__init__
(service, rules[, path])__init__ method of PyMenu class.
add_on_affected
(cb)Register a callback for when the object is affected.
add_on_affected_at_type_path
(child_type, cb)Register a callback for when the object is affected at child type.
add_on_changed
(cb)Register a callback for when the object is modified.
add_on_child_created
(child_type, cb)Register a callback for when a child object is created.
add_on_command_executed
(command, cb)Register a callback for when a command is executed.
add_on_deleted
(cb)Register a callback for when the object is deleted.
create_command_arguments
(command)Create command arguments.
deleteAllChildObjects
(obj_type)Delete all the named objects in the container.
deleteChildObjects
(obj_type, child_names)Delete the named objects in 'child_names' from the container..
delete_all_child_objects
(obj_type)Delete all the named objects in the container.
Delete child object.
delete_child_objects
(obj_type, child_names)Delete the named objects in 'child_names' from the container..
name
()Get the name of the named object.
rename
(new_name)Rename the named object.
- __init__(service, rules, path=None)#
__init__ method of PyMenu class.
- add_on_affected(cb)#
Register a callback for when the object is affected.
- Parameters:
- cb
Callable
Callback function
- cb
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- add_on_affected_at_type_path(child_type, cb)#
Register a callback for when the object is affected at child type.
- Parameters:
- child_type
str
child type
- cb
Callable
Callback function
- child_type
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- add_on_changed(cb)#
Register a callback for when the object is modified.
- Parameters:
- cb
Callable
Callback function
- cb
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- add_on_child_created(child_type, cb)#
Register a callback for when a child object is created.
- Parameters:
- child_type
str
Type of the child object
- cb
Callable
Callback function
- child_type
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- add_on_command_executed(command, cb)#
Register a callback for when a command is executed.
- Parameters:
- command
str
command name
- cb
Callable
Callback function
- command
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- add_on_deleted(cb)#
Register a callback for when the object is deleted.
- Parameters:
- cb
Callable
Callback function
- cb
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- create_command_arguments(command)#
Create command arguments.
- deleteAllChildObjects(obj_type)#
Delete all the named objects in the container.
- Parameters:
- obj_type: str
Type of the named object container.
- deleteChildObjects(obj_type, child_names)#
Delete the named objects in ‘child_names’ from the container..
- Parameters:
- obj_type: str
Type of the named object container.
- child_names
List
[str
] List of named objects.
- delete_all_child_objects(obj_type)#
Delete all the named objects in the container.
- Parameters:
- obj_type: str
Type of the named object container.
- delete_child()#
Delete child object.
- delete_child_objects(obj_type, child_names)#
Delete the named objects in ‘child_names’ from the container..
- Parameters:
- obj_type: str
Type of the named object container.
- child_names
List
[str
] List of named objects.
- name()#
Get the name of the named object.
- Returns:
str
name
- Raises:
InvalidNamedObject
If the object is not a named object.
- class ansys.fluent.core.services.datamodel_se.PyMenuGeneric(service, rules, path=None)#
Bases:
PyMenu
Generic PyMenu class for when generated API code is not available.
Attributes:
- attrs = ('service', 'rules', 'path', 'cached_attrs')#
- class ansys.fluent.core.services.datamodel_se.PyNamedObjectContainer(service, rules, path=None)#
Bases:
object
Container class using the StateEngine-based DatamodelService as the backend. Use this class instead of directly calling the DatamodelService’s method.
Methods
__len__()
Return a count of the child objects.
__iter__()
Return the next child object.
__getitem__(key)
Return the child object by key.
__setitem__(key, value)
Set the state of the child object by name.
__delitem__(key)
Delete the child object by name.
Methods:
__init__
(service, rules[, path])__init__ method of PyNamedObjectContainer class.
get
(key)Return the child object by key.
Displays the name of objects within a container.
getState
()Returns state of the container.
Displays the name of objects within a container.
Returns state of the container.
- __init__(service, rules, path=None)#
__init__ method of PyNamedObjectContainer class.
- get(key)#
Return the child object by key.
- getChildObjectDisplayNames()#
Displays the name of objects within a container.
- getState()#
Returns state of the container.
- get_object_names()#
Displays the name of objects within a container.
- get_state()#
Returns state of the container.
- class ansys.fluent.core.services.datamodel_se.PyNamedObjectContainerGeneric(service, rules, path=None)#
Bases:
PyNamedObjectContainer
Generic PyNamedObjectContainer class for when generated API code is not available.
- class ansys.fluent.core.services.datamodel_se.PyNumerical(service, rules, path=None)#
Bases:
PyParameter
Provides interface for numerical parameters.
Methods:
- max()#
Maximum value of the numerical parameter.
- min()#
Minimum value of the numerical parameter.
- class ansys.fluent.core.services.datamodel_se.PyNumericalCommandArgumentsSubItem(parent, attr, service, rules, path, arg)#
Bases:
PyCommandArgumentsSubItem
,PyNumerical
Class representing numerical command argument in datamodel.
Methods:
__init__
(parent, attr, service, rules, path, arg)__init__ method of PyNumericalCommandArgumentsSubItem class.
- __init__(parent, attr, service, rules, path, arg)#
__init__ method of PyNumericalCommandArgumentsSubItem class.
- class ansys.fluent.core.services.datamodel_se.PyParameter(service, rules, path=None)#
Bases:
PyStateContainer
Object class using StateEngine based DatamodelService as backend.
Use this class instead of directly calling DatamodelService’s method.
Methods:
add_on_changed
(cb)Register a callback for when the object is modified.
Get default value of the parameter.
- add_on_changed(cb)#
Register a callback for when the object is modified.
- Parameters:
- cb
Callable
Callback function
- cb
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- default_value()#
Get default value of the parameter.
- class ansys.fluent.core.services.datamodel_se.PyParameterCommandArgumentsSubItem(parent, attr, service, rules, path, arg)#
Bases:
PyCommandArgumentsSubItem
,PyParameter
Class representing generic parameter-like command argument in datamodel.
Methods:
__init__
(parent, attr, service, rules, path, arg)__init__ method of PyParameterCommandArgumentsSubItem class.
- __init__(parent, attr, service, rules, path, arg)#
__init__ method of PyParameterCommandArgumentsSubItem class.
- class ansys.fluent.core.services.datamodel_se.PyQuery(service, rules, query, path=None)#
Bases:
object
Query class using the StateEngine-based DatamodelService as the backend. Use this class instead of directly calling the DatamodelService’s method.
Methods
__call__()
Execute the query.
help()
Print the query help string.
Methods:
__init__
(service, rules, query[, path])__init__ method of PyQuery class.
help
()Prints help string.
- __init__(service, rules, query, path=None)#
__init__ method of PyQuery class.
- help()#
Prints help string.
- class ansys.fluent.core.services.datamodel_se.PySimpleMenuGeneric(service, rules, path=None)#
Bases:
PyMenu
,PyDictionary
A simple implementation of PyMenuGeneric applicable only for SINGLETONS.
This is required for the stand-alone datamodel server to avoid the usage of ‘service.get_specs’
Attributes:
- attrs = ('service', 'rules', 'path')#
- class ansys.fluent.core.services.datamodel_se.PySingletonCommandArgumentsSubItem(parent, attr, service, rules, path, arg)#
Bases:
PyCommandArgumentsSubItem
Class representing singleton-like command argument in datamodel.
Methods:
__init__
(parent, attr, service, rules, path, arg)__init__ method of PySingletonCommandArgumentsSubItem class.
- __init__(parent, attr, service, rules, path, arg)#
__init__ method of PySingletonCommandArgumentsSubItem class.
- class ansys.fluent.core.services.datamodel_se.PyStateContainer(service, rules, path=None)#
Bases:
PyCallableStateObject
Object class using StateEngine based DatamodelService as backend. Use this class instead of directly calling DatamodelService’s method.
Methods
get_attr(attrib)
Get the attribute value of the current object.
getAttribValue(attrib)
Get the attribute value of the current object. (This method is the same as the get_attr(attrib) method.)
get_state()
Get the state of the current object.
getState()
Deprecated camel case alias of get_state.
set_state()
Set the state of the current object.
setState()
Deprecated camel case alias of set_state.
__call__()
Set the state of the current object if state is provided else get its state.
Methods:
__init__
(service, rules[, path])__init__ method of PyStateContainer class.
add_on_attribute_changed
(attribute, cb)Register a callback for when an attribute is changed.
add_on_command_attribute_changed
(command, ...)Register a callback for when an attribute is changed.
fixState
()Fix state.
Fix state.
getAttribValue
(attrib)Get attribute value of the current object.
getState
()Get state.
get_attr
(attrib)Get attribute value of the current object.
Get state of the current object.
Get state.
help
()Print help string.
Returns true if the object is active.
Checks whether the object is read only.
setState
([state])Set state of the current object.
set_state
([state])Set state of the current object.
- __init__(service, rules, path=None)#
__init__ method of PyStateContainer class.
- add_on_attribute_changed(attribute, cb)#
Register a callback for when an attribute is changed.
- Parameters:
- attribute
str
attribute name
- cb
Callable
Callback function
- attribute
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- add_on_command_attribute_changed(command, attribute, cb)#
Register a callback for when an attribute is changed.
- Parameters:
- Returns:
EventSubscription
EventSubscription instance which can be used to unregister the callback
- fixState()#
Fix state.
- fix_state()#
Fix state.
- getAttribValue(attrib)#
Get attribute value of the current object.
- Parameters:
- attrib
str
Name of the attribute.
- attrib
- Returns:
Any
Value of the attribute.
- getState()#
Get state.
- get_attr(attrib)#
Get attribute value of the current object.
- Parameters:
- attrib
str
Name of the attribute.
- attrib
- Returns:
Any
Value of the attribute.
- get_remote_state()#
Get state of the current object.
- get_state()#
Get state.
- help()#
Print help string.
- is_active()#
Returns true if the object is active.
- is_read_only()#
Checks whether the object is read only.
- setState(state=None, **kwargs)#
Set state of the current object.
- Parameters:
- state
Any
,optional
state
- kwargs
Any
Keyword arguments.
- state
- Raises:
ReadOnlyObjectError
If the object is read-only.
- set_state(state=None, **kwargs)#
Set state of the current object.
- Parameters:
- state
Any
,optional
state
- kwargs
Any
Keyword arguments.
- state
- Raises:
ReadOnlyObjectError
If the object is read-only.
- class ansys.fluent.core.services.datamodel_se.PyTextual(service, rules, path=None)#
Bases:
PyParameter
Provides interface for textual parameters.
Methods:
Get allowed values.
- allowed_values()#
Get allowed values.
- class ansys.fluent.core.services.datamodel_se.PyTextualCommandArgumentsSubItem(parent, attr, service, rules, path, arg)#
Bases:
PyCommandArgumentsSubItem
,PyTextual
Class representing textual command argument in datamodel.
Methods:
__init__
(parent, attr, service, rules, path, arg)__init__ method of PyTextualCommandArgumentsSubItem class.
- __init__(parent, attr, service, rules, path, arg)#
__init__ method of PyTextualCommandArgumentsSubItem class.
- exception ansys.fluent.core.services.datamodel_se.ReadOnlyObjectError(obj_name)#
Bases:
RuntimeError
Raised on an attempt to mutate a read-only object.
Methods:
__init__
(obj_name)Initialize ReadOnlyObjectError.
- __init__(obj_name)#
Initialize ReadOnlyObjectError.
- exception ansys.fluent.core.services.datamodel_se.SubscribeEventError(request)#
Bases:
RuntimeError
Raised when server fails to subscribe from event.
Methods:
__init__
(request)Initialize SubscribeEventError.
- __init__(request)#
Initialize SubscribeEventError.
- class ansys.fluent.core.services.datamodel_se.SubscriptionList#
Bases:
object
Stores subscription objects by tag.
Methods:
__init__
()Initialize SubscriptionList.
add
(tag, subscription)Add a subscription object.
remove
(tag)Remove a subscription object.
Unsubscribe all subscription objects.
unsubscribe_while_deleting
(rules, path, ...)Unsubscribe corresponding subscription objects while the datamodel object is being deleted.
- __init__()#
Initialize SubscriptionList.
- add(tag, subscription)#
Add a subscription object.
- Parameters:
- tag
str
Subscription tag.
- subscription
EventSubscription
Subscription object.
- tag
- unsubscribe_all()#
Unsubscribe all subscription objects.
- unsubscribe_while_deleting(rules, path, deletion_stage)#
Unsubscribe corresponding subscription objects while the datamodel object is being deleted.
- Parameters:
- exception ansys.fluent.core.services.datamodel_se.UnsubscribeEventError(request)#
Bases:
RuntimeError
Raised when server fails to unsubscribe from event.
Methods:
__init__
(request)Initialize UnsubscribeEventError.
- __init__(request)#
Initialize UnsubscribeEventError.
- ansys.fluent.core.services.datamodel_se.convert_path_to_se_path(path)#
Convert a path structure to a StateEngine path.
- Parameters:
- path
Path
Path structure.
- path
- Returns:
str
stateengine path
- ansys.fluent.core.services.datamodel_se.false_if_none(val)#
Returns false if ‘val’ is false or None, else returns true.
- ansys.fluent.core.services.datamodel_se.true_if_none(val)#
Returns true if ‘val’ is true or None, else returns false.