19 #include <core/exception.h> 29 TOLUA_API
int tolua_fawkesutils_open (lua_State* tolua_S);
31 #include <utils/kalman/kalman_1d.h> 32 #include <utils/time/time.h> 33 #include <utils/time/clock.h> 38 static int tolua_collect_fawkes__KalmanFilter1D (lua_State* tolua_S)
45 static int tolua_collect_fawkes__Time (lua_State* tolua_S)
55 static void tolua_reg_types (lua_State* tolua_S)
57 tolua_usertype(tolua_S,
"fawkes::KalmanFilter1D");
58 tolua_usertype(tolua_S,
"timeval");
59 tolua_usertype(tolua_S,
"fawkes::Time");
60 tolua_usertype(tolua_S,
"fawkes::Clock");
64 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_new00 65 static int tolua_fawkesutils_fawkes_KalmanFilter1D_new00(lua_State* tolua_S)
68 tolua_Error tolua_err;
70 !tolua_isusertable(tolua_S,1,
"fawkes::KalmanFilter1D",0,&tolua_err) ||
71 !tolua_isnumber(tolua_S,2,1,&tolua_err) ||
72 !tolua_isnumber(tolua_S,3,1,&tolua_err) ||
73 !tolua_isnumber(tolua_S,4,1,&tolua_err) ||
74 !tolua_isnumber(tolua_S,5,1,&tolua_err) ||
75 !tolua_isnoobj(tolua_S,6,&tolua_err)
81 float noise_x = ((float) tolua_tonumber(tolua_S,2,1.0));
82 float noise_z = ((float) tolua_tonumber(tolua_S,3,1.0));
83 float mu = ((float) tolua_tonumber(tolua_S,4,0.0));
84 float sig = ((float) tolua_tonumber(tolua_S,5,1.0));
85 bool exc_caught =
false;
89 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::KalmanFilter1D");
95 catch (std::exception &e) {
97 lua_pushstring(tolua_S, e.what());
99 if (exc_caught) lua_error(tolua_S);
103 #ifndef TOLUA_RELEASE 105 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
109 #endif //#ifndef TOLUA_DISABLE 112 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_new00_local 113 static int tolua_fawkesutils_fawkes_KalmanFilter1D_new00_local(lua_State* tolua_S)
115 #ifndef TOLUA_RELEASE 116 tolua_Error tolua_err;
118 !tolua_isusertable(tolua_S,1,
"fawkes::KalmanFilter1D",0,&tolua_err) ||
119 !tolua_isnumber(tolua_S,2,1,&tolua_err) ||
120 !tolua_isnumber(tolua_S,3,1,&tolua_err) ||
121 !tolua_isnumber(tolua_S,4,1,&tolua_err) ||
122 !tolua_isnumber(tolua_S,5,1,&tolua_err) ||
123 !tolua_isnoobj(tolua_S,6,&tolua_err)
129 float noise_x = ((float) tolua_tonumber(tolua_S,2,1.0));
130 float noise_z = ((float) tolua_tonumber(tolua_S,3,1.0));
131 float mu = ((float) tolua_tonumber(tolua_S,4,0.0));
132 float sig = ((float) tolua_tonumber(tolua_S,5,1.0));
133 bool exc_caught =
false;
137 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::KalmanFilter1D");
138 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
144 catch (std::exception &e) {
146 lua_pushstring(tolua_S, e.what());
148 if (exc_caught) lua_error(tolua_S);
152 #ifndef TOLUA_RELEASE 154 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
158 #endif //#ifndef TOLUA_DISABLE 161 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_delete00 162 static int tolua_fawkesutils_fawkes_KalmanFilter1D_delete00(lua_State* tolua_S)
164 #ifndef TOLUA_RELEASE 165 tolua_Error tolua_err;
167 !tolua_isusertype(tolua_S,1,
"fawkes::KalmanFilter1D",0,&tolua_err) ||
168 !tolua_isnoobj(tolua_S,2,&tolua_err)
175 #ifndef TOLUA_RELEASE 176 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'delete'", NULL);
178 bool exc_caught =
false;
185 catch (std::exception &e) {
187 lua_pushstring(tolua_S, e.what());
189 if (exc_caught) lua_error(tolua_S);
193 #ifndef TOLUA_RELEASE 195 tolua_error(tolua_S,
"#ferror in function 'delete'.",&tolua_err);
199 #endif //#ifndef TOLUA_DISABLE 202 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_filter00 203 static int tolua_fawkesutils_fawkes_KalmanFilter1D_filter00(lua_State* tolua_S)
205 #ifndef TOLUA_RELEASE 206 tolua_Error tolua_err;
208 !tolua_isusertype(tolua_S,1,
"fawkes::KalmanFilter1D",0,&tolua_err) ||
209 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
210 !tolua_isnoobj(tolua_S,3,&tolua_err)
217 float observe = ((float) tolua_tonumber(tolua_S,2,0));
218 #ifndef TOLUA_RELEASE 219 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'filter'", NULL);
221 bool exc_caught =
false;
224 self->filter(observe);
230 catch (std::exception &e) {
232 lua_pushstring(tolua_S, e.what());
234 if (exc_caught) lua_error(tolua_S);
238 #ifndef TOLUA_RELEASE 240 tolua_error(tolua_S,
"#ferror in function 'filter'.",&tolua_err);
244 #endif //#ifndef TOLUA_DISABLE 247 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_filter01 248 static int tolua_fawkesutils_fawkes_KalmanFilter1D_filter01(lua_State* tolua_S)
250 tolua_Error tolua_err;
252 !tolua_isusertype(tolua_S,1,
"fawkes::KalmanFilter1D",0,&tolua_err) ||
253 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
254 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
255 !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
256 !tolua_isnoobj(tolua_S,5,&tolua_err)
262 float observe = ((float) tolua_tonumber(tolua_S,2,0));
263 float mu = ((float) tolua_tonumber(tolua_S,3,0));
264 float sig = ((float) tolua_tonumber(tolua_S,4,0));
265 #ifndef TOLUA_RELEASE 266 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'filter'", NULL);
268 bool exc_caught =
false;
271 self->filter(observe,mu,sig);
272 tolua_pushnumber(tolua_S,(lua_Number)mu);
273 tolua_pushnumber(tolua_S,(lua_Number)sig);
279 catch (std::exception &e) {
281 lua_pushstring(tolua_S, e.what());
283 if (exc_caught) lua_error(tolua_S);
288 return tolua_fawkesutils_fawkes_KalmanFilter1D_filter00(tolua_S);
290 #endif //#ifndef TOLUA_DISABLE 293 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_predict00 294 static int tolua_fawkesutils_fawkes_KalmanFilter1D_predict00(lua_State* tolua_S)
296 #ifndef TOLUA_RELEASE 297 tolua_Error tolua_err;
299 !tolua_isusertype(tolua_S,1,
"const fawkes::KalmanFilter1D",0,&tolua_err) ||
300 !tolua_isnoobj(tolua_S,2,&tolua_err)
307 #ifndef TOLUA_RELEASE 308 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'predict'", NULL);
310 bool exc_caught =
false;
313 float tolua_ret = (float) self->
predict();
314 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
320 catch (std::exception &e) {
322 lua_pushstring(tolua_S, e.what());
324 if (exc_caught) lua_error(tolua_S);
328 #ifndef TOLUA_RELEASE 330 tolua_error(tolua_S,
"#ferror in function 'predict'.",&tolua_err);
334 #endif //#ifndef TOLUA_DISABLE 337 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_predict01 338 static int tolua_fawkesutils_fawkes_KalmanFilter1D_predict01(lua_State* tolua_S)
340 tolua_Error tolua_err;
342 !tolua_isusertype(tolua_S,1,
"const fawkes::KalmanFilter1D",0,&tolua_err) ||
343 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
344 !tolua_isnoobj(tolua_S,3,&tolua_err)
350 float vel = ((float) tolua_tonumber(tolua_S,2,0));
351 #ifndef TOLUA_RELEASE 352 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'predict'", NULL);
354 bool exc_caught =
false;
357 float tolua_ret = (float) self->
predict(vel);
358 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
364 catch (std::exception &e) {
366 lua_pushstring(tolua_S, e.what());
368 if (exc_caught) lua_error(tolua_S);
373 return tolua_fawkesutils_fawkes_KalmanFilter1D_predict00(tolua_S);
375 #endif //#ifndef TOLUA_DISABLE 378 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_predict02 379 static int tolua_fawkesutils_fawkes_KalmanFilter1D_predict02(lua_State* tolua_S)
381 tolua_Error tolua_err;
383 !tolua_isusertype(tolua_S,1,
"const fawkes::KalmanFilter1D",0,&tolua_err) ||
384 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
385 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
386 !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
387 !tolua_isnoobj(tolua_S,5,&tolua_err)
393 float vel = ((float) tolua_tonumber(tolua_S,2,0));
394 int steps = ((int) tolua_tonumber(tolua_S,3,0));
395 float noise_z = ((float) tolua_tonumber(tolua_S,4,0));
396 #ifndef TOLUA_RELEASE 397 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'predict'", NULL);
399 bool exc_caught =
false;
402 float tolua_ret = (float) self->
predict(vel,steps,noise_z);
403 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
409 catch (std::exception &e) {
411 lua_pushstring(tolua_S, e.what());
413 if (exc_caught) lua_error(tolua_S);
418 return tolua_fawkesutils_fawkes_KalmanFilter1D_predict01(tolua_S);
420 #endif //#ifndef TOLUA_DISABLE 423 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_KalmanFilter1D_predict03 424 static int tolua_fawkesutils_fawkes_KalmanFilter1D_predict03(lua_State* tolua_S)
426 tolua_Error tolua_err;
428 !tolua_isusertype(tolua_S,1,
"const fawkes::KalmanFilter1D",0,&tolua_err) ||
429 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
430 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
431 !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
432 !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
433 !tolua_isnoobj(tolua_S,6,&tolua_err)
439 float mu = ((float) tolua_tonumber(tolua_S,2,0));
440 float vel = ((float) tolua_tonumber(tolua_S,3,0));
441 int steps = ((int) tolua_tonumber(tolua_S,4,0));
442 float noise_z = ((float) tolua_tonumber(tolua_S,5,0));
443 #ifndef TOLUA_RELEASE 444 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'predict'", NULL);
446 bool exc_caught =
false;
449 float tolua_ret = (float) self->
predict(mu,vel,steps,noise_z);
450 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
456 catch (std::exception &e) {
458 lua_pushstring(tolua_S, e.what());
460 if (exc_caught) lua_error(tolua_S);
465 return tolua_fawkesutils_fawkes_KalmanFilter1D_predict02(tolua_S);
467 #endif //#ifndef TOLUA_DISABLE 470 #ifndef TOLUA_DISABLE_tolua_get_timeval_tv_sec 471 static int tolua_get_timeval_tv_sec(lua_State* tolua_S)
473 timeval*
self = (timeval*) tolua_tousertype(tolua_S,1,0);
474 #ifndef TOLUA_RELEASE 475 if (!
self) tolua_error(tolua_S,
"invalid 'self' in accessing variable 'tv_sec'",NULL);
477 tolua_pushnumber(tolua_S,(lua_Number)self->tv_sec);
480 #endif //#ifndef TOLUA_DISABLE 483 #ifndef TOLUA_DISABLE_tolua_set_timeval_tv_sec 484 static int tolua_set_timeval_tv_sec(lua_State* tolua_S)
486 timeval*
self = (timeval*) tolua_tousertype(tolua_S,1,0);
487 #ifndef TOLUA_RELEASE 488 tolua_Error tolua_err;
489 if (!
self) tolua_error(tolua_S,
"invalid 'self' in accessing variable 'tv_sec'",NULL);
490 if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
491 tolua_error(tolua_S,
"#vinvalid type in variable assignment.",&tolua_err);
493 self->tv_sec = ((
long int) tolua_tonumber(tolua_S,2,0))
497 #endif //#ifndef TOLUA_DISABLE 500 #ifndef TOLUA_DISABLE_tolua_get_timeval_tv_usec 501 static int tolua_get_timeval_tv_usec(lua_State* tolua_S)
503 timeval*
self = (timeval*) tolua_tousertype(tolua_S,1,0);
504 #ifndef TOLUA_RELEASE 505 if (!
self) tolua_error(tolua_S,
"invalid 'self' in accessing variable 'tv_usec'",NULL);
507 tolua_pushnumber(tolua_S,(lua_Number)self->tv_usec);
510 #endif //#ifndef TOLUA_DISABLE 513 #ifndef TOLUA_DISABLE_tolua_set_timeval_tv_usec 514 static int tolua_set_timeval_tv_usec(lua_State* tolua_S)
516 timeval*
self = (timeval*) tolua_tousertype(tolua_S,1,0);
517 #ifndef TOLUA_RELEASE 518 tolua_Error tolua_err;
519 if (!
self) tolua_error(tolua_S,
"invalid 'self' in accessing variable 'tv_usec'",NULL);
520 if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
521 tolua_error(tolua_S,
"#vinvalid type in variable assignment.",&tolua_err);
523 self->tv_usec = ((
long int) tolua_tonumber(tolua_S,2,0))
527 #endif //#ifndef TOLUA_DISABLE 530 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new00 531 static int tolua_fawkesutils_fawkes_Time_new00(lua_State* tolua_S)
533 #ifndef TOLUA_RELEASE 534 tolua_Error tolua_err;
536 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
537 !tolua_isnoobj(tolua_S,2,&tolua_err)
543 bool exc_caught =
false;
547 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
553 catch (std::exception &e) {
555 lua_pushstring(tolua_S, e.what());
557 if (exc_caught) lua_error(tolua_S);
561 #ifndef TOLUA_RELEASE 563 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
567 #endif //#ifndef TOLUA_DISABLE 570 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new00_local 571 static int tolua_fawkesutils_fawkes_Time_new00_local(lua_State* tolua_S)
573 #ifndef TOLUA_RELEASE 574 tolua_Error tolua_err;
576 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
577 !tolua_isnoobj(tolua_S,2,&tolua_err)
583 bool exc_caught =
false;
587 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
588 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
594 catch (std::exception &e) {
596 lua_pushstring(tolua_S, e.what());
598 if (exc_caught) lua_error(tolua_S);
602 #ifndef TOLUA_RELEASE 604 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
608 #endif //#ifndef TOLUA_DISABLE 611 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new01 612 static int tolua_fawkesutils_fawkes_Time_new01(lua_State* tolua_S)
614 tolua_Error tolua_err;
616 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
617 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
618 !tolua_isnoobj(tolua_S,3,&tolua_err)
623 long ms = ((long) tolua_tonumber(tolua_S,2,0));
624 bool exc_caught =
false;
628 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
634 catch (std::exception &e) {
636 lua_pushstring(tolua_S, e.what());
638 if (exc_caught) lua_error(tolua_S);
643 return tolua_fawkesutils_fawkes_Time_new00(tolua_S);
645 #endif //#ifndef TOLUA_DISABLE 648 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new01_local 649 static int tolua_fawkesutils_fawkes_Time_new01_local(lua_State* tolua_S)
651 tolua_Error tolua_err;
653 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
654 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
655 !tolua_isnoobj(tolua_S,3,&tolua_err)
660 long ms = ((long) tolua_tonumber(tolua_S,2,0));
661 bool exc_caught =
false;
665 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
666 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
672 catch (std::exception &e) {
674 lua_pushstring(tolua_S, e.what());
676 if (exc_caught) lua_error(tolua_S);
681 return tolua_fawkesutils_fawkes_Time_new00_local(tolua_S);
683 #endif //#ifndef TOLUA_DISABLE 686 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new02 687 static int tolua_fawkesutils_fawkes_Time_new02(lua_State* tolua_S)
689 tolua_Error tolua_err;
691 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
692 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
693 !tolua_isnoobj(tolua_S,3,&tolua_err)
698 float sec = ((float) tolua_tonumber(tolua_S,2,0));
699 bool exc_caught =
false;
703 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
709 catch (std::exception &e) {
711 lua_pushstring(tolua_S, e.what());
713 if (exc_caught) lua_error(tolua_S);
718 return tolua_fawkesutils_fawkes_Time_new01(tolua_S);
720 #endif //#ifndef TOLUA_DISABLE 723 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new02_local 724 static int tolua_fawkesutils_fawkes_Time_new02_local(lua_State* tolua_S)
726 tolua_Error tolua_err;
728 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
729 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
730 !tolua_isnoobj(tolua_S,3,&tolua_err)
735 float sec = ((float) tolua_tonumber(tolua_S,2,0));
736 bool exc_caught =
false;
740 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
741 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
747 catch (std::exception &e) {
749 lua_pushstring(tolua_S, e.what());
751 if (exc_caught) lua_error(tolua_S);
756 return tolua_fawkesutils_fawkes_Time_new01_local(tolua_S);
758 #endif //#ifndef TOLUA_DISABLE 761 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new03 762 static int tolua_fawkesutils_fawkes_Time_new03(lua_State* tolua_S)
764 tolua_Error tolua_err;
766 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
767 !tolua_isusertype(tolua_S,2,
"fawkes::Clock",0,&tolua_err) ||
768 !tolua_isnoobj(tolua_S,3,&tolua_err)
774 bool exc_caught =
false;
778 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
784 catch (std::exception &e) {
786 lua_pushstring(tolua_S, e.what());
788 if (exc_caught) lua_error(tolua_S);
793 return tolua_fawkesutils_fawkes_Time_new02(tolua_S);
795 #endif //#ifndef TOLUA_DISABLE 798 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new03_local 799 static int tolua_fawkesutils_fawkes_Time_new03_local(lua_State* tolua_S)
801 tolua_Error tolua_err;
803 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
804 !tolua_isusertype(tolua_S,2,
"fawkes::Clock",0,&tolua_err) ||
805 !tolua_isnoobj(tolua_S,3,&tolua_err)
811 bool exc_caught =
false;
815 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
816 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
822 catch (std::exception &e) {
824 lua_pushstring(tolua_S, e.what());
826 if (exc_caught) lua_error(tolua_S);
831 return tolua_fawkesutils_fawkes_Time_new02_local(tolua_S);
833 #endif //#ifndef TOLUA_DISABLE 836 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new04 837 static int tolua_fawkesutils_fawkes_Time_new04(lua_State* tolua_S)
839 tolua_Error tolua_err;
841 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
842 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"const fawkes::Time",0,&tolua_err)) ||
843 !tolua_isnoobj(tolua_S,3,&tolua_err)
849 bool exc_caught =
false;
853 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
859 catch (std::exception &e) {
861 lua_pushstring(tolua_S, e.what());
863 if (exc_caught) lua_error(tolua_S);
868 return tolua_fawkesutils_fawkes_Time_new03(tolua_S);
870 #endif //#ifndef TOLUA_DISABLE 873 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new04_local 874 static int tolua_fawkesutils_fawkes_Time_new04_local(lua_State* tolua_S)
876 tolua_Error tolua_err;
878 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
879 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"const fawkes::Time",0,&tolua_err)) ||
880 !tolua_isnoobj(tolua_S,3,&tolua_err)
886 bool exc_caught =
false;
890 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
891 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
897 catch (std::exception &e) {
899 lua_pushstring(tolua_S, e.what());
901 if (exc_caught) lua_error(tolua_S);
906 return tolua_fawkesutils_fawkes_Time_new03_local(tolua_S);
908 #endif //#ifndef TOLUA_DISABLE 911 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new05 912 static int tolua_fawkesutils_fawkes_Time_new05(lua_State* tolua_S)
914 tolua_Error tolua_err;
916 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
917 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
918 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
919 !tolua_isnoobj(tolua_S,4,&tolua_err)
924 long sec = ((long) tolua_tonumber(tolua_S,2,0));
925 long usec = ((long) tolua_tonumber(tolua_S,3,0));
926 bool exc_caught =
false;
930 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
936 catch (std::exception &e) {
938 lua_pushstring(tolua_S, e.what());
940 if (exc_caught) lua_error(tolua_S);
945 return tolua_fawkesutils_fawkes_Time_new04(tolua_S);
947 #endif //#ifndef TOLUA_DISABLE 950 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new05_local 951 static int tolua_fawkesutils_fawkes_Time_new05_local(lua_State* tolua_S)
953 tolua_Error tolua_err;
955 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
956 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
957 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
958 !tolua_isnoobj(tolua_S,4,&tolua_err)
963 long sec = ((long) tolua_tonumber(tolua_S,2,0));
964 long usec = ((long) tolua_tonumber(tolua_S,3,0));
965 bool exc_caught =
false;
969 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
970 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
976 catch (std::exception &e) {
978 lua_pushstring(tolua_S, e.what());
980 if (exc_caught) lua_error(tolua_S);
985 return tolua_fawkesutils_fawkes_Time_new04_local(tolua_S);
987 #endif //#ifndef TOLUA_DISABLE 990 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new06 991 static int tolua_fawkesutils_fawkes_Time_new06(lua_State* tolua_S)
993 tolua_Error tolua_err;
995 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
996 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
997 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
998 !tolua_isusertype(tolua_S,4,
"fawkes::Clock",0,&tolua_err) ||
999 !tolua_isnoobj(tolua_S,5,&tolua_err)
1004 long sec = ((long) tolua_tonumber(tolua_S,2,0));
1005 long usec = ((long) tolua_tonumber(tolua_S,3,0));
1007 bool exc_caught =
false;
1011 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
1017 catch (std::exception &e) {
1019 lua_pushstring(tolua_S, e.what());
1021 if (exc_caught) lua_error(tolua_S);
1026 return tolua_fawkesutils_fawkes_Time_new05(tolua_S);
1028 #endif //#ifndef TOLUA_DISABLE 1031 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_new06_local 1032 static int tolua_fawkesutils_fawkes_Time_new06_local(lua_State* tolua_S)
1034 tolua_Error tolua_err;
1036 !tolua_isusertable(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1037 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1038 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1039 !tolua_isusertype(tolua_S,4,
"fawkes::Clock",0,&tolua_err) ||
1040 !tolua_isnoobj(tolua_S,5,&tolua_err)
1045 long sec = ((long) tolua_tonumber(tolua_S,2,0));
1046 long usec = ((long) tolua_tonumber(tolua_S,3,0));
1048 bool exc_caught =
false;
1052 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Time");
1053 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1059 catch (std::exception &e) {
1061 lua_pushstring(tolua_S, e.what());
1063 if (exc_caught) lua_error(tolua_S);
1068 return tolua_fawkesutils_fawkes_Time_new05_local(tolua_S);
1070 #endif //#ifndef TOLUA_DISABLE 1073 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_delete00 1074 static int tolua_fawkesutils_fawkes_Time_delete00(lua_State* tolua_S)
1076 #ifndef TOLUA_RELEASE 1077 tolua_Error tolua_err;
1079 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1080 !tolua_isnoobj(tolua_S,2,&tolua_err)
1087 #ifndef TOLUA_RELEASE 1088 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'delete'", NULL);
1090 bool exc_caught =
false;
1092 Mtolua_delete(
self);
1097 catch (std::exception &e) {
1099 lua_pushstring(tolua_S, e.what());
1101 if (exc_caught) lua_error(tolua_S);
1105 #ifndef TOLUA_RELEASE 1107 tolua_error(tolua_S,
"#ferror in function 'delete'.",&tolua_err);
1111 #endif //#ifndef TOLUA_DISABLE 1114 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_in_sec00 1115 static int tolua_fawkesutils_fawkes_Time_in_sec00(lua_State* tolua_S)
1117 #ifndef TOLUA_RELEASE 1118 tolua_Error tolua_err;
1120 !tolua_isusertype(tolua_S,1,
"const fawkes::Time",0,&tolua_err) ||
1121 !tolua_isnoobj(tolua_S,2,&tolua_err)
1128 #ifndef TOLUA_RELEASE 1129 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'in_sec'", NULL);
1131 bool exc_caught =
false;
1134 float tolua_ret = (float) self->
in_sec();
1135 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1141 catch (std::exception &e) {
1143 lua_pushstring(tolua_S, e.what());
1145 if (exc_caught) lua_error(tolua_S);
1149 #ifndef TOLUA_RELEASE 1151 tolua_error(tolua_S,
"#ferror in function 'in_sec'.",&tolua_err);
1155 #endif //#ifndef TOLUA_DISABLE 1158 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_in_msec00 1159 static int tolua_fawkesutils_fawkes_Time_in_msec00(lua_State* tolua_S)
1161 #ifndef TOLUA_RELEASE 1162 tolua_Error tolua_err;
1164 !tolua_isusertype(tolua_S,1,
"const fawkes::Time",0,&tolua_err) ||
1165 !tolua_isnoobj(tolua_S,2,&tolua_err)
1172 #ifndef TOLUA_RELEASE 1173 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'in_msec'", NULL);
1175 bool exc_caught =
false;
1178 long tolua_ret = (long) self->
in_msec();
1179 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1185 catch (std::exception &e) {
1187 lua_pushstring(tolua_S, e.what());
1189 if (exc_caught) lua_error(tolua_S);
1193 #ifndef TOLUA_RELEASE 1195 tolua_error(tolua_S,
"#ferror in function 'in_msec'.",&tolua_err);
1199 #endif //#ifndef TOLUA_DISABLE 1202 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_in_usec00 1203 static int tolua_fawkesutils_fawkes_Time_in_usec00(lua_State* tolua_S)
1205 #ifndef TOLUA_RELEASE 1206 tolua_Error tolua_err;
1208 !tolua_isusertype(tolua_S,1,
"const fawkes::Time",0,&tolua_err) ||
1209 !tolua_isnoobj(tolua_S,2,&tolua_err)
1216 #ifndef TOLUA_RELEASE 1217 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'in_usec'", NULL);
1219 bool exc_caught =
false;
1222 long tolua_ret = (long) self->
in_usec();
1223 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1229 catch (std::exception &e) {
1231 lua_pushstring(tolua_S, e.what());
1233 if (exc_caught) lua_error(tolua_S);
1237 #ifndef TOLUA_RELEASE 1239 tolua_error(tolua_S,
"#ferror in function 'in_usec'.",&tolua_err);
1243 #endif //#ifndef TOLUA_DISABLE 1246 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_get_timeval00 1247 static int tolua_fawkesutils_fawkes_Time_get_timeval00(lua_State* tolua_S)
1249 #ifndef TOLUA_RELEASE 1250 tolua_Error tolua_err;
1252 !tolua_isusertype(tolua_S,1,
"const fawkes::Time",0,&tolua_err) ||
1253 !tolua_isnoobj(tolua_S,2,&tolua_err)
1260 #ifndef TOLUA_RELEASE 1261 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_timeval'", NULL);
1263 bool exc_caught =
false;
1266 const timeval* tolua_ret = (
const timeval*) self->
get_timeval();
1267 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"const timeval");
1273 catch (std::exception &e) {
1275 lua_pushstring(tolua_S, e.what());
1277 if (exc_caught) lua_error(tolua_S);
1281 #ifndef TOLUA_RELEASE 1283 tolua_error(tolua_S,
"#ferror in function 'get_timeval'.",&tolua_err);
1287 #endif //#ifndef TOLUA_DISABLE 1290 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_set_time00 1291 static int tolua_fawkesutils_fawkes_Time_set_time00(lua_State* tolua_S)
1293 #ifndef TOLUA_RELEASE 1294 tolua_Error tolua_err;
1296 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1297 !tolua_isusertype(tolua_S,2,
"const timeval",0,&tolua_err) ||
1298 !tolua_isnoobj(tolua_S,3,&tolua_err)
1305 const timeval* tv = ((
const timeval*) tolua_tousertype(tolua_S,2,0));
1306 #ifndef TOLUA_RELEASE 1307 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'set_time'", NULL);
1309 bool exc_caught =
false;
1318 catch (std::exception &e) {
1320 lua_pushstring(tolua_S, e.what());
1322 if (exc_caught) lua_error(tolua_S);
1326 #ifndef TOLUA_RELEASE 1328 tolua_error(tolua_S,
"#ferror in function 'set_time'.",&tolua_err);
1332 #endif //#ifndef TOLUA_DISABLE 1335 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_set_time01 1336 static int tolua_fawkesutils_fawkes_Time_set_time01(lua_State* tolua_S)
1338 tolua_Error tolua_err;
1340 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1341 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1342 !tolua_isnoobj(tolua_S,3,&tolua_err)
1348 long ms = ((long) tolua_tonumber(tolua_S,2,0));
1349 #ifndef TOLUA_RELEASE 1350 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'set_time'", NULL);
1352 bool exc_caught =
false;
1361 catch (std::exception &e) {
1363 lua_pushstring(tolua_S, e.what());
1365 if (exc_caught) lua_error(tolua_S);
1370 return tolua_fawkesutils_fawkes_Time_set_time00(tolua_S);
1372 #endif //#ifndef TOLUA_DISABLE 1375 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_set_time02 1376 static int tolua_fawkesutils_fawkes_Time_set_time02(lua_State* tolua_S)
1378 tolua_Error tolua_err;
1380 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1381 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1382 !tolua_isnoobj(tolua_S,3,&tolua_err)
1388 float sec = ((float) tolua_tonumber(tolua_S,2,0));
1389 #ifndef TOLUA_RELEASE 1390 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'set_time'", NULL);
1392 bool exc_caught =
false;
1395 self->set_time(sec);
1401 catch (std::exception &e) {
1403 lua_pushstring(tolua_S, e.what());
1405 if (exc_caught) lua_error(tolua_S);
1410 return tolua_fawkesutils_fawkes_Time_set_time01(tolua_S);
1412 #endif //#ifndef TOLUA_DISABLE 1415 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_set_time03 1416 static int tolua_fawkesutils_fawkes_Time_set_time03(lua_State* tolua_S)
1418 tolua_Error tolua_err;
1420 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1421 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"const fawkes::Time",0,&tolua_err)) ||
1422 !tolua_isnoobj(tolua_S,3,&tolua_err)
1429 #ifndef TOLUA_RELEASE 1430 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'set_time'", NULL);
1432 bool exc_caught =
false;
1441 catch (std::exception &e) {
1443 lua_pushstring(tolua_S, e.what());
1445 if (exc_caught) lua_error(tolua_S);
1450 return tolua_fawkesutils_fawkes_Time_set_time02(tolua_S);
1452 #endif //#ifndef TOLUA_DISABLE 1455 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_add00 1456 static int tolua_fawkesutils_fawkes_Time_add00(lua_State* tolua_S)
1458 #ifndef TOLUA_RELEASE 1459 tolua_Error tolua_err;
1461 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1462 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1463 !tolua_isnoobj(tolua_S,3,&tolua_err)
1470 float seconds = ((float) tolua_tonumber(tolua_S,2,0));
1471 #ifndef TOLUA_RELEASE 1472 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'add'", NULL);
1474 bool exc_caught =
false;
1483 catch (std::exception &e) {
1485 lua_pushstring(tolua_S, e.what());
1487 if (exc_caught) lua_error(tolua_S);
1491 #ifndef TOLUA_RELEASE 1493 tolua_error(tolua_S,
"#ferror in function 'add'.",&tolua_err);
1497 #endif //#ifndef TOLUA_DISABLE 1500 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_stamp00 1501 static int tolua_fawkesutils_fawkes_Time_stamp00(lua_State* tolua_S)
1503 #ifndef TOLUA_RELEASE 1504 tolua_Error tolua_err;
1506 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1507 !tolua_isnoobj(tolua_S,2,&tolua_err)
1514 #ifndef TOLUA_RELEASE 1515 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'stamp'", NULL);
1517 bool exc_caught =
false;
1521 tolua_pushusertype(tolua_S,(
void*)&tolua_ret,
"fawkes::Time");
1527 catch (std::exception &e) {
1529 lua_pushstring(tolua_S, e.what());
1531 if (exc_caught) lua_error(tolua_S);
1535 #ifndef TOLUA_RELEASE 1537 tolua_error(tolua_S,
"#ferror in function 'stamp'.",&tolua_err);
1541 #endif //#ifndef TOLUA_DISABLE 1544 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time__add00 1545 static int tolua_fawkesutils_fawkes_Time__add00(lua_State* tolua_S)
1547 #ifndef TOLUA_RELEASE 1548 tolua_Error tolua_err;
1550 !tolua_isusertype(tolua_S,1,
"const fawkes::Time",0,&tolua_err) ||
1551 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"const fawkes::Time",0,&tolua_err)) ||
1552 !tolua_isnoobj(tolua_S,3,&tolua_err)
1560 #ifndef TOLUA_RELEASE 1561 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'operator+'", NULL);
1563 bool exc_caught =
false;
1569 void* tolua_obj = Mtolua_new((
fawkes::Time)(tolua_ret));
1570 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::Time");
1571 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1573 void* tolua_obj = tolua_copy(tolua_S,(
void*)&tolua_ret,
sizeof(
fawkes::Time));
1574 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::Time");
1575 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1583 catch (std::exception &e) {
1585 lua_pushstring(tolua_S, e.what());
1587 if (exc_caught) lua_error(tolua_S);
1591 #ifndef TOLUA_RELEASE 1593 tolua_error(tolua_S,
"#ferror in function '.add'.",&tolua_err);
1597 #endif //#ifndef TOLUA_DISABLE 1600 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time__sub00 1601 static int tolua_fawkesutils_fawkes_Time__sub00(lua_State* tolua_S)
1603 #ifndef TOLUA_RELEASE 1604 tolua_Error tolua_err;
1606 !tolua_isusertype(tolua_S,1,
"const fawkes::Time",0,&tolua_err) ||
1607 !tolua_isusertype(tolua_S,2,
"const fawkes::Time",0,&tolua_err) ||
1608 !tolua_isnoobj(tolua_S,3,&tolua_err)
1616 #ifndef TOLUA_RELEASE 1617 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'operator-'", NULL);
1619 bool exc_caught =
false;
1622 float tolua_ret = (float) self->operator-(t);
1623 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1629 catch (std::exception &e) {
1631 lua_pushstring(tolua_S, e.what());
1633 if (exc_caught) lua_error(tolua_S);
1637 #ifndef TOLUA_RELEASE 1639 tolua_error(tolua_S,
"#ferror in function '.sub'.",&tolua_err);
1643 #endif //#ifndef TOLUA_DISABLE 1646 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_str00 1647 static int tolua_fawkesutils_fawkes_Time_str00(lua_State* tolua_S)
1649 #ifndef TOLUA_RELEASE 1650 tolua_Error tolua_err;
1652 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1653 !tolua_isnoobj(tolua_S,2,&tolua_err)
1660 #ifndef TOLUA_RELEASE 1661 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'str'", NULL);
1663 bool exc_caught =
false;
1666 const char* tolua_ret = (
const char*) self->
str();
1667 tolua_pushstring(tolua_S,(
const char*)tolua_ret);
1673 catch (std::exception &e) {
1675 lua_pushstring(tolua_S, e.what());
1677 if (exc_caught) lua_error(tolua_S);
1681 #ifndef TOLUA_RELEASE 1683 tolua_error(tolua_S,
"#ferror in function 'str'.",&tolua_err);
1687 #endif //#ifndef TOLUA_DISABLE 1690 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Time_str_r00 1691 static int tolua_fawkesutils_fawkes_Time_str_r00(lua_State* tolua_S)
1693 #ifndef TOLUA_RELEASE 1694 tolua_Error tolua_err;
1696 !tolua_isusertype(tolua_S,1,
"fawkes::Time",0,&tolua_err) ||
1697 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
1698 !tolua_isnoobj(tolua_S,3,&tolua_err)
1705 char* s = ((
char*) tolua_tostring(tolua_S,2,0));
1706 #ifndef TOLUA_RELEASE 1707 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'str_r'", NULL);
1709 bool exc_caught =
false;
1718 catch (std::exception &e) {
1720 lua_pushstring(tolua_S, e.what());
1722 if (exc_caught) lua_error(tolua_S);
1726 #ifndef TOLUA_RELEASE 1728 tolua_error(tolua_S,
"#ferror in function 'str_r'.",&tolua_err);
1732 #endif //#ifndef TOLUA_DISABLE 1735 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_instance00 1736 static int tolua_fawkesutils_fawkes_Clock_instance00(lua_State* tolua_S)
1738 #ifndef TOLUA_RELEASE 1739 tolua_Error tolua_err;
1741 !tolua_isusertable(tolua_S,1,
"fawkes::Clock",0,&tolua_err) ||
1742 !tolua_isnoobj(tolua_S,2,&tolua_err)
1748 bool exc_caught =
false;
1752 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Clock");
1758 catch (std::exception &e) {
1760 lua_pushstring(tolua_S, e.what());
1762 if (exc_caught) lua_error(tolua_S);
1766 #ifndef TOLUA_RELEASE 1768 tolua_error(tolua_S,
"#ferror in function 'instance'.",&tolua_err);
1772 #endif //#ifndef TOLUA_DISABLE 1775 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_finalize00 1776 static int tolua_fawkesutils_fawkes_Clock_finalize00(lua_State* tolua_S)
1778 #ifndef TOLUA_RELEASE 1779 tolua_Error tolua_err;
1781 !tolua_isusertable(tolua_S,1,
"fawkes::Clock",0,&tolua_err) ||
1782 !tolua_isnoobj(tolua_S,2,&tolua_err)
1788 bool exc_caught =
false;
1797 catch (std::exception &e) {
1799 lua_pushstring(tolua_S, e.what());
1801 if (exc_caught) lua_error(tolua_S);
1805 #ifndef TOLUA_RELEASE 1807 tolua_error(tolua_S,
"#ferror in function 'finalize'.",&tolua_err);
1811 #endif //#ifndef TOLUA_DISABLE 1814 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_is_ext_default_timesource00 1815 static int tolua_fawkesutils_fawkes_Clock_is_ext_default_timesource00(lua_State* tolua_S)
1817 #ifndef TOLUA_RELEASE 1818 tolua_Error tolua_err;
1820 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
1821 !tolua_isnoobj(tolua_S,2,&tolua_err)
1828 #ifndef TOLUA_RELEASE 1829 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'is_ext_default_timesource'", NULL);
1831 bool exc_caught =
false;
1835 tolua_pushboolean(tolua_S,(
bool)tolua_ret);
1841 catch (std::exception &e) {
1843 lua_pushstring(tolua_S, e.what());
1845 if (exc_caught) lua_error(tolua_S);
1849 #ifndef TOLUA_RELEASE 1851 tolua_error(tolua_S,
"#ferror in function 'is_ext_default_timesource'.",&tolua_err);
1855 #endif //#ifndef TOLUA_DISABLE 1858 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_has_ext_timesource00 1859 static int tolua_fawkesutils_fawkes_Clock_has_ext_timesource00(lua_State* tolua_S)
1861 #ifndef TOLUA_RELEASE 1862 tolua_Error tolua_err;
1864 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
1865 !tolua_isnoobj(tolua_S,2,&tolua_err)
1872 #ifndef TOLUA_RELEASE 1873 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'has_ext_timesource'", NULL);
1875 bool exc_caught =
false;
1879 tolua_pushboolean(tolua_S,(
bool)tolua_ret);
1885 catch (std::exception &e) {
1887 lua_pushstring(tolua_S, e.what());
1889 if (exc_caught) lua_error(tolua_S);
1893 #ifndef TOLUA_RELEASE 1895 tolua_error(tolua_S,
"#ferror in function 'has_ext_timesource'.",&tolua_err);
1899 #endif //#ifndef TOLUA_DISABLE 1902 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_ext_to_realtime00 1903 static int tolua_fawkesutils_fawkes_Clock_ext_to_realtime00(lua_State* tolua_S)
1905 #ifndef TOLUA_RELEASE 1906 tolua_Error tolua_err;
1908 !tolua_isusertype(tolua_S,1,
"fawkes::Clock",0,&tolua_err) ||
1909 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"const fawkes::Time",0,&tolua_err)) ||
1910 !tolua_isnoobj(tolua_S,3,&tolua_err)
1918 #ifndef TOLUA_RELEASE 1919 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'ext_to_realtime'", NULL);
1921 bool exc_caught =
false;
1927 void* tolua_obj = Mtolua_new((
fawkes::Time)(tolua_ret));
1928 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::Time");
1929 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1931 void* tolua_obj = tolua_copy(tolua_S,(
void*)&tolua_ret,
sizeof(
fawkes::Time));
1932 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::Time");
1933 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1941 catch (std::exception &e) {
1943 lua_pushstring(tolua_S, e.what());
1945 if (exc_caught) lua_error(tolua_S);
1949 #ifndef TOLUA_RELEASE 1951 tolua_error(tolua_S,
"#ferror in function 'ext_to_realtime'.",&tolua_err);
1955 #endif //#ifndef TOLUA_DISABLE 1958 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_time00 1959 static int tolua_fawkesutils_fawkes_Clock_get_time00(lua_State* tolua_S)
1961 #ifndef TOLUA_RELEASE 1962 tolua_Error tolua_err;
1964 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
1965 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"fawkes::Time",0,&tolua_err)) ||
1966 !tolua_isnoobj(tolua_S,3,&tolua_err)
1974 #ifndef TOLUA_RELEASE 1975 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_time'", NULL);
1977 bool exc_caught =
false;
1980 self->get_time(*time);
1986 catch (std::exception &e) {
1988 lua_pushstring(tolua_S, e.what());
1990 if (exc_caught) lua_error(tolua_S);
1994 #ifndef TOLUA_RELEASE 1996 tolua_error(tolua_S,
"#ferror in function 'get_time'.",&tolua_err);
2000 #endif //#ifndef TOLUA_DISABLE 2003 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_time01 2004 static int tolua_fawkesutils_fawkes_Clock_get_time01(lua_State* tolua_S)
2006 tolua_Error tolua_err;
2008 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2009 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"fawkes::Time",0,&tolua_err)) ||
2010 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2011 !tolua_isnoobj(tolua_S,4,&tolua_err)
2019 #ifndef TOLUA_RELEASE 2020 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_time'", NULL);
2022 bool exc_caught =
false;
2025 self->get_time(*time,sel);
2031 catch (std::exception &e) {
2033 lua_pushstring(tolua_S, e.what());
2035 if (exc_caught) lua_error(tolua_S);
2040 return tolua_fawkesutils_fawkes_Clock_get_time00(tolua_S);
2042 #endif //#ifndef TOLUA_DISABLE 2045 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_time02 2046 static int tolua_fawkesutils_fawkes_Clock_get_time02(lua_State* tolua_S)
2048 tolua_Error tolua_err;
2050 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2051 !tolua_isusertype(tolua_S,2,
"fawkes::Time",0,&tolua_err) ||
2052 !tolua_isnoobj(tolua_S,3,&tolua_err)
2059 #ifndef TOLUA_RELEASE 2060 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_time'", NULL);
2062 bool exc_caught =
false;
2065 self->get_time(time);
2071 catch (std::exception &e) {
2073 lua_pushstring(tolua_S, e.what());
2075 if (exc_caught) lua_error(tolua_S);
2080 return tolua_fawkesutils_fawkes_Clock_get_time01(tolua_S);
2082 #endif //#ifndef TOLUA_DISABLE 2085 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_time03 2086 static int tolua_fawkesutils_fawkes_Clock_get_time03(lua_State* tolua_S)
2088 tolua_Error tolua_err;
2090 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2091 !tolua_isusertype(tolua_S,2,
"fawkes::Time",0,&tolua_err) ||
2092 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2093 !tolua_isnoobj(tolua_S,4,&tolua_err)
2101 #ifndef TOLUA_RELEASE 2102 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_time'", NULL);
2104 bool exc_caught =
false;
2107 self->get_time(time,sel);
2113 catch (std::exception &e) {
2115 lua_pushstring(tolua_S, e.what());
2117 if (exc_caught) lua_error(tolua_S);
2122 return tolua_fawkesutils_fawkes_Clock_get_time02(tolua_S);
2124 #endif //#ifndef TOLUA_DISABLE 2127 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_time04 2128 static int tolua_fawkesutils_fawkes_Clock_get_time04(lua_State* tolua_S)
2130 tolua_Error tolua_err;
2132 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2133 !tolua_isusertype(tolua_S,2,
"timeval",0,&tolua_err) ||
2134 !tolua_isnoobj(tolua_S,3,&tolua_err)
2140 struct timeval* tv = ((
struct timeval*) tolua_tousertype(tolua_S,2,0));
2141 #ifndef TOLUA_RELEASE 2142 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_time'", NULL);
2144 bool exc_caught =
false;
2153 catch (std::exception &e) {
2155 lua_pushstring(tolua_S, e.what());
2157 if (exc_caught) lua_error(tolua_S);
2162 return tolua_fawkesutils_fawkes_Clock_get_time03(tolua_S);
2164 #endif //#ifndef TOLUA_DISABLE 2167 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_time05 2168 static int tolua_fawkesutils_fawkes_Clock_get_time05(lua_State* tolua_S)
2170 tolua_Error tolua_err;
2172 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2173 !tolua_isusertype(tolua_S,2,
"timeval",0,&tolua_err) ||
2174 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2175 !tolua_isnoobj(tolua_S,4,&tolua_err)
2181 struct timeval* tv = ((
struct timeval*) tolua_tousertype(tolua_S,2,0));
2183 #ifndef TOLUA_RELEASE 2184 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_time'", NULL);
2186 bool exc_caught =
false;
2189 self->get_time(tv,sel);
2195 catch (std::exception &e) {
2197 lua_pushstring(tolua_S, e.what());
2199 if (exc_caught) lua_error(tolua_S);
2204 return tolua_fawkesutils_fawkes_Clock_get_time04(tolua_S);
2206 #endif //#ifndef TOLUA_DISABLE 2209 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_systime00 2210 static int tolua_fawkesutils_fawkes_Clock_get_systime00(lua_State* tolua_S)
2212 #ifndef TOLUA_RELEASE 2213 tolua_Error tolua_err;
2215 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2216 !tolua_isusertype(tolua_S,2,
"timeval",0,&tolua_err) ||
2217 !tolua_isnoobj(tolua_S,3,&tolua_err)
2224 struct timeval* tv = ((
struct timeval*) tolua_tousertype(tolua_S,2,0));
2225 #ifndef TOLUA_RELEASE 2226 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_systime'", NULL);
2228 bool exc_caught =
false;
2231 self->get_systime(tv);
2237 catch (std::exception &e) {
2239 lua_pushstring(tolua_S, e.what());
2241 if (exc_caught) lua_error(tolua_S);
2245 #ifndef TOLUA_RELEASE 2247 tolua_error(tolua_S,
"#ferror in function 'get_systime'.",&tolua_err);
2251 #endif //#ifndef TOLUA_DISABLE 2254 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_systime01 2255 static int tolua_fawkesutils_fawkes_Clock_get_systime01(lua_State* tolua_S)
2257 tolua_Error tolua_err;
2259 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2260 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"fawkes::Time",0,&tolua_err)) ||
2261 !tolua_isnoobj(tolua_S,3,&tolua_err)
2268 #ifndef TOLUA_RELEASE 2269 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_systime'", NULL);
2271 bool exc_caught =
false;
2274 self->get_systime(*time);
2280 catch (std::exception &e) {
2282 lua_pushstring(tolua_S, e.what());
2284 if (exc_caught) lua_error(tolua_S);
2289 return tolua_fawkesutils_fawkes_Clock_get_systime00(tolua_S);
2291 #endif //#ifndef TOLUA_DISABLE 2294 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_get_systime02 2295 static int tolua_fawkesutils_fawkes_Clock_get_systime02(lua_State* tolua_S)
2297 tolua_Error tolua_err;
2299 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2300 !tolua_isusertype(tolua_S,2,
"fawkes::Time",0,&tolua_err) ||
2301 !tolua_isnoobj(tolua_S,3,&tolua_err)
2308 #ifndef TOLUA_RELEASE 2309 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'get_systime'", NULL);
2311 bool exc_caught =
false;
2314 self->get_systime(time);
2320 catch (std::exception &e) {
2322 lua_pushstring(tolua_S, e.what());
2324 if (exc_caught) lua_error(tolua_S);
2329 return tolua_fawkesutils_fawkes_Clock_get_systime01(tolua_S);
2331 #endif //#ifndef TOLUA_DISABLE 2334 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_now00 2335 static int tolua_fawkesutils_fawkes_Clock_now00(lua_State* tolua_S)
2337 #ifndef TOLUA_RELEASE 2338 tolua_Error tolua_err;
2340 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2341 !tolua_isnoobj(tolua_S,2,&tolua_err)
2348 #ifndef TOLUA_RELEASE 2349 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'now'", NULL);
2351 bool exc_caught =
false;
2357 void* tolua_obj = Mtolua_new((
fawkes::Time)(tolua_ret));
2358 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::Time");
2359 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2361 void* tolua_obj = tolua_copy(tolua_S,(
void*)&tolua_ret,
sizeof(
fawkes::Time));
2362 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::Time");
2363 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
2371 catch (std::exception &e) {
2373 lua_pushstring(tolua_S, e.what());
2375 if (exc_caught) lua_error(tolua_S);
2379 #ifndef TOLUA_RELEASE 2381 tolua_error(tolua_S,
"#ferror in function 'now'.",&tolua_err);
2385 #endif //#ifndef TOLUA_DISABLE 2388 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_elapsed00 2389 static int tolua_fawkesutils_fawkes_Clock_elapsed00(lua_State* tolua_S)
2391 #ifndef TOLUA_RELEASE 2392 tolua_Error tolua_err;
2394 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2395 !tolua_isusertype(tolua_S,2,
"fawkes::Time",0,&tolua_err) ||
2396 !tolua_isnoobj(tolua_S,3,&tolua_err)
2404 #ifndef TOLUA_RELEASE 2405 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'elapsed'", NULL);
2407 bool exc_caught =
false;
2410 float tolua_ret = (float) self->elapsed(t);
2411 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2417 catch (std::exception &e) {
2419 lua_pushstring(tolua_S, e.what());
2421 if (exc_caught) lua_error(tolua_S);
2425 #ifndef TOLUA_RELEASE 2427 tolua_error(tolua_S,
"#ferror in function 'elapsed'.",&tolua_err);
2431 #endif //#ifndef TOLUA_DISABLE 2434 #ifndef TOLUA_DISABLE_tolua_fawkesutils_fawkes_Clock_sys_elapsed00 2435 static int tolua_fawkesutils_fawkes_Clock_sys_elapsed00(lua_State* tolua_S)
2437 #ifndef TOLUA_RELEASE 2438 tolua_Error tolua_err;
2440 !tolua_isusertype(tolua_S,1,
"const fawkes::Clock",0,&tolua_err) ||
2441 !tolua_isusertype(tolua_S,2,
"fawkes::Time",0,&tolua_err) ||
2442 !tolua_isnoobj(tolua_S,3,&tolua_err)
2450 #ifndef TOLUA_RELEASE 2451 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'sys_elapsed'", NULL);
2453 bool exc_caught =
false;
2456 float tolua_ret = (float) self->sys_elapsed(t);
2457 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2463 catch (std::exception &e) {
2465 lua_pushstring(tolua_S, e.what());
2467 if (exc_caught) lua_error(tolua_S);
2471 #ifndef TOLUA_RELEASE 2473 tolua_error(tolua_S,
"#ferror in function 'sys_elapsed'.",&tolua_err);
2477 #endif //#ifndef TOLUA_DISABLE 2480 TOLUA_API
int tolua_fawkesutils_open (lua_State* tolua_S)
2482 tolua_open(tolua_S);
2483 tolua_reg_types(tolua_S);
2484 tolua_module(tolua_S,NULL,0);
2485 tolua_beginmodule(tolua_S,NULL);
2486 tolua_module(tolua_S,
"fawkes",0);
2487 tolua_beginmodule(tolua_S,
"fawkes");
2489 tolua_cclass(tolua_S,
"KalmanFilter1D",
"fawkes::KalmanFilter1D",
"",tolua_collect_fawkes__KalmanFilter1D);
2491 tolua_cclass(tolua_S,
"KalmanFilter1D",
"fawkes::KalmanFilter1D",
"",NULL);
2493 tolua_beginmodule(tolua_S,
"KalmanFilter1D");
2494 tolua_function(tolua_S,
"new",tolua_fawkesutils_fawkes_KalmanFilter1D_new00);
2495 tolua_function(tolua_S,
"new_local",tolua_fawkesutils_fawkes_KalmanFilter1D_new00_local);
2496 tolua_function(tolua_S,
".call",tolua_fawkesutils_fawkes_KalmanFilter1D_new00_local);
2497 tolua_function(tolua_S,
"delete",tolua_fawkesutils_fawkes_KalmanFilter1D_delete00);
2498 tolua_function(tolua_S,
"filter",tolua_fawkesutils_fawkes_KalmanFilter1D_filter00);
2499 tolua_function(tolua_S,
"filter",tolua_fawkesutils_fawkes_KalmanFilter1D_filter01);
2500 tolua_function(tolua_S,
"predict",tolua_fawkesutils_fawkes_KalmanFilter1D_predict00);
2501 tolua_function(tolua_S,
"predict",tolua_fawkesutils_fawkes_KalmanFilter1D_predict01);
2502 tolua_function(tolua_S,
"predict",tolua_fawkesutils_fawkes_KalmanFilter1D_predict02);
2503 tolua_function(tolua_S,
"predict",tolua_fawkesutils_fawkes_KalmanFilter1D_predict03);
2504 tolua_endmodule(tolua_S);
2505 tolua_endmodule(tolua_S);
2506 tolua_cclass(tolua_S,
"timeval",
"timeval",
"",NULL);
2507 tolua_beginmodule(tolua_S,
"timeval");
2508 tolua_variable(tolua_S,
"tv_sec",tolua_get_timeval_tv_sec,tolua_set_timeval_tv_sec);
2509 tolua_variable(tolua_S,
"tv_usec",tolua_get_timeval_tv_usec,tolua_set_timeval_tv_usec);
2510 tolua_endmodule(tolua_S);
2511 tolua_module(tolua_S,
"fawkes",0);
2512 tolua_beginmodule(tolua_S,
"fawkes");
2514 tolua_cclass(tolua_S,
"Time",
"fawkes::Time",
"",tolua_collect_fawkes__Time);
2516 tolua_cclass(tolua_S,
"Time",
"fawkes::Time",
"",NULL);
2518 tolua_beginmodule(tolua_S,
"Time");
2519 tolua_function(tolua_S,
"new",tolua_fawkesutils_fawkes_Time_new00);
2520 tolua_function(tolua_S,
"new_local",tolua_fawkesutils_fawkes_Time_new00_local);
2521 tolua_function(tolua_S,
".call",tolua_fawkesutils_fawkes_Time_new00_local);
2522 tolua_function(tolua_S,
"new",tolua_fawkesutils_fawkes_Time_new01);
2523 tolua_function(tolua_S,
"new_local",tolua_fawkesutils_fawkes_Time_new01_local);
2524 tolua_function(tolua_S,
".call",tolua_fawkesutils_fawkes_Time_new01_local);
2525 tolua_function(tolua_S,
"new",tolua_fawkesutils_fawkes_Time_new02);
2526 tolua_function(tolua_S,
"new_local",tolua_fawkesutils_fawkes_Time_new02_local);
2527 tolua_function(tolua_S,
".call",tolua_fawkesutils_fawkes_Time_new02_local);
2528 tolua_function(tolua_S,
"new",tolua_fawkesutils_fawkes_Time_new03);
2529 tolua_function(tolua_S,
"new_local",tolua_fawkesutils_fawkes_Time_new03_local);
2530 tolua_function(tolua_S,
".call",tolua_fawkesutils_fawkes_Time_new03_local);
2531 tolua_function(tolua_S,
"new",tolua_fawkesutils_fawkes_Time_new04);
2532 tolua_function(tolua_S,
"new_local",tolua_fawkesutils_fawkes_Time_new04_local);
2533 tolua_function(tolua_S,
".call",tolua_fawkesutils_fawkes_Time_new04_local);
2534 tolua_function(tolua_S,
"new",tolua_fawkesutils_fawkes_Time_new05);
2535 tolua_function(tolua_S,
"new_local",tolua_fawkesutils_fawkes_Time_new05_local);
2536 tolua_function(tolua_S,
".call",tolua_fawkesutils_fawkes_Time_new05_local);
2537 tolua_function(tolua_S,
"new",tolua_fawkesutils_fawkes_Time_new06);
2538 tolua_function(tolua_S,
"new_local",tolua_fawkesutils_fawkes_Time_new06_local);
2539 tolua_function(tolua_S,
".call",tolua_fawkesutils_fawkes_Time_new06_local);
2540 tolua_function(tolua_S,
"delete",tolua_fawkesutils_fawkes_Time_delete00);
2541 tolua_function(tolua_S,
"in_sec",tolua_fawkesutils_fawkes_Time_in_sec00);
2542 tolua_function(tolua_S,
"in_msec",tolua_fawkesutils_fawkes_Time_in_msec00);
2543 tolua_function(tolua_S,
"in_usec",tolua_fawkesutils_fawkes_Time_in_usec00);
2544 tolua_function(tolua_S,
"get_timeval",tolua_fawkesutils_fawkes_Time_get_timeval00);
2545 tolua_function(tolua_S,
"set_time",tolua_fawkesutils_fawkes_Time_set_time00);
2546 tolua_function(tolua_S,
"set_time",tolua_fawkesutils_fawkes_Time_set_time01);
2547 tolua_function(tolua_S,
"set_time",tolua_fawkesutils_fawkes_Time_set_time02);
2548 tolua_function(tolua_S,
"set_time",tolua_fawkesutils_fawkes_Time_set_time03);
2549 tolua_function(tolua_S,
"add",tolua_fawkesutils_fawkes_Time_add00);
2550 tolua_function(tolua_S,
"stamp",tolua_fawkesutils_fawkes_Time_stamp00);
2551 tolua_function(tolua_S,
".add",tolua_fawkesutils_fawkes_Time__add00);
2552 tolua_function(tolua_S,
".sub",tolua_fawkesutils_fawkes_Time__sub00);
2553 tolua_function(tolua_S,
"str",tolua_fawkesutils_fawkes_Time_str00);
2554 tolua_function(tolua_S,
"str_r",tolua_fawkesutils_fawkes_Time_str_r00);
2555 tolua_endmodule(tolua_S);
2556 tolua_endmodule(tolua_S);
2557 tolua_module(tolua_S,
"fawkes",0);
2558 tolua_beginmodule(tolua_S,
"fawkes");
2559 tolua_cclass(tolua_S,
"Clock",
"fawkes::Clock",
"",NULL);
2560 tolua_beginmodule(tolua_S,
"Clock");
2564 tolua_function(tolua_S,
"instance",tolua_fawkesutils_fawkes_Clock_instance00);
2565 tolua_function(tolua_S,
"finalize",tolua_fawkesutils_fawkes_Clock_finalize00);
2566 tolua_function(tolua_S,
"is_ext_default_timesource",tolua_fawkesutils_fawkes_Clock_is_ext_default_timesource00);
2567 tolua_function(tolua_S,
"has_ext_timesource",tolua_fawkesutils_fawkes_Clock_has_ext_timesource00);
2568 tolua_function(tolua_S,
"ext_to_realtime",tolua_fawkesutils_fawkes_Clock_ext_to_realtime00);
2569 tolua_function(tolua_S,
"get_time",tolua_fawkesutils_fawkes_Clock_get_time00);
2570 tolua_function(tolua_S,
"get_time",tolua_fawkesutils_fawkes_Clock_get_time01);
2571 tolua_function(tolua_S,
"get_time",tolua_fawkesutils_fawkes_Clock_get_time02);
2572 tolua_function(tolua_S,
"get_time",tolua_fawkesutils_fawkes_Clock_get_time03);
2573 tolua_function(tolua_S,
"get_time",tolua_fawkesutils_fawkes_Clock_get_time04);
2574 tolua_function(tolua_S,
"get_time",tolua_fawkesutils_fawkes_Clock_get_time05);
2575 tolua_function(tolua_S,
"get_systime",tolua_fawkesutils_fawkes_Clock_get_systime00);
2576 tolua_function(tolua_S,
"get_systime",tolua_fawkesutils_fawkes_Clock_get_systime01);
2577 tolua_function(tolua_S,
"get_systime",tolua_fawkesutils_fawkes_Clock_get_systime02);
2578 tolua_function(tolua_S,
"now",tolua_fawkesutils_fawkes_Clock_now00);
2579 tolua_function(tolua_S,
"elapsed",tolua_fawkesutils_fawkes_Clock_elapsed00);
2580 tolua_function(tolua_S,
"sys_elapsed",tolua_fawkesutils_fawkes_Clock_sys_elapsed00);
2581 tolua_endmodule(tolua_S);
2582 tolua_endmodule(tolua_S);
2583 tolua_endmodule(tolua_S);
2589 #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501 2590 TOLUA_API
int luaopen_fawkesutils (lua_State* tolua_S) {
2591 return tolua_fawkesutils_open(tolua_S);
double in_sec() const
Convet time to seconds.
TimesourceSelector
Select the time source.
const timeval * get_timeval() const
Obtain the timeval where the time is stored.
static Clock * instance()
Clock initializer.
const char * str(bool utc=false) const
Output function.
float predict() const
Predicts the next position based on the past observations.
This is supposed to be the central clock in Fawkes.
bool is_ext_default_timesource() const
Checks whether the external time source is the default time soucre.
A class for handling time.
bool has_ext_timesource() const
Check whether an external time source is registered.
long in_msec() const
Convert the stored time into milli-seconds.
select the external time source
Base class for exceptions in Fawkes.
Time ext_to_realtime(const Time &t)
Convert a time given w.r.t.
select the system time source
virtual const char * what_no_backtrace() const
Get primary string (does not implicitly print the back trace).
static void finalize()
Finalize.
long in_usec() const
Convert the stored time into micro-seconds.
Time & stamp()
Set this time to the current time.
One-dimensional Kalman filter implementation for single-precision floats.
select the default time source