en ru

Docs

NAME

getValues - read the values from the digital connectors

SYNOPSIS

function getValues(connectorsId, baseIndex, count);

DESCRIPTION

The function is used to read the values from the digital connectors with id connectorsId. Argument count determines how many connectors will be examined, starting from baseIndex.

RETURN VALUES

getValues returns an array of count values.

EXAMPLES

A simple case:

connectors = createDigitalConnectors(5);
setValues(connectors, 0, {0.0, 2.0, 5.5, 1.0, 7.0});
values = getValues(connectors, 3, 0); -- {}
values = getValues(connectors, 0, 2); -- {0.0, 2.0}
values = getValues(connectors, 2, 1); -- {5.5}
values = getValues(connectors, 3, 2); -- {1.0, 7.0}
values = getValues(connectors, 0, 5); -- {0.0, 2.0, 5.5, 1.0, 7.0}

SEE ALSO

createDigitalConnectors, setValues

Verbatim copying and distribution of this entire article are permitted in any medium, provided this notice is preserved.
Send suggestions, questions and bug reports to neurowombatmail@gmail.com
Copyright © 2009, 2010, 2011, 2012 Andrew Timashov