HiveMind
BittyBuzzUserFunctions.h
Go to the documentation of this file.
1 #ifndef __BITTYBUZZUSERFUNCTIONS_H_
2 #define __BITTYBUZZUSERFUNCTIONS_H_
3 
4 #include <cstdint>
5 
11 
17  extern int16_t g_vmStepDelayMs;
18 
27  void log();
28 
54  void registerClosure();
55 
69  void callHostFunction();
70 
85  void callBuzzFunction();
86 
98  void isNil();
99 
111  void isInt();
112 
123  void isFloat();
124 
136  void isString();
137 
149  void isTable();
150 
162  void isClosure();
163 
175  void isLambdaClosure();
176 
189  void toInt();
190 
203  void toFloat();
204 
216  void delay();
217 
218 } // namespace BittyBuzzUserFunctions
219 
220 #endif // __BITTYBUZZUSERFUNCTIONS_H_
BittyBuzzUserFunctions::registerClosure
void registerClosure()
register a new function, exposing it to the remote composant of the swarm Signature register_closure(...
Definition: BittyBuzzUserFunctions.cpp:90
BittyBuzzUserFunctions::isClosure
void isClosure()
Checks if a variable is a function closure Signature isclosure(arg1)
Definition: BittyBuzzUserFunctions.cpp:281
BittyBuzzUserFunctions::g_vmStepDelayMs
int16_t g_vmStepDelayMs
The delay between each call of the step function in buzz.
Definition: BittyBuzzUserFunctions.cpp:8
BittyBuzzUserFunctions::callHostFunction
void callHostFunction()
calls a function to a host Signature call_host_function(agent_id, fname, params)
Definition: BittyBuzzUserFunctions.cpp:180
BittyBuzzUserFunctions::log
void log()
Logs to the default output Signature log(args...)
Definition: BittyBuzzUserFunctions.cpp:67
BittyBuzzUserFunctions::isLambdaClosure
void isLambdaClosure()
Checks if a variable is a lambda, unamed closure Signature islambda_closure(arg1)
Definition: BittyBuzzUserFunctions.cpp:290
BittyBuzzUserFunctions::delay
void delay()
wait for a certain delay Signature delay(arg1) Warning this function make the whole VM sleep which ca...
Definition: BittyBuzzUserFunctions.cpp:327
BittyBuzzUserFunctions::isString
void isString()
Checks if a variable is a float Signature istable(arg1)
Definition: BittyBuzzUserFunctions.cpp:263
BittyBuzzUserFunctions::toInt
void toInt()
Casts a type to int Signature int(arg1)
Definition: BittyBuzzUserFunctions.cpp:299
BittyBuzzUserFunctions::callBuzzFunction
void callBuzzFunction()
calls a function to a buzz Signature call_buzz_function(agent_id, fname, params)
Definition: BittyBuzzUserFunctions.cpp:208
BittyBuzzUserFunctions::isInt
void isInt()
Checks if a variable is an int Signature isint(arg1)
Definition: BittyBuzzUserFunctions.cpp:245
BittyBuzzUserFunctions::isTable
void isTable()
Checks if a variable is a table Signature istable(arg1)
Definition: BittyBuzzUserFunctions.cpp:272
BittyBuzzUserFunctions
Namespace to regroup the user functions, ie: custom functions that will be available in the buzz scri...
Definition: BittyBuzzUserFunctions.h:10
BittyBuzzUserFunctions::toFloat
void toFloat()
Casts a type to float Signature float(arg1)
Definition: BittyBuzzUserFunctions.cpp:313
BittyBuzzUserFunctions::isNil
void isNil()
Checks if a variable is nil Signature isnil(arg1)
Definition: BittyBuzzUserFunctions.cpp:236
BittyBuzzUserFunctions::isFloat
void isFloat()
Checks if a variable is a float.
Definition: BittyBuzzUserFunctions.cpp:254