sdleiF | ||
int size RO | Number of signals in this set | |
snoitcnuF | ||
function add(string channel)returns Signal | Create a new signal | |
function addProperty(string channel, untyped property)returns Signal | Create property-based signalCreate a signal that automatically reflects one of the creature's properties (i.e. its power is equal to the property value). Example: Creature.signals.addProperty("energy","energy"); //then, Neuro.signals.receive("energy") in a custom neuron would work similarly to a built-in smell sensor. | |
function clear()doesn't return a value | Delete all signals | |
function get(int index)returns Signal | Access individual signals (index = 0 .. size-1) | |
function receive(string channel)returns float | Receive signal in channelReceive the aggregated signal power in a given channel. | |
function receiveFilter(string channel, float max_distance, float flavor, float flavorfilter)returns float | Receive filtered signalReceive the aggregated signal power in a given channel. Additional filtering options: - Max distance only receives the neighbor signals (based on their physical location) - Flavor filtering: only signals having the flavor similar to the specified value will be received. The flavorfilter value is the difference of flavor that reduces the received signal to 0. The "flavor attenuation" is linear, i.e., signals differing by (filter/2) in flavor will be reduced to 50%. | |
function receiveSet(string channel, float max_distance)returns Vector | Receive signals in rangeGet all signals in the specified range. Returns a read-only vector object containing Signal objects - individual signals can be accessed as result[0], .., result[result.size-1]. | |
function receiveSingle(string channel, float max_distance)returns Signal | Receive strongestFind the signal source that has the highest signal power (taking into account distance). |
Global context |