Taskolib  1.3.3
Namespaces | Functions
lua_details.h File Reference

Detailed Description

Declaration of free functions dealing with Lua specifics.

Author
Lars Fröhlich, Marcus Walla
Date
Created on June 15, 2022

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the license, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

#include <chrono>
#include <functional>
#include <string>
#include <variant>
#include "sol/sol.hpp"
#include "taskolib/CommChannel.h"
#include "taskolib/Context.h"
#include "taskolib/TimeoutTrigger.h"
Include dependency graph for lua_details.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 task
 Namespace task contains all Taskolib functions and classes.
 

Functions

void task::abort_script_with_error (lua_State *lua_state, const std::string &msg)
 
void task::check_immediate_termination_request (lua_State *lua_state)
 
void task::check_script_timeout (lua_State *lua_state)
 
CommChannel * task::get_comm_channel_ptr_from_registry (lua_State *lua_state)
 Retrieve a pointer to the used CommChannel from the Lua registry. More...
 
const Context & task::get_context_from_registry (lua_State *lua_state)
 Retrieve a reference to the used Context from the Lua registry. More...
 
OptionalStepIndex task::get_step_idx_from_registry (lua_State *lua_state)
 Get the index of the currently executed Step from the Lua registry. More...
 
LuaInteger task::get_ms_since_epoch (TimePoint t0, std::chrono::milliseconds dt)
 
void task::hook_abort_with_error (lua_State *lua_state, lua_Debug *)
 
void task::hook_check_timeout_and_termination_request (lua_State *lua_state, lua_Debug *)
 
void task::install_custom_commands (sol::state &lua)
 Install implementations for some custom functions in the given Lua state. More...
 
void task::install_timeout_and_termination_request_hook (sol::state &lua, TimePoint now, std::chrono::milliseconds timeout, OptionalStepIndex step_idx, const Context &context, CommChannel *comm_channel, TimeoutTrigger *sequence_timeout)
 
void task::open_safe_library_subset (sol::state &lua)
 
void task::print_fct (sol::this_state sol, sol::variadic_args va)
 
void task::sleep_fct (double seconds, sol::this_state sol)