Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion pytm/pytm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,19 @@ def dfd(self, **kwargs):


class Actor(Element):
"""An entity usually initiating actions"""
"""An entity usually initiating actions.

Actors represent users or external systems that initiate
interactions with the system being modeled.

Attributes:
port (int): Default TCP port for outgoing data flows.
protocol (str): Default network protocol for outgoing data flows.
data (list): pytm.Data objects carried in outgoing data flows.
inputs (list): Incoming Dataflows.
outputs (list): Outgoing Dataflows.
isAdmin (bool): Indicates whether the actor has administrative privileges.
"""

port = varInt(-1, doc="Default TCP port for outgoing data flows")
protocol = varString("", doc="Default network protocol for outgoing data flows")
Expand All @@ -1827,10 +1839,24 @@ class Actor(Element):
isAdmin = varBool(False)

def __init__(self, name, **kwargs):
"""
Initialize an Actor.

Args:
name (str): Name of the actor.
**kwargs: Optional actor properties.
port (int): Default TCP port for outgoing data flows.
protocol (str): Default network protocol for outgoing data flows.
data (list): pytm.Data objects in outgoing data flows.
inputs (list): Incoming Dataflows.
outputs (list): Outgoing Dataflows.
isAdmin (bool): Indicates administrative privileges.
"""
super().__init__(name, **kwargs)
TM._actors.append(self)



class Process(Asset):
"""An entity processing data"""

Expand Down