Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
e84d6b99
Commit
e84d6b99
authored
Dec 06, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt_elog_dump makefile was missing
parent
ae4fbb27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
6 deletions
+74
-6
src/exe/rt_elog_dump/src/os_templ/hw_templ/makefile
src/exe/rt_elog_dump/src/os_templ/hw_templ/makefile
+15
-0
src/exe/rt_elog_dump/src/rt_elog_dump.c
src/exe/rt_elog_dump/src/rt_elog_dump.c
+59
-6
No files found.
src/exe/rt_elog_dump/src/os_templ/hw_templ/makefile
0 → 100644
View file @
e84d6b99
include
$(pwre_dir_symbols)
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq
($($(type_name)_generic_mk),)
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq
($($(type_name)_generic_mk),)
include
$(pwre_sroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include
../../special.mk
-include
../special.mk
-include
special.mk
src/exe/rt_elog_dump/src/rt_elog_dump.c
View file @
e84d6b99
/*
* Proview Open Source Process Control.
* Copyright (C) 2005-2012 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
/* rt_elog_dump.c -- <short description>
Author Jonas Nylund.
...
...
@@ -38,11 +74,28 @@ void convertEventPrio(int prio, char *ret);
DB
*
dataBaseP
=
NULL
;
void
usage
()
{
printf
(
"
\n
"
" rt_elog_dump Dump eventlog to text file
\n
"
"
\n
"
" > rt_elog_dump [dumpfile] [database]
\n
"
"
\n
"
" dumpfile Name of dumpfile, default "
DUMPFILE
"
\n
"
" database Database file, default "
DATABASE
"
\n\n
"
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
FILE
*
outFile
;
pwr_tInt32
ret
;
if
(
argc
>
1
&&
(
strcmp
(
argv
[
1
],
"-h"
)
==
0
||
strcmp
(
argv
[
1
],
"--help"
)
==
0
))
{
usage
();
exit
(
0
);
}
if
(
argc
==
3
)
{
if
(
argv
[
2
]
!=
NULL
)
...
...
@@ -53,7 +106,7 @@ main (int argc, char *argv[])
if
(
outFile
==
NULL
)
{
printf
(
"
kunde ej skapa fil, avslutar
"
);
printf
(
"
** Unable to open file, terminating
\n
"
);
exit
(
1
);
}
if
(
argc
>
1
)
...
...
@@ -67,9 +120,9 @@ main (int argc, char *argv[])
printf
(
"error db_close: %s
\n
"
,
db_strerror
(
ret
));
}
if
(
argc
==
3
)
printf
(
"
Programmet klart resultatet finns i filen
%s
\n
"
,
argv
[
2
]);
printf
(
"
-- Dumpfile successfully created,
%s
\n
"
,
argv
[
2
]);
else
printf
(
"
Programmet klart resultatet finns i filen
%s
\n
"
,
DUMPFILE
);
printf
(
"
-- Dumpfile successfully created,
%s
\n
"
,
DUMPFILE
);
return
0
;
}
...
...
@@ -87,7 +140,7 @@ Init (char *fname)
{
/*error creating db-handle send the mess to errh, then exit*/
printf
(
"error db_create: %s
\n
"
,
db_strerror
(
ret
));
printf
(
"
Fel vid skapande av databashandtag avslutar
\n
"
);
printf
(
"
** Error when creating db handle, terminating
\n
"
);
exit
(
1
);
}
...
...
@@ -144,10 +197,10 @@ void ReadFromDBAndPutInFile(FILE *outFile)
if
(
ret
!=
DB_NOTFOUND
)
{
printf
(
"error dbcp->c_get: %s
\n
"
,
db_strerror
(
ret
));
printf
(
"
Fel vid frsk att lsa post nr %u, avslutar
\n
"
,
nrOfEvents
);
printf
(
"
** Error reading post number %u, terminating
\n
"
,
nrOfEvents
);
exit
(
1
);
}
printf
(
"
Antal hndelser skrivna till fil:
%u
\n
"
,
nrOfEvents
);
printf
(
"
-- Number of events written to file
: %u
\n
"
,
nrOfEvents
);
/*Close the cursor*/
if
((
ret
=
dbcp
->
c_close
(
dbcp
))
!=
0
)
{
...
...
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