Behaviours: gen_server.
which are used, respectively, to perform a step of the activity and
to get/set activity properties.
Some other modules of ROSEN, for example kinematics,
simple_path and diff_drive are
implemented as activities, since the movement of an object
is, actually, one of the main activities of an object in a 3d sim.
get_property/2 | Get the property PropName of the activity at pid Pid. |
set_property/3 | Set the property PropName of the activity at pid Pid assigning it to value PropValue. |
start_link/4 | create an activity for an object. |
start_link/5 | create an activity for an object, registering it with local name Name. |
step/2 | Perform a step of an activity. |
stop/1 | Immediately stop the activity with pid Pid, calling the
terminate/2 callback function, which
should return ok. |
get_property(Pid, PropName) -> Result
Get the property PropName of the activity at pid Pid. The result should be {error, noprop} if the property does ot exist, and should be {value, {PropName, PropVal}} if the property exists. Also a custom CustomRes term can be returned.
set_property(Pid, PropName, PropertyValue) -> Result
Set the property PropName of the activity at pid Pid assigning it to value PropValue. If the property esists, it is set to the new value and the result is {ok}. Otherwise, the callback function should return {error, noprop}
start_link(Module, Params, ObjectPid, Object) -> Result
create an activity for an object. Module is the name of the module where callbacks are implemented. Params is the list of params to be passed to the
Module:initfunction
ObjectPid
is the pid of the Object3d to which
this activity applies, while Object
must be the complete
description of the object3d.object3d:add_activity
to add an activity to a given object.
start_link(Name, Module, Params, ObjectPid, Object) -> Result
create an activity for an object, registering it with local name Name. Name = the name of the activity Module is the name of the module where callbacks are implemented. Params is the list of params to be passed to the
Module:initfunction
ObjectPid
is the pid of the Object3d to which
this activity applies, while Object
must be the complete
description of the object3d.object3d:add_activityto add an activity to a given object.
step(Pid, ObjectState) -> Reply
Perform a step of an activity. The step acts on the ObjectState of the object whose pid is Pid. Reply is a term returned by the activity. Note that activities are performed on a step-by-step base: whenever an object3d() is updated, all its activities perform a step.
stop(Pid) -> ok
Immediately stop the activity with pid Pid, calling the
terminate/2
callback function, which
should return ok.
Generated by EDoc, Nov 21 2007, 10:13:23.