Added support for time scheduled lua scripts

This commit is contained in:
2020-11-24 20:08:01 +01:00
parent 2cb0fd1fed
commit e562540313
8 changed files with 131 additions and 8 deletions

View File

@@ -11,6 +11,7 @@ extern "C"
#include <vector>
#include <string>
#include "Service.h"
#include <ctime>
//Functions for LUA
int thrawn_log(lua_State* lua);
@@ -19,6 +20,8 @@ int thrawn_register_service(lua_State* lua);
int thrawn_subscribe(lua_State* lua);
int thrawn_schedule(lua_State* lua);
int thrawn_publish(lua_State* lua);
int thrawn_create_topic_state(lua_State* lua);
@@ -34,6 +37,8 @@ void call_thrawn_on_start(LuaService& service);
void call_thrawn_on_update(LuaService& service, TopicState state);
void call_thrawn_on_schedule(LuaService& service, std::time_t now, const std::string& callback);
//Database logging
int thrawn_log_light(lua_State* lua);