Skip to content

Commit c6adaba

Browse files
committed
Docs updated.
1 parent 200b68b commit c6adaba

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,16 @@ Here, we just ignore any message.
240240
#### init/1
241241

242242
```erlang
243-
-callback init( Args :: _ ) -> {ok, #net_state{}}.
243+
-callback init( Args :: _ ) -> UsrInfo :: _.
244244
```
245245

246-
The `init/1` function initializes the net instance. It is given a start argument term which is the start argument term that was provided with `gen_pnet:start_link/n`. As a return value a tuple of the form `{ok, #net_state{}}` is expected. We can construct it with the help of `gen_pnet:new/2`. This function takes two arguments: The module implementing the net structure callback functions as well as a user info field.
246+
The `init/1` function initializes the net instance. It is given an initial argument which is provided with `gen_pnet:start_link/n`. The `init/1` function is expected to return a user info field which is later handed to other callback functions.
247247

248248
```erlang
249-
init( _Args ) -> {ok, gen_pnet:new( ?MODULE, [] )}.
249+
init( _Args ) -> [].
250250
```
251251

252-
Here, we instantiate a `#net_state{}` record denoting the current module as the Petri net structure callback module and the empty list as the user-info field.
252+
Here, we return the empty list as a dummy user info field.
253253

254254
#### terminate/2
255255

src/gen_pnet.erl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,7 @@
246246
%% ```
247247
%% init( _NetArg ) -> [].
248248
%% '''
249-
%% Here, we instantiate a `#net_state{}' record denoting the current module as
250-
%% the Petri net structure callback module and the empty list as the user-info
251-
%% field.
249+
%% Here, we return the empty list as a dummy user info field.
252250
%%
253251
%% <h4>terminate/2</h4>
254252
%%

0 commit comments

Comments
 (0)