The taskmodel module defines all the datatypes needed to define a new Task Model. All ports inherit the TaskPort
A TaskModel port.
A dsx.application.widget.Widget subclass, or list of subclasses.
Converts a given data to the correct resource type
Parameters: | rsrc – An object or value |
---|---|
Returns: | A datatype asserting isCompatible() |
Checks whether the passed resource is conform to the types accepted by this port.
Creates a new MwmrPort
Parameters: | size (int, bytes) – Size of one item in the channel |
---|
alias of Mwmr
Creates a new MwmrPort
Parameters: | size (int, bytes) – Size of one item in the channel |
---|
Creates a Task definition.
fifos, locks, barriers, memspaces and signals are names (i.e. strings) of ports for each of those resources. Thread instantiated from this task will have to plug something into those slots.
Evey resource should have an unique name for this task.
Checks the instance satisfies all the implementation’s constraints.
Parameters: | inst (dsx.application.widgets.Task) – Task instance |
---|---|
Returns: | None if OK |
Raises : | any, if check failed |
Retrieves an already-declared model by its name
Parameters: | name (str) – Model name |
---|---|
Returns: | A TaskModel object |
Raises : | KeyError if not found |
Retrieves the file name and line where this model was declared.
Returns: | a dsx.util.place.Place object |
---|
Retrieves a task implementation by its class.
Parameters: | clas (dsx.application.taskmodel.TaskImpl subclass) – Implementation class type |
---|---|
Returns: | an clas instance object |
Raises : | NotImplementedError if not found |
This defines the model of a processing entity. Each implementation should be declared on its own, and referenced here.
For each instance of a task purpose is to map i/o and resources.
This is used to declare _all_ ways of communication of a task.
Registers a model
Parameters: |
---|
A task implementation. Implementations have to be attached to models, when they are, setModel() is called with the model.