Copyright © 2015-2017 Jörgen Brandt
Version: 0.1.0
Behaviours: gen_pnet.
Authors: Jörgen Brandt (joergen.brandt@onlinehome.de).
A module implementing the behavior of the common runtime environment (CRE).
add_client/2 | Registers a client process with a given CRE instance. |
add_worker/2 | Registers a worker process with a given CRE instance. |
code_change/3 | |
cre_request/4 | Requests the computation of an application from a given CRE intance. |
fire/3 | |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
init_marking/2 | |
is_enabled/3 | |
place_lst/0 | |
preset/1 | |
start_link/0 | Starts an anonymous CRE instance. |
start_link/1 | Starts a named CRE instance. |
stop/1 | Stops the CRE instance. |
terminate/2 | |
trigger/3 | |
trsn_lst/0 | |
worker_result/4 | Sends the result of a previously computed application to the CRE. |
add_client(CreName, ClientName) -> any()
Registers a client process with a given CRE instance.
Takes the name of a CRE instanceCreName
and the name of a client
instance ClientName
and adds the client to the client pool of the CRE.
add_worker(CreName, WorkerName) -> any()
Registers a worker process with a given CRE instance.
Takes the name of a CRE instanceCreName
and the name of a worker
instance WorkerName
and adds the worker to the worker pool of the CRE.
The presence of workers is a precondition for the CRE to send out demand
or perform work. A CRE without workers, thus, can accept clients but can
never make progress.
code_change(OldVsn, NetState, Extra) -> any()
cre_request(CreName, ClientName, I, A) -> any()
Requests the computation of an application from a given CRE intance.
When a client with the nameClientName
that has received demand has
generated an application A
belonging to a program with the program
identifier I
it uses this function to send the application to the CRE
instance with the name CreName
.
fire(X1, X2, X3) -> any()
handle_call(Request, From, NetState) -> any()
handle_cast(Request, NetState) -> any()
handle_info(Info, NetState) -> any()
init(MasterArg) -> any()
init_marking(Place, UsrInfo) -> any()
is_enabled(Trsn, X2, X3) -> any()
place_lst() -> any()
preset(X1) -> any()
start_link() -> any()
Starts an anonymous CRE instance.
Returns{ok, Pid}
on success where Pid
is the process id of the
newly created process.
See also: start_link/1.
start_link(CreName) -> any()
Starts a named CRE instance.
Returns{ok, Pid}
on success where Pid
is the process id of the
newly created process.
See also: start_link/0.
stop(CreName) -> any()
Stops the CRE instance.
terminate(Reason, NetState) -> any()
trigger(Place, Q, NetState) -> any()
trsn_lst() -> any()
worker_result(CreName, WorkerName, A, Delta) -> any()
Sends the result of a previously computed application to the CRE.
When a worker has computed the result of an application that has previously been requested from it the worker sends the result back to the CRE using this function.Generated by EDoc