Module driver

This is the Erlang Port Driver Upon start the driver will be loaded into the Erlang runtime enviroment.

Authors: Thomas Lorentsen, Sten Gruener.

Description

This is the Erlang Port Driver Upon start the driver will be loaded into the Erlang runtime enviroment. Using call_port messages can be passed to and from the driver. You can only start the driver once using an asynchronous driver. So messages being passed into the driver are serialised and passed into the driver. Once the message has been passed into the driver it can continue to pass more messages into the driver. Messages are passed back to the caller argument of callport. To set the number of asynchronous processes inside the port driver you need to tweak the +A option in erlang shell.

Function Index

call_port/4Passes a message and result is passed back to Caller.
start/0Starts the driver.
stop/1Stops the server.

Function Details

call_port/4

call_port(DriverPid::pid(), Caller::pid(), RobotId::string(), Message::any()) -> {return, Message::string()} | {error, atom()}

Passes a message and result is passed back to Caller.

start/0

start() -> pid()

Starts the driver. returns the pid to the server to allow communication to the driver.

stop/1

stop(Pid::pid()) -> ok

Stops the server


Generated by EDoc, Aug 13 2009, 23:20:23.