-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsprite_main.cpp
33 lines (27 loc) · 889 Bytes
/
sprite_main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <SCALE/Scale_if.h>
#include <base/XPRINTF.h>
#include "hwio/UDP_lua.hpp"
#include "task/Echo_lua.hpp"
#include "task/Hello_lua.hpp"
#include "task/Ping_lua.hpp"
#include "task/Pong_lua.hpp"
int main(int argc, char* argv[])
{
(void) argc; // Suppress unused variable warning.
SCALE::Scale_if& scale = SCALE::Scale_if::get_instance();
/* Register my tasks with with the Lua executive.
*/
hwio::UDP_lua::register_class(scale.state());
task::Echo_lua::register_class(scale.state());
task::Hello_lua::register_class(scale.state());
task::Ping_lua::register_class(scale.state());
task::Pong_lua::register_class(scale.state());
/* Execute the main script that drives the simulation.
*/
if(false == scale.run_script(argv[1]))
{
EPRINTF("Failed executing script: %s\n", argv[1]);
return -1;
}
return 0;
}