|
Telescience Resource Kit
TReK Python
5.4.0 ART
|
This class determine a parameter's dependency based on a counter. More...
Inherits Dependency.
Public Member Functions | |
Initialize / Finalize | |
Functions handling class initialization and finalization. | |
def | CounterDependency ( Optional[CounterDependency] counter_dependency=None, Optional[c_void_p] native_ptr=None, is_clone: bool=False -> def ) -> def |
Class initializer. More... | |
def | clone ( -> CounterDependency ) -> def |
Creates a new instance of the object with the same contents. | |
def | copy (copy_from: object -> None ) -> def |
Copies the contents of the provided 'copy_from' CounterDependency. More... | |
def | load_file (filename: str -> None ) -> def |
Loads the CounterDependency definition from the specified file. More... | |
def | save_file (filename: str -> None ) -> def |
Saves the CounterDependency definition to the specified file. More... | |
CounterDependency Settings | |
Functions handling CounterDependency Settings. | |
def | configure (name: str, mod_value: int, remainder_value: int -> None ) -> def |
Configures the counter dependency. More... | |
def | get_modulo ( -> int ) -> def |
Returns the modulo value for the counter dependency. More... | |
def | get_remainder ( -> int ) -> def |
Returns the remainder value for the counter dependency. More... | |
def | get_start_counter ( -> int ) -> def |
Returns the start counter value for the counter dependency. More... | |
def | get_dependency_parameter ( -> str ) -> def |
Returns the parameter to use for the counter. | |
def | set_start_counter (counter: int=0 -> None ) -> def |
Sets a start counter for the dependency. More... | |
![]() | |
def | CounterDependency ( -> None ) -> def |
Class initializer. More... | |
def | get_type ( -> DependencyType ) -> def |
Gets the type of Dependency. More... | |
![]() | |
def | remove_all_attributes ( -> None ) -> def |
Removes all attributes. | |
def | remove_attribute (name: str -> None ) -> def |
Removes the attribute by name. More... | |
def | __eq__ (named_item: object -> bool ) -> def |
Equality operator "==". More... | |
def | initialize ( -> None ) -> def |
Initializes the object. More... | |
def | add_attribute (name: str, value: str -> None ) -> def |
Adds an attribute to the item. More... | |
def | get_alias ( -> str ) -> def |
Returns the alias of the item. More... | |
def | get_attribute (name: str -> str ) -> def |
Get the value of the specified attribute. More... | |
def | get_attribute_list ( -> list[str] ) -> def |
Gets a list of the attribute names. More... | |
def | get_name ( -> str ) -> def |
Returns the name of the item. More... | |
def | get_long_description ( -> str ) -> def |
Returns the long description of the item. More... | |
def | get_short_description ( -> str ) -> def |
Returns the short description of the item. More... | |
def | get_user_description ( -> str ) -> def |
Returns the user description of the item. More... | |
def | get_owner ( -> str ) -> def |
Returns the owner of the item. More... | |
def | get_path ( -> str ) -> def |
Returns the path for the item. More... | |
def | set_name (name: str -> None ) -> def |
Sets the name of the item. More... | |
def | set_alias (alias: str -> None ) -> def |
Sets the alias of the item. More... | |
def | set_short_description (description: str -> None ) -> def |
Sets the short description of the item. More... | |
def | set_long_description (description: str -> None ) -> def |
Sets the long description of the item. More... | |
def | set_user_description (description: str -> None ) -> def |
Sets the user description of the item. More... | |
def | set_owner (owner: str -> None ) -> def |
Sets the owner of the item. More... | |
def | set_path (path: str -> None ) -> def |
Sets the path of the item. More... | |
This class determine a parameter's dependency based on a counter.
For parameter X with a dependency on Parameter Y, the remainder from the modulo operator on the counter value (Y) determines if the parameter should be included. value(Y) % mod_value == remainder
( | counter_dependency | : Optional[CounterDependency] | |
native_ptr | : Optional[c_void_p] | ||
is_clone | : bool | ||
) | -> def |
Class initializer.
[in] | counter_dependency | CounterDependency to create a copy (optional). By default, initializes a new instance. |
[in] | native_ptr | (Optional) Internal parameter, do not provide. |
[in] | is_clone | (Optional) Internal parameter, do not provide. |
Reimplemented from Dependency.
( | name | : str | |
mod_value | : int | ||
remainder_value | : int | ||
) | -> None |
Configures the counter dependency.
Sets the parameter to check for dependency as well as the required attributes. The parameter name is not checked on input for existence in the containing packet. This check will be performed when validation is available at the packet level.
[in] | name | The name of the parameter whose value is checked. |
[in] | mod_value | The modulo value (mod_value > remainder_value). |
[in] | remainder_value | The remainder that must match the value % mod_value. |
TrekError | 15103 - TREK_DATA_REMAINDER_TOO_LARGE |
( | copy_from | : object | ) | -> None |
Copies the contents of the provided 'copy_from' CounterDependency.
[in] | copy_from | CounterDependency to copy from. |
TypeError | if 'copy_from' is not a CounterDependency. |
Reimplemented from NamedItem.
( | ) | -> int |
Returns the modulo value for the counter dependency.
( | ) | -> int |
Returns the remainder value for the counter dependency.
( | ) | -> int |
Returns the start counter value for the counter dependency.
( | filename | : str | ) | -> None |
Loads the CounterDependency definition from the specified file.
Reads an XML CounterDependency.
[in] | filename | The file from which to load the CounterDependency object. |
( | filename | : str | ) | -> None |
Saves the CounterDependency definition to the specified file.
Writes an XML CounterDependency.
[in] | filename | The file to save the counter dependency object. |
( | counter | : int | ) | -> None |
Sets a start counter for the dependency.
If a start counter is defined, then the dependency check will return false (fail) if the counter value is not greater than or equal to the value specified. The default start counter value is 0.
[in] | counter | Counter start value > 0. |