Module dvh

A Simple device reader.

Authors: Thomas Lorentsen, Sten Gruener.

Description

A Simple device reader. Provides functions for reading devices It also supports concurrent reading of devices from a list or robots. Note that it is possible to return empty results.

Function Index

find_value/2A C-Style-Array value finder which returns the index of the value in the list.
pread_robots/2Reads robots in parrallel and returns the results.
pread_robots/3Reads robots in parrallel and returns results to caller.
read/2Read device of a robot.
read_devices/2Reads multiple devices from the robot.
read_fiducial/1Reads the fiducial sensors and returns a list of tuples.
read_lasers/1Reads the lasers and returns a list of results.
read_robots/2Reads a list of devices or a device with a list of robots Robot pids are passed in a list with a list of device name atoms.
results/2duplication of read for naming consitancy with player Devices supported: lasers.

Function Details

find_value/2

find_value(Value, List) -> any()

A C-Style-Array value finder which returns the index of the value in the list. returns the last occurence of the item, useful to find a minimum inside of the list of laser measurments. input: Value to find, List to search in. return: index if found (first element is 0), -1 if not found. spec (Value::integer(), List::list()) -> integer().

pread_robots/2

pread_robots(RobotIds::list(), Devices::list()) -> Results::list()

Reads robots in parrallel and returns the results. The robot id is built up of a list of robot pids. The devices is a list of atoms of the device names.

pread_robots/3

pread_robots(Caller::pid(), RobotIds::list(), Devices::list()) -> {dvh, Results::list()}

Reads robots in parrallel and returns results to caller. The robot id is built up of a list of robot pids. The devices is a list of atoms of the device names. If you use this you have to handle the message receiving yourself

read/2

read(RobotId::pid(), Device::atom()) -> Results::tuple() | {error, no_such_device}

Read device of a robot. Pass in the robot pid and an atom of the device name Devices supported: lasers, fiducial

read_devices/2

read_devices(RobotID::pid(), Devices::list()) -> [{RobotID::pid(), Device::string(), Results::tuple()}]

Reads multiple devices from the robot

read_fiducial/1

read_fiducial(RobotId::pid()) -> Fiducials::list() | {error, no_such_device}

Reads the fiducial sensors and returns a list of tuples. tuples are of the form of:
{Id, {Roll, Pitch, Yaw},{UX,UY,UZ},{URoll, UPitch, UYaw}} Id is 0 when the id of a item is unknown

read_lasers/1

read_lasers(RobotID::pid()) -> {Lasers::list(), Bearings::list()}

Reads the lasers and returns a list of results. *Duplication of results() for back-compatiblity reasions*

read_robots/2

read_robots(Robots::list(), Devices::list()) -> [{RobotID::pid(), Device::string(), Results::tuple()}]

Reads a list of devices or a device with a list of robots Robot pids are passed in a list with a list of device name atoms.

results/2

results(RobotId::pid(), Device::atom()) -> Results::tuple() | {error, no_such_device}

duplication of read for naming consitancy with player Devices supported: lasers


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