Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
ed82ce62
Commit
ed82ce62
authored
Mar 11, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first version for new codegen. Use "node" from xxx.src.xml
parent
bbb57a25
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
6 deletions
+91
-6
Makefile.am
Utilities/codegen/tests/Makefile.am
+7
-6
TestGen.cc
Utilities/codegen/tests/TestGen.cc
+43
-0
TestGen.h
Utilities/codegen/tests/TestGen.h
+28
-0
create_links.sh
Utilities/codegen/tests/create_links.sh
+4
-0
start_fg.sh
Utilities/codegen/tests/start_fg.sh
+9
-0
No files found.
Utilities/codegen/tests/Makefile.am
View file @
ed82ce62
#
noinst_PROGRAMS = test
noinst_PROGRAMS
=
test
#
test_LDADD = $(top_builddir)/lib/libUniSet.la
test_LDADD
=
$(top_builddir)
/lib/libUniSet.la
#
test_SOURCES = TestGen_SK.cc TestGen.cc TestGen-main.cc
test_SOURCES
=
TestGen_SK.cc TestGen.cc TestGen-main.cc
TestGen_SK.cc
:
@PACKAGE@-codegen testgen.src.xm
l
TestGen_SK.cc
:
../@PACKAGE@-codegen testgen.src.xml ../*.xs
l
chmod
'a+x'
@PACKAGE@-codegen
chmod
'a+x'
../
@PACKAGE@-codegen
./
uniset-codegen
--local-include
-l
--ask
-n
TestGen testgen.src.xml
./
testgen.sh
clean-local
:
clean-local
:
rm
-rf
*
_SK.cc
*
_SK.h
*
-main
.cc
rm
-rf
*
_SK.cc
*
_SK.h
*
-main
.cc
\ No newline at end of file
Utilities/codegen/tests/TestGen.cc
0 → 100644
View file @
ed82ce62
// $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
);
}
// -----------------------------------------------------------------------------
Utilities/codegen/tests/TestGen.h
0 → 100644
View file @
ed82ce62
// $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_
// -----------------------------------------------------------------------------
Utilities/codegen/tests/create_links.sh
0 → 100755
View file @
ed82ce62
#!/bin/sh
ln
-s
-f
/usr/bin/uniset-stop.sh stop.sh
ln
-s
-f
../../../conf/test.xml test.xml
Utilities/codegen/tests/start_fg.sh
0 → 100755
View file @
ed82ce62
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment