Commit ed82ce62 authored by Pavel Vainerman's avatar Pavel Vainerman

first version for new codegen. Use "node" from xxx.src.xml

parent bbb57a25
#noinst_PROGRAMS = test
#test_LDADD = $(top_builddir)/lib/libUniSet.la
#test_SOURCES = TestGen_SK.cc TestGen.cc TestGen-main.cc
noinst_PROGRAMS = test
test_LDADD = $(top_builddir)/lib/libUniSet.la
test_SOURCES = TestGen_SK.cc TestGen.cc TestGen-main.cc
TestGen_SK.cc: @PACKAGE@-codegen testgen.src.xml
chmod 'a+x' @PACKAGE@-codegen
./uniset-codegen --local-include -l --ask -n TestGen testgen.src.xml
TestGen_SK.cc: ../@PACKAGE@-codegen testgen.src.xml ../*.xsl
chmod 'a+x' ../@PACKAGE@-codegen
./testgen.sh
clean-local:
rm -rf *_SK.cc *_SK.h *-main.cc
\ No newline at end of file
// $Id$
#include <uniset/Exceptions.h>
#include "TestGen.h"
// -----------------------------------------------------------------------------
using namespace std;
using namespace UniSetTypes;
// -----------------------------------------------------------------------------
TestGen::TestGen( UniSetTypes::ObjectId id, xmlNode* confnode ):
TestGen_SK( id, confnode )
{
}
// -----------------------------------------------------------------------------
TestGen::~TestGen()
{
}
// -----------------------------------------------------------------------------
TestGen::TestGen()
{
cerr << ": init failed!!!!!!!!!!!!!!!"<< endl;
throw Exception();
}
// -----------------------------------------------------------------------------
void TestGen::step()
{
cout << "input2 state=" << in_input2_s;
}
// -----------------------------------------------------------------------------
void TestGen::sensorInfo( SensorMessage *sm )
{
if( sm->id == input1_s )
out_output1_c = in_input1_s; // sm->state
}
// -----------------------------------------------------------------------------
void TestGen::timerInfo( TimerMessage *tm )
{
}
// -----------------------------------------------------------------------------
void TestGen::sigterm( int signo )
{
TestGen_SK::sigterm(signo);
}
// -----------------------------------------------------------------------------
// $Id$
// -----------------------------------------------------------------------------
#ifndef TestGen_H_
#define TestGen_H_
// -----------------------------------------------------------------------------
#include "TestGen_SK.h"
// -----------------------------------------------------------------------------
class TestGen:
public TestGen_SK
{
public:
TestGen( UniSetTypes::ObjectId id, xmlNode* confnode = UniSetTypes::conf->getNode("TestGen") );
virtual ~TestGen();
protected:
TestGen();
virtual void step();
void sensorInfo( UniSetTypes::SensorMessage *sm );
void timerInfo( UniSetTypes::TimerMessage *tm );
virtual void sigterm( int signo );
private:
};
// -----------------------------------------------------------------------------
#endif // TestGen_H_
// -----------------------------------------------------------------------------
#!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh
ln -s -f ../../../conf/test.xml test.xml
#!/bin/sh
ulimit -Sc 1000000
uniset-start.sh -f ./test --name TestProc --confile test.xml --unideb-add-levels info,crit,warn,level1,level8 \
--sm-ready-timeout 5000
#info,warn,crit,system,level9 > 1.log
#--c-filter-field cfilter --c-filter-value test1 --s-filter-field io --s-filter-value 1
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