Classes | Defines | Typedefs | Enumerations | Functions | Variables
Virtual Machine

Classes

struct  AsebaLocalEventDescription
struct  AsebaNativeFunctionArgumentDescription
struct  AsebaNativeFunctionDescription
struct  AsebaVariableDescription
struct  AsebaVMDescription
struct  AsebaVMState

Defines

#define ASEBA_NATIVES_STD_COUNT   21
#define ASEBA_NATIVES_STD_DESCRIPTIONS
#define ASEBA_NATIVES_STD_FUNCTIONS
#define AsebaMaskClear(v, m)   ((v) &= (~(m)))
 Set the part masked by m of v to 0.
#define AsebaMaskIsClear(v, m)   (((v) & (m)) == 0)
 Returns true if the part masked by m of v is 0.
#define AsebaMaskIsSet(v, m)   (((v) & (m)) != 0)
 Returns true if the part masked by m of v is 1.
#define AsebaMaskSet(v, m)   ((v) |= (m))
 Set the part masked by m of v to 1.
#define AsebaSendMessageWords(vm, type, data, size)   AsebaSendMessage(vm,type,data,(size)*2)
#define BIT_CLR(v, b)   ((v) &= (~(1 << (b))))
 Set bit b of v to 0.
#define BIT_SET(v, b)   ((v) |= (1 << (b)))
 Set bit b of v to 1.
#define GET_BIT(v, b)   (((v) >> (b)) & 0x1)
 Return true if bit b of v is 1.

Typedefs

typedef void(* AsebaNativeFunctionPointer )(AsebaVMState *vm)

Enumerations

enum  { ASEBA_MAX_BREAKPOINTS = 16 }

Functions

void __attribute__ ((weak)) AsebaVMRunCB(AsebaVMState *vm)
sint16 aseba_atan2 (sint16 y, sint16 x)
void aseba_comb_sort (sint16 *input, uint16 size)
sint16 aseba_cos (sint16 angle)
sint16 aseba_sin (sint16 angle)
sint16 aseba_sqrt (sint16 num)
void AsebaDebugBareRun (AsebaVMState *vm, uint16 stepsLimit)
void AsebaDebugBreakpointRun (AsebaVMState *vm, uint16 stepsLimit)
uint16 AsebaGetRandom ()
void AsebaNative_mathatan2 (AsebaVMState *vm)
void AsebaNative_mathcos (AsebaVMState *vm)
void AsebaNative_mathmuldiv (AsebaVMState *vm)
void AsebaNative_mathrot2 (AsebaVMState *vm)
void AsebaNative_mathsin (AsebaVMState *vm)
void AsebaNative_mathsqrt (AsebaVMState *vm)
void AsebaNative_rand (AsebaVMState *vm)
void AsebaNative_vecadd (AsebaVMState *vm)
void AsebaNative_vecaddscalar (AsebaVMState *vm)
void AsebaNative_vecargbounds (AsebaVMState *vm)
void AsebaNative_veccopy (AsebaVMState *vm)
void AsebaNative_vecdiv (AsebaVMState *vm)
void AsebaNative_vecdot (AsebaVMState *vm)
void AsebaNative_vecfill (AsebaVMState *vm)
void AsebaNative_vecmax (AsebaVMState *vm)
void AsebaNative_vecmin (AsebaVMState *vm)
void AsebaNative_vecmul (AsebaVMState *vm)
void AsebaNative_vecnonzerosequence (AsebaVMState *vm)
void AsebaNative_vecsort (AsebaVMState *vm)
void AsebaNative_vecstat (AsebaVMState *vm)
void AsebaNative_vecsub (AsebaVMState *vm)
void AsebaNativeFunction (AsebaVMState *vm, uint16 id)
static sint16 AsebaNativePopArg (AsebaVMState *vm)
void AsebaPutVmToSleep (AsebaVMState *vm)
void AsebaResetIntoBootloader (AsebaVMState *vm)
void AsebaSendDescription (AsebaVMState *vm)
void AsebaSendMessage (AsebaVMState *vm, uint16 id, const void *data, uint16 size)
void AsebaSendVariables (AsebaVMState *vm, uint16 start, uint16 length)
void AsebaSetRandomSeed (uint16 seed)
uint16 AsebaVMCheckBreakpoint (AsebaVMState *vm)
uint16 AsebaVMClearBreakpoint (AsebaVMState *vm, uint16 pc)
void AsebaVMClearBreakpoints (AsebaVMState *vm)
void AsebaVMDebugMessage (AsebaVMState *vm, uint16 id, uint16 *data, uint16 dataLength)
static sint16 AsebaVMDoBinaryOperation (AsebaVMState *vm, sint16 valueOne, sint16 valueTwo, uint16 op)
static sint16 AsebaVMDoUnaryOperation (AsebaVMState *vm, sint16 value, uint16 op)
void AsebaVMEmitNodeSpecificError (AsebaVMState *vm, const char *message)
uint16 AsebaVMGetEventAddress (AsebaVMState *vm, uint16 event)
void AsebaVMInit (AsebaVMState *vm)
uint16 AsebaVMRun (AsebaVMState *vm, uint16 stepsLimit)
void AsebaVMSendExecutionStateChanged (AsebaVMState *vm)
uint8 AsebaVMSetBreakpoint (AsebaVMState *vm, uint16 pc)
uint16 AsebaVMSetupEvent (AsebaVMState *vm, uint16 event)
uint16 AsebaVMShouldDropPacket (AsebaVMState *vm, uint16 source, const uint8 *data)
void AsebaVMStep (AsebaVMState *vm)
void AsebaWriteBytecode (AsebaVMState *vm)

Variables

StreamTypeRegistry __attribute__ ((init_priority(1000))) streamTypeRegistry
static const sint16 aseba_atan_table [20 *8+1] = { 652, 735, 816, 896, 977, 1058, 1139, 1218, 1300, 1459, 1620, 1777, 1935, 2093, 2250, 2403, 2556, 2868, 3164, 3458, 3748, 4029, 4307, 4578, 4839, 5359, 5836, 6290, 6720, 7126, 7507, 7861, 8203, 8825, 9357, 9839, 10260, 10640, 10976, 11281, 11557, 12037, 12425, 12755, 13036, 13277, 13486, 13671, 13837, 14112, 14331, 14514, 14666, 14796, 14907, 15003, 15091, 15235, 15348, 15441, 15519, 15585, 15642, 15691, 15736, 15808, 15865, 15912, 15951, 15984, 16013, 16037, 16060, 16096, 16125, 16148, 16168, 16184, 16199, 16211, 16222, 16240, 16255, 16266, 16276, 16284, 16292, 16298, 16303, 16312, 16320, 16325, 16331, 16334, 16338, 16341, 16344, 16348, 16352, 16355, 16357, 16360, 16361, 16363, 16364, 16366, 16369, 16369, 16371, 16372, 16373, 16373, 16375, 16375, 16377, 16376, 16378, 16378, 16378, 16379, 16379, 16380, 16380, 16380, 16382, 16381, 16381, 16381, 16382, 16382, 16382, 16382, 16382, 16382, 16384, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384 }
static const sint16 aseba_sin_table [128+1] = {0, 403, 804, 1207, 1608, 2010, 2411, 2812, 3212, 3612, 4011, 4411, 4808, 5206, 5603, 5998, 6393, 6787, 7180, 7572, 7962, 8352, 8740, 9127, 9513, 9896, 10279, 10660, 11040, 11417, 11794, 12167, 12540, 12911, 13279, 13646, 14010, 14373, 14733, 15091, 15447, 15801, 16151, 16500, 16846, 17190, 17531, 17869, 18205, 18538, 18868, 19196, 19520, 19842, 20160, 20476, 20788, 21097, 21403, 21706, 22006, 22302, 22595, 22884, 23171, 23453, 23732, 24008, 24279, 24548, 24812, 25073, 25330, 25583, 25833, 26078, 26320, 26557, 26791, 27020, 27246, 27467, 27684, 27897, 28106, 28311, 28511, 28707, 28899, 29086, 29269, 29448, 29622, 29792, 29957, 30117, 30274, 30425, 30572, 30715, 30852, 30985, 31114, 31238, 31357, 31471, 31581, 31686, 31786, 31881, 31972, 32057, 32138, 32215, 32285, 32352, 32413, 32470, 32521, 32569, 32610, 32647, 32679, 32706, 32728, 32746, 32758, 32766, 32767, }
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathatan2
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathatan2
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathcos
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathcos
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathmuldiv
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathmuldiv
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathrot2
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathrot2
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathsin
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathsin
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathsqrt
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_mathsqrt
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_rand
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_rand
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecadd
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecadd
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecaddscalar
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecaddscalar
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecargbounds
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecargbounds
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_veccopy
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_veccopy
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecdiv
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecdiv
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecdot
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecdot
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecfill
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecfill
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecmax
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecmax
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecmin
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecmin
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecmul
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecmul
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecnonzerosequence
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecnonzerosequence
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecsort
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecsort
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecstat
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecstat
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecsub
const
AsebaNativeFunctionDescription 
AsebaNativeDescription_vecsub
void const char * message
static uint16 rnd_state

Detailed Description

Glue logic must implement:

if (debug command queue is not empty)
	execute debug command
else if (executing a thread)
	run VM
else if (event queue is not empty)
	fetch event
	run VM
else
	sleep until something happens

Define Documentation

#define ASEBA_NATIVES_STD_COUNT   21

Embedded targets must know the size of ASEBA_NATIVES_STD_FUNCTIONS without having to compute them by hand, please update this when adding a new function

Definition at line 205 of file natives.h.

Value:
AsebaNative_veccopy, \
        AsebaNative_vecfill, \
        AsebaNative_vecaddscalar, \
        AsebaNative_vecadd, \
        AsebaNative_vecsub, \
        AsebaNative_vecmul, \
        AsebaNative_vecdiv, \
        AsebaNative_vecmin, \
        AsebaNative_vecmax, \
        AsebaNative_vecdot, \
        AsebaNative_vecstat, \
        AsebaNative_vecargbounds, \
        AsebaNative_vecsort, \
        AsebaNative_mathmuldiv, \
        AsebaNative_mathatan2, \
        AsebaNative_mathsin, \
        AsebaNative_mathcos, \
        AsebaNative_mathrot2, \
        AsebaNative_mathsqrt, \
        AsebaNative_vecnonzerosequence, \
        AsebaNative_rand

snippet to include standard native functions

Definition at line 208 of file natives.h.

#define AsebaMaskClear (   v,
 
)    ((v) &= (~(m)))

Set the part masked by m of v to 0.

Definition at line 101 of file vm.h.

#define AsebaMaskIsClear (   v,
 
)    (((v) & (m)) == 0)

Returns true if the part masked by m of v is 0.

Definition at line 105 of file vm.h.

#define AsebaMaskIsSet (   v,
 
)    (((v) & (m)) != 0)

Returns true if the part masked by m of v is 1.

Definition at line 103 of file vm.h.

#define AsebaMaskSet (   v,
 
)    ((v) |= (m))

Set the part masked by m of v to 1.

Definition at line 99 of file vm.h.

#define AsebaSendMessageWords (   vm,
  type,
  data,
  size 
)    AsebaSendMessage(vm,type,data,(size)*2)

Definition at line 153 of file vm.h.

#define BIT_CLR (   v,
 
)    ((v) &= (~(1 << (b))))

Set bit b of v to 0.

Definition at line 40 of file vm.c.

#define BIT_SET (   v,
 
)    ((v) |= (1 << (b)))

Set bit b of v to 1.

Definition at line 38 of file vm.c.

#define GET_BIT (   v,
 
)    (((v) >> (b)) & 0x1)

Return true if bit b of v is 1.

Definition at line 36 of file vm.c.


Typedef Documentation

Signature of a native function

Definition at line 68 of file natives.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
ASEBA_MAX_BREAKPOINTS 

maximum number of simultaneous breakpoints the target supports

Definition at line 54 of file vm.h.


Function Documentation

void __attribute__ ( (weak)  )

Called by AsebaVMDebugMessage when VM is going to be run

Called by AsebaVMEmitNodeSpecificError to be notified when VM hit an execution error Is also called for wrong array access or division by 0 with message == NULL

sint16 aseba_atan2 ( sint16  y,
sint16  x 
)

Definition at line 69 of file natives.c.

void aseba_comb_sort ( sint16 input,
uint16  size 
)

Definition at line 253 of file natives.c.

sint16 aseba_cos ( sint16  angle)

Definition at line 221 of file natives.c.

sint16 aseba_sin ( sint16  angle)

Definition at line 180 of file natives.c.

Definition at line 227 of file natives.c.

void AsebaDebugBareRun ( AsebaVMState vm,
uint16  stepsLimit 
)

Run without support of breakpoints. Check ASEBA_VM_EVENT_RUNNING_MASK to exit on interrupts or stepsLimit if > 0.

Definition at line 551 of file vm.c.

void AsebaDebugBreakpointRun ( AsebaVMState vm,
uint16  stepsLimit 
)

Run with support of breakpoints. Also check ASEBA_VM_EVENT_RUNNING_MASK to exit on interrupts.

Definition at line 582 of file vm.c.

Functon to get a random number

Definition at line 1076 of file natives.c.

Function to perform atan2

Definition at line 811 of file natives.c.

Function to perform cos

Definition at line 870 of file natives.c.

Function to perform dest = (a*b)/c in 32 bits

Definition at line 768 of file natives.c.

Function to perform the rotation of a vector

Definition at line 898 of file natives.c.

Function to perform sin

Definition at line 842 of file natives.c.

Function to perform sqrt

Definition at line 932 of file natives.c.

Function to get a 16-bit signed random number

Definition at line 1082 of file natives.c.

Function to add two vectors

Definition at line 377 of file natives.c.

Function to add a scalar to each element of a vector

Definition at line 346 of file natives.c.

Function to get indices of the bounds of a vector

Definition at line 700 of file natives.c.

Function to copy a vector

Definition at line 288 of file natives.c.

Function to divide two vectors elements by elements

Definition at line 467 of file natives.c.

Function to perform a dot product on a vector

Definition at line 575 of file natives.c.

Function to fill all the elements of a vector to a specific value

Definition at line 317 of file natives.c.

Function to take the element by element maximum

Definition at line 542 of file natives.c.

Function to take the element by element minimum

Definition at line 509 of file natives.c.

Function to multiply two vectors elements by elements

Definition at line 437 of file natives.c.

Function to get the middle index of the largest sequence of non-zero elements

Definition at line 960 of file natives.c.

Function to sort a vector

Definition at line 746 of file natives.c.

Function to perform statistics on a vector

Definition at line 651 of file natives.c.

Function to substract two vectors

Definition at line 407 of file natives.c.

void AsebaNativeFunction ( AsebaVMState vm,
uint16  id 
)

Called by AsebaStep to perform a native function call.

Definition at line 35 of file LocalVirtualMachine.cpp.

static sint16 AsebaNativePopArg ( AsebaVMState vm) [inline, static]

Return an argument on the stack, including the value of template parameters

Definition at line 88 of file natives.h.

Called by AsebaVMDebugMessage when VM must put to node in deep sleep. Write an empty function to leave feature unsupported

Definition at line 965 of file challenge.cpp.

Called by AsebaVMDebugMessage when VM must restart the node and enter to the bootloader, write an empty function to leave feature unsupported

Definition at line 1029 of file challenge.cpp.

Called by AsebaVMDebugMessage when VM must send its description on the network.

Definition at line 81 of file asebatest.cpp.

void AsebaSendMessage ( AsebaVMState vm,
uint16  id,
const void *  data,
uint16  size 
)

Called by AsebaStep if there is a message (not an user event) to send. size is given in number of bytes.

Definition at line 4 of file aseba-test-natives-count.cpp.

void AsebaSendVariables ( AsebaVMState vm,
uint16  start,
uint16  length 
)

Called by AsebaVMDebugMessage when some variables must be sent efficiently

Definition at line 76 of file asebatest.cpp.

void AsebaSetRandomSeed ( uint16  seed)

Functon to set the seed of random generator

Definition at line 1071 of file natives.c.

Execute on bytecode of the current VM thread and check for potential breakpoints. Return 1 if breakpoint was seen, 0 otherwise. VM must be ready for run otherwise trashes may occur.

Definition at line 534 of file vm.c.

Clear the breakpoint at a specific location.

Definition at line 663 of file vm.c.

Clear all breakpoints.

Definition at line 682 of file vm.c.

void AsebaVMDebugMessage ( AsebaVMState vm,
uint16  id,
uint16 data,
uint16  dataLength 
)

Execute a debug action from a debug message. dataLength is given in number of uint16.

Definition at line 696 of file vm.c.

static sint16 AsebaVMDoBinaryOperation ( AsebaVMState vm,
sint16  valueOne,
sint16  valueTwo,
uint16  op 
) [static]

Definition at line 90 of file vm.c.

static sint16 AsebaVMDoUnaryOperation ( AsebaVMState vm,
sint16  value,
uint16  op 
) [static]

Definition at line 137 of file vm.c.

void AsebaVMEmitNodeSpecificError ( AsebaVMState vm,
const char *  message 
)

Can be called by glue code (including native functions), to stop vm and emit a node specific error

Definition at line 508 of file vm.c.

Return the starting address of an event, or 0 if the event is not handled.

Definition at line 55 of file vm.c.

void AsebaVMInit ( AsebaVMState vm)

Setup the execution status of the VM. This is not sufficient to have a working VM. nodeId and bytecode, variables, and stack along with their sizes must be set outside this function. The content of the variable array is zeroed by this function.

Definition at line 44 of file vm.c.

uint16 AsebaVMRun ( AsebaVMState vm,
uint16  stepsLimit 
)

Run the VM depending on the current execution mode. Either run or step, depending of the current mode. If stepsLimit > 0, execute at maximim stepsLimit Return 1 if anything was executed, 0 otherwise.

Definition at line 625 of file vm.c.

Send an execution state changed message

Definition at line 688 of file vm.c.

Set a breakpoint at a specific location.

Definition at line 646 of file vm.c.

Setup VM to execute an event. If event is not handled, VM is not ready for run. Return the starting address of the event, or 0 if the event is not handled.

Definition at line 68 of file vm.c.

uint16 AsebaVMShouldDropPacket ( AsebaVMState vm,
uint16  source,
const uint8 data 
)

Return non-zero if VM will ignore the packet, 0 otherwise

Definition at line 825 of file vm.c.

void AsebaVMStep ( AsebaVMState vm)

Execute one bytecode of the current VM thread. VM must be ready for run otherwise trashes may occur.

Definition at line 155 of file vm.c.

Called by AsebaVMDebugMessage when VM must write its bytecode to flash, write an empty function to leave feature unsupported

Definition at line 1025 of file challenge.cpp.


Variable Documentation

const sint16 aseba_atan_table[20 *8+1] = { 652, 735, 816, 896, 977, 1058, 1139, 1218, 1300, 1459, 1620, 1777, 1935, 2093, 2250, 2403, 2556, 2868, 3164, 3458, 3748, 4029, 4307, 4578, 4839, 5359, 5836, 6290, 6720, 7126, 7507, 7861, 8203, 8825, 9357, 9839, 10260, 10640, 10976, 11281, 11557, 12037, 12425, 12755, 13036, 13277, 13486, 13671, 13837, 14112, 14331, 14514, 14666, 14796, 14907, 15003, 15091, 15235, 15348, 15441, 15519, 15585, 15642, 15691, 15736, 15808, 15865, 15912, 15951, 15984, 16013, 16037, 16060, 16096, 16125, 16148, 16168, 16184, 16199, 16211, 16222, 16240, 16255, 16266, 16276, 16284, 16292, 16298, 16303, 16312, 16320, 16325, 16331, 16334, 16338, 16341, 16344, 16348, 16352, 16355, 16357, 16360, 16361, 16363, 16364, 16366, 16369, 16369, 16371, 16372, 16373, 16373, 16375, 16375, 16377, 16376, 16378, 16378, 16378, 16379, 16379, 16380, 16380, 16380, 16382, 16381, 16381, 16381, 16382, 16382, 16382, 16382, 16382, 16382, 16384, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384 } [static]

Definition at line 51 of file natives.c.

const sint16 aseba_sin_table[128+1] = {0, 403, 804, 1207, 1608, 2010, 2411, 2812, 3212, 3612, 4011, 4411, 4808, 5206, 5603, 5998, 6393, 6787, 7180, 7572, 7962, 8352, 8740, 9127, 9513, 9896, 10279, 10660, 11040, 11417, 11794, 12167, 12540, 12911, 13279, 13646, 14010, 14373, 14733, 15091, 15447, 15801, 16151, 16500, 16846, 17190, 17531, 17869, 18205, 18538, 18868, 19196, 19520, 19842, 20160, 20476, 20788, 21097, 21403, 21706, 22006, 22302, 22595, 22884, 23171, 23453, 23732, 24008, 24279, 24548, 24812, 25073, 25330, 25583, 25833, 26078, 26320, 26557, 26791, 27020, 27246, 27467, 27684, 27897, 28106, 28311, 28511, 28707, 28899, 29086, 29269, 29448, 29622, 29792, 29957, 30117, 30274, 30425, 30572, 30715, 30852, 30985, 31114, 31238, 31357, 31471, 31581, 31686, 31786, 31881, 31972, 32057, 32138, 32215, 32285, 32352, 32413, 32470, 32521, 32569, 32610, 32647, 32679, 32706, 32728, 32746, 32758, 32766, 32767, } [static]

Definition at line 168 of file natives.c.

Description of AsebaNative_mathatan2

Definition at line 830 of file natives.c.

Initial value:
{
        "math.atan2",
        "performs dest = atan2(y,x) element by element",
        {
                { -1, "dest" },
                { -1, "y" },
                { -1, "x" },
                { 0, 0 }
        }
}

Description of AsebaNative_mathatan2

Definition at line 830 of file natives.c.

Description of AsebaNative_mathcos

Definition at line 887 of file natives.c.

Initial value:
{
        "math.cos",
        "performs dest = cos(x) element by element",
        {
                { -1, "dest" },
                { -1, "x" },
                { 0, 0 }
        }
}

Description of AsebaNative_mathcos

Definition at line 887 of file natives.c.

Description of AsebaNative_mathmuldiv

Definition at line 798 of file natives.c.

Initial value:
{
        "math.muldiv",
        "performs dest = (a*b)/c in 32 bits element by element",
        {
                { -1, "dest" },
                { -1, "a" },
                { -1, "b" },
                { -1, "c" },
                { 0, 0 }
        }
}

Description of AsebaNative_mathmuldiv

Definition at line 798 of file natives.c.

Description of AsebaNative_mathrot2

Definition at line 920 of file natives.c.

Initial value:
{
        "math.rot2",
        "rotates v of angle a to dest",
        {
                { 2, "dest" },
                { 2, "v" },
                { 1, "a" },
                { 0, 0 }
        }
}

Description of AsebaNative_mathrot2

Definition at line 920 of file natives.c.

Description of AsebaNative_mathsin

Definition at line 859 of file natives.c.

Initial value:
{
        "math.sin",
        "performs dest = sin(x) element by element",
        {
                { -1, "dest" },
                { -1, "x" },
                { 0, 0 }
        }
}

Description of AsebaNative_mathsin

Definition at line 859 of file natives.c.

Description of AsebaNative_mathsqrt

Definition at line 949 of file natives.c.

Initial value:
{
        "math.sqrt",
        "performs dest = sqrt(x) element by element",
        {
                { -1, "dest" },
                { -1, "x" },
                { 0, 0 }
        }
}

Description of AsebaNative_mathsqrt

Definition at line 949 of file natives.c.

Description of AsebaNative_rand

Definition at line 1097 of file natives.c.

Initial value:
{
        "math.rand",
        "fill array with random values",
        {
                { -1, "dest" },
                { 0, 0 }
        }
}

Description of AsebaNative_rand

Definition at line 1097 of file natives.c.

Description of AsebaNative_vecadd

Definition at line 394 of file natives.c.

Initial value:
{
        "math.add",
        "adds src1 and src2 to dest, element by element",
        {
                { -1, "dest" },
                { -1, "src1" },
                { -1, "src2" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecadd

Definition at line 394 of file natives.c.

Description of AsebaNative_vecaddscalar

Definition at line 364 of file natives.c.

Initial value:
{
        "math.addscalar",
        "add scalar to each element of src and store result to dest",
        {
                { -1, "dest" },
                { -1, "src" },
                { 1, "scalar" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecaddscalar

Definition at line 364 of file natives.c.

Description of AsebaNative_vecargbounds

Definition at line 733 of file natives.c.

Initial value:
{
        "math.argbounds",
        "get the indices (argmin, argmax) of the (minimum, maximum) values of src",
        {
                { -1, "src" },
                { 1, "argmin" },
                { 1, "argmax" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecargbounds

Definition at line 733 of file natives.c.

Description of AsebaNative_veccopy

Definition at line 305 of file natives.c.

Initial value:
{
        "math.copy",
        "copies src to dest element by element",
        {
                { -1, "dest" },
                { -1, "src" },
                { 0, 0 }
        }
}

Description of AsebaNative_veccopy

Definition at line 305 of file natives.c.

Description of AsebaNative_vecsub

Definition at line 496 of file natives.c.

Initial value:
{
        "math.div",
        "divides src1 by src2 to dest, element by element",
        {
                { -1, "dest" },
                { -1, "src1" },
                { -1, "src2" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecsub

Definition at line 496 of file natives.c.

Description of AsebaNative_vecdot

Definition at line 637 of file natives.c.

Initial value:
{
        "math.dot",
        "writes the dot product of src1 and src2 to dest, after a shift",
        {
                { 1, "dest" },
                { -1, "src1" },
                { -1, "src2" },
                { 1, "shift" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecdot

Definition at line 637 of file natives.c.

Description of AsebaNative_vecfill

Definition at line 334 of file natives.c.

Initial value:
{
        "math.fill",
        "fills dest with constant value",
        {
                { -1, "dest" },
                { 1, "value" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecfill

Definition at line 334 of file natives.c.

Description of AsebaNative_vecsmax

Definition at line 562 of file natives.c.

Initial value:
{
        "math.max",
        "writes the maximum of src1 and src2 to dest, element by element",
        {
                { -1, "dest" },
                { -1, "src1" },
                { -1, "src2" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecsmax

Definition at line 562 of file natives.c.

Description of AsebaNative_vecmin

Definition at line 529 of file natives.c.

Initial value:
{
        "math.min",
        "writes the minimum of src1 and src2 to dest, element by element",
        {
                { -1, "dest" },
                { -1, "src1" },
                { -1, "src2" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecmin

Definition at line 529 of file natives.c.

Description of AsebaNative_vecadd

Definition at line 454 of file natives.c.

Initial value:
{
        "math.mul",
        "multiplies src1 and src2 to dest, element by element",
        {
                { -1, "dest" },
                { -1, "src1" },
                { -1, "src2" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecadd

Definition at line 454 of file natives.c.

Description of AsebaNative_vecnonzerosequence

Definition at line 1057 of file natives.c.

Initial value:
{
        "math.nzseq",
        "write to dest the middle index of the largest sequence of non-zero elements from src, -1 if not found or if smaller than minLength",
        {
                { 1, "dest" },
                { -1, "src" },
                { 1, "minLength" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecnonzerosequence

Definition at line 1057 of file natives.c.

Description of AsebaNative_vecsort

Definition at line 757 of file natives.c.

Initial value:
{
        "math.sort",
        "sort array in place",
        {
                { -1, "array" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecsort

Definition at line 757 of file natives.c.

Description of AsebaNative_vecstat

Definition at line 686 of file natives.c.

Initial value:
{
        "math.stat",
        "performs statistics on src",
        {
                { -1, "src" },
                { 1, "min" },
                { 1, "max" },
                { 1, "mean" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecstat

Definition at line 686 of file natives.c.

Description of AsebaNative_vecsub

Definition at line 424 of file natives.c.

Initial value:
{
        "math.sub",
        "substracts src2 from src1 to dest, element by element",
        {
                { -1, "dest" },
                { -1, "src1" },
                { -1, "src2" },
                { 0, 0 }
        }
}

Description of AsebaNative_vecsub

Definition at line 424 of file natives.c.

void const char* message

Definition at line 179 of file vm.h.

uint16 rnd_state [static]

Definition at line 1069 of file natives.c.



aseba
Author(s): Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:17:17