Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
buzz_basic [2016/04/13 04:11] – [Development, Compilation and Deployment of Buzz Scripts] ilpincy | buzz_basic [2016/04/17 03:06] – [A Typical Buzz Script] ilpincy | ||
---|---|---|---|
Line 22: | Line 22: | ||
**Communication model.** The robots are assumed capable of exchanging information through //situated communication// | **Communication model.** The robots are assumed capable of exchanging information through //situated communication// | ||
+ | |||
+ | ==== A Typical Buzz Script ==== | ||
+ | |||
+ | The [[buzz_syntax_bnf|Buzz syntax]] is inspired to well-known languages such as [[https:// | ||
+ | |||
+ | In principle, a Buzz script can be organized in any way one likes. Typically, however, a number of standard functions are present, because they need to be called by the underlying system to proceed with the execution. These functions take care of initialization, | ||
+ | |||
+ | <code buzz> | ||
+ | # Executed once at init time. | ||
+ | function init() { | ||
+ | ... | ||
+ | } | ||
+ | |||
+ | # Executed at each time step. | ||
+ | function step() { | ||
+ | ... | ||
+ | } | ||
+ | |||
+ | # Executed once when the robot (or the simulator) is reset. | ||
+ | function reset() { | ||
+ | ... | ||
+ | } | ||
+ | |||
+ | # Execute once at the end of experiment. | ||
+ | function destroy() { | ||
+ | ... | ||
+ | } | ||
+ | </ |