BatteryInterface_tolua.cpp

00001 /*
00002 ** Lua binding: interfaces_BatteryInterface
00003 ** Generated automatically by tolua++-1.0.92
00004 */
00005 /*  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version. A runtime exception applies to
00009  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU Library General Public License for more details.
00015  *
00016  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00017  */
00018
00019 #ifndef __cplusplus
00020 #include "stdlib.h"
00021 #endif
00022 #include "string.h"
00023
00024 #include "tolua++.h"
00025
00026 /* Exported function */
00027 TOLUA_API int  tolua_interfaces_BatteryInterface_open (lua_State* tolua_S);
00028
00029 #include <interfaces/BatteryInterface.h>
00030 using namespace fawkes;
00031
00032 /* function to release collected object via destructor */
00033 #ifdef __cplusplus
00034 
00035 static int tolua_collect_fawkes__BatteryInterface__SleepMessage (lua_State* tolua_S)
00036 {
00037  fawkes::BatteryInterface::SleepMessage* self = (fawkes::BatteryInterface::SleepMessage*) tolua_tousertype(tolua_S,1,0);
00038         delete self;
00039         return 0;
00040 }
00041
00042 static int tolua_collect_fawkes__BatteryInterface__PushButtonMessage (lua_State* tolua_S)
00043 {
00044  fawkes::BatteryInterface::PushButtonMessage* self = (fawkes::BatteryInterface::PushButtonMessage*) tolua_tousertype(tolua_S,1,0);
00045         delete self;
00046         return 0;
00047 }
00048 #endif
00049 
00050
00051 /* function to register type */
00052 static void tolua_reg_types (lua_State* tolua_S)
00053 {
00054  tolua_usertype(tolua_S,"Message");
00055  tolua_usertype(tolua_S,"fawkes::BatteryInterface");
00056  tolua_usertype(tolua_S,"fawkes::BatteryInterface::PushButtonMessage");
00057  tolua_usertype(tolua_S,"fawkes::BatteryInterface::SleepMessage");
00058  tolua_usertype(tolua_S,"Interface");
00059 }
00060
00061 /* method: new of class  PushButtonMessage */
00062 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_new00
00063 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_new00(lua_State* tolua_S)
00064 {
00065 #ifndef TOLUA_RELEASE
00066  tolua_Error tolua_err;
00067  if (
00068      !tolua_isusertable(tolua_S,1,"fawkes::BatteryInterface::PushButtonMessage",0,&tolua_err) ||
00069      !tolua_isnoobj(tolua_S,2,&tolua_err)
00070  )
00071   goto tolua_lerror;
00072  else
00073 #endif
00074  {
00075   {
00076    fawkes::BatteryInterface::PushButtonMessage* tolua_ret = (fawkes::BatteryInterface::PushButtonMessage*)  new fawkes::BatteryInterface::PushButtonMessage();
00077    tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::BatteryInterface::PushButtonMessage");
00078   }
00079  }
00080  return 1;
00081 #ifndef TOLUA_RELEASE
00082  tolua_lerror:
00083  tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
00084  return 0;
00085 #endif
00086 }
00087 #endif //#ifndef TOLUA_DISABLE
00088 
00089 /* method: new_local of class  PushButtonMessage */
00090 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_new00_local
00091 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_new00_local(lua_State* tolua_S)
00092 {
00093 #ifndef TOLUA_RELEASE
00094  tolua_Error tolua_err;
00095  if (
00096      !tolua_isusertable(tolua_S,1,"fawkes::BatteryInterface::PushButtonMessage",0,&tolua_err) ||
00097      !tolua_isnoobj(tolua_S,2,&tolua_err)
00098  )
00099   goto tolua_lerror;
00100  else
00101 #endif
00102  {
00103   {
00104    fawkes::BatteryInterface::PushButtonMessage* tolua_ret = (fawkes::BatteryInterface::PushButtonMessage*)  new fawkes::BatteryInterface::PushButtonMessage();
00105    tolua_pushusertype_and_takeownership(tolua_S,(void *)tolua_ret,"fawkes::BatteryInterface::PushButtonMessage");
00106   }
00107  }
00108  return 1;
00109 #ifndef TOLUA_RELEASE
00110  tolua_lerror:
00111  tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
00112  return 0;
00113 #endif
00114 }
00115 #endif //#ifndef TOLUA_DISABLE
00116 
00117 /* method: delete of class  PushButtonMessage */
00118 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_delete00
00119 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_delete00(lua_State* tolua_S)
00120 {
00121 #ifndef TOLUA_RELEASE
00122  tolua_Error tolua_err;
00123  if (
00124      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface::PushButtonMessage",0,&tolua_err) ||
00125      !tolua_isnoobj(tolua_S,2,&tolua_err)
00126  )
00127   goto tolua_lerror;
00128  else
00129 #endif
00130  {
00131   fawkes::BatteryInterface::PushButtonMessage* self = (fawkes::BatteryInterface::PushButtonMessage*)  tolua_tousertype(tolua_S,1,0);
00132 #ifndef TOLUA_RELEASE
00133   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'",NULL);
00134 #endif
00135   delete self;
00136  }
00137  return 0;
00138 #ifndef TOLUA_RELEASE
00139  tolua_lerror:
00140  tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
00141  return 0;
00142 #endif
00143 }
00144 #endif //#ifndef TOLUA_DISABLE
00145 
00146 /* method: new of class  SleepMessage */
00147 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_new00
00148 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_new00(lua_State* tolua_S)
00149 {
00150 #ifndef TOLUA_RELEASE
00151  tolua_Error tolua_err;
00152  if (
00153      !tolua_isusertable(tolua_S,1,"fawkes::BatteryInterface::SleepMessage",0,&tolua_err) ||
00154      !tolua_isnoobj(tolua_S,2,&tolua_err)
00155  )
00156   goto tolua_lerror;
00157  else
00158 #endif
00159  {
00160   {
00161    fawkes::BatteryInterface::SleepMessage* tolua_ret = (fawkes::BatteryInterface::SleepMessage*)  new fawkes::BatteryInterface::SleepMessage();
00162    tolua_pushusertype(tolua_S,(void*)tolua_ret,"fawkes::BatteryInterface::SleepMessage");
00163   }
00164  }
00165  return 1;
00166 #ifndef TOLUA_RELEASE
00167  tolua_lerror:
00168  tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
00169  return 0;
00170 #endif
00171 }
00172 #endif //#ifndef TOLUA_DISABLE
00173 
00174 /* method: new_local of class  SleepMessage */
00175 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_new00_local
00176 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_new00_local(lua_State* tolua_S)
00177 {
00178 #ifndef TOLUA_RELEASE
00179  tolua_Error tolua_err;
00180  if (
00181      !tolua_isusertable(tolua_S,1,"fawkes::BatteryInterface::SleepMessage",0,&tolua_err) ||
00182      !tolua_isnoobj(tolua_S,2,&tolua_err)
00183  )
00184   goto tolua_lerror;
00185  else
00186 #endif
00187  {
00188   {
00189    fawkes::BatteryInterface::SleepMessage* tolua_ret = (fawkes::BatteryInterface::SleepMessage*)  new fawkes::BatteryInterface::SleepMessage();
00190    tolua_pushusertype_and_takeownership(tolua_S,(void *)tolua_ret,"fawkes::BatteryInterface::SleepMessage");
00191   }
00192  }
00193  return 1;
00194 #ifndef TOLUA_RELEASE
00195  tolua_lerror:
00196  tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
00197  return 0;
00198 #endif
00199 }
00200 #endif //#ifndef TOLUA_DISABLE
00201 
00202 /* method: delete of class  SleepMessage */
00203 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_delete00
00204 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_delete00(lua_State* tolua_S)
00205 {
00206 #ifndef TOLUA_RELEASE
00207  tolua_Error tolua_err;
00208  if (
00209      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface::SleepMessage",0,&tolua_err) ||
00210      !tolua_isnoobj(tolua_S,2,&tolua_err)
00211  )
00212   goto tolua_lerror;
00213  else
00214 #endif
00215  {
00216   fawkes::BatteryInterface::SleepMessage* self = (fawkes::BatteryInterface::SleepMessage*)  tolua_tousertype(tolua_S,1,0);
00217 #ifndef TOLUA_RELEASE
00218   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'",NULL);
00219 #endif
00220   delete self;
00221  }
00222  return 0;
00223 #ifndef TOLUA_RELEASE
00224  tolua_lerror:
00225  tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
00226  return 0;
00227 #endif
00228 }
00229 #endif //#ifndef TOLUA_DISABLE
00230 
00231 /* method: current of class  fawkes::BatteryInterface */
00232 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_current00
00233 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_current00(lua_State* tolua_S)
00234 {
00235 #ifndef TOLUA_RELEASE
00236  tolua_Error tolua_err;
00237  if (
00238      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00239      !tolua_isnoobj(tolua_S,2,&tolua_err)
00240  )
00241   goto tolua_lerror;
00242  else
00243 #endif
00244  {
00245   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00246 #ifndef TOLUA_RELEASE
00247   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'current'",NULL);
00248 #endif
00249   {
00250    unsigned int tolua_ret = (unsigned int)  self->current();
00251    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00252   }
00253  }
00254  return 1;
00255 #ifndef TOLUA_RELEASE
00256  tolua_lerror:
00257  tolua_error(tolua_S,"#ferror in function 'current'.",&tolua_err);
00258  return 0;
00259 #endif
00260 }
00261 #endif //#ifndef TOLUA_DISABLE
00262 
00263 /* method: set_current of class  fawkes::BatteryInterface */
00264 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_current00
00265 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_current00(lua_State* tolua_S)
00266 {
00267 #ifndef TOLUA_RELEASE
00268  tolua_Error tolua_err;
00269  if (
00270      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00271      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
00272      !tolua_isnoobj(tolua_S,3,&tolua_err)
00273  )
00274   goto tolua_lerror;
00275  else
00276 #endif
00277  {
00278   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00279   unsigned const int new_current = ((unsigned const int)  tolua_tonumber(tolua_S,2,0));
00280 #ifndef TOLUA_RELEASE
00281   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_current'",NULL);
00282 #endif
00283   {
00284    self->set_current(new_current);
00285   }
00286  }
00287  return 0;
00288 #ifndef TOLUA_RELEASE
00289  tolua_lerror:
00290  tolua_error(tolua_S,"#ferror in function 'set_current'.",&tolua_err);
00291  return 0;
00292 #endif
00293 }
00294 #endif //#ifndef TOLUA_DISABLE
00295 
00296 /* method: maxlenof_current of class  fawkes::BatteryInterface */
00297 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_current00
00298 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_current00(lua_State* tolua_S)
00299 {
00300 #ifndef TOLUA_RELEASE
00301  tolua_Error tolua_err;
00302  if (
00303      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00304      !tolua_isnoobj(tolua_S,2,&tolua_err)
00305  )
00306   goto tolua_lerror;
00307  else
00308 #endif
00309  {
00310   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00311 #ifndef TOLUA_RELEASE
00312   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'maxlenof_current'",NULL);
00313 #endif
00314   {
00315    int tolua_ret = (int)  self->maxlenof_current();
00316    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00317   }
00318  }
00319  return 1;
00320 #ifndef TOLUA_RELEASE
00321  tolua_lerror:
00322  tolua_error(tolua_S,"#ferror in function 'maxlenof_current'.",&tolua_err);
00323  return 0;
00324 #endif
00325 }
00326 #endif //#ifndef TOLUA_DISABLE
00327 
00328 /* method: voltage of class  fawkes::BatteryInterface */
00329 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_voltage00
00330 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_voltage00(lua_State* tolua_S)
00331 {
00332 #ifndef TOLUA_RELEASE
00333  tolua_Error tolua_err;
00334  if (
00335      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00336      !tolua_isnoobj(tolua_S,2,&tolua_err)
00337  )
00338   goto tolua_lerror;
00339  else
00340 #endif
00341  {
00342   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00343 #ifndef TOLUA_RELEASE
00344   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'voltage'",NULL);
00345 #endif
00346   {
00347    unsigned int tolua_ret = (unsigned int)  self->voltage();
00348    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00349   }
00350  }
00351  return 1;
00352 #ifndef TOLUA_RELEASE
00353  tolua_lerror:
00354  tolua_error(tolua_S,"#ferror in function 'voltage'.",&tolua_err);
00355  return 0;
00356 #endif
00357 }
00358 #endif //#ifndef TOLUA_DISABLE
00359 
00360 /* method: set_voltage of class  fawkes::BatteryInterface */
00361 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_voltage00
00362 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_voltage00(lua_State* tolua_S)
00363 {
00364 #ifndef TOLUA_RELEASE
00365  tolua_Error tolua_err;
00366  if (
00367      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00368      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
00369      !tolua_isnoobj(tolua_S,3,&tolua_err)
00370  )
00371   goto tolua_lerror;
00372  else
00373 #endif
00374  {
00375   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00376   unsigned const int new_voltage = ((unsigned const int)  tolua_tonumber(tolua_S,2,0));
00377 #ifndef TOLUA_RELEASE
00378   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_voltage'",NULL);
00379 #endif
00380   {
00381    self->set_voltage(new_voltage);
00382   }
00383  }
00384  return 0;
00385 #ifndef TOLUA_RELEASE
00386  tolua_lerror:
00387  tolua_error(tolua_S,"#ferror in function 'set_voltage'.",&tolua_err);
00388  return 0;
00389 #endif
00390 }
00391 #endif //#ifndef TOLUA_DISABLE
00392 
00393 /* method: maxlenof_voltage of class  fawkes::BatteryInterface */
00394 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_voltage00
00395 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_voltage00(lua_State* tolua_S)
00396 {
00397 #ifndef TOLUA_RELEASE
00398  tolua_Error tolua_err;
00399  if (
00400      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00401      !tolua_isnoobj(tolua_S,2,&tolua_err)
00402  )
00403   goto tolua_lerror;
00404  else
00405 #endif
00406  {
00407   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00408 #ifndef TOLUA_RELEASE
00409   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'maxlenof_voltage'",NULL);
00410 #endif
00411   {
00412    int tolua_ret = (int)  self->maxlenof_voltage();
00413    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00414   }
00415  }
00416  return 1;
00417 #ifndef TOLUA_RELEASE
00418  tolua_lerror:
00419  tolua_error(tolua_S,"#ferror in function 'maxlenof_voltage'.",&tolua_err);
00420  return 0;
00421 #endif
00422 }
00423 #endif //#ifndef TOLUA_DISABLE
00424 
00425 /* method: temperature of class  fawkes::BatteryInterface */
00426 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_temperature00
00427 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_temperature00(lua_State* tolua_S)
00428 {
00429 #ifndef TOLUA_RELEASE
00430  tolua_Error tolua_err;
00431  if (
00432      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00433      !tolua_isnoobj(tolua_S,2,&tolua_err)
00434  )
00435   goto tolua_lerror;
00436  else
00437 #endif
00438  {
00439   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00440 #ifndef TOLUA_RELEASE
00441   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'temperature'",NULL);
00442 #endif
00443   {
00444    unsigned int tolua_ret = (unsigned int)  self->temperature();
00445    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00446   }
00447  }
00448  return 1;
00449 #ifndef TOLUA_RELEASE
00450  tolua_lerror:
00451  tolua_error(tolua_S,"#ferror in function 'temperature'.",&tolua_err);
00452  return 0;
00453 #endif
00454 }
00455 #endif //#ifndef TOLUA_DISABLE
00456 
00457 /* method: set_temperature of class  fawkes::BatteryInterface */
00458 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_temperature00
00459 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_temperature00(lua_State* tolua_S)
00460 {
00461 #ifndef TOLUA_RELEASE
00462  tolua_Error tolua_err;
00463  if (
00464      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00465      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
00466      !tolua_isnoobj(tolua_S,3,&tolua_err)
00467  )
00468   goto tolua_lerror;
00469  else
00470 #endif
00471  {
00472   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00473   unsigned const int new_temperature = ((unsigned const int)  tolua_tonumber(tolua_S,2,0));
00474 #ifndef TOLUA_RELEASE
00475   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_temperature'",NULL);
00476 #endif
00477   {
00478    self->set_temperature(new_temperature);
00479   }
00480  }
00481  return 0;
00482 #ifndef TOLUA_RELEASE
00483  tolua_lerror:
00484  tolua_error(tolua_S,"#ferror in function 'set_temperature'.",&tolua_err);
00485  return 0;
00486 #endif
00487 }
00488 #endif //#ifndef TOLUA_DISABLE
00489 
00490 /* method: maxlenof_temperature of class  fawkes::BatteryInterface */
00491 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_temperature00
00492 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_temperature00(lua_State* tolua_S)
00493 {
00494 #ifndef TOLUA_RELEASE
00495  tolua_Error tolua_err;
00496  if (
00497      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00498      !tolua_isnoobj(tolua_S,2,&tolua_err)
00499  )
00500   goto tolua_lerror;
00501  else
00502 #endif
00503  {
00504   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00505 #ifndef TOLUA_RELEASE
00506   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'maxlenof_temperature'",NULL);
00507 #endif
00508   {
00509    int tolua_ret = (int)  self->maxlenof_temperature();
00510    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00511   }
00512  }
00513  return 1;
00514 #ifndef TOLUA_RELEASE
00515  tolua_lerror:
00516  tolua_error(tolua_S,"#ferror in function 'maxlenof_temperature'.",&tolua_err);
00517  return 0;
00518 #endif
00519 }
00520 #endif //#ifndef TOLUA_DISABLE
00521 
00522 /* method: absolute_soc of class  fawkes::BatteryInterface */
00523 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_absolute_soc00
00524 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_absolute_soc00(lua_State* tolua_S)
00525 {
00526 #ifndef TOLUA_RELEASE
00527  tolua_Error tolua_err;
00528  if (
00529      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00530      !tolua_isnoobj(tolua_S,2,&tolua_err)
00531  )
00532   goto tolua_lerror;
00533  else
00534 #endif
00535  {
00536   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00537 #ifndef TOLUA_RELEASE
00538   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'absolute_soc'",NULL);
00539 #endif
00540   {
00541    float tolua_ret = (float)  self->absolute_soc();
00542    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00543   }
00544  }
00545  return 1;
00546 #ifndef TOLUA_RELEASE
00547  tolua_lerror:
00548  tolua_error(tolua_S,"#ferror in function 'absolute_soc'.",&tolua_err);
00549  return 0;
00550 #endif
00551 }
00552 #endif //#ifndef TOLUA_DISABLE
00553 
00554 /* method: set_absolute_soc of class  fawkes::BatteryInterface */
00555 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_absolute_soc00
00556 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_absolute_soc00(lua_State* tolua_S)
00557 {
00558 #ifndef TOLUA_RELEASE
00559  tolua_Error tolua_err;
00560  if (
00561      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00562      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
00563      !tolua_isnoobj(tolua_S,3,&tolua_err)
00564  )
00565   goto tolua_lerror;
00566  else
00567 #endif
00568  {
00569   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00570   const float new_absolute_soc = ((const float)  tolua_tonumber(tolua_S,2,0));
00571 #ifndef TOLUA_RELEASE
00572   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_absolute_soc'",NULL);
00573 #endif
00574   {
00575    self->set_absolute_soc(new_absolute_soc);
00576   }
00577  }
00578  return 0;
00579 #ifndef TOLUA_RELEASE
00580  tolua_lerror:
00581  tolua_error(tolua_S,"#ferror in function 'set_absolute_soc'.",&tolua_err);
00582  return 0;
00583 #endif
00584 }
00585 #endif //#ifndef TOLUA_DISABLE
00586 
00587 /* method: maxlenof_absolute_soc of class  fawkes::BatteryInterface */
00588 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_absolute_soc00
00589 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_absolute_soc00(lua_State* tolua_S)
00590 {
00591 #ifndef TOLUA_RELEASE
00592  tolua_Error tolua_err;
00593  if (
00594      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00595      !tolua_isnoobj(tolua_S,2,&tolua_err)
00596  )
00597   goto tolua_lerror;
00598  else
00599 #endif
00600  {
00601   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00602 #ifndef TOLUA_RELEASE
00603   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'maxlenof_absolute_soc'",NULL);
00604 #endif
00605   {
00606    int tolua_ret = (int)  self->maxlenof_absolute_soc();
00607    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00608   }
00609  }
00610  return 1;
00611 #ifndef TOLUA_RELEASE
00612  tolua_lerror:
00613  tolua_error(tolua_S,"#ferror in function 'maxlenof_absolute_soc'.",&tolua_err);
00614  return 0;
00615 #endif
00616 }
00617 #endif //#ifndef TOLUA_DISABLE
00618 
00619 /* method: relative_soc of class  fawkes::BatteryInterface */
00620 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_relative_soc00
00621 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_relative_soc00(lua_State* tolua_S)
00622 {
00623 #ifndef TOLUA_RELEASE
00624  tolua_Error tolua_err;
00625  if (
00626      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00627      !tolua_isnoobj(tolua_S,2,&tolua_err)
00628  )
00629   goto tolua_lerror;
00630  else
00631 #endif
00632  {
00633   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00634 #ifndef TOLUA_RELEASE
00635   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'relative_soc'",NULL);
00636 #endif
00637   {
00638    float tolua_ret = (float)  self->relative_soc();
00639    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00640   }
00641  }
00642  return 1;
00643 #ifndef TOLUA_RELEASE
00644  tolua_lerror:
00645  tolua_error(tolua_S,"#ferror in function 'relative_soc'.",&tolua_err);
00646  return 0;
00647 #endif
00648 }
00649 #endif //#ifndef TOLUA_DISABLE
00650 
00651 /* method: set_relative_soc of class  fawkes::BatteryInterface */
00652 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_relative_soc00
00653 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_relative_soc00(lua_State* tolua_S)
00654 {
00655 #ifndef TOLUA_RELEASE
00656  tolua_Error tolua_err;
00657  if (
00658      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
00659      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
00660      !tolua_isnoobj(tolua_S,3,&tolua_err)
00661  )
00662   goto tolua_lerror;
00663  else
00664 #endif
00665  {
00666   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00667   const float new_relative_soc = ((const float)  tolua_tonumber(tolua_S,2,0));
00668 #ifndef TOLUA_RELEASE
00669   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_relative_soc'",NULL);
00670 #endif
00671   {
00672    self->set_relative_soc(new_relative_soc);
00673   }
00674  }
00675  return 0;
00676 #ifndef TOLUA_RELEASE
00677  tolua_lerror:
00678  tolua_error(tolua_S,"#ferror in function 'set_relative_soc'.",&tolua_err);
00679  return 0;
00680 #endif
00681 }
00682 #endif //#ifndef TOLUA_DISABLE
00683 
00684 /* method: maxlenof_relative_soc of class  fawkes::BatteryInterface */
00685 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_relative_soc00
00686 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_relative_soc00(lua_State* tolua_S)
00687 {
00688 #ifndef TOLUA_RELEASE
00689  tolua_Error tolua_err;
00690  if (
00691      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00692      !tolua_isnoobj(tolua_S,2,&tolua_err)
00693  )
00694   goto tolua_lerror;
00695  else
00696 #endif
00697  {
00698   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00699 #ifndef TOLUA_RELEASE
00700   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'maxlenof_relative_soc'",NULL);
00701 #endif
00702   {
00703    int tolua_ret = (int)  self->maxlenof_relative_soc();
00704    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00705   }
00706  }
00707  return 1;
00708 #ifndef TOLUA_RELEASE
00709  tolua_lerror:
00710  tolua_error(tolua_S,"#ferror in function 'maxlenof_relative_soc'.",&tolua_err);
00711  return 0;
00712 #endif
00713 }
00714 #endif //#ifndef TOLUA_DISABLE
00715 
00716 /* method: oftype of class  fawkes::BatteryInterface */
00717 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_oftype00
00718 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_oftype00(lua_State* tolua_S)
00719 {
00720 #ifndef TOLUA_RELEASE
00721  tolua_Error tolua_err;
00722  if (
00723      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00724      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
00725      !tolua_isnoobj(tolua_S,3,&tolua_err)
00726  )
00727   goto tolua_lerror;
00728  else
00729 #endif
00730  {
00731   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00732   const char* interface_type = ((const char*)  tolua_tostring(tolua_S,2,0));
00733 #ifndef TOLUA_RELEASE
00734   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'oftype'",NULL);
00735 #endif
00736   {
00737    bool tolua_ret = (bool)  self->oftype(interface_type);
00738    tolua_pushboolean(tolua_S,(bool)tolua_ret);
00739   }
00740  }
00741  return 1;
00742 #ifndef TOLUA_RELEASE
00743  tolua_lerror:
00744  tolua_error(tolua_S,"#ferror in function 'oftype'.",&tolua_err);
00745  return 0;
00746 #endif
00747 }
00748 #endif //#ifndef TOLUA_DISABLE
00749 
00750 /* method: datachunk of class  fawkes::BatteryInterface */
00751 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_datachunk00
00752 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_datachunk00(lua_State* tolua_S)
00753 {
00754 #ifndef TOLUA_RELEASE
00755  tolua_Error tolua_err;
00756  if (
00757      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00758      !tolua_isnoobj(tolua_S,2,&tolua_err)
00759  )
00760   goto tolua_lerror;
00761  else
00762 #endif
00763  {
00764   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00765 #ifndef TOLUA_RELEASE
00766   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'datachunk'",NULL);
00767 #endif
00768   {
00769    const void* tolua_ret = (const void*)  self->datachunk();
00770    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
00771   }
00772  }
00773  return 1;
00774 #ifndef TOLUA_RELEASE
00775  tolua_lerror:
00776  tolua_error(tolua_S,"#ferror in function 'datachunk'.",&tolua_err);
00777  return 0;
00778 #endif
00779 }
00780 #endif //#ifndef TOLUA_DISABLE
00781 
00782 /* method: datasize of class  fawkes::BatteryInterface */
00783 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_datasize00
00784 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_datasize00(lua_State* tolua_S)
00785 {
00786 #ifndef TOLUA_RELEASE
00787  tolua_Error tolua_err;
00788  if (
00789      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00790      !tolua_isnoobj(tolua_S,2,&tolua_err)
00791  )
00792   goto tolua_lerror;
00793  else
00794 #endif
00795  {
00796   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00797 #ifndef TOLUA_RELEASE
00798   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'datasize'",NULL);
00799 #endif
00800   {
00801    unsigned int tolua_ret = (unsigned int)  self->datasize();
00802    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00803   }
00804  }
00805  return 1;
00806 #ifndef TOLUA_RELEASE
00807  tolua_lerror:
00808  tolua_error(tolua_S,"#ferror in function 'datasize'.",&tolua_err);
00809  return 0;
00810 #endif
00811 }
00812 #endif //#ifndef TOLUA_DISABLE
00813 
00814 /* method: type of class  fawkes::BatteryInterface */
00815 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_type00
00816 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_type00(lua_State* tolua_S)
00817 {
00818 #ifndef TOLUA_RELEASE
00819  tolua_Error tolua_err;
00820  if (
00821      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00822      !tolua_isnoobj(tolua_S,2,&tolua_err)
00823  )
00824   goto tolua_lerror;
00825  else
00826 #endif
00827  {
00828   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00829 #ifndef TOLUA_RELEASE
00830   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'type'",NULL);
00831 #endif
00832   {
00833    const char* tolua_ret = (const char*)  self->type();
00834    tolua_pushstring(tolua_S,(const char*)tolua_ret);
00835   }
00836  }
00837  return 1;
00838 #ifndef TOLUA_RELEASE
00839  tolua_lerror:
00840  tolua_error(tolua_S,"#ferror in function 'type'.",&tolua_err);
00841  return 0;
00842 #endif
00843 }
00844 #endif //#ifndef TOLUA_DISABLE
00845 
00846 /* method: id of class  fawkes::BatteryInterface */
00847 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_id00
00848 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_id00(lua_State* tolua_S)
00849 {
00850 #ifndef TOLUA_RELEASE
00851  tolua_Error tolua_err;
00852  if (
00853      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00854      !tolua_isnoobj(tolua_S,2,&tolua_err)
00855  )
00856   goto tolua_lerror;
00857  else
00858 #endif
00859  {
00860   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00861 #ifndef TOLUA_RELEASE
00862   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'id'",NULL);
00863 #endif
00864   {
00865    const char* tolua_ret = (const char*)  self->id();
00866    tolua_pushstring(tolua_S,(const char*)tolua_ret);
00867   }
00868  }
00869  return 1;
00870 #ifndef TOLUA_RELEASE
00871  tolua_lerror:
00872  tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
00873  return 0;
00874 #endif
00875 }
00876 #endif //#ifndef TOLUA_DISABLE
00877 
00878 /* method: uid of class  fawkes::BatteryInterface */
00879 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_uid00
00880 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_uid00(lua_State* tolua_S)
00881 {
00882 #ifndef TOLUA_RELEASE
00883  tolua_Error tolua_err;
00884  if (
00885      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00886      !tolua_isnoobj(tolua_S,2,&tolua_err)
00887  )
00888   goto tolua_lerror;
00889  else
00890 #endif
00891  {
00892   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00893 #ifndef TOLUA_RELEASE
00894   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'uid'",NULL);
00895 #endif
00896   {
00897    const char* tolua_ret = (const char*)  self->uid();
00898    tolua_pushstring(tolua_S,(const char*)tolua_ret);
00899   }
00900  }
00901  return 1;
00902 #ifndef TOLUA_RELEASE
00903  tolua_lerror:
00904  tolua_error(tolua_S,"#ferror in function 'uid'.",&tolua_err);
00905  return 0;
00906 #endif
00907 }
00908 #endif //#ifndef TOLUA_DISABLE
00909 
00910 /* method: serial of class  fawkes::BatteryInterface */
00911 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_serial00
00912 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_serial00(lua_State* tolua_S)
00913 {
00914 #ifndef TOLUA_RELEASE
00915  tolua_Error tolua_err;
00916  if (
00917      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00918      !tolua_isnoobj(tolua_S,2,&tolua_err)
00919  )
00920   goto tolua_lerror;
00921  else
00922 #endif
00923  {
00924   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00925 #ifndef TOLUA_RELEASE
00926   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'serial'",NULL);
00927 #endif
00928   {
00929    unsigned int tolua_ret = (unsigned int)  self->serial();
00930    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00931   }
00932  }
00933  return 1;
00934 #ifndef TOLUA_RELEASE
00935  tolua_lerror:
00936  tolua_error(tolua_S,"#ferror in function 'serial'.",&tolua_err);
00937  return 0;
00938 #endif
00939 }
00940 #endif //#ifndef TOLUA_DISABLE
00941 
00942 /* method: mem_serial of class  fawkes::BatteryInterface */
00943 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_mem_serial00
00944 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_mem_serial00(lua_State* tolua_S)
00945 {
00946 #ifndef TOLUA_RELEASE
00947  tolua_Error tolua_err;
00948  if (
00949      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00950      !tolua_isnoobj(tolua_S,2,&tolua_err)
00951  )
00952   goto tolua_lerror;
00953  else
00954 #endif
00955  {
00956   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00957 #ifndef TOLUA_RELEASE
00958   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'mem_serial'",NULL);
00959 #endif
00960   {
00961    unsigned int tolua_ret = (unsigned int)  self->mem_serial();
00962    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
00963   }
00964  }
00965  return 1;
00966 #ifndef TOLUA_RELEASE
00967  tolua_lerror:
00968  tolua_error(tolua_S,"#ferror in function 'mem_serial'.",&tolua_err);
00969  return 0;
00970 #endif
00971 }
00972 #endif //#ifndef TOLUA_DISABLE
00973 
00974 /* method: operator== of class  fawkes::BatteryInterface */
00975 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface__eq00
00976 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface__eq00(lua_State* tolua_S)
00977 {
00978 #ifndef TOLUA_RELEASE
00979  tolua_Error tolua_err;
00980  if (
00981      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
00982      !tolua_isusertype(tolua_S,2,"Interface",0,&tolua_err) ||
00983      !tolua_isnoobj(tolua_S,3,&tolua_err)
00984  )
00985   goto tolua_lerror;
00986  else
00987 #endif
00988  {
00989   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
00990   Interface* comp = ((Interface*)  tolua_tousertype(tolua_S,2,0));
00991 #ifndef TOLUA_RELEASE
00992   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='",NULL);
00993 #endif
00994   {
00995    bool tolua_ret = (bool)  self->operator==(*comp);
00996    tolua_pushboolean(tolua_S,(bool)tolua_ret);
00997   }
00998  }
00999  return 1;
01000 #ifndef TOLUA_RELEASE
01001  tolua_lerror:
01002  tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
01003  return 0;
01004 #endif
01005 }
01006 #endif //#ifndef TOLUA_DISABLE
01007 
01008 /* method: hash of class  fawkes::BatteryInterface */
01009 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash00
01010 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash00(lua_State* tolua_S)
01011 {
01012 #ifndef TOLUA_RELEASE
01013  tolua_Error tolua_err;
01014  if (
01015      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
01016      !tolua_isnoobj(tolua_S,2,&tolua_err)
01017  )
01018   goto tolua_lerror;
01019  else
01020 #endif
01021  {
01022   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01023 #ifndef TOLUA_RELEASE
01024   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'hash'",NULL);
01025 #endif
01026   {
01027    unsigned const char* tolua_ret = ( unsigned const char*)  self->hash();
01028    tolua_pushstring(tolua_S,(const char*)tolua_ret);
01029   }
01030  }
01031  return 1;
01032 #ifndef TOLUA_RELEASE
01033  tolua_lerror:
01034  tolua_error(tolua_S,"#ferror in function 'hash'.",&tolua_err);
01035  return 0;
01036 #endif
01037 }
01038 #endif //#ifndef TOLUA_DISABLE
01039 
01040 /* method: hash_size of class  fawkes::BatteryInterface */
01041 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash_size00
01042 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash_size00(lua_State* tolua_S)
01043 {
01044 #ifndef TOLUA_RELEASE
01045  tolua_Error tolua_err;
01046  if (
01047      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
01048      !tolua_isnoobj(tolua_S,2,&tolua_err)
01049  )
01050   goto tolua_lerror;
01051  else
01052 #endif
01053  {
01054   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01055 #ifndef TOLUA_RELEASE
01056   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'hash_size'",NULL);
01057 #endif
01058   {
01059    int tolua_ret = (int)  self->hash_size();
01060    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
01061   }
01062  }
01063  return 1;
01064 #ifndef TOLUA_RELEASE
01065  tolua_lerror:
01066  tolua_error(tolua_S,"#ferror in function 'hash_size'.",&tolua_err);
01067  return 0;
01068 #endif
01069 }
01070 #endif //#ifndef TOLUA_DISABLE
01071 
01072 /* method: hash_printable of class  fawkes::BatteryInterface */
01073 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash_printable00
01074 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash_printable00(lua_State* tolua_S)
01075 {
01076 #ifndef TOLUA_RELEASE
01077  tolua_Error tolua_err;
01078  if (
01079      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
01080      !tolua_isnoobj(tolua_S,2,&tolua_err)
01081  )
01082   goto tolua_lerror;
01083  else
01084 #endif
01085  {
01086   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01087 #ifndef TOLUA_RELEASE
01088   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'hash_printable'",NULL);
01089 #endif
01090   {
01091    const char* tolua_ret = (const char*)  self->hash_printable();
01092    tolua_pushstring(tolua_S,(const char*)tolua_ret);
01093   }
01094  }
01095  return 1;
01096 #ifndef TOLUA_RELEASE
01097  tolua_lerror:
01098  tolua_error(tolua_S,"#ferror in function 'hash_printable'.",&tolua_err);
01099  return 0;
01100 #endif
01101 }
01102 #endif //#ifndef TOLUA_DISABLE
01103 
01104 /* method: is_writer of class  fawkes::BatteryInterface */
01105 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_is_writer00
01106 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_is_writer00(lua_State* tolua_S)
01107 {
01108 #ifndef TOLUA_RELEASE
01109  tolua_Error tolua_err;
01110  if (
01111      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
01112      !tolua_isnoobj(tolua_S,2,&tolua_err)
01113  )
01114   goto tolua_lerror;
01115  else
01116 #endif
01117  {
01118   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01119 #ifndef TOLUA_RELEASE
01120   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'is_writer'",NULL);
01121 #endif
01122   {
01123    bool tolua_ret = (bool)  self->is_writer();
01124    tolua_pushboolean(tolua_S,(bool)tolua_ret);
01125   }
01126  }
01127  return 1;
01128 #ifndef TOLUA_RELEASE
01129  tolua_lerror:
01130  tolua_error(tolua_S,"#ferror in function 'is_writer'.",&tolua_err);
01131  return 0;
01132 #endif
01133 }
01134 #endif //#ifndef TOLUA_DISABLE
01135 
01136 /* method: set_from_chunk of class  fawkes::BatteryInterface */
01137 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_from_chunk00
01138 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_from_chunk00(lua_State* tolua_S)
01139 {
01140 #ifndef TOLUA_RELEASE
01141  tolua_Error tolua_err;
01142  if (
01143      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01144      !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
01145      !tolua_isnoobj(tolua_S,3,&tolua_err)
01146  )
01147   goto tolua_lerror;
01148  else
01149 #endif
01150  {
01151   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01152   void* chunk = ((void*)  tolua_touserdata(tolua_S,2,0));
01153 #ifndef TOLUA_RELEASE
01154   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_from_chunk'",NULL);
01155 #endif
01156   {
01157    self->set_from_chunk(chunk);
01158   }
01159  }
01160  return 0;
01161 #ifndef TOLUA_RELEASE
01162  tolua_lerror:
01163  tolua_error(tolua_S,"#ferror in function 'set_from_chunk'.",&tolua_err);
01164  return 0;
01165 #endif
01166 }
01167 #endif //#ifndef TOLUA_DISABLE
01168 
01169 /* method: create_message of class  fawkes::BatteryInterface */
01170 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_create_message00
01171 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_create_message00(lua_State* tolua_S)
01172 {
01173 #ifndef TOLUA_RELEASE
01174  tolua_Error tolua_err;
01175  if (
01176      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
01177      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
01178      !tolua_isnoobj(tolua_S,3,&tolua_err)
01179  )
01180   goto tolua_lerror;
01181  else
01182 #endif
01183  {
01184   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01185   const char* type = ((const char*)  tolua_tostring(tolua_S,2,0));
01186 #ifndef TOLUA_RELEASE
01187   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'create_message'",NULL);
01188 #endif
01189   {
01190    Message* tolua_ret = (Message*)  self->create_message(type);
01191    tolua_pushusertype(tolua_S,(void*)tolua_ret,"Message");
01192   }
01193  }
01194  return 1;
01195 #ifndef TOLUA_RELEASE
01196  tolua_lerror:
01197  tolua_error(tolua_S,"#ferror in function 'create_message'.",&tolua_err);
01198  return 0;
01199 #endif
01200 }
01201 #endif //#ifndef TOLUA_DISABLE
01202 
01203 /* method: read of class  fawkes::BatteryInterface */
01204 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_read00
01205 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_read00(lua_State* tolua_S)
01206 {
01207 #ifndef TOLUA_RELEASE
01208  tolua_Error tolua_err;
01209  if (
01210      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01211      !tolua_isnoobj(tolua_S,2,&tolua_err)
01212  )
01213   goto tolua_lerror;
01214  else
01215 #endif
01216  {
01217   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01218 #ifndef TOLUA_RELEASE
01219   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'read'",NULL);
01220 #endif
01221   {
01222    self->read();
01223   }
01224  }
01225  return 0;
01226 #ifndef TOLUA_RELEASE
01227  tolua_lerror:
01228  tolua_error(tolua_S,"#ferror in function 'read'.",&tolua_err);
01229  return 0;
01230 #endif
01231 }
01232 #endif //#ifndef TOLUA_DISABLE
01233 
01234 /* method: write of class  fawkes::BatteryInterface */
01235 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_write00
01236 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_write00(lua_State* tolua_S)
01237 {
01238 #ifndef TOLUA_RELEASE
01239  tolua_Error tolua_err;
01240  if (
01241      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01242      !tolua_isnoobj(tolua_S,2,&tolua_err)
01243  )
01244   goto tolua_lerror;
01245  else
01246 #endif
01247  {
01248   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01249 #ifndef TOLUA_RELEASE
01250   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'write'",NULL);
01251 #endif
01252   {
01253    self->write();
01254   }
01255  }
01256  return 0;
01257 #ifndef TOLUA_RELEASE
01258  tolua_lerror:
01259  tolua_error(tolua_S,"#ferror in function 'write'.",&tolua_err);
01260  return 0;
01261 #endif
01262 }
01263 #endif //#ifndef TOLUA_DISABLE
01264 
01265 /* method: has_writer of class  fawkes::BatteryInterface */
01266 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_has_writer00
01267 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_has_writer00(lua_State* tolua_S)
01268 {
01269 #ifndef TOLUA_RELEASE
01270  tolua_Error tolua_err;
01271  if (
01272      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
01273      !tolua_isnoobj(tolua_S,2,&tolua_err)
01274  )
01275   goto tolua_lerror;
01276  else
01277 #endif
01278  {
01279   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01280 #ifndef TOLUA_RELEASE
01281   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'has_writer'",NULL);
01282 #endif
01283   {
01284    bool tolua_ret = (bool)  self->has_writer();
01285    tolua_pushboolean(tolua_S,(bool)tolua_ret);
01286   }
01287  }
01288  return 1;
01289 #ifndef TOLUA_RELEASE
01290  tolua_lerror:
01291  tolua_error(tolua_S,"#ferror in function 'has_writer'.",&tolua_err);
01292  return 0;
01293 #endif
01294 }
01295 #endif //#ifndef TOLUA_DISABLE
01296 
01297 /* method: num_readers of class  fawkes::BatteryInterface */
01298 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_num_readers00
01299 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_num_readers00(lua_State* tolua_S)
01300 {
01301 #ifndef TOLUA_RELEASE
01302  tolua_Error tolua_err;
01303  if (
01304      !tolua_isusertype(tolua_S,1,"const fawkes::BatteryInterface",0,&tolua_err) ||
01305      !tolua_isnoobj(tolua_S,2,&tolua_err)
01306  )
01307   goto tolua_lerror;
01308  else
01309 #endif
01310  {
01311   const fawkes::BatteryInterface* self = (const fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01312 #ifndef TOLUA_RELEASE
01313   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'num_readers'",NULL);
01314 #endif
01315   {
01316    unsigned int tolua_ret = (unsigned int)  self->num_readers();
01317    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
01318   }
01319  }
01320  return 1;
01321 #ifndef TOLUA_RELEASE
01322  tolua_lerror:
01323  tolua_error(tolua_S,"#ferror in function 'num_readers'.",&tolua_err);
01324  return 0;
01325 #endif
01326 }
01327 #endif //#ifndef TOLUA_DISABLE
01328 
01329 /* method: msgq_enqueue_copy of class  fawkes::BatteryInterface */
01330 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_enqueue_copy00
01331 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_enqueue_copy00(lua_State* tolua_S)
01332 {
01333 #ifndef TOLUA_RELEASE
01334  tolua_Error tolua_err;
01335  if (
01336      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01337      !tolua_isusertype(tolua_S,2,"Message",0,&tolua_err) ||
01338      !tolua_isnoobj(tolua_S,3,&tolua_err)
01339  )
01340   goto tolua_lerror;
01341  else
01342 #endif
01343  {
01344   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01345   Message* message = ((Message*)  tolua_tousertype(tolua_S,2,0));
01346 #ifndef TOLUA_RELEASE
01347   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_enqueue_copy'",NULL);
01348 #endif
01349   {
01350    unsigned int tolua_ret = (unsigned int)  self->msgq_enqueue_copy(message);
01351    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
01352   }
01353  }
01354  return 1;
01355 #ifndef TOLUA_RELEASE
01356  tolua_lerror:
01357  tolua_error(tolua_S,"#ferror in function 'msgq_enqueue_copy'.",&tolua_err);
01358  return 0;
01359 #endif
01360 }
01361 #endif //#ifndef TOLUA_DISABLE
01362 
01363 /* method: msgq_remove of class  fawkes::BatteryInterface */
01364 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_remove00
01365 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_remove00(lua_State* tolua_S)
01366 {
01367 #ifndef TOLUA_RELEASE
01368  tolua_Error tolua_err;
01369  if (
01370      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01371      !tolua_isusertype(tolua_S,2,"Message",0,&tolua_err) ||
01372      !tolua_isnoobj(tolua_S,3,&tolua_err)
01373  )
01374   goto tolua_lerror;
01375  else
01376 #endif
01377  {
01378   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01379   Message* message = ((Message*)  tolua_tousertype(tolua_S,2,0));
01380 #ifndef TOLUA_RELEASE
01381   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_remove'",NULL);
01382 #endif
01383   {
01384    self->msgq_remove(message);
01385   }
01386  }
01387  return 0;
01388 #ifndef TOLUA_RELEASE
01389  tolua_lerror:
01390  tolua_error(tolua_S,"#ferror in function 'msgq_remove'.",&tolua_err);
01391  return 0;
01392 #endif
01393 }
01394 #endif //#ifndef TOLUA_DISABLE
01395 
01396 /* method: msgq_remove of class  fawkes::BatteryInterface */
01397 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_remove01
01398 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_remove01(lua_State* tolua_S)
01399 {
01400  tolua_Error tolua_err;
01401  if (
01402      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01403      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
01404      !tolua_isnoobj(tolua_S,3,&tolua_err)
01405  )
01406   goto tolua_lerror;
01407  else
01408  {
01409   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01410   unsigned int message_id = ((unsigned int)  tolua_tonumber(tolua_S,2,0));
01411 #ifndef TOLUA_RELEASE
01412   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_remove'",NULL);
01413 #endif
01414   {
01415    self->msgq_remove(message_id);
01416   }
01417  }
01418  return 0;
01419 tolua_lerror:
01420  return tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_remove00(tolua_S);
01421 }
01422 #endif //#ifndef TOLUA_DISABLE
01423 
01424 /* method: msgq_size of class  fawkes::BatteryInterface */
01425 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_size00
01426 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_size00(lua_State* tolua_S)
01427 {
01428 #ifndef TOLUA_RELEASE
01429  tolua_Error tolua_err;
01430  if (
01431      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01432      !tolua_isnoobj(tolua_S,2,&tolua_err)
01433  )
01434   goto tolua_lerror;
01435  else
01436 #endif
01437  {
01438   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01439 #ifndef TOLUA_RELEASE
01440   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_size'",NULL);
01441 #endif
01442   {
01443    unsigned int tolua_ret = (unsigned int)  self->msgq_size();
01444    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
01445   }
01446  }
01447  return 1;
01448 #ifndef TOLUA_RELEASE
01449  tolua_lerror:
01450  tolua_error(tolua_S,"#ferror in function 'msgq_size'.",&tolua_err);
01451  return 0;
01452 #endif
01453 }
01454 #endif //#ifndef TOLUA_DISABLE
01455 
01456 /* method: msgq_flush of class  fawkes::BatteryInterface */
01457 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_flush00
01458 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_flush00(lua_State* tolua_S)
01459 {
01460 #ifndef TOLUA_RELEASE
01461  tolua_Error tolua_err;
01462  if (
01463      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01464      !tolua_isnoobj(tolua_S,2,&tolua_err)
01465  )
01466   goto tolua_lerror;
01467  else
01468 #endif
01469  {
01470   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01471 #ifndef TOLUA_RELEASE
01472   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_flush'",NULL);
01473 #endif
01474   {
01475    self->msgq_flush();
01476   }
01477  }
01478  return 0;
01479 #ifndef TOLUA_RELEASE
01480  tolua_lerror:
01481  tolua_error(tolua_S,"#ferror in function 'msgq_flush'.",&tolua_err);
01482  return 0;
01483 #endif
01484 }
01485 #endif //#ifndef TOLUA_DISABLE
01486 
01487 /* method: msgq_lock of class  fawkes::BatteryInterface */
01488 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_lock00
01489 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_lock00(lua_State* tolua_S)
01490 {
01491 #ifndef TOLUA_RELEASE
01492  tolua_Error tolua_err;
01493  if (
01494      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01495      !tolua_isnoobj(tolua_S,2,&tolua_err)
01496  )
01497   goto tolua_lerror;
01498  else
01499 #endif
01500  {
01501   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01502 #ifndef TOLUA_RELEASE
01503   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_lock'",NULL);
01504 #endif
01505   {
01506    self->msgq_lock();
01507   }
01508  }
01509  return 0;
01510 #ifndef TOLUA_RELEASE
01511  tolua_lerror:
01512  tolua_error(tolua_S,"#ferror in function 'msgq_lock'.",&tolua_err);
01513  return 0;
01514 #endif
01515 }
01516 #endif //#ifndef TOLUA_DISABLE
01517 
01518 /* method: msgq_try_lock of class  fawkes::BatteryInterface */
01519 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_try_lock00
01520 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_try_lock00(lua_State* tolua_S)
01521 {
01522 #ifndef TOLUA_RELEASE
01523  tolua_Error tolua_err;
01524  if (
01525      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01526      !tolua_isnoobj(tolua_S,2,&tolua_err)
01527  )
01528   goto tolua_lerror;
01529  else
01530 #endif
01531  {
01532   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01533 #ifndef TOLUA_RELEASE
01534   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_try_lock'",NULL);
01535 #endif
01536   {
01537    bool tolua_ret = (bool)  self->msgq_try_lock();
01538    tolua_pushboolean(tolua_S,(bool)tolua_ret);
01539   }
01540  }
01541  return 1;
01542 #ifndef TOLUA_RELEASE
01543  tolua_lerror:
01544  tolua_error(tolua_S,"#ferror in function 'msgq_try_lock'.",&tolua_err);
01545  return 0;
01546 #endif
01547 }
01548 #endif //#ifndef TOLUA_DISABLE
01549 
01550 /* method: msgq_unlock of class  fawkes::BatteryInterface */
01551 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_unlock00
01552 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_unlock00(lua_State* tolua_S)
01553 {
01554 #ifndef TOLUA_RELEASE
01555  tolua_Error tolua_err;
01556  if (
01557      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01558      !tolua_isnoobj(tolua_S,2,&tolua_err)
01559  )
01560   goto tolua_lerror;
01561  else
01562 #endif
01563  {
01564   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01565 #ifndef TOLUA_RELEASE
01566   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_unlock'",NULL);
01567 #endif
01568   {
01569    self->msgq_unlock();
01570   }
01571  }
01572  return 0;
01573 #ifndef TOLUA_RELEASE
01574  tolua_lerror:
01575  tolua_error(tolua_S,"#ferror in function 'msgq_unlock'.",&tolua_err);
01576  return 0;
01577 #endif
01578 }
01579 #endif //#ifndef TOLUA_DISABLE
01580 
01581 /* method: msgq_pop of class  fawkes::BatteryInterface */
01582 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_pop00
01583 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_pop00(lua_State* tolua_S)
01584 {
01585 #ifndef TOLUA_RELEASE
01586  tolua_Error tolua_err;
01587  if (
01588      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01589      !tolua_isnoobj(tolua_S,2,&tolua_err)
01590  )
01591   goto tolua_lerror;
01592  else
01593 #endif
01594  {
01595   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01596 #ifndef TOLUA_RELEASE
01597   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_pop'",NULL);
01598 #endif
01599   {
01600    self->msgq_pop();
01601   }
01602  }
01603  return 0;
01604 #ifndef TOLUA_RELEASE
01605  tolua_lerror:
01606  tolua_error(tolua_S,"#ferror in function 'msgq_pop'.",&tolua_err);
01607  return 0;
01608 #endif
01609 }
01610 #endif //#ifndef TOLUA_DISABLE
01611 
01612 /* method: msgq_first of class  fawkes::BatteryInterface */
01613 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_first00
01614 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_first00(lua_State* tolua_S)
01615 {
01616 #ifndef TOLUA_RELEASE
01617  tolua_Error tolua_err;
01618  if (
01619      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01620      !tolua_isnoobj(tolua_S,2,&tolua_err)
01621  )
01622   goto tolua_lerror;
01623  else
01624 #endif
01625  {
01626   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01627 #ifndef TOLUA_RELEASE
01628   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_first'",NULL);
01629 #endif
01630   {
01631    Message* tolua_ret = (Message*)  self->msgq_first();
01632    tolua_pushusertype(tolua_S,(void*)tolua_ret,"Message");
01633   }
01634  }
01635  return 1;
01636 #ifndef TOLUA_RELEASE
01637  tolua_lerror:
01638  tolua_error(tolua_S,"#ferror in function 'msgq_first'.",&tolua_err);
01639  return 0;
01640 #endif
01641 }
01642 #endif //#ifndef TOLUA_DISABLE
01643 
01644 /* method: msgq_empty of class  fawkes::BatteryInterface */
01645 #ifndef TOLUA_DISABLE_tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_empty00
01646 static int tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_empty00(lua_State* tolua_S)
01647 {
01648 #ifndef TOLUA_RELEASE
01649  tolua_Error tolua_err;
01650  if (
01651      !tolua_isusertype(tolua_S,1,"fawkes::BatteryInterface",0,&tolua_err) ||
01652      !tolua_isnoobj(tolua_S,2,&tolua_err)
01653  )
01654   goto tolua_lerror;
01655  else
01656 #endif
01657  {
01658   fawkes::BatteryInterface* self = (fawkes::BatteryInterface*)  tolua_tousertype(tolua_S,1,0);
01659 #ifndef TOLUA_RELEASE
01660   if (!self) tolua_error(tolua_S,"invalid 'self' in function 'msgq_empty'",NULL);
01661 #endif
01662   {
01663    bool tolua_ret = (bool)  self->msgq_empty();
01664    tolua_pushboolean(tolua_S,(bool)tolua_ret);
01665   }
01666  }
01667  return 1;
01668 #ifndef TOLUA_RELEASE
01669  tolua_lerror:
01670  tolua_error(tolua_S,"#ferror in function 'msgq_empty'.",&tolua_err);
01671  return 0;
01672 #endif
01673 }
01674 #endif //#ifndef TOLUA_DISABLE
01675 
01676 /* Open function */
01677 TOLUA_API int tolua_interfaces_BatteryInterface_open (lua_State* tolua_S)
01678 {
01679  tolua_open(tolua_S);
01680  tolua_reg_types(tolua_S);
01681  tolua_module(tolua_S,NULL,0);
01682  tolua_beginmodule(tolua_S,NULL);
01683   tolua_module(tolua_S,"fawkes",0);
01684   tolua_beginmodule(tolua_S,"fawkes");
01685    tolua_cclass(tolua_S,"BatteryInterface","fawkes::BatteryInterface","Interface",NULL);
01686    tolua_beginmodule(tolua_S,"BatteryInterface");
01687     #ifdef __cplusplus
01688     tolua_cclass(tolua_S,"PushButtonMessage","fawkes::BatteryInterface::PushButtonMessage","Message",tolua_collect_fawkes__BatteryInterface__PushButtonMessage);
01689     #else
01690     tolua_cclass(tolua_S,"PushButtonMessage","fawkes::BatteryInterface::PushButtonMessage","Message",NULL);
01691     #endif
01692     tolua_beginmodule(tolua_S,"PushButtonMessage");
01693      tolua_function(tolua_S,"new",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_new00);
01694      tolua_function(tolua_S,"new_local",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_new00_local);
01695      tolua_function(tolua_S,".call",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_new00_local);
01696      tolua_function(tolua_S,"delete",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_PushButtonMessage_delete00);
01697     tolua_endmodule(tolua_S);
01698     #ifdef __cplusplus
01699     tolua_cclass(tolua_S,"SleepMessage","fawkes::BatteryInterface::SleepMessage","Message",tolua_collect_fawkes__BatteryInterface__SleepMessage);
01700     #else
01701     tolua_cclass(tolua_S,"SleepMessage","fawkes::BatteryInterface::SleepMessage","Message",NULL);
01702     #endif
01703     tolua_beginmodule(tolua_S,"SleepMessage");
01704      tolua_function(tolua_S,"new",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_new00);
01705      tolua_function(tolua_S,"new_local",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_new00_local);
01706      tolua_function(tolua_S,".call",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_new00_local);
01707      tolua_function(tolua_S,"delete",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_SleepMessage_delete00);
01708     tolua_endmodule(tolua_S);
01709     tolua_function(tolua_S,"current",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_current00);
01710     tolua_function(tolua_S,"set_current",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_current00);
01711     tolua_function(tolua_S,"maxlenof_current",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_current00);
01712     tolua_function(tolua_S,"voltage",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_voltage00);
01713     tolua_function(tolua_S,"set_voltage",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_voltage00);
01714     tolua_function(tolua_S,"maxlenof_voltage",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_voltage00);
01715     tolua_function(tolua_S,"temperature",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_temperature00);
01716     tolua_function(tolua_S,"set_temperature",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_temperature00);
01717     tolua_function(tolua_S,"maxlenof_temperature",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_temperature00);
01718     tolua_function(tolua_S,"absolute_soc",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_absolute_soc00);
01719     tolua_function(tolua_S,"set_absolute_soc",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_absolute_soc00);
01720     tolua_function(tolua_S,"maxlenof_absolute_soc",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_absolute_soc00);
01721     tolua_function(tolua_S,"relative_soc",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_relative_soc00);
01722     tolua_function(tolua_S,"set_relative_soc",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_relative_soc00);
01723     tolua_function(tolua_S,"maxlenof_relative_soc",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_maxlenof_relative_soc00);
01724     tolua_function(tolua_S,"oftype",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_oftype00);
01725     tolua_function(tolua_S,"datachunk",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_datachunk00);
01726     tolua_function(tolua_S,"datasize",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_datasize00);
01727     tolua_function(tolua_S,"type",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_type00);
01728     tolua_function(tolua_S,"id",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_id00);
01729     tolua_function(tolua_S,"uid",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_uid00);
01730     tolua_function(tolua_S,"serial",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_serial00);
01731     tolua_function(tolua_S,"mem_serial",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_mem_serial00);
01732     tolua_function(tolua_S,".eq",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface__eq00);
01733     tolua_function(tolua_S,"hash",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash00);
01734     tolua_function(tolua_S,"hash_size",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash_size00);
01735     tolua_function(tolua_S,"hash_printable",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_hash_printable00);
01736     tolua_function(tolua_S,"is_writer",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_is_writer00);
01737     tolua_function(tolua_S,"set_from_chunk",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_set_from_chunk00);
01738     tolua_function(tolua_S,"create_message",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_create_message00);
01739     tolua_function(tolua_S,"read",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_read00);
01740     tolua_function(tolua_S,"write",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_write00);
01741     tolua_function(tolua_S,"has_writer",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_has_writer00);
01742     tolua_function(tolua_S,"num_readers",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_num_readers00);
01743     tolua_function(tolua_S,"msgq_enqueue_copy",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_enqueue_copy00);
01744     tolua_function(tolua_S,"msgq_remove",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_remove00);
01745     tolua_function(tolua_S,"msgq_remove",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_remove01);
01746     tolua_function(tolua_S,"msgq_size",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_size00);
01747     tolua_function(tolua_S,"msgq_flush",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_flush00);
01748     tolua_function(tolua_S,"msgq_lock",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_lock00);
01749     tolua_function(tolua_S,"msgq_try_lock",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_try_lock00);
01750     tolua_function(tolua_S,"msgq_unlock",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_unlock00);
01751     tolua_function(tolua_S,"msgq_pop",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_pop00);
01752     tolua_function(tolua_S,"msgq_first",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_first00);
01753     tolua_function(tolua_S,"msgq_empty",tolua_interfaces_BatteryInterface_fawkes_BatteryInterface_msgq_empty00);
01754    tolua_endmodule(tolua_S);
01755   tolua_endmodule(tolua_S);
01756  tolua_endmodule(tolua_S);
01757  return 1;
01758 }
01759
01760
01761 extern "C" {
01762 #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
01763  TOLUA_API int luaopen_interfaces_BatteryInterface (lua_State* tolua_S) {
01764  return tolua_interfaces_BatteryInterface_open(tolua_S);
01765 };
01766 #endif
01767 }
01768
01769