Commit 27713cdb authored by jdelange's avatar jdelange

* po-hi-c/include/po_hi_lua.h

   po-hi-c/src/po_hi_lua.c
   - First implementation of LUA to load files

 * po-hi-c/src/Makefile.am
   po-hi-c/include/Makefile.am
   - Put the LUA subsystem to be included in PolyORB-HI-C distribution

 * po-hi-c/share/make/Makefile.common
   - Build the LUA binaries



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@3663 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 145cf9c5
......@@ -8,6 +8,7 @@ EXTRA_DIST = $(srcdir)/po_hi_common.h \
$(srcdir)/po_hi_returns.h \
$(srcdir)/po_hi_gqueue.h \
$(srcdir)/po_hi_monitor.h \
$(srcdir)/po_hi_lua.h \
$(srcdir)/po_hi_storage.h \
$(srcdir)/po_hi_giop.h \
$(srcdir)/po_hi_utils.h \
......
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* For more informations, please visit http://www.assert-online.net/taste
*
* Copyright (C) 2012, European Space Agency (ESA)
*/
#ifndef __PO_HI_LUA_H__
#define __PO_HI_LUA_H__
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <po_hi_returns.h>
#ifdef TARGET_NATIVE
#include <lua5.1/lua.h>
#include <lua5.1/lualib.h>
#include <lua5.1/lauxlib.h>
#endif
int __po_hi_lua_load (const char*, const char*);
#endif
......@@ -85,6 +85,7 @@ ifeq ($(NEED_TRANSPORT), yes)
po_hi_messages.o \
po_hi_marshallers.o \
po_hi_giop.o \
po_hi_lua.o \
po_hi_utils.o \
po_hi_types.o \
po_hi_monitor.o \
......@@ -124,6 +125,7 @@ else
po_hi_task.o \
po_hi_time.o \
po_hi_utils.o \
po_hi_lua.o \
po_hi_protected.o \
po_hi_monitor.o \
po_hi_storage.o \
......
......@@ -8,6 +8,7 @@ C_FILES = $(srcdir)/po_hi_task.c \
$(srcdir)/po_hi_monitor.c \
$(srcdir)/po_hi_gqueue.c \
$(srcdir)/po_hi_giop.c \
$(srcdir)/po_hi_lua.c \
$(srcdir)/po_hi_protected.c \
$(srcdir)/po_hi_transport.c \
$(srcdir)/po_hi_storage.c \
......
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* For more informations, please visit http://www.assert-online.net/taste
*
* Copyright (C) 2012, European Space Agency (ESA)
*/
#include <po_hi_lua.h>
int __po_hi_lua_load (const char* filename, const char* functionname)
{
#ifdef TARGET_NATIVE
lua_State * state;
state = lua_open();
luaL_openlibs(state);
if (luaL_dofile (state,filename) != 0)
{
return __PO_HI_INVALID;
}
#endif
return __PO_HI_SUCCESS;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment