traintastic/server/src/lua/object/cbusinterface.hpp
Reinder Feenstra 222c219fb7
Einige Prüfungen sind fehlgeschlagen
Build / client macos-15-arm64 (push) Has been cancelled
Build / client macos-15-intel (push) Has been cancelled
Build / client ubuntu_24.04 (push) Has been cancelled
Build / client ubuntu_24.04_arm64 (push) Has been cancelled
Build / client raspberrypios_arm64 (push) Has been cancelled
Build / client raspberrypios_arm7 (push) Has been cancelled
Build / client windows_x64_msvc (push) Has been cancelled
Build / server ubuntu_24.04 (debug+ccov) (push) Has been cancelled
Build / server macos-15-arm64 (push) Has been cancelled
Build / server macos-15-intel (push) Has been cancelled
Build / server raspberrypios_arm64 (push) Has been cancelled
Build / server raspberrypios_arm7 (push) Has been cancelled
Build / server ubuntu_24.04 (push) Has been cancelled
Build / server ubuntu_24.04_arm64 (push) Has been cancelled
Build / server windows_x64_clang (push) Has been cancelled
Build / language files (push) Has been cancelled
Build / manual (push) Has been cancelled
Build / Update contributers in README.md (push) Has been cancelled
Build / shared data raspberrypios_10 (push) Has been cancelled
Build / shared data ubuntu_24.04 (push) Has been cancelled
Build / package innosetup (push) Has been cancelled
Build / Deploy to website (push) Has been cancelled
[cbus] added Lua support for sending CBUS/VLCB message and DCC commands
2026-02-21 16:21:28 +01:00

49 Zeilen
1.4 KiB
C++

/**
* This file is part of Traintastic,
* see <https://github.com/traintastic/traintastic>.
*
* Copyright (C) 2026 Reinder Feenstra
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef TRAINTASTIC_SERVER_LUA_OBJECT_CBUSINTERFACE_HPP
#define TRAINTASTIC_SERVER_LUA_OBJECT_CBUSINTERFACE_HPP
#include <lua.hpp>
#include "../../hardware/interface/cbusinterface.hpp"
namespace Lua::Object {
class CBUSInterface
{
private:
static int __index(lua_State* L);
static int send(lua_State* L);
static int send_dcc(lua_State* L);
public:
static constexpr char const* metaTableName = "object.interface.cbus";
static void registerType(lua_State* L);
static int index(lua_State* L, ::CBUSInterface& object);
};
}
#endif