Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmittag committed Jul 25, 2023
1 parent 874c027 commit 7b973c2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mock_service/doc/pydoc/loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class PythonDslLoader(MockLoader)
#### load

```python
def load(vdb_metadata) -> LoaderResult
def load(client) -> LoaderResult
```

Load mocking configuration from Python script.
Expand Down
22 changes: 22 additions & 0 deletions mock_service/doc/pydoc/mocking-dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,25 @@ See `__resolve_value` for documentation of value resolution.

- `AnimationAction` - The created AnimationAction.

<a id="lib.dsl.create_EventTrigger"></a>

#### create\_EventTrigger

```python
def create_EventTrigger(type: EventType,
path: Optional[str] = None) -> EventTrigger
```

Create an EventTrigger for own VSS path or different one. It handles that events for the new VSS paths
are handled too and the EventTrigger works fine.

**Arguments**:

- `type` _EvenType_ - The kind of event the EventTrigger shall be.
- `path` _Optional[str]_ - Default None which represents same VSS path as the datapoint or new VSS path


**Returns**:

- `EvenTrigger` - The created EventTrigger.

9 changes: 5 additions & 4 deletions mock_service/lib/dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,15 @@ def create_animation_action(
return AnimationAction(duration, repeat_mode, values, __resolve_value)

def create_EventTrigger(type: EventType, path: Optional[str] = None) -> EventTrigger:
"""Create a SetAction with dynamic value resolution. See `__resolve_value`
for documentation of value resolution.
"""Create an EventTrigger for own VSS path or different one. It handles that events for the new VSS paths
are handled too and the EventTrigger works fine.
Args:
value (Any): The value to set or a dynamic literal.
type (EvenType): The kind of event the EventTrigger shall be.
path (Optional[str]): Default None which represents same VSS path as the datapoint or new VSS path
Returns:
SetAction: The created SetAction.
EvenTrigger: The created EventTrigger.
"""
if path is not None:
_required_datapoint_paths.append(path)
Expand Down

0 comments on commit 7b973c2

Please sign in to comment.